A light source and method for controlling the same. The light source utilizes
a
light generator that generates a light signal of a wavelength at an intensity that
is set by a control signal. The control signal is controlled by a servo that monitors
the light output of the light generator and compares the monitored value with a
target value. When the target value is changed, the control signal is initially
replaced by a predicted control signal based on the new target value rather than
the error signal generated in the servo. This provides time for the servo to adjust
to the new target value. In one embodiment, the control signal includes a periodic
signal that switches between a value that causes the light generator to generate
light of the wavelength and a second value at which the light generator does not
generate light of the wavelength.