Adaptive Control of Four-Quadrant DC-DC Converters in Both Discontinuous and Continuous Conduction Modes

Hicham Chaoui 1,* , Mohamad Alzayed 1 , Okezie Okoye 2 and Mehdy Khayamy 2 1 Intelligent Robotic and Energy Systems (IRES), Department of Electronics, Carleton University, 1125 Colonel By Dr, Ottawa, ON K1S 5B6, Canada; mohamad.alzayed@carleton.ca 2 Electrical & Computer Engineering, Tennessee Technological University, 220 W. 10th Street, Cookeville, TN 38505, USA; oookoye42@students.tntech.edu (O.O.); mkhayamy42@students.tntech.edu (M.K.) * Correspondence: hicham.chaoui@carleton.ca; Tel.: +1-613-520-2600; Fax: +1-613-520-5708


Introduction
Research on DC-DC converters has traditionally focused on the topology with a voltage source as the input and a load at the output [1][2][3][4]. In this application, the converter can operate in two different modes, namely discontinuous conduction mode (DCM) and continuous conduction mode (CCM). Due to the presence of an electronic switch, the output current of the inductor at steady state oscillates between a maximum value and a minimum value. The extent of this variation is determined by the value of the inductance. In CCM, the output current of the converter varies between two nonzero, positive values. However, in DCM, the value of the inductor current varies between zero and a nonzero positive value. For a fixed load, the transition between DCM and CCM is governed by the value of the load. For battery charger applications, however, the DC-DC converter topology has a source at one end and a source at the other end. The operation of this topology can be classified into three modes: transient CCM, steady-state CCM, and DCM. During the steady-state CCM, the inductor stores as much energy during the charging period as it loses during the discharging period. The implication of this is that over a switching period, the net energy added to the inductor is zero. Since the current through the inductor is directly proportional to the root of the energy in the inductor, the current remains constant over a switching period as well. In DCM, the inductor loses more energy during the discharge period than it gains during the charge period. In this topology, the operation of the converter in either CCM or DCM is determined by the duty cycle. Many papers in the literature have attempted to accurately capture the behavior of the different topologies of the DC-DC converter in these two modes. In [5], a state-space average model was developed numerically for the converter operating in DCM and CCM. A new method for modeling resonant DC-DC converters using multi-frequency approximation was developed in [6], while the work in [7] presented a continuous-time average modeling of a dual active bridge DC-DC converter. Problems associated with modeling the switched-capacitor DC-DC were examined in [8]. A quadratic boost converter alongside its current controller was designed in [9] using the reduced redundant power processing principle. To the authors' knowledge, no attempt has been made to model and analyze the behavior of a DC-DC converter with fixed voltage sources at both ends.
From the analysis of the different modes of operation of the converter, one can immediately infer that the average model of the converter in the different modes will be different. More specifically, the relationship between the duty cycle and the inductor current changes radically as the converter transits from the DCM region to the CCM region. This nonlinear behavior of the converter with a source at both ends implies that a linear inductor current regulator-such as the PID controller-cannot be used over its entire range of operation. A common practice is to design the converter in such a manner to ensure it only operates in the CCM region. However, for a battery charging application, operation in the DCM region is unavoidable during the constant voltage charging stage. It is also worth noting that the critical current-the boundary between DCM and CCM-depends on the voltages at both ends of the converter. Hence, for battery charging applications, this boundary is not fixed in the constant current charging stage since the battery voltage changes with the state of charge. This then calls for an advanced controller that is able to cope with the transition between the different modes of operation. An adaptive law based on sliding mode control was proposed and validated for DC-DC converters in [10], while the work in [11] presented an indirect sliding mode control for a quadratic boost converter in DCM and CCM. Thew work in [12] discussed a self-tuning adaptive controller for a non-inverting buck-boost converter based on parameter estimation using recursive least squares (RLS). A zero-voltage switching technique was employed for a buck converter at the DCM/CCM boundary in [1] and was shown to have increased efficiency. A parameter insensitive predictive current control was reported in [2] for a DC-DC power converter, and the work in [3] presented a PID compensator for a low power DC-DC buck converter in both DCM and CCM. A PID was also presented in [13], but with adaptive gains that change as the converter moves from DCM to CCM. In [14], a mixed-mode input current sensorless predictive current control was proposed for a boost switched-mode rectifier. A sample correction and duty-ratio feedforward were employed in [15], which reduce the harmonic content of the input current in DCM and mixed conduction mode (MCM) operation.
In this paper, an adaptive controller is proposed for switched-mode DC-DC converters with voltage sources at both ends. Thus far, very few attempts have been made to solve the DCM/CCM transition problem. An attempt was presented in [16] where an adaptive fuzzy logic mixing technique was proposed for current control. Unlike this method, the proposed strategy has the following distinctive features: (i) The proposed adaptive controller achieves asymptotic stability unlike the controller in [16], which yields stability only to a region. Thus, error convergence to zero is guaranteed as opposed to the adaptive fuzzy logic controller. (ii) Adaptive control reduces the computational burden associated with such a soft-computing technique, i.e., fuzzy logic. (iii) The controller in [16] needs to be coupled with a local model network to get satisfactory results, unlike the proposed adaptive control, where only a simple switching function is needed. The inherent properties of adaptive control are instrumental to achieve smooth inductor current DCM/CCM transition and can be used for buck, boost, and buck-boost topologies. Numeric results are presented with the detailed switching model of a four-quadrant converter topology. A buck converter is used as a battery charger to experimentally validate the effectiveness of the proposed control scheme. The rest of the paper is arranged as follows: In Section 2, the detailed analysis and average modeling of the various DC-DC converter topologies are given. Section 3 presents the description of the plant functionality and the problem statement. This section also details the derivation of the adaptive control law and its stability analysis. Simulation and experimental results are presented and discussed in Section 4. The paper concludes in Section 5 with some remarks and suggestions for future research.

