Abstract:
A photo amplifying apparatus for amplifying wavelength division multiplexed signals includes a specific wavelength measuring unit for measuring a specific wavelength at a measuring point, a total power measuring unit for measuring all wavelengths at the measuring point, and an output control unit for controlling the output of the photo amplifying apparatus based on the light power measured by the specific wavelength measuring unit and the total power measuring unit. Since the photo amplifying apparatus measures both the specific wavelength and all wavelengths, the photo amplifying apparatus can determine change in the number of multiplexed wavelengths and the gain gradient of the photo signals, and can properly control its output level.

Description:
BACKGROUND OF THE INVENTION 
   1. Field of the Invention 
   The present invention generally relates to a photo (light) amplifying apparatus, and more particularly, to a photo amplifying apparatus for amplifying wavelength division multiplexing (WDM) signals that includes a measuring unit that measures the power of a specific wavelength, a measuring unit that measures the total power of all wavelengths, and a controlling unit that controls the output power of the photo amplifying apparatus. 
   2. Description of the Related Art 
   Wavelength division multiplexing (WDM) is a pervading broad band technology in which a plurality of photo signals of different wavelengths is transmitted via a single optical transmission path. 
   The wavelength division multiplexing technology is applied to multi-channel optical communications of various distances. In practice, wavelength division multiplexing communication systems are required to flexibly support optical communications of various wavelengths and distances. 
   In general, a WDM photo amplifying apparatus of the WDM communication system amplifies photo signals so that the output power of output photo signals of each wavelength becomes equal. To achieve this object, the WDM photo amplifying apparatus controls excitation light sources and optical attenuators provided therein based on information about the power of photo signals monitored at various stages in the optical path and information for setting gain, the number of wavelengths, and output power, for example, received from an exterior resource. 
     FIG. 1  is a schematic diagram showing a conventional photo amplifying apparatus. The photo amplifying apparatus shown in  FIG. 1  includes photo amplifying units  1 ,  2 , a variable optical attenuator  6 , a control unit  7 , optical splitters  12 - 15 , and photo diodes (optical monitors)  32 - 35 . 
   The photo amplifying units  1 ,  2  further include Erbium-doped Fiber Amplifiers (EDFA)  3 ,  4 , laser diodes (excitation light sources)  21 ,  22 , and wavelength mixers  41 ,  42 , respectively. The photo amplifying unit  1  further includes a gain equalizer  5 . 
   The EDFAs  3 ,  4  are excited by the laser diodes  21 ,  22 , respectively. 
     FIG. 2  is a graph showing the distribution of power (dBm) over wavelength (nm) of wavelength division multiplexing signals. As shown in  FIG. 2 , X in , denotes the power of photo signals of each wavelength λ 1 -λn. The WDM signal having the power distribution shown in  FIG. 2  is input to the photo amplifying apparatus via a input terminal IN. A fraction of the input photo signals is split from the main signal by the photo splitter (photo coupler)  12 , and converted into an electric signal by the photo diode  32 . 
     FIG. 3  is a schematic diagram showing the power of the photo signals monitored by the photo diode  32 . The output of the photo diode  32  depends only on the total power (=X in +10×log(n)) of photo signals over all wavelengths λ 1 -λn. Likewise, the outputs of the photo diodes  33 - 35  depend only on the total power of photo signals over all wavelengths λ 1 -λn incoming to the photo splitters  13 - 15 , respectively. 
   The control unit  7  controls the power of each stage based on the total power of the photo signals over all wavelengths λ 1 -λn monitored by the photo diodes  32 - 35 . As a result, the photo amplifying apparatus shown in  FIG. 1  outputs the objective output photo signals via an output terminal OUT. 
     FIG. 4  is a schematic diagram for explaining the automatic level control (ALC) performed by the control unit  7 . The control unit  7  of the photo amplifying apparatus shown in  FIG. 1  automatically controls the optical level of each stage as follows:
         (1) Controlling the laser diode (excitation light source)  21  so that the difference between the output P PD33  of the photo diode  33  and the output P PD32  of the photo diode  32  becomes constant.
 
 P   PD33   −P   PD32   =A (constant)  (1)
   (2) Controlling the laser diode (excitation light source)  22  so that the difference between the output P PD35  of the photo diode  35  and the output P PD34  of the photo diode  34  becomes constant.
 
 P   PD35   −P   PD34   =B (constant)  (2)
       
   In the case that the photo amplifying unit  1  (or  2 ) cannot achieve a predetermined gain A (or B), the control unit  7  raises the gain of the photo amplifying unit  2  (or  1 ) so as to make A+B constant. 
   (3) Controlling the variable attenuator  6  so that the output power from the output terminal OUT reaches the objective output level. 
   As a result of the above automatic gain control, an output of which level is determined based on the number of wavelengths is obtained via the output terminal OUT. 
     FIGS. 5A and 5B  are schematic diagrams for explaining a problem that occurs in the case wherein the control unit  7  fails to control the output from the output terminal OUT at the level determined based on the number of wavelengths. 
     FIG. 5A  illustrates the case wherein two wavelengths are used. The output powers of both wavelengths λ 1 , λ 2  are assumed to be equal to the same value X in . Under such a condition, the case in which the light source of the wavelength λ 2  accidentally malfunctions is examined below. 
   Since the number of wavelengths to be amplified by the photo amplifying apparatus is reduced from two wavelengths to one wavelength, the output level of the photo amplifying apparatus is expected to be halved. However, if the control unit  7  is not informed that the number of input wavelengths is reduced to one, the control unit  7  compensates for the reduction in power level caused by the disappearance of wavelength λ 2  by increasing the output level of λ 1 . Consequently, the control unit  7  cannot keep the output level per wavelength constant. 
   To solve this problem, in a large-capacity long-distance WDM communication system, an upper-rank photo transmitting apparatus informs the photo amplifying apparatus of a lower-rank photo transmitting apparatus of information such as the number of wavelengths and the output level of each wavelength to configure the photo amplifying apparatus of the lower rank photo transmitting apparatus. 
   The control unit  7  of the photo amplifying apparatus of the lower-rank photo transmitting apparatus controls the output based on the information (configuration information) received from the upper-rank photo transmitting apparatus so that the output power of the photo amplifying apparatus is kept at the level corresponding to the number of wavelengths. 
   Since the properties of optical parts built in conventional photo amplifying apparatuses are dispersed, the conventional photo amplifying apparatuses are adjusted one by one in an adjustment process of production so that the gradient of gain over wavelength becomes flat and the gains satisfy the following equations:
 
 P   PD33   −P   PD32   =A (dB)(constant), and  (1)
 
 P   PD35   −P   PD34   =B (dB)(constant)  (2)
 
   Japanese Patent Laid-open Application No. 2000-312046 discloses a technique with which difference between gains of a photo amplifying apparatus determined by various input wavelengths caused by change in optical fiber loss can be eliminated. According to this application, a controlling unit built into the photo amplifying apparatus controls the operation of the photo amplifying apparatus based on the intensity of received reference light. 
   Japanese Patent Laid-open Application No. 2000-196169 discloses a technique for a photo amplifying apparatus of a WDM communication system that multiplexes and transmits a plurality of photo signals with which the degradation of nonlinear property and signal-to-noise ratio due to change in the number of channels is eliminated. According to this application, a photo amplifying apparatus is provided with the following: a first portion including an optical fiber with rare earth element doped, an excitation laser diode, and an automatic optical gain control circuit; a second portion including an optical attenuator and an automatic level control circuit; and a monitor signal processing circuit. Before a change in the number of channels, the photo amplifying apparatus outputs amplifying a WDM signal of which level is determined by the number of channels. When the photo amplifying apparatus is informed of the change in the number of channels, the photo amplifying apparatus temporarily fixes the transmissivity of the optical attenuator, and keeps its gain constant so as to output a photo signal of which level corresponds to the number of channels. After the change in the number of channels, the photo amplifying apparatus resumes controlling the transmissivity of the optical attenuator and its gain. 
   In the case in which a signal of a certain wavelength unexpectedly vanishes due to the malfunction of a light source, for example, the upper-rank photo transmission apparatus determines that the number of wavelengths has changed. After the determination, the upper-rank photo transmission apparatus informs the photo amplifying apparatus of a lower-rank photo transmission apparatus receiving configuration information (the number of wavelengths and the output levels, for example) from the upper-rank photo transmission apparatus, about the change in the number of wavelengths. Accordingly, the photo amplifying apparatus receives the information indicating that the number of wavelengths has changed in a delay (from hundreds of msec to several sec) after the number of wavelengths actually changes. 
   A conventional photo amplifying apparatus absorbs the delay to the extent from hundreds of msec to several sec in the following manner. 
   An optical attenuator with a dead time from hundreds of msec to several sec may be used; the optical attenuator operates with the delay from hundreds of msec to several sec. Even if the photo amplifying apparatus receives the information indicating that the number of wavelengths has changed, during the delay (from hundreds of msec to several sec) after the number of wavelengths actually changes, the optical attenuator does not react. Accordingly, the photo amplifying apparatus is not affected by the delay time. 
   Alternatively, monitoring circuits sampling signal levels at each stage may be required to retain their sampled values for a retention time of about several seconds. Since an optical attenuator is controlled based on the sampled signal levels monitored by the monitoring circuits, the optical attenuator is controlled after the retention time of several seconds. Accordingly, the photo amplifying apparatus can avoid being affected by the delay in receiving the information. 
   However, the time required for the information of the number of wavelengths to be transmitted from the upper-rank photo transmission apparatus to the photo amplifying apparatus depends on the performance of the upper-rank photo transmission apparatus for determining the number of wavelengths, and consequently, differs one after another. There remains a problem in that the above dead time and/or holding time needs to be optimized for each upper rank photo transmission apparatus. 
   Because the total gain of a photo amplifying apparatus is desired to be indifferent for various wavelengths, the gain of the photo amplifying unit of the photo amplifying apparatus needs to be adjusted to compensate for the difference in optical efficiency of the remaining portion of the photo amplifying apparatus other than the photo amplifying unit. 
   Conventionally, the gain of the photo amplifying unit of each WDM photo amplifying apparatus is individually adjusted in the production process based on a test condition (for example the maximum number of wavelengths). Accordingly, if the WDM photo amplifying apparatus is used in practice under a different condition (for example the number of wavelengths) from the test condition defining the maximum number of wavelengths, for example, the desired flatness of the total gain of the WDM photo amplifying apparatus may not be achievable. 
   For example, as shown in  FIG. 6 , even though the photo amplifying apparatus is adjusted in its production process based on the maximum number of wavelengths (ten, for example), the photo amplifying apparatus is often used with the number of wavelengths (seven, for example) being less than the maximum number. In this case, the gain of the photo amplifying apparatus may exhibit a gradient as shown in  FIG. 7 . 
   The invention taught in Japanese Patent Laid-open Application No. 2000-312046 still inherits a problem that the wavelength of the reference light needs to be different from the wavelength of the main signals. Another problem of the invention is that the number of wavelengths cannot be identified. 
   According to the invention taught in Japanese Patent Laid-open Application No. 2000-196169, when the wavelength number is changed, the transmissivity, for example, of the optical attenuator is temporarily fixed, and then, after the wavelength number is changed, the control of the optical attenuator is resumed. This invention also inherits the above problems. 
   SUMMARY OF THE INVENTION 
   Accordingly, it is a general object of the present invention to provide a novel and useful photo amplifying apparatus in which one or more of the problems described above are eliminated. 
   Another and more specific object of the present invention is to provide a photo amplifying apparatus that detects the change in wavelength number and the gain gradient of photo signals based on the photo signals, and controls the output level. 
   To achieve one or more of the above objects, a photo amplifying apparatus for amplifying wavelength division multiplexing signals, according to an aspect of the present invention, includes:
         a specific wavelength measuring unit that measures the light power of photo signals of a specific wavelength at a measuring point;   a total power measuring unit that measures the light power of the photo signals of all wavelengths at the measuring point; and   an output control unit that controls the output of the photo amplifying apparatus based on the light power measured by the partial wavelength measuring unit and the light power measured by the total power measuring unit.       

   The photo amplifying apparatus measures both the light power of a specific wavelength and the light power of all wavelengths at the measuring point. Accordingly, the photo amplifying apparatus can determine a change in the number of multiplexed wavelengths and in the gain gradient of the photo signal based on the measured light power, and can properly control its output level. 
   According to another aspect of the present invention, the photo amplifying apparatus is further characterized in that the specific wavelength measuring unit further includes a variable-wavelength optical filter. 
   Even if a specific wavelength (signal) stops due to a malfunction, for example, the photo amplifying apparatus provided with the variable-wavelength optical filter can switch to an alternative wavelength and continue monitoring the light power of the alternative wavelength. Accordingly, the output control unit can continuously control the photo amplifying apparatus. 
   Other objects, features, and advantages of the present invention will be more apparent from the following detailed description when read in conjunction with the accompanying drawings. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  is a schematic diagram showing a conventional photo amplifying apparatus; 
       FIG. 2  is a graph for explaining photo signals input to a photo amplifying apparatus; 
       FIG. 3  is a graph for explaining the total power of photo signals monitored by a photo diode; 
       FIG. 4  is a graph for explaining the amplification and attenuation of photo signals by a photo amplifying apparatus; 
       FIGS. 5A and 5B  are graphs for explaining a problem caused by the reduction in number of wavelengths; 
       FIG. 6  is a graph for explaining the flatness of gain over the maximum number of wavelengths; 
       FIG. 7  is a graph for explaining the gradient of gain over seven wavelengths; 
       FIG. 8  is a schematic diagram showing a photo amplifying apparatus according to the first embodiment of the present invention; 
       FIG. 9  is a flow chart for obtaining the number of wavelengths; 
       FIG. 10  is a schematic diagram showing a photo amplifying apparatus according to the second embodiment of the present invention; 
       FIG. 11  is a flow chart for making gains flat (constant); 
       FIG. 12  is a circuit diagram for explaining processing for flattening gains; 
       FIG. 13  is a schematic diagram showing a photo amplifying apparatus according to the third embodiment of the present invention; 
       FIG. 14  is a schematic diagram showing a photo amplifying apparatus according to the fourth embodiment of the present invention; 
       FIG. 15  is a schematic diagram showing a photo amplifying apparatus according to the fifth embodiment of the present invention; and 
       FIG. 16  is a schematic diagram showing a photo amplifying apparatus according to the sixth embodiment of the present invention. 
   

   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
   Preferred embodiments of the present invention are described below with reference to the drawings. 
   First Embodiment 
     FIG. 8  is a schematic diagram showing a photo amplifying apparatus according to the first embodiment of the present invention. 
   The photo amplifying apparatus shown in  FIG. 8  includes the following: photo amplifying units  1 ,  2 , a variable optical attenuator  6 , a control unit  7 , optical splitters  11 - 15 , photo diodes  31 - 35 , and a fixed optical filter  51 . 
   The fixed optical filter  51  transmits photo signals of a specific wavelength. The photo amplifying unit  1  further includes a laser diode  21  (excitation light source), a wavelength mixer  41 , EDFA  3 , and gain equalizer  5 . The photo amplifying unit  2  further includes a laser diode  22  (excitation light source), a wavelength mixer  42 , and EDFA  4 . 
   WDM photo signals (wavelengths: λ 1 -λn, intensity X in ) are provided to a photo signal input terminal IN. The input photo signal is amplified by the photo amplifying unit  1 . The amplified photo signal is attenuated down to a predetermined signal level by the variable optical attenuator  6 . The attenuated photo signal is amplified up to a predetermined signal level by the photo amplifying unit  2 . Then the amplified photo signal is output from the photo signal output terminal OUT. 
   The photo diode  31  detects the signal level (P PD31 ) of the photo signal of the specific wavelength transmitting through the fixed optical filter  51 . The photo diode  32  detects the total power P PD32  of photo signals (wavelengths: λ 1 -λn) before being amplified by the photo amplifying unit  1 . Likewise, the photo diode  33  detects the total power P PD33  of photo signals (wavelengths: λ 1 -λn) after being amplified by the photo amplifying unit  1 . 
   The photo diode  34  detects the total power P PD34  of photo signals (wavelengths: λ 1 -λn) before being amplified by the photo amplifying unit  2 . The photo diode  35  detects the total power P PD35  of photo signals (wavelengths: λ 1 -λn) after being amplified by the photo amplifying unit  2 . 
   (1) The control unit  7  of the photo amplifying apparatus controls the laser diode (excitation light source)  21  so that the difference between the output P PD33  of the photo diode  33  and the output P PD32  of the photo diode  32  becomes constant.
 
 P   PD33   −P   PD32   =D (dB)(constant)  (3)
 
   (2) The control unit  7  of the photo amplifying apparatus controls the laser diode (excitation light source)  22  so that the difference between the output P PD35  of the photo diode  35  and the output P PD34  of the photo diode  34  becomes constant.
 
 P   PD35   −P   PD34   =E (dB)(constant)  (4)
 
   (3) If the gain of either the photo amplifying unit  1  or the photo amplifying unit  2  cannot achieve the predetermined gains D or E, the control unit  7  of the photo amplifying apparatus raises the gain of the other photo amplifying unit  2  or the photo amplifying unit  1  so that
 
 D+E =constant  (5)
 
   (4) The control unit  7  of the photo amplifying apparatus controls the variable optical attenuator  6  so that the output power P PD35  from the output terminal OUT is tuned at a target output level. 
   Assuming the light intensity input to the photo signal input terminal IN is “a” (dBm/ch), and the light intensity output from the photo signal output terminal OUT is “b” (dBm/ch), the light intensities P PD31 , P PD32 , and P PD35  monitored by the photo diodes  31 ,  32 , and  35 , respectively, are:
 
 P   PD31   =a (dBm/ch)  (6)
 
 P   PD32   =a +10×log( n )(dBm)[total power]  (7)
 
 P   PD35   =b +10×log( n )(dBm)[total power]  (8)
 
   If the loss of the transmission path connected to the photo signal input terminal IN changes +/−x (dB), the light intensities P PD31  and P PD32  monitored by the photo diodes  31  and  32 , respectively, becomes:
 
 P   PD31   =a±x (dBm/ch)  (9)
 
 P   PD32   =a+ 10×log( n )± x (dBm)  (10)
 
   Assuming the change in the monitored photo intensities P PD31  and P PD32  being Δx1 and Δx2, respectively, the equations (6), (7), (9), and (10) lead to the following relations:
 
