**2. Materials and Methods**

#### *2.1. System Evaluation*

Let us consider the boost converter under current-mode control shown in Figure 2b. As far as the converter is concerned, it plays the role of an interface, for matching the energy flow between the source and the load [24]. The input capacitor with capacitance *C*<sup>1</sup> is used to smooth the voltage supplied by the PV to avoid ripples due to the nonlinearity of the PV generator. An LC filter is also used at the output to reduce switching ripples due to the switching nature of the converter and to provide a smooth output current to the DC output. Another function of our DC-DC converter is to track the maximum power point (MPP) by controlling the reference signal *Rsi*ref, using the perturbation and observation (P&O) algorithm, which increases or decreases the value of the reference signal *Rsi*ref in order to position the PV operating point at its MPP at all times. The signal *RsiL* is low-pass-filtered using *Hi*(*s*) to obtain the signal *RsiL f* , where *Rs* is the sensor resistance. Considering a unity gain first-order filtering effect of the current sensor, the equation relating *iL f* to *iL* in the Laplace domain is

$$\frac{I\_{Lf}(s)}{I\_L(s)} = \frac{\omega\_c}{s + \omega\_c}'\tag{1}$$

where *ω<sup>c</sup>* is the cut-off frequency of the filter. In time domain, this equation can be expressed as follows

$$\frac{d\dot{\mathbf{i}}\_{Lf}}{dt} = -\omega\_{\mathbf{c}}\dot{\mathbf{i}}\_{Lf} + \omega\_{\mathbf{c}}\dot{\mathbf{i}}\_{L}.\tag{2}$$

The filtered signal *iL f* is used both for current-mode control and for obtaining the average PV power after multiplying it by the PV voltage *v*pv. For current-mode control, the signal *RsiL f* is compared with the reference signal *RsI*ref − *v*ramp, where *v*ramp = *mat* mod *T* is the ramp compensating signal, *ma* = *VM*/*T* is its slope, *VM* is its amplitude and *T* is its period. The control logic compares the signal *RsiL f* with the signal *RsI*ref − *v*ramp in such a way that at the beginning of each switching cycle with the period dictated by the clock signal CLK, the switch S is turned ON and OFF whenever the signal *RsiL f* reaches the signal *RsI*ref − *v*ramp. The binary signal *u* is a result of this switching decision and it takes the value 1 when the switch is turned ON and 0 when it is turned OFF. The current reference *RsI*ref is provided by the MPPT.

A flowchart for current-mode control proposed in this work is shown in Figure 3. The program loop starts with the initialization of the voltage at the PV terminal, the current through the inductor and the voltage at the load (Block 2). These initial values are used to set the initial value of the reference voltage. In practice, the initial reference voltage is imposed by *V*ref,init = 0.85 × *V*MPPT,max [18]. Therefore, the choice of the initial values in the system must be made taking into account this condition on the reference voltage. When the irradiation is uniform, the P&O MPPT algorithm and CMC keep operating at the MPP (Block 3, Block 4, and Block 5). The P&O algorithm verifies fluctuations of power and voltage of PV array and determines the set-point voltage *V*ref constantly. To maximize the output power from the PV array, its output voltage needs to be maintained at the level determined by the P&O algorithm. The resulting reference current *I*ref from the reference voltage will produce the control signal that will be used by the pulse width modulation (PWM) for the boost converter switch. During the switching of the boost converter, the fourth-order Runge–Kutta algorithm is used to determine the dynamics taken by the converter (the values of the converter states and the values of the duty cycle) over time (Block 7, Block 8, Block 9). It should be noted that all numerical simulations in this paper are performed using MATLAB/SIMULINK. Other software such as C++, Fortran or Python could also be used because it is the simulation of ordinary differential equations [25–29].
