The adjustment procedure for the UCSB Free-Electron Laser undulators is based on a three dimensional analytical model of the field
perturbation, along the undulator's axis, in response to a displacement of any one of the 2*n* ferro-magnetic pole tips,
where *n* is the number of pole positions (two per period).

The longitudinal axis is *z*, and the transverse axes are *x* and *y* with the main field directed along *y* as shown.

A simple two dimensional analytical model of the unperturbed fields in *z* and *y* can be derived by treating the
ferromagnetic pole tips as scaler magnetic equipotential surfaces (equivalent to assuming infinite permeability). To solve Laplace's
equation, , as a periodic boundary value problem
, a region is chosen with an upper boundary represented by the Fourier series

By symmetry, the lower and left potentials are zero and on the right. The solution, by separation
of variables, yields the expansion of as a Fourier series in *z*

For coordinates chosen such that at the upper boundary

where *w* is the pole thickness,

These relate the hypothetical _{0} to the actual *B* determined numerically.
If a single pole tip is displaced by *d*, then the new fields, by the principle of superposition, can be modeled
as the sum of *bar B* from (1) and from a simple model of dipole fields created by
potential surfaces _{0} and -_{0} of
width *w* at the original and displaced tip positions *y* and *y-d*. The latter results in

The simultaneous tilt of opposed pole tips generates an *x* axis field proportionality

These field perturbations are attenuated by the shielding effect of adjacent ferromagnetic pole tips and an empirically derived correction of the form was applied.

**Fig. 2** a, b, and c are plots of the perturbing fields as a function of
distance from a displaced pole tip.

Prior to adjustment, field measurements yield a set of *n* values of *B _{y}*

A set of *2n* equations

describes the difference between the desired field *B _{d}* and the measured field

Although each pole has two degrees of freedom representing in-out and tilt motions, a correlation must exist for the x
correction, that is, opposing poles are constrained to tilt only by equal and opposite amounts to avoid generation of a
quadrupole field. No provisions have been made for measuring such a field, but in principle, it could be done and another
set of matrix elements used to correct it. For our purposes this was deemed unnecessary. To provide the required correlation,
a separate *J* matrix is used for *x*. In accordance with (2), the final displacement for each screw is

The solution may be considered a quasi-Newtonian optimization, but if initial errors are not more than a few percent, convergence is rapid with about three iterations required.