Δ x 1 =±x   (11)
 
Δ x 2 =±x   (12)
 
Accordingly, Δx1 and Δx2 are equal.
 
   On the other hand, if the wavelength number changes from “n” to “n±m”, the light intensities P PD31  and P PD32  monitored by the photo diode  31  and the photo diode  32 , respectively, are obtained as follows:
 
 P   PD31   =a (dBm/ch)  (13)
 
 P   PD32   =a+ 10×log( n±m )[total power]  (14)
 
   As is understandable from the above equations, whereas the light intensity P PD31  monitored by the photo diode  31  does not change (Δx1=0), the change Δx2 in the light intensity P PD32  is:
 
Δ x 2=10×log [( n±m )/ n ]  (15)
 
   Accordingly, when detecting change in the input signal level, one can determine whether the change is caused by either the loss of the transmission path or the change in wavelength number by comparing the change Δx1 and Δx2 in the monitored light intensities P PD31  and P PD32 . 
   If the light intensity P PD31  monitored by the photo diode  31  and the light intensity P PD32  monitored by the photo diode  32  change in the same quantity, one can determine that the change in the input signal level is caused by the loss of the transmission path. If the monitored light intensity P PD31  monitored by the photo diode  31  does not change, but the monitored light intensity P PD32  monitored by the photo diode  32  does change, one can determine that the change in the input signal level is caused by the change in wavelength number. 
   Since “n” is known, the change in wavelength number “m” is obtained based on the equation (15) as follows:
 
 m=±n ×(10 Δx2/10 −1)  (16)
 
   Accordingly, the photo amplifying apparatus can identify the current number of wavelengths as soon as the input signal changes without waiting for configuration information about the number of wavelengths to be transmitted from the upper rank monitoring apparatus of the photo amplifying apparatus. Consequently, it is not necessary to set a dead time or a time lag of the photo amplifying apparatus, or optimize the dead time or the time lag depending on the upper rank photo transmission apparatus. 
   Additionally, since the photo amplifying apparatus can identify the number of wavelengths, the photo amplifying apparatus can control the optical attenuator  6  so that the output photo signal achieves a target:
 
