## 2 Principles and Setups
### Electrical Control for Working Stability  
In order to reduce the impacts from the fluctuation of pump power and accumulation gain of EDF, a dual-channel fuzzy-control scheme is adopted to stabilize the outputs of MWEDFL in a long and short working term. As shown in Figure 3, the input light from the coupler C2 enters the monitor. There are two channels in the designed monitor to respectively test the shifts of mean power and central wavelength of oscillations. A tunable Fabry-Perot filter (1554A, NewFocus, Newport, Irvine, CA, USA) is used in the wavelength-channel to lock the selective oscillation. The intensity changes of oscillations (denoted by \(\lambda\)-shift and \(P\)-shift, respectively) will be monitored by detector D1 and D2 (PDB450A, Thorlabs). After current-voltage (I/V) transform and amplifying, the sampled signals enter the differential amplifier _diff_-1 and _diff_-2, and the corresponding errors \(e_{\lambda}\) and \(e_{P}\) will be gained through a subtraction operation with the set aim voltages (denoted by aim-1 and aim-2, respectively).  
Fuzzy rule base is the essence of the designed one-level controller and it will deliver the factors (denoted by \(e_{\lambda}\) and \(e_{P}\), respectively) to negatively feedback the shifts in terms of wavelength and mean peaking power, according to the values of \(e_{\lambda}\) and \(e_{P}\). Set the membership of \(e_{\lambda}\) and \(e_{P}\) belonging to the subset: (High, MH (middle-high), N (normal), ML (middle-low), Low), and the membership of  
Figure 2: (**a**) The formed Lyot filter and (**b**) its calculated transmission spectrum (PC1/PC2: polarization controller, PMF: polarization-maintenance fiber, T: normalized transmission).  
\(\varepsilon_{\lambda}\) and \(\varepsilon_{P}\) belonging to the subset: {PL (positive large), PM (positive middle), O (zero), NM (negative middle), NL (negative large)). Concretely, the circuit of controller is shown in Figure 3, which is mainly composed of microcontroller unit (MCU), gain turning buttons and display. MCU (STM32F103C8T6) is the core of circuit and it conducts the digital subtraction operation, fuzzy control and outputs the feedback current. The output current can be displayed and amplified by the gain turning buttons in the range of 1\(\sim\)10\({}^{3}\). Moreover, we fabricate a new line with D-type 9-pin connector and input the current from driver into the circuit of controller. Finally, through a high precision amplifier (AD620), the feedback current and driving current are added and outputted.  
Further, assuming the current of driver is \(I_{d}\), the feedback currents (\(I_{c}\)) for \(\lambda\)-shift and \(P\)-shift are then presented as  
\[I_{\lambda}=-a_{1}\varepsilon_{\lambda}\cdot I_{0} \tag{2}\]  
\[I_{P}=-a_{2}\varepsilon_{P}\cdot I_{0} \tag{3}\]  
where \(a_{1}\) and \(a_{2}\) are the gain factors, \(I_{0}\) is the minimum of feedback current, accordingly \(I_{c}=I_{\lambda}+I_{P}\). And through an adder, the output current \(I_{dc}\) will be  
\[I_{dc}=I_{d}+I_{c}=I_{d}-(a_{1}\varepsilon_{\lambda}+a_{2}\varepsilon_{P})I_{0} \tag{4}\]  
So, in the electrical Ring-2, \(I_{dc}\) is the final driving current for pump source and its value will be dynamically adjusted to enhance the working stability of MWEDFL. It is noted that the fuzzy rule base should be determined by the detailed \(e_{\lambda}\) and \(e_{P}\), and it will be depicted in Section 3.