A method and apparatus to automatically control an output power of a laser
diode, include generating an error voltage between an output voltage of
the laser diode sampled during an automatic power control period and a
reference voltage, and performing proportional-integral processing on the
error voltage to generate a compensated control voltage and applying the
compensated control voltage to the laser diode.