b+10×log(n)+10×log [(n±m)/n](dBm)  (17)
 
without waiting for the configuration information transmitted from the upper rank observing apparatus of the photo amplifying apparatus.
 
     FIG. 9  is a flow chart showing the calculation of the number of wavelengths “m” by the control unit  7  of the photo amplifying apparatus shown in  FIG. 8 . 
   The light intensity is monitored by the photo diodes  31  and  32  (step S 2 ). Then, the changes Δx1 and Δx2 in the light intensities monitored by the photo diodes  31  and  32 , respectively, are calculated (step S 3 ). 
   Δx1 and Δx2 are compared (step S 4 ). If Δx1=Δx2, which means that the change in the input signal level is caused by a loss of the transmission path, the process returns to step S 2 . If Δx1≠Δx2, the increased or decreased number of wavelengths is obtained based on the equation (16) (step S 5 ). 
   As described above, since the photo amplifying apparatus shown in  FIG. 8  can alone identify the number of wavelengths, the photo amplifying apparatus does not need to be provided with dead time or retention time of hundreds msec for controlling the photo output signal to be constant. The photo amplifying apparatus consequently can control the photo output signal at high speed. 
   The photo amplifying apparatus detects the change in the number of wavelengths as soon as the change occurs, and controls the photo output signal based on the detected change in the number of wavelengths. Accordingly, the control by the photo amplifying apparatus becomes stable. 
   Second Embodiment 
   The second embodiment of the present invention is described with reference to  FIG. 10 . A photo amplifying apparatus of  FIG. 10  includes the following: photo amplifying units  1 ,  2 , a variable optical attenuator  6 , a control unit  7 , optical splitters  12 - 16 , photo diodes  32 - 36 , and a fixed optical filter  52 . The photo amplifying unit  1  further includes a laser diode (excitation light source)  21 , a wavelength mixer  41 , an EDFA  3 , and a gain equalizer  5 . The photo amplifying unit  2  further includes a laser diode (excitation light source)  22 , a wavelength mixer  42 , and an EDFA  4 . 
   Elements that are identical to those of the photo amplifying apparatus shown in  FIG. 8  are referred to by the same numerals, and their description is omitted. The photo amplifying apparatus shown in  FIG. 10  is basically the same as the photo amplifying apparatus shown in  FIG. 8  except for the optical splitter  11 , the fixed optical filter  51 , and the photo diode  31  that are removed, and the optical splitter  16 , the fixed optical filter  52 , and the photo diode  36  that are added. The fixed optical filter  52  transmits a photo signal of specific wavelength. 
   WDM photo signals (wavelengths: λ 1 -λn, intensity X in ) are provided to a photo signal input terminal IN. The input photo signal is amplified by the photo amplifying unit  1 . The amplified photo signal is attenuated down to a predetermined signal level by the variable optical attenuator  6 . The attenuated photo signal is amplified up to a predetermined signal level by the photo amplifying unit  2 . Then the amplified photo signal is output from the photo signal output terminal OUT. 
   The photo diode  32  detects the total power P PD32  of photo signals (wavelengths: λ 1 -λn) before being amplified by the photo amplifying unit  1 . Likewise, the photo diode  33  detects the total power P PD33  of photo signals (wavelengths: λ 1 -λn) after being amplified by the photo amplifying unit  1 . The photo diode  34  detects the total power P PD34  of photo signals (wavelengths: λ 1 -λn). The photo diode  35  detects the total power P PD35  of the photo signals (wavelengths: λ 1 -λn) after being amplified by the photo amplifying unit  2 . The photo diode  36  detects the signal level (P PD36 ) of the photo signal of the specific wavelength transmitting through the fixed optical filter  52 . 
   (1) The control unit  7  of the photo amplifying apparatus controls the laser diode (excitation light source)  21  so that the difference between the output P PD33  of the photo diode  33  and the output P PD32  of the photo diode  32  becomes constant.
 
 P   PD33   −P   PD32   =D (dB)(constant)  (3)
 
   (2) The control unit  7  of the photo amplifying apparatus controls the laser diode (excitation light source)  22  so that the difference between the output P PD35  of the photo diode  35  and the output P PD34  of the photo diode  34  becomes constant.
 
 P   PD35   −P   PD34   =E (dB)(constant)  (4)
 
   (3) If either the photo amplifying unit  1  or the photo amplifying unit  2  cannot achieve the respective predetermined gains D or E, the control unit  7  of the photo amplifying apparatus raises the gain of the other photo amplifying unit  2  or the photo amplifying unit  1  so that
 
 D+E =constant  (5)
 
   (4) The control unit  7  of the photo amplifying apparatus controls the variable optical attenuator  6  so that the output power P PD35  from the output terminal OUT is tuned to a target output level. 
   The control unit  7  controls the laser diodes  21  and  22  that are excitation light sources of the EDFA  3  and  4 , respectively, and consequently, controls the gains of the photo amplifying units  1  and  2  so as to make their gains flat enough. 
   The following equation needs to be satisfied:
 
