# Analysis of AC DC Four-Switch Boost-Buck Battery Charger Converter for EV Applications
## 8 Control Design
The transfer function for voltage control \(G_{CV}(s)\) is structured as a first-order system with an integrator and a zero at a low frequency, which can be expressed as  
\[G_{CV}(s) = \frac{0.2\,s+10}{0.02s}. \tag{19}\]  
To streamline control operations, the same \(G_{CV}(s)\) and \(G_{Ci}(s)\) transfer functions are utilized for both the buck and boost modes. This simplification contrasts with the approach taken in the referenced work [14; 16], where distinct controller loops are implemented for each mode, leading to increased complexity and computational demand in the digital control system. Figure 15a,b illustrate the Bode plots for the loop gain of the current and voltage transfer functions in the buck mode. Figure 15a shows a bandwidth of 46 kHz and an almost \(75^{\circ}\) phase margin. Figure 15b presents the Bode plot for the voltage loop gain, revealing a bandwidth of 10 Hz and a phase margin of \(109^{\circ}\). These plots demonstrate the stability characteristics of the control system in the buck mode. Figure 16 illustrates the schematic of a block controller used for managing a power conversion system with a dual-loop structure: one for current control and another for voltage control. The diagram indicates the process flow, starting with the sensing of the absolute input voltage \(v_{g}\), output voltage \(v_{o}\), and rectified input current \(\big{|}i_{g}\big{|}\). These sensed values are fed into the control system for processing. Initially, the peak of the input voltage is determined using a peak detector circuit. The sensed input voltage is then divided by this peak value to produce a normalized rectified sine waveform, termed as the voltage reference \(|\sin(\omega t)|\). This normalization is crucial for creating a reference that follows the input voltage's shape but maintains a consistent magnitude, which is necessary for subsequent control actions. The sensed output voltage is then compared with a predetermined fixed reference voltage. The objective here is to regulate the average output voltage to this fixed reference, and this is accomplished through the voltage control compensator \(G_{CV}(s)\). The compensator adjusts the system to correct any deviations from the desired output voltage. Subsequently, the output from \(G_{CV}(s)\) is multiplied by the normalized rectified sine waveform voltage reference \(|\sin(\omega t)|\). This multiplication yields the reference current that the current controller compensator \(G_{Ci}(s)\) will use to shape the rectified input current \(\left|i_{g}\right|\) accordingly. By comparing the actual rectified input current with this reference current, the system ensures that the input current waveform is sculpted to closely match the voltage waveform, thereby achieving a high PF and efficient energy usage. The control signals for the gates of the switching devices are generated through a dual-comparison mechanism involving a Sawtooth waveform with a 1 V amplitude. The top comparator utilizes the output from \(G_{Ci}(s)\) and the Sawtooth waveform to create control signals for the buck switches, which operate at the system's switching frequency. In contrast, the bottom comparator drives the boost switches by first subtracting 1 V from the \(G_{Ci}(s)\) output voltage and then comparing this modified signal with the same Sawtooth waveform. This methodical generation of gate signals ensures that the buck and boost switches are driven correctly to regulate the power flow in the converter. Figure 16: Controller circuit. Figure 15: Bode plots’ transfer functions for buck loop gain of the following: (**a**) Current loop \(G_{i_{g}d-RC_{\text{us}}}(s)G_{Ci}(s)\). (**b**) Voltage loop \(G_{vi_{gr}}(s)G_{CV}(s)\).