I. Introduction
Undulators are used in synchrotrons as sources for high brilliance X-ray beams [1]. For an undulator the important figures of merit are the phase error and the field integrals, where the field integrals along the beam axis should ideally be zero so that there is no effect on the electron beam orbit. The phase error is related to the quality of the emitted radiation. In order to obtain a photon beam with high brightness all photons emitted along the trajectory of one single electron must have a constant phase relation so that they interfere constructively. The phase and the wavelength are determined by the period length, field strength and the beam energy. If one of these parameters deviates in one or several periods the photons are not in phase.