# Design of a Single-Stage Transformerless Buck-Boost Inverter for Electric Vehicle Chargers
## 5 Controller Design
### Closed-Loop Control  
A typical double-loop controller, i.e., an outer voltage-loop and an inner current-loop controller [15; 16], is incorporated to regulate the proposed buck-boost inverter. Its relevant control block diagram is shown in Figure 4, where \(K_{pmm}\) denotes the gain of the pulse-width modulator (PWM), \(z^{-1}\) represents one sampling period time delay, and ZOH stands for the mathematical model of the zero-order-hold behavior of the pulse-width generator [7]. It should be mentioned that the proposed controller is implemented by a digital controller, and hence, the transfer functions of the controllers are expressed in the discrete \(z\)-domain. In contrast, the system plant model, which is described by (3), is represented in the continuous s-domain. Additionally, a control block denoted as G\({}_{d}\)(\(z\)) is employed in the current controller to effectively dampen the resonant peak introduced by the \(LC\)-filter. Moreover, taking the varying loads into consideration, the load current \(i_{R}\)(\(s\)) is treated as a disturbance here. The transfer function from the output of PWM generator to the inductor current \(i_{L}\)(\(s\)) can be derived from Figure 4 as follows:  
\[T_{vi\_iL}(s)=\frac{i_{L}(s)}{v_{i}(s)}=\frac{C_{f}s}{C_{f}L_{f}s^{2}+\left(1- d_{o}\right)^{2}}. \tag{9}\]  
In addition, the transfer function from the output of PWM generator to the output voltage \(v_{c}\) (\(s\)) can be derived as:  
\[T_{vi\_vC}(s)=\frac{v_{C}(s)}{v_{i}(s)}=\frac{1-d_{o}}{C_{f}L_{f}s^{2}+\left(1 -d_{o}\right)^{2}}. \tag{10}\]  
Applying the \(z\)-transformation with ZOH into (9) and (10), the relevant discrete expressions can be obtained as:  
\[ \begin{array}{l}T_{vi\_iL}(z)=Z\Big{[}(1-z^{-1})\cdot\frac{T_{vi\_iL}(s)}{s }\Big{]}\\ =\frac{(z-1)\cdot\sin(\left\lvert(1-d_{o}\right)\omega_{T}\tau_{s}\right\rvert }{(1-d_{o})L_{f}\omega_{T}\left\{z^{-2}-2z\cos(\left\lvert(1-d_{o}\right) \omega_{T}\right\rvert+1)}},\end{array}  \tag{11}\]  
Figure 4: Overall control block diagram of the proposed buck–boost inverter. \[ \begin{split}& T_{vi\_c}c(z)=Z\Big{[}(1-z^{-1})\cdot\frac{T_{vi\_c}(s)}{ s}\Big{]}\\ &\quad=\frac{(z+1)\cdot\{1-\cos([1-d_{o})\omega_{r}T_{s}]\}}{(1-d_{o })\cdot\{z^{2}-2\cos([1-d_{o})\omega_{r}T_{s}]+1\}}\end{split}  \tag{12}\]  
where \(\omega_{r}=1/(l_{r}C_{f})^{1/2}\) denotes the resonance frequency of the \(LC\)-filter. After the derivation of (11) and (12), the simplified control block diagram of the proposed buck-boost inverter is illustrated in Figure 5, where all the transfer functions are expressed in the \(z\)-domain. The system and control parameter values are tabulated in TABLE 1. It should be mentioned that the proportional gains \(G_{i}\) and \(G_{d}\) are used for the current controller, while a proportional-resonant (PR) controller with its proportional gain denoted as \(G_{vp}\) and resonant gain denoted as \(G_{vr}\) is employed as the voltage controller. Based on Figure 5 and the system parameter values listed in Table 1, the pole-zero map of the closed-loop voltage control is illustrated in Figure 6, where the zeros are represented as circles while the poles are denoted as crosses. The effectiveness of the proposed damping control block \(G_{d}(z)\) can be clearly observed by comparing Figure 6a,b. As seen, the system poles are located much closer to the center of the unit circle after the carefully designed \(G_{d}(z)\) is enabled. It should be highlighted that the variation in the duty cycle will influence the stability of the proposed inverter, while the stability of conventional H-bridge inverters is independent of \(d_{o}\). As a consequence, all the closed-loop poles should always stay within the unit cycle as the duty cycle varies. In order to ensure the system stability, the maximum value of the output voltage \(v_{c}\) should be given first, and then the maximum \(d_{o}\) can be derived according to (8). Next, the variation range of \(d_{o}\) can be obtained.