short communications
A magnet model for a hybrid undulator assembly
aVTT, Finland
*Correspondence e-mail: matti.ryynanen@vtt.fi
A modelling method, in which a single magnet block is divided into several sub-blocks, is described. It is assumed that each sub-block is polarized homogeneously. The sub-block polarizations are derived with a
which analytically calculates the total magnet values generated by all sub-blocks and fits it to the values measured at the corresponding points in the vicinity of the magnet. The sub-block modellings accomplished show notable improvement in predicting the magnet within the undulator gap when compared with a model based on homogeneously polarized blocks. The sub-block model can also be used when discarding bad magnets from a set. Finally, the results show that the inhomogeneities in individual magnets are one of the major reasons for poor predictability of the undulator field in hybrid devices.Keywords: hybrid undulators; permanent-magnet models; genetic algorithms.
1. Introduction
The field quality of permanent-magnet undulators is limited by the variation of the magnetic polarization within the set of magnet blocks used in the magnetic structure of the devices. By measuring individual magnets and distributing them in the magnet arrays according to a sorting scheme, a vast improvement of the field can be achieved as compared with a random distribution. This process requires that the undulator field can be accurately predicted from the measured properties of the magnets.
Generally, such sorting has been based on the measured integrated polarization (total dipole moment) of the magnet blocks. However, predictions of undulator fields based only on the three components of the integrated polarization have proved to be imprecise.
Better results have been obtained in pure-magnet devices by measuring the field contribution values of the magnets and summing them to form the undulator field. This is also possible for hybrid undulators, but measuring the fields of individual blocks in the ferromagnetic environment where the assembled blocks will be placed is technically complicated. Hybrid undulator fields can also be predicted satisfactorily from integrated polarizations if the magnets between the poles are built up from several small blocks. This method is laborious due to the large number of magnets to be measured, sorted and assembled. In order to avoid this time-consuming and difficult measurement and assembly task, a magnet model in which a large block is made up of individually homogeneous sub-blocks has been developed.
The model is designed for predicting hybrid undulator fields in sorting of the magnet set for assembly. When compared with the integrated measurement sorting, the sub-block method considerably reduces post-assembly shimming.
2. 16-Sub-block model
Undulator magnets were modelled as consisting of rectangular sub-blocks. The fairly thin magnets were divided into sub-blocks on the main faces only, with cutting planes in the main magnetization direction (z direction). Each sub-block was assumed to be homogeneously polarized, with the polarization components fitted with a (GA) (Goldberg, 1989) so that the analytically calculated field values outside the magnet (Maréchal et al., 1990) came close to measured values. The polarization of each sub-block was assumed to be rigid.
The number of sub-blocks was kept to only nine by using only pole sides as sub-block cutting-plane positions. This would provide enough sub-blocks to predict the undulator field. However, since satisfying the inverse problem solution in air requires more sub-blocks, two more cross-cutting planes were added, each bisecting the magnet, raising the number of sub-blocks to 16 (Fig. 1).
3. Fitness function and magnet measurements
The quality of the fitted polarizations (fitness) was the sum of the absolute differences between the analytically calculated values of the z component of the and the corresponding measured values in 93 points on both sides of the block. Essential information received directly from the field measurements was that the values on the central area of the block were often different on opposite sides of the block.
The z component of the local field was measured at a distance of 2 mm from the surface with a Hall-probe-based measurement system. Integrated magnetization for homogenous chromosomes was measured using a Helmholz coil.
4. for fitting of sub-block polarizations
The generated two-dimensional tables (chromosomes) consisted of sub-block polarizations. Two chromosomes were recombined or crossed over so that they described an action where two magnets that have been built up from real rectangular sub-blocks would be divided into two parts to be exchanged to form two new original-size magnets.
New chromosomes were also produced by performing minor random changes (mutations) to existing chromosome elements. Mutations were restricted so that polarization values of the lateral components were kept below 0.05 T and the main polarization value was kept between 1.1 and 1.3 T. The short tests showed that the correct selection of the mutation parameters is crucial. Mutation probability can be high in the very beginning of the fitting but must be reduced considerably after some fitting rounds (generations). An algorithm using two mutation rates proved to function well. In the first stage, some (>10) chromosomes were produced from the initial chromosome by mutating all elements. In the second stage, there was one random element mutation in every recombination with a mutation interval of 0.025 T from the previous element value. The new value was taken with uniform probability from the mutation interval.
5. Selection and population
In each generation the best chromosomes were collected to form a population, from which the best one and a random one were taken for recombination. These two elitist selections make the algorithm resemble greedy GAs (Fanni et al., 1997) and local hill-climbing optimization methods.
The influence of the population size on the fitting was studied with populations of 2, 10, 100, 300 and 500 chromosomes with nine seeds. In tests lasting 5000 generations, small populations adapted faster and to better values than larger populations. In practice, the deviations in the adaptation rapidity are not significant in populations smaller than 50 individuals.
GAs have a tendency to find only local minima, which is also the case with this specific algorithm. Attempts were made to reduce the attraction of local relatively bad minima by editing the elitism. This degenerated the fitting speed so drastically that tests were stopped at an early stage. The decision was made to use two-stage modelling with a very elitist GA. The first five short (200 generations) fittings were calculated with five different seeds and a homogeneous chromosome as the initial chromosome. In the second stage, one seed was used with the best chromosome of the previous stage as the initial chromosome.
6. Modelling results
The fitting improvement almost stagnated when the fitness had improved by about half an order of magnitude from the initial homogeneous magnet values. The standard deviation of the fitness values of the magnet set was approximately 25% throughout the process. The fitness values of the homogenous chromosomes and modelled chromosomes after 1000 generations of the second modelling stage are presented in Fig. 2.
Magnets generating markedly different absolute field values on opposite sides of the central area of the block always modelled with polarization vectors that were oriented in a flower-bunch-like shape of considerable symmetry (all Jx + Jy pointing symmetrically outwards or inwards in the side sub-blocks; Fig. 1). This kind of inhomogeneity is a well known feature of NdFeB magnets. It can be the result of the orientation of the magnet powder in an inhomogeneous magnet field or may develop at later processing stages such as compressing or sintering. Orientation errors due to an inhomogeneous orientation field are difficult to avoid in blocks that have large dimensions in the direction of easy magnetization. The same is of course true for smaller pieces cut from such a large block. All blocks described in this paper were oriented as single pieces and isostatically compressed. Despite this, there were large variations in the between blocks from the same batch. These variations are ascribed to fluctuations in the compacting and sintering processes but no clean-cut explanation has been found. These variations were clearly seen in measurements and modelled using 16-sub-block modelling. The magnet sets comprised relatively homogeneous magnets and a wide spectrum of magnets with different symmetrical or localized fluctuations in polarization.
The symmetrical inhomogeneity explains the poor results of the hybrid undulator magnet sortings based on the homogeneous magnet model. The strong effect of this kind of inhomogeneity on the hybrid undulator field is due to the ferromagnetic poles in contact with the magnet blocks. Because of the symmetrical orientation of Jx + Jy the potential of the poles on both sides of such a magnet is shifted in the same direction. This potential shift can be clearly seen in the integral of the undulator field. It is the part of the magnet that `overhangs' the pole which produces this effect (ten of the 16 sub-blocks). The part of the magnet that lies sandwiched between the pole faces is fairly effectively screened by the pole. This serious effect of a symmetrical inhomogeneity passes completely unnoticed in the homogeneous model.
If there are extra undulator magnets, it is reasonable to discharge the magnets that have a large fitness in the 16-sub-block model. If the full 16-sub-block-model-based sorting is considered too laborious, some improvement of the sorting based on integrated polarization can be achieved by discarding blocks that have large differences in the
at opposite sides of the central area.7. Undulator field predictions
Two magnet sets have been modelled with the 16-sub-block method: magnets for MAXII undulator U5.2 (U1) and undulator U5.88 (U2). Both U1 and U2 were sorted with a similar genetic process, using the r.m.s. phase error of the undulator field as the fitness parameter. The chromosomes of U1 were degenerated to
with measured integrated magnetization values. The 16-sub-block model field prediction for U1 was made afterwards from the assembled configuration. U2 was sorted using the 16-sub-block model.Field predictions for the complete undulators were summed up by linear superposition of field predictions for single blocks, which were again summed up from the sub-block fields. Unit effects for each polarization component of each sub-block position (48 in total) were derived from three-dimensional FEM calculations. The FEM models were 1.5 periods long with the sub-blocks in the centre, comprising eight poles altogether. The fields were calculated on the optical axis between the centres of the end-poles. The separation of the field points was 1.0 mm for U1 and 0.98 mm for U2.
The measured phase error of U1 was more than 20° higher than the predicted value, while in U2 the difference was less than 4°.
To visualize the field prediction quality, the first integral of the measured U1 field with two predicted integrals are presented in Fig. 3. One of the predictions is based on the homogeneous model and the other on the 16-sub-block model. The corresponding two predictions for the U2 field do not differ from each other to such a great extent as the predictions for U1, which confirms the assumption that inhomogeneities in magnet blocks constitute one major reason for poor predictability of hybrid undulator fields.
References
Fanni, A., Marchesi, M., Serri, A. & Usai, M. (1997). IEEE Trans. Magn. 33, 1900–1903. CrossRef Web of Science
Goldberg, D. E. (1989). Genetic Algorithms in Search, Optimation and Machine Learning. Reading, MA: Addison Wesley.
Maréchal, X. M., Chavanne, J. & Elleaume, P. (1990). Magnetic Field Generated by Parallelepiped Permanent-Magnet Block. ESRF-Synchrotron Radiation/ID-9037. ESRF, Grenoble, France.
© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.