A PI + Sliding-Mode Controller Based on the Discontinuous Conduction Mode for an Unidirectional Buck–Boost Converter with Electric Vehicle Applications

This paper solves the buck–boost converter operation problem in the discontinuous conduction mode and the feeding a DC bus of a combined battery/solar-powered electric vehicle grid. Since the sun’s radiation has a very important effect on the performance of photovoltaic solar modules due to its continuous variation, the main task of the system under study is the regulation of the output voltage from an MPPT system located at the output of the panels in order to obtain a DC bus voltage that is fixed to 24 V. This is ensured via a double-loop scheme, where the current inner loop relies on sliding-mode control; meanwhile, the outer voltage loop considers a proportional–integral action. Additionally, the current loop implements an adaptive hysteresis logic in order to operate at a fixed frequency. The closed-loop system’s performance is checked via numerical results with respect to step changes in the load, input voltage, and output voltage reference variations.


Introduction
Currently, both academic and industrial communities around the world are developing many projects to stimulate efficient energy generation and consumption, optimization of fuel combustion engines, or increase the penetration of renewable energies into the grid. The main objective is to gradually decrease the pronounced dependency that exists on the consumption of conventional fuels and to contribute positively to energy production with a sustainable approach [1]. For instance, in order to contribute towards electric transportation, in [2], life-cycle pricing evaluation was investigated as a tool for determining the value of hydrogen as a source for hydrogen-fuel-cell-based transportation. Additionally, in [3], for an electric vehicle application, an efficient high-step-down DC-DC converter was designed for battery charging; meanwhile, in [4], an H ∞ observer was designed to generate an estimation for the state of charge of a lithium-ion battery. Regarding microgrid systems, many projects are underway with the objective of implementing sustainable energy systems instead of using conventional ways of generating, transmitting, and consuming energy [5].
In general, power electronic converters have a significant influence on the exploitation of renewable energies due to several features, such as their high efficiency, low cost, scalability, and numerous available topologies for energy processing. In the case of DC-DC power conversion, a remarkable topology is the well-known buck-boost converter, which converts power from an input voltage source into an output voltage that might be higher or lower than the input voltage; however, the output voltage polarity is negative with respect to the input voltage [6]. In growing industries, such as those of wind energy, solar power systems, and electric cars, the buck-boost converter is critical [7]. In all of these cases, the voltage level must be stepped up or down and maintained at a constant level regardless of load or input voltage fluctuations. Furthermore, the continuous conduction mode (CCM) and discontinuous conduction mode (DCM) are the two modes in which power converters can operate. DCM occurs whenever the ripple is significant enough to force a change in the polarity of the signal (current or voltage), hence contradicting the switch unidirectionality requirement. DCM is highly common in low-power operating conditions in traditional converter topologies [8]. In essence, DCM operation results in a faster transient performance at the cost of increased circuit stresses. The conduction losses in the switch are very small, while this dissipation can be high in CCM, especially when adding the effects of the diode reverse recovery current. For low-power applications, DCM is still a preferred operating mode [9]. A converter working in DCM is cheaper and smaller than a converter working in CCM, despite the fact that both share the same characteristics. In addition, power converters in CCM require a larger inductance value than in DCM.
From a feedback perspective, the usage of a high-performance controller is mandatory in order to maintain the precise converter operation in DCM. To this end, a suitable alternative is to use a nonlinear controller, such as a sliding-mode controller (SMC). The SMC scheme's main advantage is its resilience to parameter uncertainty. Furthermore, compared to other nonlinear control methods, the SMC is a control method with a high degree of flexibility in its design stage and is reasonably easy to implement. Because of these characteristics, the SMC is well suited for use in nonlinear systems [9]. In reality, the SMC is well adapted to controlling the operation of intrinsically variable structure systems, such as power converters [9]. Equally importantly, the capability of proportionalintegral-derivative (PID) controllers to control most practical industrial processes has led to their widespread use in industry [10]. These types of controllers have shown proper performance when applied to processes with negligible nonlinear dynamics and nonconservative performance requirements [10]. Furthermore, a dynamical system in a closed loop with a PID structure and an SMC might result in better performance [7].
It's worth noting that power converters are built to work at a fixed switching frequency; meanwhile, SMC schemes present control signals with variable switching frequencies.
Among the most popular approaches for keeping the switching frequency in an SMC constant is pulse-width modulation (PWM). In reality, this is comparable to traditional PWM control techniques, which compare the control signal to a triangle signal to produce a trigger signal. However, since the original SM control law must be kept, especially when both the current and voltage state variables are involved, implementation is difficult [11]. Another option is to use adaptive control, in which the hysteresis band adapts itself in response to changes in the input voltage. In theory, this adaptive control approach is more direct, maintains the SMC's original characteristics, and does not suffer from a degraded transient response [12].
An SMC for DC/DC converters is simple to implement. For example, in [13], the sliding-mode technique was used to model and regulate a DC/DC buck-boost converter. Even with high supply and load variations, reliable operation, robustness, and acceptable dynamic behavior are achieved. In [13], the proposed controller was designed for the CCM operation of a converter where the SMC concepts were assured by the application of a fast-switching control method. In this case, the sliding surface involved the desired output current and voltage. Additionally, in [7], for a buck-boost converter working in CCM, the paper proposed a double-loop control with a standard PI and an SMC. The controller was capable of addressing a wide range of load resistance and voltage references. In [11], a PWM-based SMC for buck, boost, and buck-boost converters in DCM operating at a constant frequency was reported. However, as indicated by the authors, the implementation of this controller can be non-trivial. In [14], for a DC-DC buck-boost converter, an adaptive nonlinear controller was designed. An adaptive backstepping approach was used to build the suggested controller, which was based on input-output linearization. Both continuous and discontinuous conduction modes could be used with the controller. Additionally, in [15], using the discontinuous conduction mode, a new technique for a two-loop control of a DC/DC flyback converter and a Cuk converter is given. The designed controller could manage the converter's output over a broad range of input voltages and load resistances. Furthermore, the SMC has been widely used as a solution for state estimation problems in EV applications. It has potential applicability for the effective diagnosis of internal parameters of lithium-ion batteries, such as aging, internal short circuits [16], the state of charge [17], and electrochemical-thermal characteristics, in order to extend the battery lifespan [18].
In particular, this paper suggests a buck-boost converter running in DCM to feed an electric vehicle grid. In Figure 1, the source and loads of the electric vehicle grid are depicted, where two photovoltaic (PV) arrays-each one of 300 W connected in parallelare considered. In order to increase the performance of the solar cells, maximum power point tracking (MPPT) is installed in the system. As the interface between the solar panel and the DC bus, a buck-boost power converter in DCM is considered. This converter is responsible for maintaining a constant voltage value at the DC bus. The main goal is to feed the loads connected to the DC bus of the electric vehicle with a constant value despite the noticeable voltage variations.
The selected solar panels were manufactured by Solarnova from the SOL300GT series with a peak power of 300 W and peak current of 9.31 A. The MPPT solar charge controller was manufactured by EPEVER from the Tracer-BN series, and its efficiency was not less than 99.5%. This controller is recommended for use in solar boats. According to tests carried out by the manufacturer, the output of the MPPT in unfavorable conditions (cloudy day) delivers a maximum voltage of 19 V, and for optimal conditions of high solar radiation, a maximum voltage of 27 V is obtained. However, a constant voltage of 24 V is required at the DC bus. Equally importantly for this research, the devices for data collection, measurements, and communication are detailed in Table 1. The power consumption of the equipment was calculated by assuming the nominal voltage of 24 V. The DC motors at maximum speed demanded 42 A. Since the electric vehicle would not operate at full speed, a consumption of 6.3 A was defined. Given that the electric vehicle load was too small, the input voltage could be greater or lower than the desired output voltage (24 V). It is understood that a buck-boost converter operating in DCM could be a good candidate as a voltage regulator. Unlike the previous references, this work develops a PI and sliding-mode double-loop controller for a DC/DC buck-boost converter running in DCM. The output voltage is indirectly regulated by an inner SMC system that tracks the inductor reference current directly. This is to deal with the buck-boost converter's non-minimum phase behavior [19]. On the other hand, the current reference is generated using a PI controller, which is properly tuned via frequency response approach. The SMC for the current loop is implemented through a hysteresis method with an adaptive feedforward fixed frequency that includes an inductor current limitation logic.
The following is a summary of the paper's structure. In Section 2, the mathematical model of a buck-boost converter in DCM is explored. The proposed controller for output voltage regulation is presented in Section 3. The numerical simulation results are shown in Section 4, and the main conclusions and future work are summarized inSection 5.

