Quadrupole Shapes

The usual practice of constructing quadrupoles from truncated cylindrical hyperbolae is put into question. A new shape is proposed. This shape has an analytic potential function. The exact shape of the analytic quadrupole may be impractical, but in the short case where aspect ratio ≈ 1, pole shapes can be spherical. The optimal spherical radius is found to be 1.65 times the aperture radius. An example is also given demonstrating that in the long quad limit, the aberrations of order 5 and higher are much lower for the optimized shape.


I. INTRODUCTION
The multipole elements commonly used to control charged particle beams correspond to solution terms of the Laplace equation ∇ 2 V = 0, namely, in polar coordinates (r, θ), r n cos nθ in the system where the potential on axis is zero. Thus n = 2 for a quadrupole, 3 for a sextupole, etc. This implicitly assumes the elements are infinitely extended in the axial (z) direction, and of course in real beamlines, they are not. For n = 2, the intended linear dependence of the fields upon transverse coordinate is thus broken by the finiteness of the quadrupole. This results in nonlinear force terms and aberrations.
It is not obvious how to terminate the poles of a quadrupole. Often, they are simply truncated. Does the shape in the longitudinal direction matter? And if so, what shape is optimal? For very long quadrupoles, it can be argued that hyperbolic equipotential surfaces given by r 2 cos 2θ = constant are optimal. However, this is only true sufficiently far from the ends; for quadrupoles whose length is comparable to or shorter than the aperture, the 2-D hyperbolic shape is clearly not optimal. What then is the optimal shape of quadrupoles in the short limit? What is the optimal shape in the long limit? Answering these questions is the subject of this paper.

A. Hardness of the fringe field
In the limit where the fringe field extent is short compared with the focal length of the quadrupole, the lowest order aberration (cubic force) effect is independent of fringe field shape. This was shown in 1997 [1].
Let the strength function of the quadrupole be k(z). Rigourously, this means ∂ xx V = −∂ yy V = k(z) along the axis x = y = 0, so that In the "hard-edge" limit, k is a step function. But using a discontinuous step function instead of an analytic function to calculate the optics leads to dramatically incorrect results. It is thus regrettable that almost all the major higher order optics codes allow calculation of third order optics in the "no fringe field" case. This case is unphysical because it brings a particle from the field-free region outside the quadrupole instantaneously into the region where k = 0 without traversing intermediate fields. For example, for electrostatic quadrupoles, this violates conservation of energy as the potential energy is thereby incremented without changing the kinetic energy (in magnetic quadrupoles, angular momentum conservation is violated).
Once the neophyte beamline designer has learned that the third order aberrations calculated without fringe fields are incorrect, he/she is still left with the impression that the fringe field is at fault and customizing it in some way will improve the third order optics. Further, of quadrupoles with the same effective length, those with short fringe fields are erroneously thought to be superior even though this often means they have smaller aperture. In fact, such quadrupoles are inferior, as their fifth order aberrations are worse: it can be shown that in the hard-edge limit, fifth order aberrations are singular [2].

B. Simplified fringe fields
We are thus drawn towards fringe fields that are "soft" as opposed to "hard". In this limit, in the case of short quadrupoles, we dispense with the idealized 2-D hyperbolic shape, as there is anyway no region of the quadrupole that is sufficiently far from the fringe field. In other words, the quadrupole has no flat area where k(z) = k 0 , a constant.
A common calculational technique is to fit the fringe field to a so-called Enge function [3]: where D is the aperture diameter. Generally one uses up to N = 6 coefficients. This function has the advantages that it is analytic, and tends realistically (exponentially) to asymptotic values. On the other hand, the Enge coefficients a m are not directly related to any physical parameter. For example, varying any one of the a m changes the quadrupole's effective length. Further, the hardness of the fringe field is not given by a single parameter but rather by a combination of all 6. This makes it difficult for a designer to learn for example that the third order aberration is insensitive to fringe field hardness. A useful approximation is to set all Enge coefficients except a 1 to zero [4]. In that case, varying a 1 changes fringe field hardness without shifting the effective field boundary. The edge function becomes: To simplify notation, let us measure z in units of 2D/a 1 (effectively, the fringe field thickness). In this way, we can write the strength function of a full quadrupole of effective length L as Comparing quadrupoles of differing lengths, we wish the integrated strength K = kdz = k 0 L to remain constant, so write k as: In the short limit, we have simply that k is the derivative of tanh:

