An increasing offset between the optical phase and the maximum of the wave envelope of an optical pulse can be seen on the right. 
Each line is displaced from a harmonic of the repetition rate by the carrier–envelope offset frequency.  The carrier–envelope offset frequency is the rate at which the peak of the carrier frequency slips from the peak of the pulse envelope on a pulse-to-pulse basis.
Measurement of the carrier–envelope offset frequency is usually done with a self-referencing technique, in which the phase of one part of the spectrum is compared to its harmonic. Different possible approaches for carrier–envelope offset phase control were proposed in 1999. The two simplest approaches, which require only one nonlinear optical process, are described in the following.
In the "f − 2f" technique, light at the lower-energy side of the broadened spectrum is doubled using second-harmonic generation (SHG) in a nonlinear crystal, and a heterodyne beat is generated between that and light at the same wavelength on the upper-energy side of the spectrum.  This beat signal, detectable with a photodiode, includes a difference-frequency component, which is the carrier–envelope offset frequency.
Alternatively, difference-frequency generation (DFG) can be used. From light of opposite ends of the broadened spectrum the difference frequency is generated in a nonlinear crystal, and a heterodyne beat between this mixing product and light at the same wavelength of the original spectrum is measured.  This beat frequency, detectable with a photodiode, is the carrier–envelope offset frequency.
Because the phase is measured directly, and not the frequency, it is possible to set the frequency to zero and additionally lock the phase, but because the intensity of the laser and this detector is not very stable, and because the whole spectrum beats in phase,
one has to lock the phase on a fraction of the repetition rate.