Converter Model
The four-quadrant converter can operate in either one of the buck, boost, or buck-boost topologies (Figure 1), depending on the voltage at both ends of the converter. Q1 to Q4 represent pulses. The analysis and derivation of the equations governing the behavior of four-quadrant DC-DC converters with two voltage sources can be found in [16]. The transition from one topology to another is achieved by the application of appropriate control signals for the gate of the switches and the direction of the inductor current, which forward biases the body diode of the MOSFETs. The switches could be either completely on, completely off, or be in a switching state.

Buck Model with Two Sources at Both Ends
The buck converter can be modeled using switching function analysis as follows: where V 1 is the converter input voltage, V 2 is the converter output voltage, L is the inductance of the converter, and I L is the instantaneous value of inductor current. For the analysis of the behavior of the buck converter, the duty cycle d can be used to represent the average on time for the switch S, hence obtaining the average model for the buck converter topology.
Energies 2020, 13,4187 For the sake of the analysis of the converter in DCM (d < d c ), the inductor current is assumed to only flow in one direction. Hence, to get the relationship between the duty cycle and the average inductor current in DCM, one cycle of the inductor current is considered in the switching model. As is shown in Figure 2, during the time the switch is on (T ON ), the inductor is charged directly by the source, so the current in it rises. When the switch is turned off, the inductor current is discharged into the source; hence, it falls to zero and stays at zero for the remainder of the time the switch is off (T OFF ).
where I ave is the average value of inductor current over a switching period; the critical current, I c , at the DCM/CCM boundary can be calculated by using d c = V 1 V 2 with (3):

Boost Model with Two Sources at Both Ends
Similarly, the boost converter's average model in CCM can be written as [16]: To ensure an unchanging inductor current, it is required to find a value for d that will make the term To find the expression for the average inductor in the DCM operation, a similar analysis to the one carried out above for a buck converter is performed. Thus,

