An apparatus is directed to controlling a light source. The apparatus
provides at least one light source that emits a light signal at a
discrete frequency and a reference signal at the discrete frequency. The
apparatus further includes a photodetector optically coupled to the light
source and designed to receive the light signal. The apparatus
additionally includes at least one lock-in system coupled to the
photodetector and each light source that receives the light signal from
the photodetector and receives the reference signal from the light
source. Each lock-in system produces an intensity value of the light
source based on the light signal and the reference signal. The lock-in
system may include a frequency multiplier and a filter coupled to the
frequency multiplier wherein the intensity value is the product of the
light signal and the reference signal processed through the frequency
multiplier, and filtered to remove non-dc portions.