Buck-Boost Converter Modeling and Physical Considerations in DCM
The buck-boost converter under study is depicted in Figure 2. The converter is formed by the input voltage V I , the MOSFET M, the inductor L, the diode D, the output capacitor C, and the load R. When the converter operates in DCM before time t = 0, i L is zero. At time t = 0, M is switched ON; therefore, D is switched OFF. The inductor voltage is V I , and consequently, i L linearly increases from 0. On the other hand, when t = DT, M is switched OFF and D is ON. As a result, the inductor voltage is −v C , and i L linearly decreases. The diode is turned OFF when the current in the diode approaches zero. The inductor current is zero until M is switched ON, since both the transistor and the diode are OFF [20]. Assuming that the converter of Figure 2 is operating in DCM, three different operation modes may be considered. The switch position and inductor current determine these modes. For instance, Figure 3 represents the inductor current when the converter works in DCM, i.e., i L = 0 from interval d 2 T to T. In this way, the converter dynamics are described as follows: State I (when power switch M is ON): State II (when power switch is OFF and i L > 0): State III (when power switch is OFF and i L = 0): Taking Figure 3 into account, the dynamics of the converter in DCM can be rewritten as: The function u B represents an auxiliary switching function related to zero inductor current and can also be defined as follows:

Auxiliary Signal Determination
The duty cycle of the buck-boost converter in CCM is calculated as follows [20]: As depicted in Figure 3, the maximum distance where u B equals unity is related to the case where CCM is present, which is: Since u B = 1 is true for d 2 T, then u Beq can be defined as follows: Consequently, u Beq can be redefined using (10) and (12) as follows: In the next section, a double-loop control scheme for DC bus voltage regulation based on the SMC and PI outer loop is detailed.