Buck-Boost Model with Two Sources at Both Ends
The buck-boost converter can also be represented by its average model, which is defined as [16]: For a constant inductor current, it is required to find a critical value for d that will force the term To find the expression for the average inductor in the DCM operation, a similar analysis to the one carried out above for the buck and the boost converter is performed. Hence, The critical duty cycle, d c , at the DCM/CCM boundary depends only on the converter's input-output voltage ratio. With a power flow from V 1 to V 2 , boost and buck modes are only valid when V 2 V 1 ≥ 1 and V 2 V 1 ≤ 1, respectively. As for buck-boost mode, it can operate in both regions. From Formulations (3), (6), and (9), it can be seen that in the DCM operation, the relationship between the inductor current and the duty cycle is a quadratic one, i.e., the average inductor current depends on the square of the instantaneous duty cycle. Hence, it can be concluded that the converter operating in the DCM is a memoryless system. On the other hand, from Formulations (2), (5), and (8), it can be seen that the average inductor current depends on the integral (or cumulative values) of the duty cycle. Hence, the converter operates as a non-memoryless system when in CCM operation.

Problem Statement
As has been mathematically demonstrated above, the converter operates in two distinct modes: DCM and CCM. The DCM is a memoryless system, which means that the current can be controlled in an open loop. The inherent stability of the converter in this mode of operation means an aggressive PI controller can be used without the risk of instability. However, in CCM operation, the converter is highly sensitive to changes in the duty cycle. The implication of this is that a controller that ensures satisfactory transient performance in DCM operation would cause the system have wild inductor current oscillations in CCM.
Furthermore, for battery charger applications, the boundary between CCM and DCM is constantly changing since the battery voltage changes with its state of charge. Such uncertainty requires an advanced control strategy to achieve smooth transition at the boundary and to maintain accurate tracking in both operating modes. The proposed controller is able to transition from DCM operation to CCM operation using a gain scheduler that adjusts the controller parameters for a smooth transition from CCM to DCM.

Adaptive Control Strategy
A typical converter control structure consists of two loops: an outer voltage loop for regulating the output voltage and a second inner loop for current control in both constant current and constant voltage regions of the battery. Traditionally, a simple PI controller is used for the outer voltage loop. Consequently, a PI controller can be used. The output of the PI controller is the current reference to be tracked by the current control loop. However, since this work is focused on converter structures with fixed voltage sources at the input and at the output, only the inner current loop is considered. For certain applications, like battery charging, this current reference traverses the DCM-CCM boundary, hence the need for an advanced controller. The inductor current control structure is shown below. The proposed adaptive control scheme is shown in Figure 3.  (3), (6), and (9) reveals that the current is a function of f s , V 1 , V 2 , L, and d, which are all inherently bounded. Both converters' switching frequency f s and inductance L have finite values. Furthermore, the converters' input and output source voltages are also bounded by their nature. Finally, the duty cycle is the control signal that is always within the range of 0 < d < 1 and, hence, is also bounded. Henceforth, the control system in DCM is always stable as t → ∞ since the current is bounded at all times.

Remark 1. The correlation between the converter current and the duty cycle in DCM in
The proposed control technique is based on the inverse model of the four-quadrant converter, which is based on deriving an expression for the duty cycle in terms of the converter parameters, the source voltage and the output voltage. Equations (2), (5), and (8) can be expressed as, Without loss of generality, the aforementioned formulations can be represented by the following general form, where V a and V b are voltage state variables in a general form that are valid for all converter modes. For a converter operating in buck mode, V a = V 1 and , and so the rest of them. Thus, the general form desired dynamics can be written in a linear-in-parameter regression form: where . Let e = I L − I * L denote the current error, with I * L the desired time-dependent current signal. The control philosophy capitalizes on adaptive control theory for the design of an adaptive controller that achieves accurate tracking through continuous adaptation. Therefore, the adaptive control law is defined as, where ζ is a strictly positive constant gain. Take the derivative of the error signal e and multiply it by L V a , Setting the control law d as (16) leads to the following desired error dynamics, Stability is a critical aspect in closed-loop control systems. Unlike many control techniques that lack stability proof, the stability of the proposed adaptive control scheme is demonstrated using Lyapunov's stability theory. where Λ = diag(λ 1 , λ 2 ) and λ i is a positive constant.
Although DCM and CCM have different dynamics, one controller is used for both modes with two distinct adaptation gains, i.e., Λ DCM and Λ CCM , as shown in Figure 3. Depending on the value of the inductor current I L , the proper adaptation gain is selected using the logic highlighted by a dotted box in Figure 3.
Proof. Choose the following Lyapunov candidate: Taking the derivative of V yields,V Parameters Θ are considered to be slowly time-varying so that˙Θ =˙Θ. Substitute L V aė from (18), Setting the adaptation law as (20) implies that, Setting ζ > 0 yieldsV < 0, ∀ e = 0, so that e = 0 is a globally asymptotically stable equilibrium point. Hence, the system is asymptotically stable in the sense of Lyapunov. A Lyapunov function V with a negative definite derivative (V < 0) must converge to a finite value. Therefore, signals e,Θ, andΘ also converge to finite limits. From (16),Î L is also bounded, which implies from (18) thatė is also bounded.
For non-autonomous systems, asymptotic stability cannot be concluded from a positive Lyapunov function V that is decreasing (V < 0). Instead, the application of Barbalat's lemma is required to prove asymptotic stability and convergence.
Taking the derivative ofV leads to,V Consequently,V is also bounded. From Lemma 1, V has a finite limit as t → ∞, andV is uniformly continuous. Thus, lim t→∞V = 0, and hence, lim t→∞ e = 0.

