An optical switching apparatus includes an optical switch having a plurality
of
input ports and output ports, optical amplifiers, monitor circuits, optical amplifiers
monitor circuits, and a controller that controls the optical switch. The optical
amplifiers are connected to the input ports of the optical switch. The monitor
circuits are connected to the output ports of the optical switch. The controller
selects one of the plurality of the monitor circuits based on predetermined rules
to obtains the loss at the output ports and/or the differential loss between the
channels of the optical switch. The controller further selects one of the optical
amplifiers based on the configuration of the optical switch to compensate the loss
and the differential loss among the different channels of the optical switch by
pre-amplifying the optical signals before they reach the input ports of the optical switch.