Controller Design for Output Voltage Regulation
In this section, the controller design stage is shown in detail. As described by [21], since buck-boost-and boost-type converters exhibit non-minimum phase behavior from the control signal to the output voltage, direct output (single-loop) voltage control cannot be implemented for this system. Alternatively, as shown in Figure 4, current-mode (doubleloop) control was selected to ensure a stable output voltage regulation and a suitable current tracking. Notice that the current inner loop relies on SMC in order to generate the duty cycle u; meanwhile, the voltage outer loop uses PI control in order to generate the current reference i Lre f .

Sliding-Mode Current Controller
The sliding-mode control technique for variable-structure systems (VSSs) provides an alternative method of implementing a control action that makes use of the DC/DC converter's intrinsic variable structure. The switches are driven as a function of the instantaneous values of the state variables, especially in power converters, in such a way that the system trajectory is compelled to stay on a properly chosen surface, termed the sliding surface. Furthermore, the most notable property of SMC is its robustness to system parameter uncertainty. In our case, the state Equations (7) and (8) can be rewritten as: where A and B are system matrices with real components and proper dimensions, z is the state vector equal to z = [i L , v c ] , and u is the scalar control function and takes values between 0 and 1. According to SMC theory, the control law u is defined as [22]: where a discontinuity is employed through the sign function sgn over the sliding surface S(z). Notice that the control problem is now reduced to finding a proper sliding surface such that output voltage regulation to a desired value is ensured.

Sliding Surface Selection
The proposed sliding surface (S(z) = 0) must represent a desired operating condition for the converter; for this case, a proportional term of the current error is selected as the sliding surface: where K represents the sliding coefficient, and its value is determined by the next expression: Consequently, control law is:

Equivalent Control
For the existence of sliding motion on S, the necessary and sufficient conditions are: Moreover, it is defined that Consideringż in (14) and according to (20), we have: where u is changed by u eq , which, in turn, represents an equivalent continuous control signal that preserves the system trajectory on the sliding surface. The equivalent control is then defined as: The transversality condition [22] proposes that if there is a local sliding motion on S, then the next expression must satisfy: Equation (26) is intuitive because if the expression equals zero, then the control command on the nonlinear system would be lost. We can conclude that the surface accomplishes the transversality condition, as V I is always different from zero. For this purpose, the equivalent control is computed as: It is both required and sufficient for a sliding motion to occur locally on S if the corresponding equivalent control meets the physically permissible range [22]: in order to drive the MOSFET M through the PWM principle. From the expression obtained in (27), we can conclude that the surface accomplishes the necessary and sufficient condition because v c is always positive, as the voltage in the capacitor keeps the same reference as the input voltage.

