**Figure 17.**

*Block diagram of the current loop.*

**Figure 18.** *Pole map of* FCL-i(s)*.*

#### *3.3.2.2 Grid connected mode*

In grid connection operation mode, the DC/AC converter controls power exchange with grid. In this mode, only the current loop is controlled. This loop is based on a resonant controller as shown in **Figure 16**.

The simplified block diagram of the current loop is given by **Figure 17**.

Based on **Figure 17**, the open and closed-loop transfer functions are given by Eqs. (18) and (19), respectively. The transfer function of the resonant controller RC2 is given by Eq. (17):

$$F\_{CR2}(s) = \frac{i\_{2i}s^2 + i\_{1i}s + i\_{0i}}{s^2 + o\_0^2} \tag{17}$$

$$F\_{OL\cdot i}(\mathbf{s}) = \frac{I\_{L1}}{I\_{L1\cdot r\mathbf{j}'} - I\_{L1}} = \frac{i\_{2\mathbf{i}}s^2 + i\_{1\mathbf{i}}s + i\_{0\mathbf{i}}o\_0^2}{L\_1s^3 + L\_1o\_0^2s} \tag{18}$$

$$F\_{CL\cdot i}(s) = \frac{I\_{L1}}{I\_{L1\cdot ref}} = \frac{i\_{2i}s^2 + i\_{1i}s + i\_{0i}}{L\_1s^3 + i\_{2i}s^2 + \left(L\_1o\_0^2 + i\_{1i1}\right)s + i\_{0i1}}\tag{19}$$

For the tuning of the internal loop resonant controller, the generalized stability margin criterion is considered. The system characteristic polynomial *Pi*(*s*) is deduced from Eq. (19), and it is expressed as follows:

*Control Analysis of Building-Integrated Photovoltaic System DOI: http://dx.doi.org/10.5772/intechopen.91739*

$$P\_i(\mathbf{s}) = L\_1 \mathbf{s}^3 + i\_{2i} \mathbf{s}^2 + \left(L\_1 a\_0^2 + i\_{1i}\right) \mathbf{s} + i\_{0i} \tag{20}$$

The identification between the system characteristic polynomial *Pi*(*s*) and the generalized stability margin criterion reference polynomial *PGSMi*(*s*) [Eq. (21)] and the resonant controller *RC*<sup>2</sup> parameters are deduced as in Eq. (22):

$$P\_{\rm GSMi}(\mathbf{s}) = \lambda\_i (\mathbf{s} + r\_i)(\mathbf{s} + r\_i + j a\_{\rm ii})(\mathbf{s} + r\_i - j a\_{\rm ii}) \tag{21}$$

**Figure 19.** *Bode diagram of* FOL-i(s)*.*

*3.3.2.2 Grid connected mode*

**Figure 18.** *Pole map of* FCL-i(s)*.*

**66**

**Figure 17.**

*Block diagram of the current loop.*

*Numerical Modeling and Computer Simulation*

RC2 is given by Eq. (17):

In grid connection operation mode, the DC/AC converter controls power exchange with grid. In this mode, only the current loop is controlled. This loop is

The simplified block diagram of the current loop is given by **Figure 17**. Based on **Figure 17**, the open and closed-loop transfer functions are given by Eqs. (18) and (19), respectively. The transfer function of the resonant controller

*i*2*is*

<sup>2</sup> <sup>þ</sup> *<sup>i</sup>*1*is* <sup>þ</sup> *<sup>i</sup>*0*<sup>i</sup> <sup>s</sup>*<sup>2</sup> <sup>þ</sup> *<sup>ω</sup>*<sup>2</sup> 0

<sup>2</sup> <sup>þ</sup> *<sup>i</sup>*1*is* <sup>þ</sup> *<sup>i</sup>*0*<sup>i</sup>ω*<sup>2</sup>

<sup>0</sup> þ *i*1*i*<sup>1</sup> *<sup>s</sup>* <sup>þ</sup> *<sup>i</sup>*0*i*<sup>1</sup>

*<sup>L</sup>*1*s*<sup>3</sup> <sup>þ</sup> *<sup>L</sup>*1*ω*<sup>2</sup>

<sup>2</sup> <sup>þ</sup> *<sup>i</sup>*1*is* <sup>þ</sup> *<sup>i</sup>*0*<sup>i</sup>*

0

0*s*

<sup>¼</sup> *<sup>i</sup>*2*is*

*<sup>L</sup>*1*s*<sup>3</sup> <sup>þ</sup> *<sup>i</sup>*2*is*<sup>2</sup> <sup>þ</sup> *<sup>L</sup>*1*ω*<sup>2</sup>

For the tuning of the internal loop resonant controller, the generalized stability

(17)

(18)

(19)

*FCR*2ðÞ¼ *s*

*IL*<sup>1</sup> *IL*<sup>1</sup>‐*ref* � *IL*<sup>1</sup>

<sup>¼</sup> *<sup>i</sup>*2*is*

margin criterion is considered. The system characteristic polynomial *Pi*(*s*) is

based on a resonant controller as shown in **Figure 16**.

*FOL*‐*<sup>i</sup>*ðÞ¼ *<sup>s</sup>*

deduced from Eq. (19), and it is expressed as follows:

*IL*<sup>1</sup> *IL*<sup>1</sup>‐*ref*

*FCL*‐*<sup>i</sup>*ðÞ¼ *<sup>s</sup>*

**Figure 20.** *Bode diagram of* FCL-i(s)*.*

$$\begin{cases} i\_{2i} = 3r\_i \lambda\_i \\ i\_{1i} = \lambda\_i \left( 3r\_i^2 + o\_{ii}^2 \right) - L\_1 o\_0^2 \\ i\_{0i} = \lambda\_i \left( r\_i^3 + r\_i o\_{ii}^2 \right) \\ \lambda\_i = L\_1 \end{cases} \tag{22}$$

We choose ri equal to 100 and *ωii* equal to *ωg*. For *Li* equal to 2 mH, the resonant controller *RC*<sup>2</sup> parameters are given by the following equation:

$$\begin{cases} i\_{2i} = \mathbf{0.5} \\ i\_{1i} = \mathbf{60} \\ i\_{0i} = \mathbf{11870} \end{cases} \tag{23}$$

**5. Experimental results**

*Reference current in case of connected mode.*

*Power injected into AC bus in case of connected mode.*

*Control Analysis of Building-Integrated Photovoltaic System*

*DOI: http://dx.doi.org/10.5772/intechopen.91739*

references.

**69**

**Figure 23.**

**Figure 22.**

**6. Conclusion**

**Figure 24** shows the experimental test bench. The used AC/DC converter is from SEMIKRON. Currents and voltages are censored via LEM LV25 and LEM 55LP, respectively, as given in **Figure 24**. The control algorithm is implemented on the STM32F4 Discovery. The acquisition time is set to 100 μs. **Figure 25** presents the LCL filter capacitor voltage in islanded mode for different values of voltage reference *Vc-ref-abc*. As shown in this figure, the obtained voltages are equal to their

In this chapter, the control of power converters integrated in building solar system is investigated. The studied system is composed of a PV panel in parallel with a battery energy storage system which are linked to a DC bus, a DC/AC power converter, and an LCL filter interfacing between DC and AC bus. Single- and three-phase linear and nonlinear loads are connected to a four-wire AC bus.

For the obtained resonant controller parameters, **Figure 18** shows the pole map of *FCL-i*(*s*). Based on this figure, the stability margin *ri* is equal to the desired one. **Figure 19** gives the bode diagram of *FOL-i*(*s*). As mentioned on this figure, the gain margins *Gm* and *Pm* are equal to infinity and 79.5°, respectively. **Figure 20** presents the gain of *FCL-i*(*s*) and shows that the bandwidth of the internal current loop is equal to 40.8 Hz.

## **4. Simulation results**

Several simulation tests developed under PSIM software were done. **Figure 21** presents the LCL filter capacitor voltage in islanded mode for different values of voltage reference *Vc-ref-abc*. As shown in this figure, the obtained voltages are equal to their references. **Figure 22** presents the power injected into the AC bus during 24 hours; this power corresponds to the PV generation. In this case all the batteries are considered to be charged to their SOCmax. The deduced reference current is presented in **Figure 23**.

#### **Figure 21.**

*LCL filter capacitor voltage in islanded mode for different values of voltage reference* Vc-ref-abc*: (a)* Vc-ref-abc *= 325 V, (b)* Vc-ref-abc *= 200 V, (c)* Vc-ref-abc *= 100 V, and (d)* Vc-ref-abc *= 30 V.*

*Control Analysis of Building-Integrated Photovoltaic System DOI: http://dx.doi.org/10.5772/intechopen.91739*

*i*2*<sup>i</sup>* ¼ 3*riλ<sup>i</sup> <sup>i</sup>*1*<sup>i</sup>* <sup>¼</sup> *<sup>λ</sup><sup>i</sup>* <sup>3</sup>*r*<sup>2</sup>

8 >>><

*Numerical Modeling and Computer Simulation*

>>>:

equal to 40.8 Hz.

**4. Simulation results**

presented in **Figure 23**.

**Figure 21.**

**68**

*<sup>i</sup>*0*<sup>i</sup>* <sup>¼</sup> *<sup>λ</sup><sup>i</sup> <sup>r</sup>*<sup>3</sup>

8 ><

>:

*λ<sup>i</sup>* ¼ *L*<sup>1</sup>

controller *RC*<sup>2</sup> parameters are given by the following equation:

*<sup>i</sup>* <sup>þ</sup> *<sup>ω</sup>*<sup>2</sup> *ii* � � � *<sup>L</sup>*1*ω*<sup>2</sup>

*<sup>i</sup>* <sup>þ</sup> *riω*<sup>2</sup> *ii* � �

We choose ri equal to 100 and *ωii* equal to *ωg*. For *Li* equal to 2 mH, the resonant

*i*2*<sup>i</sup>* ¼ 0*:*5 *i*1*<sup>i</sup>* ¼ 60 *i*0*<sup>i</sup>* ¼ 11870

For the obtained resonant controller parameters, **Figure 18** shows the pole map of *FCL-i*(*s*). Based on this figure, the stability margin *ri* is equal to the desired one. **Figure 19** gives the bode diagram of *FOL-i*(*s*). As mentioned on this figure, the gain margins *Gm* and *Pm* are equal to infinity and 79.5°, respectively. **Figure 20** presents the gain of *FCL-i*(*s*) and shows that the bandwidth of the internal current loop is

Several simulation tests developed under PSIM software were done. **Figure 21** presents the LCL filter capacitor voltage in islanded mode for different values of voltage reference *Vc-ref-abc*. As shown in this figure, the obtained voltages are equal to their references. **Figure 22** presents the power injected into the AC bus during 24 hours; this power corresponds to the PV generation. In this case all the batteries are considered to be charged to their SOCmax. The deduced reference current is

*LCL filter capacitor voltage in islanded mode for different values of voltage reference* Vc-ref-abc*: (a)* Vc-ref-abc *= 325 V, (b)* Vc-ref-abc *= 200 V, (c)* Vc-ref-abc *= 100 V, and (d)* Vc-ref-abc *= 30 V.*

0

(22)

(23)

**Figure 22.** *Power injected into AC bus in case of connected mode.*

**Figure 23.** *Reference current in case of connected mode.*
