## 6 Conclusions  
A theoretical and experimental study of digital automatic power control (APC) based on a PI controller for a laser diode was performed. This article showed that it was possible to design a digital APC based on a PI controller for semiconductor lasers using the light-current curve obtained either from the one presented in the laser data sheet or experimentally. The control gains (\(K_{p}\)) and integral times (\(T_{i}\)) that guarantee the convergence of the system to a constant reference \(y_{sp}\) were determined in terms of the slope efficiency of the laser. In Equation (24), an interval for the control gains that guarantees the convergence of the system if the characteristic time of the system (\(\tau\)) is greater than the sampling period (\(T_{s}\)) or if the integral time complies with Equation (25) was defined. Nevertheless, the proposed theoretical model does not guarantee the convergence of the system during significant disturbances in the operating temperature that contradict the theoretical assumptions of \(dT/dt\approx 0\) used in Section 2. However, the model can guarantee the system stability when the thermal variations are less than \(\sim\)1 \({}^{\circ}\)C per minute (0.017 \({}^{\circ}\)C/s) and if the chosen control gain complies with the condition of Equation (24) in the new operating temperature (see Figure 18). Furthermore, the analysis demonstrates that, when the thermal variation condition is met, the integral time has no effect on whether or not the system converges. It does, however, allow for the adjustment of the system's convergence time to the reference \(y_{sp}\). Thereby, the integral time impacts only the system's characteristic time. Due to the forced behavior of the system that is shown in Figure 3 and described in Equations (12) and (17), it is possible to see that the theoretical convergence time is unique and independent of the initial system conditions (\(y_{0}\)). From the analysis of Equations (12) and (17) (considering \(\eta\,I_{th}\approx 0\)), the value of the convergence time is of five system characteristic times considering a limit of stability for the output system of 99% of \(y_{sp}\). The convergence time can be tuned using the integral time to reach a lower limit of \(5T_{s}\) for \(\tau=T_{s}\). Thus, the system response is limited by the sampling period of the controller. The performance of the designed laser driver compared to other drivers in the literature is shown in Table 1. It is shown that the controller, at stable temperature conditions, achieved slightly better stability (approximately an order of magnitude fewer variations in  
Figure 18: Robustness of the experimental system output (**a**) for different \(\eta K_{p}\) from 0.03 to 0.64, \(T_{i}=1\) s and \(y_{sp}=3.4\) mW, under thermal disturbances (**b**). magnitude) than those reported. Additionally, it can operate during slow thermal variations or slow operating temperature transitions without increasing the instabilities, thus, respecting the other drivers at stable temperature conditions. Figure 18 shows the behaviour of the PI controller for more sudden thermal variations. It shows the reduction in robustness of the controller due to the thermal variations, presenting the limit for the proper operability of the controller. The optical power fluctuations are closely related to the controller proportional gain and the thermal speed of change during the operation. Thus, at a low proportional gain and a thermal speed of 0.15 \({}^{\circ}\)C/s, the fluctuations reach the 17% of \(y_{sp}\). Considering the above, it might be necessary to improve the robustness of the driver to thermal fluctuations that might appear during the laser operation in environments where the thermal variations are larger than 0.1 \({}^{\circ}\)C/s. A continuous, stable laser can be used for several applications; however, in particular, this type of solution can be useful for nanosatellite applications, where power and volume can be serious constraints.