[( P   PD35   −ASE )/ n ]/ P   PD36 =constant  (18)
 
where “n” is the number of wavelengths amplified by the photo amplifying apparatus, and ASE is noise power caused by accumulated spontaneous emission, for example.
 
   (P PD35 −ASE) is the power of signal component, and (P PD35 −ASE)/n is the power of signal component per a wavelength. The equation (18) means that the ratio between the power of signal component per a wavelength and P PD36  is constant. P PD36  is the power of an arbitrarily selected wavelength. The constant ratio between the power of the arbitrarily selected wavelength and the average power over “n” wavelengths means that the gain of the photo amplifying apparatus is flat. ASE is determined based on a different experiment. 
   If the equation (18) is not satisfied, the gain is not flat. Accordingly, the control unit  7  controls the laser diodes  21  and  22  that are excitation light sources so that the ratio between (P PD35 −ASE)/n and the level P PD36  of the photo signal transmitting through the fixed optical filter  52  achieves a predetermined value. 
   The control unit  7  controls the variable optical attenuator  6  so that the power of photo signal per wavelength (P PD35 −ASE)/n is kept at a predetermined value in order to compensate the power per wavelength. 
     FIG. 11  is a flow chart for explaining processing by the control unit  7  of the photo amplifying apparatus for making gain thereof flat. 
     FIG. 12  is a block diagram for explaining processing by the control unit  7  of the photo amplifying apparatus for making gain thereof flat. 
   The processing by the control unit  7  is described below with reference to  FIGS. 11 and 12 . 
   As shown in  FIG. 12 , the photo signals are received and converted into current signals by the photo diodes  32 - 34 ,  35 , and  36 , and are converted into voltage signals by resistors R 2 -R 4 , R 5 , and R 6 . The voltage signals are amplified by amps  2 - 4 ,  5 ,  6 , and further converted into digital signals by analog-digital converters ADC 2 - 4 ,  5 , and  6 . Then, the digital signals are input to the control unit  7 . 
   The control unit  7  processes the input digital signals as follows (initial operation): 
   (1) Detecting the signal level of outputs from AMP 4 ,  5 , and  6  (step S 12 ). 
   (2) Driving the laser diode  22  that is the excitation light source of the photo amplifying unit  2  so that the ratio between electric signals of Amp  4  and  5  becomes a predetermined value to control the gain (step S 13 , S 14 ). 
   (3) Controlling the variable optical attenuator  6  so that the level of the electric signal of Amp  6  becomes a predetermined value (steps S 15 , S 16 ). 
   After the above processing, the control unit  7  performs the following to compensate the gain gradient and the output per wavelength: 
   (4) Detecting the electric signal levels of Amp  5  and Amp  6  (step S 17 ). 
   (5) Controlling the variable optical attenuator  6  so that the electric signal level of Amp  6  becomes a set value (steps S 19 , S 20 ). 
   (6) Controlling the laser diodes  21  and  22  that are the excitation light sources of the photo amplifying units  1  and  2 , respectively, so that the equation (18) is satisfied (steps S 21 , S 22 ). 
   If the control unit  7  receives an instruction to stop processing or detects that the input signal stops, the control unit  7  exits the processing (steps S 18 , S 23 ). 
   Third Embodiment 
     FIG. 13  is a schematic diagram showing a photo amplifying apparatus according to the third embodiment of the present invention. 
   Elements that are identical to those of the photo amplifying apparatus shown in  FIG. 8  are referred to by the same reference numerals, and their description is omitted. 
   The photo amplifying apparatus shown in  FIG. 13  is the same as the photo amplifying apparatus shown in  FIG. 8  except that the fixed optical filter  51  that transmits photo signals of a specific wavelength is replaced with a variable optical filter  61  that transmits photo signals of a specific wavelength, and a drive circuit  71  that controls the variable optical filter  61 . Any wavelength can be selected with these new components. 
   The operation of the photo amplifying apparatus shown in  FIG. 13  is basically identical to that of the photo amplifying apparatus shown in  FIG. 8 . The advantage of the photo amplifying apparatus according to the third embodiment is that, if the photo signal of the specific wavelength detected by the photo diode  31  stops due to a malfunction, for example, the control unit  7  causes the variable optical filter  61  to switch to another wavelength and continue monitoring the photo signal of the other wavelength. In the case of the photo amplifying apparatus according to the first embodiment, however, if the photo signal of the specific wavelength detected by the photo diode  31  stops, the control unit  7  of the photo amplifying apparatus shown in  FIG. 8  fails to properly control the photo amplifying apparatus. 
   Fourth Embodiment 
     FIG. 14  is a schematic diagram showing a photo amplifying apparatus according to the fourth embodiment of the present invention. 
   The photo amplifying apparatus shown in  FIG. 14  is different from the photo amplifying apparatus shown in  FIG. 10  in that fixed optical filter  52  that transmits a specific wavelength is replaced with a variable optical filter  62  that transmits a variable wavelength, and a drive circuit  72  for controlling the variable optical filter  62  is added. Accordingly, even if the photo signal of the specific wavelength detected by the photo diode  36  stops due to a malfunction, for example, the variable optical filter  62  can select an alternative wavelength and continue to monitor the photo signal of the alternative wavelength. 
   The photo amplifying apparatus according to the fourth embodiment operates in the same manner as the photo amplifying apparatus according to the second embodiment except that, even if the photo signal of the specific wavelength stops, the control unit  7  causes the filter drive circuit  72  to switch the stopped wavelength to another wavelength and continues to properly control. 
   Fifth Embodiment 
     FIG. 15  is a schematic diagram showing a photo amplifying apparatus according to the fifth embodiment of the present invention. 
   The fifth embodiment is the combination of the first embodiment and the second embodiment. 
   Compared with the photo amplifying apparatuses shown in  FIGS. 8 and 10 , the photo amplifying apparatus shown in  FIG. 15  is different in that it is provided with both fixed optical filters  51  and  52  and both photo diodes  31  and  36 . 
   As described with reference to  FIG. 15 , since the photo amplifying apparatus is provided with the fixed optical filter  51  and the photo diode  31 , the photo amplifying apparatus can determine the number of wavelengths as soon as the number of wavelengths changes. Using the determined number of wavelengths, the photo amplifying apparatus can make the gain thereof flat. 
   Sixth Embodiment 
     FIG. 16  is a schematic diagram showing a photo amplifying apparatus according to the sixth embodiment. 
   The sixth embodiment is the combination of the third embodiment and the fourth embodiment. The photo amplifying apparatus shown in  FIG. 16  is different from the photo amplifying apparatus shown in  FIG. 15  in that the fixed optical filters  51  and  52  are replaced with variable optical filters  61  and  62 , and drive circuits  71  and  72  are added. The drive circuits  71  and  72  control the variable optical filters  61  and  62 , respectively, so that the variable optical filters  61  and  62  transmit photo signals of which the wavelength is variably determined by the control unit  7 . Accordingly, the control unit  7  of the photo amplifying apparatus shown in  FIG. 16  can arbitrarily determine the wavelength of the photo signals that transmit the variable optical filters  61  and  62 . 
   The photo amplifying apparatus according to the sixth embodiment shown in  FIG. 16  operates basically in the same manner as the photo amplifying apparatus according to the fifth embodiment shown in  FIG. 15 . If the photo signal of the wavelength that is monitored by the photo diodes  31  and  36  stops due to a malfunction, for example, the control unit  7  of the photo amplifying apparatus according to the fifth embodiment can no longer be properly controlled by the photo amplifying apparatus. However, the control unit  7  of the photo amplifying apparatus according to the sixth embodiment can continuously control the photo amplifying apparatus according to the sixth embodiment by switching the monitored wavelength to another wavelength. Accordingly, the control unit  7  can continue to properly control the photo amplifying apparatus. 
   As described above, according to the present invention, the photo amplifying apparatus controls output signal level by detecting, based on the change in photo signals, changes in the number of the wavelengths and gain gradient of the photo signals. 
   The present invention is not limited to these embodiments, but variations and modifications may be made without departing from the scope of the present invention. 
   This patent application is based on Japanese priority patent application No. 2002-264261 filed on Sep. 10, 2002, the entire contents of which are hereby incorporated by reference.