II. PROPERTIES OF THE SECH-SQUARED QUAD
From this strength function, we can derive the potential V for all of space using the technique of analytic continuation given by Derevjankin [5] (this reference is in Russian, but referred to by Vasil'ev [6]): We find: See Fig. 1 where equipotential contours are plotted using as scaling potential V 0 ≡ V ( π 4 , 0, 0) = K 4 log 2. The properties of V are perhaps more readily apparent if it is written in real form: Let F = ∇V denote the magnetic field or electric field as appropriate for magnetic or electrostatic quadrupoles. This has components: sin 2y cos 2y + cosh 2z = − K 2 sin y cos y cos 2 y + sinh 2 z (11) sinh 2z cos 2x + cosh 2z + sinh 2z cos 2y + cosh 2z (12) These make apparent the fact that the transverse fields are nonlinear; at z = 0, F x ∝ tan x, F y ∝ tan y. Nevertheless, the integral of the transverse field is exactly linear: and similarly, F y dz = −Ky. The reason for this behaviour is that farther from axis, the transverse field is stronger at z = 0, but weaker at the tails (it's 'peakier'). This is clarified in Fig. 2. Lastly, the integrated gradient is independent of x and y:  Neither eqn. 13 nor eqn. 14 are surprises: from the symmetry and Laplace's equation, it can be shown that the following expansion holds: Taking derivatives to find the fields, and integrating for constant x, y, we see that eqns. 13 and 14 hold for any choice of k(z).

III. EXAMPLE QUADRUPOLES
The potential V of the sech 2 quadrupole is periodic with period π in the x and y directions. At large z, the cancellation of this grid of alternating sign potentials ensures the rapid exponential falloff of the field. This is somewhat realistic. In the case of electrostatic quadrupoles, the ground planes dashed in Fig. 1 can be thought of as some approximation of the beam pipe. In magnetic quadrupoles the yoke takes the place of the ground surfaces. The yoke's proximity to the pole faces results in a characteristically quicker falloff as can be seen in Fig. 3, where the ideal sech 2 quadrupole is compared with a real quadrupole, namely, the TRIUMF 12Q12 (more on this quadrupole below).
Four choices of equipotential surfaces are shown in Fig. 4, oriented so that the quadrupole axis is vertical. Note the top left case is most like a long conventional quadrupole; the most significant difference being that the inside diameter varies along its length, as indicated by the V = ± V0 16 curves in the plot of Fig. 1. The lower right case in Fig. 4 would not give the correct fields without the 4 ground planes as the boundaries given by the 4 slender rods alone are insufficient. But the longer quadrupole (upper left in Fig. 4) case would work quite accurately without the ground planes. 155. 6 . The continuous curve is the magnetic field at this same radius using eqn. 8, normalized to agree at z = 0.
As will be shown, this design has smaller aberrations than conventional designs, i.e. poles having constant xy cross section, truncated at each end. The only disadvantage is that the shape is rather more difficult to fabricate, having curvature on all directions.

