Automatic differentiation (AD) is a new and promising method in numerical a
nalysis. In this paper, the general principle of automatic differentiation
method for charged particle optics is given. The aberration analysis of rot
ationally symmetric systems as well as deflection systems using AD method i
s thoroughly studied, and the extraction of Gaussian properties and third-o
rder geometric aberration coefficients from the AD results are obtained. As
examples, the Gaussian properties and the third-order geometric aberration
s of bell-shaped magnetic lens and saddle-coil magnetic deflector have been
calculated, and the results are of high accuracy. It is proved that the AD
method is an elegant and high-accurate approach for the numerical analysis
of aberrations of charged particle optical systems.