Lyapunov Stability Analysis
A sliding-mode control's goal is to force the system state to the sliding surface from any acceptable initial state and keep it there. The last claim is supported by the following candidate Lyapunov function: [13]: The control u is chosen so that d dt < 0 to ensure the stability of the system and to render the surface S(z) attractive [13]. For this end, the time derivative of (29) is computed as: where two cases are analyzed. When u = 1 and S is changed by −S, Since the capacitor voltage and input voltage are always positive and the equivalent control is between 0 and 1, the time derivative of is a negative definite function. This implies that the control law is globally asymptotically stable on the sliding surface [13].

Hysteresis Function
Generally speaking, practical implementation of the SMC via (18) is direct and simple. The direct application of this control law, on the other hand, results in systems that are switched at a very high frequency, which causes an undesirable chattering impact in closed-loop systems [9]. This phenomenon translates into high switching losses, inductor conduction losses, noise, and problems of electromagnetic interference [23]. Therefore, it is necessary to restrict the operating frequency range, for instance, by using a hysteresis function. A more realistic way to specify the switching logic is as follows [24]: where ∆ is an arbitrary value to be selected. The hysteresis band H is used around the sliding line, aiming to fix the frequency to a constant value. The control law (33) can be implemented using a hysteresis comparator, as shown in Figure 5. In this case, a hysteresis band ∆ = H is selected. The control logic for the width of the hysteresis loop is then: The hysteresis band may be computed in real time for various input voltages, as stated in [25]. For this case, H is computed as: Notice that, since the input voltage is measured, the hysteresis band is changed correspondingly to keep the switching frequency f constant. In practical applications, a fast converter response is required; however, the inductor current might experience significant overshoots. Note that high current values, can cause inductor core saturation and damage the converter components if physical limitations are exceeded. Thus, it is practical to include a protection circuit in the controller that prevents the inductor current from exceeding harmful levels. Current limitation can be provided by using another hysteresis comparator and an AND port .

Proportional-Integral Voltage Controller
In order to guarantee DC bus voltage regulation, it is required to add a slower outer voltage control loop. This control loop generates the inductor current reference i Lre f to be tracked by the SMC current loop. In this way, a PI controller generates the current reference for the current loop as follows: where [26]: The expression in (36) is the transfer function of the PI voltage controller in the Laplace domain. The zero of (36) is placed lower than one decade below f c , which represents the crossover frequency. The voltage loop value of f c should be lower than the current loop [26]. The tuning gains K p and K i are the proportional and integral gains, respectively, and T i is the integration time. The output current reference to the output voltage transfer function is obtained from (4).
The loop gain of the external closed-loop voltage can be written as: Hence, f c = 211 Hz was selected for the outer voltage loop. Notice that Figure 6 depicts the Bode plots of the simulated voltage loop gain with the converter parameters listed in ] Table 2 and Table 3. The relative stability criteria establish that the phase margin (PM) must be at least 45º and the gain margin (GM) must be at least 6 DB [27]. From Figure 6, it can be concluded that the closed-loop system is stable with PM = 170º and an infinite GM.

Numerical Results and Discussion
The performance of the current control law defined in (34) in combination with (36) in a closed loop with the buck-boost converter given by (7) and (8) was verified through numerical simulations. Table 3 details the converter parameters used in the simulation. Additionally, Figure 7 presents the block diagram of the sliding-mode controller with an adaptive hysteresis band and sliding coefficient. To evaluate the closed-loop system, four different scenarios were considered. In the following, each scenario is completely explained. Note that the input voltage variation range from 19 to 27 V was determined from the MPPT system; meanwhile, the desired output voltage V * O was set to 24 V, and consequently, it was possible to evaluate the voltage conversion in both buck and boost modes, unlike [11], in which the input voltage V I was fixed to 24 V and the closed-loop results only showed the boost mode.  Figure 7. Block diagram of the designed SMC scheme.

Simulation Scenario I: Converter Open-Loop Behavior
In order to generate a comparison framework between simulation scenarios, the openloop operation of the system is analyzed in this section. In Figure 8, the output voltage v C and inductor current i L waveforms are displayed. Notice that both variables' initial conditions are set to zero. The output voltage v C converges to 20 V in around 15 ms with a small ripple in the steady state at around 104.6 mV. On the other hand, the settling time of the current i L to the steady state is 15 ms, with a ripple current of 20 A and peak current of 73.52 A.