A. Short Quadrupole Shapes
In the lower left of Fig. 4 (where the surfaces are strikingly similar in shape to four American regulation footballs) the potential of the shown surfaces is ±V 0 and the curvature of the pole in the longitudinal direction is the same as in the transverse direction. This is an attractive feature because it allows as a good approximation for the pole to be symmetric along its axis, terminating in a spherical shape. What is the pole curvature that achieves this?
The radii of curvature of the equipotential surfaces in the z = 0 plane are: and similarly, in the y = 0 plane, replace y by z. Evaluated at the pole-tip y = z = 0, we find the surprisingly simple expressions: (the negative signs mean that the curvature is away from the origin). Thus, at the normalized aperture radius x = π/4, we find the curvatures are equal and both equal 1. Or, in other words, the curvature of the pole-tip is to be pole-tip curvature = 4 π (aperture radius).
This (4/π) is substantially different from the ratio of 1.145 used for quadrupoles whose poles are circular in cross section across the axis. The latter is derived by reducing the 12-pole (duodecapole) to zero for the 2D case (infinitely long quadrupoles) [7]. As the xy cross section is nearly hyperbolic, while the xz cross section is nearly a circle, it is clear that choosing a hyperboloid of revolution as shape is no better than choosing a spherical shape. The latter has the advantage that it is simpler to specify to the machinist.
As evident in the comparison in Fig. 5, the shape used for practicality, namely cylindrical poles terminating in a spherical pole-face, omits important parts of the "football" (the triangular regions either side of the poles in Fig. 5). This will have two effects: the quadrupole strength function k(z) will not precisely follow a sech 2 law, and there will be some integrated 12-pole. The former is of little consequence, but the latter can cause aberration. However, just as with the case of the 2D quadrupole, we can alter the radius of curvature of the pole face to compensate the 12-pole.
(20-pole and higher are not of course compensated in this technique but made slightly worse.) In order to find the curvature radius that zeroes out the integrated 12-pole, Laplace's equation was solved for a 3D boundary model, using a uniform rectangular mesh in xyz of 100 × 100 × 300 increments for 1/16 of the quadrupole. The 12-pole integrated strength was found from a polynomial fit as outlined in Appendix A. The speed of convergence of the relaxation calculation was markedly increased when initialized with the function eqn. 8.
The result found is that the radius of curvature in units of the aperture radius is 1.65 ± 0.05: spherical pole-tip radius = 1.65 × (aperture radius).
The uncertainty arises from the grid coarseness and also from the variation due to surfaces "behind" the pole; surfaces which the engineer would be free to optimize for practicality. The potential on these surfaces also depends upon the insulator design in the case of electrostatic quadrupoles and the coil layout in the magnetic case. This curvature is shown as the red curve in Fig. 6: one observes that it bulges past the "football" curve slightly on either side of centre. The blue curve is seen to properly match the "football" curve at the centre, and the green curvature, which is commonly used for such quadrupoles, is seen to not match the desired curvature at all. Reminder: the curvature of the ideal football shape in the direction orthogonal to the plane of the figure is essentially the blue curve.

B. The "12Q12" design
In the past, the short quadrupoles that have used rounded poles have used curvatures that are too sharp and as a result the 12-pole does not integrate to zero. See Reeve et al. [8]. Of course, the point harmonic A 6 (z) is not zero, but ∝ k (z) even for the ideal pure quadrupole case. See Fig. 7 for k = sech 2 (z). What is found in actuality is for example Fig. 11 of Reeve et al. (1976) [8]: the 12-pole looks like Fig. 7 on top of a nonzero background that is due to the incorrect pole curvature.
Recently, quadrupoles of the design "12Q12/1.5" were constructed by Scanditronix Magnet AB [9] for TRIUMF [10]. Their integrated multipole components were measured, also by Scanditronix, using a rotating coil. These magnets' radius of curvature near the pole centre is 1.14 times the aperture radius, which, as stated above, is too small by a factor 1.44, but this was partially offset by using a hyperboloid rather than a spherical shape. The 12-pole component was found to be roughly 20 times larger than the other multipoles: 0.0032 times the quadrupole field, at a radius of 94 mm, where the aperture radius is 155.6 mm. Converted to multipole potential A 6 , this is A 6 dz/ A 2 dz = 0.80%. The calculation technique described above, using 3 × 10 6 mesh points and fitting the power law eqn. A4 gave, for the same geometry, 0.85%; in fairly good agreement. At < 1%, these may seem small but one should remember e.g. that the x 4 y 2 term in the potential is 15 times larger than the x 6 term (see eqn. A8).

