# Three-Phase PV CHB Inverter for a Distributed Power Generation System
## 2 System Topology and Control Strategy
### CHB Inverter Modeling  
From Figure 1, it can be argued that for a given voltage \(v_{pvi,p}\) across the \(i^{th}\) DC-link capacitor, the \(i^{th}\) cell in the \(p\)-th leg provides an output voltage \(v_{Hi,p}\) which can assume only three values (0, \(+v_{pvi,p}\), \(-v_{pvi,p}\)) depending on the state of the four switches \(\text{S}_{i,p}\). Namely, \(v_{Hi,p}=0\) if either \(\text{S}_{i1,p}\) and \(\text{S}_{i3,p}\) or \(\text{S}_{i2,p}\) and \(\text{S}_{i4,p}\) are in the ON state; \(v_{Hip}=+v_{pvi,p}\) when both \(\text{S}_{i1,p}\) and \(\text{S}_{i4,p}\) are ON; \(v_{Hi,p}=-v_{pvi,p}\) when both \(\text{S}_{i2,p}\) and \(\text{S}_{i3,p}\) are ON. As a result, the AC \(v_{inv,p}\) waveform is composed by \(2N+1\) levels given by the sum of the voltages \(v_{Hi,p}\). In other terms, by assuming the switch states as binary signals (i.e., switch ON corresponds to 1, while switch OFF corresponds to 0), the AC voltage \(v_{inv,p}\) across the \(p\)-th phase can be written as follows:  
\[v_{inv,p}=\sum_{i=1}^{N}v_{Hi,p}=\sum_{i=1}^{N}\left(S_{i1,p}-S_{i3,p}\right)v _{pvi,p}=\sum_{i=1}^{N}h_{i,p}v_{pvi,p} \tag{1}\]  
where the modulation factor \(h_{i,p}\) can assume three possible values (+1, -1, 0). It is worth noting that in conventional modulation approaches, the cells are either all modulated (as in the phase shifted PWM) [20; 38; 39; 40; 41], or none are modulated (as in the level-shifted modulation) [21]. Differently from those approaches, only one set of the modulation factors \(h\) is being modulated in our algorithm, so that (1) can be written as  
\[v_{inv,p}=\sum_{i=1}^{K-1}\pm(v_{pvi,p})+h_{K,p}v_{pvK,p} \tag{2}\]  
where \(K\) identifies the only cell driven in PWM mode during each control cycle. The \(+/-\) sign in the sum depends on whether the corresponding \(h\) is kept to 1 or \(-1\); the remaining \(N\)-K cells do not appear (i.e. \(h=0\)). It can be noted from Figure 1 that the states defined by \(h=+/-1\) correspond to the discharging of the DC-link capacitors \(C_{i,p}\), while \(h=0\) makes the capacitor to be charged by the PV source. Whether the sign is + or - depends on whether \(v_{inv,p}\) is in the positive half cycle or in the negative half cycle, respectively. In order to write the open loop state equations for the control problem, it is possible to replace \(h_{i,p}\) with a continuous switching function \(\overline{h}_{i,p}\) bounded in the interval \([-1,+1]\); thus, each leg current \(i_{in,p}\) injected into the grid can be straightforwardly related to the voltages across each cell:  
\[\frac{di_{in,p}}{dt}=\frac{v_{L,p}}{\frac{dv_{pvi,p}}{dt}=\frac{v_{grid,p}-v_ {inv,p}}{L}=\frac{v_{grid,p}-\sum\limits_{i=1}^{N}\overline{h}_{i,p}v_{pvi,p}} {L} i=1,..,N \tag{3}\]  
The control is achieved by feeding back the state variables according to the schematic view depicted in Figure 2. Figure 2 can be viewed as a quite \"standard\" control cycle which provides the reference voltages \(v_{inv,p}^{ref}\) for the three phases. For each phase, the outer loop adjusts the sum of the DC-link voltages \(v_{pvi,i}\) in accordance with the sum of the references \(v_{pvi,p}^{ref}\) provided by the MPPT blocks (these blocks--not shown in the figure--perform a standard Perturb and Observe (P & O) algorithm). Unfortunately, in order to ensure the overall stability of the CHB inverter, the tracking voltage \(v_{pvi,p}^{ref}\) should avoid the case that PV generators operate in the flat region of their I-V curve [42]. As a consequence, a lower boundary has to be defined, also ensuring a proper synthesis of AC-side multilevel waveform. It important to note that the DC-link voltages \(v_{pvi,i}\) are obtained by digitally filtering the 100 Hz ripple, thus improving the quality of the inverter output current in terms of THD [20]. On the other hand, a proper sizing of the DC-link capacitors has been performed to limit the detrimental effect of the 100 Hz oscillation on the MPPT efficiency [1].