Simulation and Experimental Results
In order to validate the proposed adaptive controller, a detailed switching model of the four-quadrant topology with two voltage sources was simulated in the MATLAB/Simulink environment.
To accurately simulate a given converter topology, with its nonlinearities, the SimPowerSystems toolbox was used to build the three topologies of the converters. This toolbox contains electronic components, which model actual hardware, e.g., MOSFETs, inductors, etc. In addition, discrete-time simulation was used to get a step closer to the hardware. Hence, the behavior of the proposed adaptive control on actual hardware can be approximated by its behavior using the discrete-time switching model presented in this paper. Additional resistors of 0.52 mΩ were included in the model to account for the resistances of the connecting wires. These additional resistances have the effect of raising the critical duty cycle and critical current separating the DCM and CCM boundary, as will be seen in the results.
To reveal the adaptive nature of the controller, numerous simulation runs were conducted on the various converter topologies, and the results are presented in Figures 4-6. A cyclic inductor current was used as the commanded current, while the reference current for the adaptive controller was taken as the output of a filter with ω n = 25 rad/s. The parameters of the four-quadrant converter are given in Table 1. For the purposes of comparison, a traditional PI controller was used for inductor current control of the buck converter topology. In the first scenario, the PI controller was tuned for tracking in the DCM, used for inductor current control across the entire reference current range. Next, a PI controller tuned for satisfactory performance in CCM was used for current control across the entire range of the reference current. The results for both scenarios are presented in Figure 7. In both cases, the PI control gains were chosen to get a satisfactory performance following an empirical analysis and can be refined further to improve the control performance. First, a buck converter with two fixed sources at both ends was simulated in MATLAB/Simulink using the switching model. The parameters of the converter are given in Table 1. The critical current, I C , at which the converter makes the transition from DCM was obtained by substituting the converter parameters in Formulation (4) as follows: The commanded current was chosen to cycle between 0 A and 20 A to enable the operation of the buck converter in both DCM and CCM.
The critical duty cycle at which the average inductor current remained unchanged is given by: Next, the adaptive controller was tested with the switching model of a boost converter. The parameters of the boost converters were the same given in Table 1. The boundary current demarcating CCM operation from DCM operation for the boost converter is given by substituting converter parameters in Formulation (7) as follows: For simulation, the commanded current of the boost converter was made to oscillate between 0 A and 20 A to make it operate in both DCM and CCM. The critical duty cycle to ensure a constant average inductor current is given by: Lastly, the adaptive controller was tested with the switching model of a non-inverting buck-boost converter. The parameters of the converter are as given in Table 1. The critical current separating the DCM from the CCM is given by substituting converter parameters into Formulation (10) as follows: For operation of the buck-boost converter in both CCM and DCM, the converter commanded current is chosen to cycle between 0 A and 40 A. The critical duty cycle to ensure an unchanging inductor current is given by: The behavior of the converter in the transition between DCM and CCM is similar for all three topologies, as can be seen from the results, so it is sufficient to discuss just the buck converter simulation. For the control of the inductor current using the PI controller tuned for DCM operation, accurate tracking is observed in Figure 7a in DCM. However, when the inductor current transitions to CCM, wild oscillations can be observed in the inductor current. This is due to the inherent instability of the converter CCM operation. Next, the PI controller is tuned for satisfactory performance in CCM operation and used to control the inductor current over the entire range of the reference current. The result presented in Figure 7b reveals the sluggishness of the controller when the converter is in DCM operation. However, once the transition is made into CCM, the controller is able to perfectly track the reference current. These results prove that a single PI cannot simultaneously achieve good tracking in both the DCM and CCM operation of the converter.     Next, the PI controller is replaced by the proposed adaptive controller based on the inverse model. In the first cycle occurring between 0 s and 0.5 s, there is a considerable mismatch between the actual inductor current and the reference current (see Figure 4a). The tracking error is presented in Figure 4b, where one can observe an initial tracking error of 8 A in the first cycle. The discontinuous transition from DCM to CCM is also noticeable during the ascent and descent of the inductor current in the first cycle. In the second cycle, occurring from 0.6 s to 1 s, the controller adapts to some extent, and the tracking error during the current ascent is about 2 A. Further adaptation can be seen in the third and fourth cycle, as the inductor current tracking error is progressively reduced. The duty cycle provided by the controller is presented in Figure 4c. As expected, the duty cycle never exceeds the critical duty cycle of 0.33 during the CCM operation.
Similar results are presented for the boost and buck-boost converter. The adaptation is more easily visualized when one examines the inductor current tracking error shown in Figures 5b and  6b. The gradual diminishing of the error in both cases verifies the adaptability of the controller. It is worth noting that the same controller is used for all three topologies of the four-quadrant converter, without modification to the structure or parameter. The only modification made is to the local model network, where the voltages at both ends of the converter are used to determine the transition current. The portability of the adaptive controller across all three topologies is due to the fact that the controller is based on a generic inverse model derived earlier.
A buck converter was used to experimentally assess the performance of the proposed approach. The adaptive controller was implemented in an Arduino Due board. The control algorithm sampling time was set to 1 ms, and the converter's switching frequency was set to 1 kHz. A power supply provided a regulated 12 V input voltage, and a 2350 mAh, 3.6 V lithium-ion battery (CGR18650D) was taken as the converter's output source. As such, the experimental test acted as a battery charger. For that, the battery was initially subjected to a constant current of 0.44 A for 100 ms, and the process was repeated a second time to show the convergence properties of the proposed adaptive controller.
Results are reported in Figure 8. As expected, the current converges gradually to its desired value as the adaptive controller adjusts its parameters. Once the convergence of the parameters is achieved, accurate tacking is observed. The smooth DCM/CCM transition and fast convergence are noteworthy. As is revealed in Figure 8b, the tracking errors converge gradually to zero after approximately 50 ms. The ability of the proposed controller to achieve high tracking accuracy is clearly demonstrated by the low magnitude of the tracking errors. Hence, the proposed adaptive control scheme is capable of achieving the required high control performance.

Conclusions
In this work, an adaptive controller was proposed for inductor current control in a four-quadrant DC-DC converter with voltage sources at both ends. Depending on the ratio of the voltages at both ends of the converter, it can operate in either the buck, boost, or buck-boost topology. Analysis of the converter provided shows that the converter can operate in both DCM and CCM. In these different modes, the converter displays different degrees of stability and, as such, cannot be controlled by a single controller. Moreover, a simple function is used to switch the controller parameters for a smooth transition between DCM and CCM. In applications where switched-mode DC-DC converters with voltage sources at both ends are needed, DCM and CCM operations are inevitable. A practical application of this is where a battery powered DC-DC converter is connected in parallel with an existing power source for peak shaving. The suggested controller was tested using simulated models of a buck, boost, and non-inverting buck-boost converter simulated in the MATLAB/Simulink environment. Additionally, a buck converter was used to assess experimentally the effectiveness of the proposed adaptive controller. Simulation and experimental results reveal the adaptive nature of the controller and its ability to tackle the discontinuous transition that usually occurs at the DCM and CCM boundary.

Conflicts of Interest:
The authors declare no conflict of interest.