C. Long Quadrupole Example
The aim of this example is to demonstrate that the conventional design quadrupole with a "tophat"-shaped strength function, has higher aberrations than the sech 2 quadrupole. Sech 2 quadrupoles need not be short. Refer to the V = ± V0 16 equipotentials in Fig.1 to observe the shape of a long sech 2 quadrupole. The main difference in comparison with conventional quads is that the strength varies continuously along the quad. One method of obtaining this is to flare the aperture, varying it continuously from centre outward. Admittedly, this complicates the design and would increase the construction cost, especially for superconducting quads.
For illustration, we take as an extreme example the CERN LHC β quadrupoles. We take as round figures, a length of 6 m, aperture radius of 35 mm, gradient of 200 T/m, and use the Enge coefficients of the "LHCHGQ" [11]. We construct a model sech 2 quadrupole of the same integrated Note that the latter quad would be impractical on two counts: its field extends outside the 6 m space allotted in the LHC, and it would need to be 1.5 times stronger at its peak. The comparison is only to illustrate that quads with optimally soft fringe fields have lower fifth and higher order aberrations.
strength (1200 T), and same integrated squared strength of 240,000 T 2 /m. This latter ensures that the third order aberrations are the same [1]. The Sech 2 strength function scaled to satisfy these two integrals is Using COSY-∞ [12] and a proton energy of 7 TeV, we compared the aberrations to seventh order; these are shown in Table 1. (For the LHCHGQ, we had to modify slightly the COSY-∞ routine FFELE as the fringe field given in ref. [11] has an anomalously large extent). For the implementation of the sech 2 quadrupole in COSY-∞, see Appendix B.
As expected, the third order aberrations are the same for the two types. The thin lens formula for the aberrations is [1]:  These agree well with the values in the table, when the thick lens effect is taken into account. (This reduces the aberration effect in the focusing direction and exacerbates in the defocusing direction.) But at higher than third order, the aberrations are not at all the same. The fifth order aberrations are about 200 times smaller for the sech 2 quadrupole, and the largest seventh order coefficients are roughly 100,000 times smaller for the sech 2 quadrupole. For ninth order, the ratio is 10 8 .
It is doubtful that a superconducting quadrupole with eqn. 20 as strength function is at all feasible, and in any case would be too long to fit into the interaction region of the LHC. Further, there is nothing to suggest that the aberrations calculated for the LHCHGQ quads in any way limit the performance of the LHC. However, this comparative study puts to rest the notion that quadrupoles with smoothly varying strength function, being in a sense "all fringe field" [8], are optically inferior to more conventional quadrupoles with harder edges. In fact, quite the opposite is true.
The k(z) ∝ sech 2 z/D case is not special; any smoothly varying k would have similar low aberration properties. The advantage of the sech 2 case is that there is a handy, simple expression for the potential, and at least in the case of very short quads, this expression is a good approximation.
Thus our results can be understood as follows. In the traditional design, the poles terminate abruptly, and this results in aberrations that scale with the ratio of beam size to aperture, raised to a power appropriate for the order of the aberration. In the case of the design proposed here, the aberrations scale with the ratio of beam size to quadrupole length, raised to that same power. quadrupole symmetry V (x, y, z) = −V (y, x, z) and that V is even in x and y, V (x, y, z) = ∞ n=0 ∞ m=n+1 a 2m,2n (z) (2m)!(2n)!
From this we confirm that δ 6 dz = 0, so that 1 6! a 60 dz = A 6 dz (A10) Thus, the integrated 12-pole can be found from a fit as per eqn. A4.