Simulation Scenario II: Input Voltage Variations
In this scenario, the performance of the SMC was tested when the input voltage increased from 19 to 27 V at instant t = 0.05 s. Notice that both variables' initial conditions are set to zero. Figure 9 illustrates the results for a 24 V desired output voltage. Consequently, with the increase in voltage, the inductor current's steady state i L decreases from 20.81 to 14.9 A. In the beginning, the current reaches a peak value of 36.27 A with a 2 ms transient response time. The output voltage response shows a peak value of 24.5 V because of the disturbance. The voltage ripple before the disturbance is 85 mV, and after, it is 43 mV. The settling time is 3 ms before the disturbance, and after, it is 11 ms. Based on these results, it can be stated that the presented controller has good dynamic behavior and is stable.

Simulation Scenario III: Resistance Load Variations
In this scenario, the robustness of the closed-loop system is tested with respect to step load change. Notice that both variables' initial conditions are set to zero. Because the sliding coefficient is sensitive to the load, a change in the operating load resistance changes K instantaneously. To ensure that (17) is valid for all operating conditions, the sliding coefficient must be variable by using the operating load r L instead of the nominal load resistance R [9]. Since it is not possible to acquire a resistance measurement directly, the relationship is used to obtain the instantaneous load resistance. In this case, we analyze the converter in boost mode, where V I = 19 V. The load resistance changes from 6.66 Ω to 3.33 Ω at 0.05 s. Figure 10 depicts the output voltage and inductor current waveforms when the load resistance changes. In buck mode, V I = 27 V and the load resistance changes from 6.66 Ω to 3.33 Ω at 0.05 s. Figure 11 depicts the output voltage and inductor current waveforms when the load resistance is changed. Figure 11. Output voltage v C and inductor current i L waveforms when the load resistor is stepped down in buck mode.
In both modes, the output voltage is robust with respect to load resistance variations. The voltage v C suffers a small alteration and increases to 24.1 V with a 101 mV ripple in boost mode with a 3 ms settling time. For the buck mode, the voltage increases to 24.4 V with a 27.5 mV ripple and a 3 ms settling time. The current waveform decreases from 20.2 to 18.4 A in boost mode and from 14.11 to 13.28 A in buck mode.

Simulation Scenario IV: Output Voltage Reference Variations
Finally, in this section, the results when the reference voltage is changed are detailed. Notice that both variables' initial conditions are set to zero. Figure 12 depicts the output voltage v C during a change in the reference from 24 to 22 V at t = 0.05 s when the converter is working in boost mode (V I = 19 V). In Figure 13, the output voltage during a change in the reference voltage from 19 to 24 V at t = 0.05 s is shown when the converter is working in buck mode (V I = 27 V). These results show that despite the changes in the voltage reference, the controller is able to ensure a suitable output voltage regulation. For this scheme, the system presented zero steady error and fast transient response.

Conclusions and Future Work
This paper proposed the employment of a DCM-based buck-boost converter to maintain a constant voltage value in a marine charging station's DC bus. The DCM state equations for the converter were obtained while considering the inductor current and the switch position. As a control technique, in Section 3, we developed a PI outer controller in combination with a sliding-mode controller to implement a double-loop control scheme that is capable ensuring output voltage regulation despite load and voltage reference changes. To restrict the switching frequency variation, we introduced an adaptive feedforward control, which ensures that the hysteresis band varies. Additionally, with the aim of avoiding the use of a large inductance value, another hysteresis comparator was used. The numerical results in Section 4 confirm that a buck-boost converter operating in discontinuous conduction mode is suitable for applications where the load resistance is small and the power supply voltage is variable. In this research work, several simulation scenarios were considered, where the input voltage changed from 19 to 27 V, which represented a 42% variation, the load changed from 6.67 to 3.33 Ω, yielding a variation in output power from 86.4 to 172.9 W, and finally, the output voltage reference changed from 24 to 22 V. In all closed-loop cases, the output voltage exhibited a maximum variation of 2% of its nominal value of 24 V. In addition, the proposed controller enabled the fast and stable dynamics of the converter and provided precise voltage regulation on the DC bus. The simulations are in good agreement with the theoretical predictions. Finally, the controller provided robustness regarding load, input voltage, and voltage reference changes. Future work will be aimed towards a practical implementation of the proposed control scheme and its extension to other applications, such as bidirectional buck-boost converters for electric vehicles and charging applications for lithium-ion batteries.
Author Contributions: All authors contributed to the development of the overall document, control design, and results. All authors have read and agreed to the published version of the manuscript.