*3.3. BES Control Structure and Design*

Figure 8 shows the block diagram of the proposed control structure for the BES system. The control system can be divided into 3 parts: the Power Control (high bandwidth), the Reference Power Calculator, and the SOC control (low bandwidth). These three parts of the controller can be designed separately and independently due to their different time scales.

**Figure 8.** Mathematical model of the BES converter system with the proposed controller.

#### 3.3.1. Power Control Loop

This loop generates the duty cycle for the converter to absorb/supply the reference power (*P*∗ b ). A proportional-integrating (PI) controller is considered and its gains, *k*1b and *k*2b, are optimally designed as follows. Define *x*˙1(*t*) = *e*(*t*) = *P*<sup>∗</sup> <sup>b</sup> (*t*)−*P*bo(*t*), and *x*2(*t*) = *P*bo(*t*) to obtain the state space equations of the power control loop as

$$\begin{aligned} \dot{x}\_1(t) &= -x\_2(t) + P\_\mathsf{b}^\*(t) \\ \dot{x}\_2(t) &= -\frac{R\_\mathsf{b}}{L\_\mathsf{b}} x\_2(t) + \frac{V\_{\mathrm{bus}}}{L\_\mathsf{b}} u\_\mathsf{b}(t) - \frac{V\_{\mathrm{bus}}^2}{L\_\mathsf{b}}. \end{aligned} \tag{4}$$

We use the approach [34] to convert this tracking problem into standard linear quadratic regulator (LQR) problem by applying *<sup>d</sup> dt* to both sides of (4) to obtain

$$\begin{aligned} \dot{z}\_1(t) &= -z\_2(t), \\ \dot{z}\_2(t) &= -\frac{R\_\mathsf{b}}{L\_\mathsf{b}} z\_2(t) + \frac{V\_{\mathrm{bus}}}{L\_\mathsf{b}} \mathcal{W}\_\mathsf{b}(t), \end{aligned} \tag{5}$$

where *<sup>z</sup>*i(*t*) = *<sup>x</sup>*˙i(*t*) and *<sup>W</sup>*b(*t*) = *<sup>u</sup>*˙b(*t*). It is assumed that *<sup>d</sup> dtV*bus and *<sup>d</sup> dt P*<sup>∗</sup> <sup>b</sup> are 0, which is justifiable. Therefore, *z*˙(*t*) = *Az*(*t*)+*BW*b(*t*) and the objective is to regulate *z*1(*t*) =*e*(*t*) to 0. The cost function is

$$J = \int\_0^\infty [q\_1 e^2(t) + q\_2 z\_2^2(t) + \mathcal{W}\_\mathbf{b}^2(t)]dt. \tag{6}$$

As described in Reference [34], the *q*<sup>i</sup> parameters can be systematically adjusted for the design of the gains (*k*1b, *k*2b) to achieve the fast and smooth response in the power control. The numerical design stage for this system is described in Section 4.

#### 3.3.2. Reference Power Calculation

The reference power is calculated using an algorithm to properly follow the desired ramp rate. Figure 9 shows the flowchart that generates a reference power value, *P*rmp, that follows desired ramp

rate whenever the PV power experiences changes. If *P*∗ soc is power for the SOC control, then the reference power for the BES system is

$$P\_\mathbf{b}^\*(t) = P\_{\rm rmp}(t) + P\_{\rm scc}^\*(t). \tag{7}$$

**Figure 9.** Flowchart to calculate power ramp reference for the BES.

#### 3.3.3. SOC Control Loop

A PI controller is used and its gains, *k*1soc and *k*2soc, are optimally designed to keep the SOC close to its reference value as shown in Figure 8 [6]. The SOC controller gains are designed such that the power control loop and the ramp reference calculator are faster than it. Therefore, during the design of this loop, the fast dynamics of the power control loop may be neglected (and this loop is substituted with a unity gain and the ramp power *P*rmp is set to zero). With these assumption and also neglecting the small voltage variations across the battery that is, *v*<sup>b</sup> ≈ *V*<sup>∗</sup> <sup>b</sup> , the system becomes linear. Defining *x*˙1(*t*) =*e*(*t*) =SOC∗−SOC(*t*), *x*2(*t*) =SOC(*t*), and *u*(*t*) =*P*soc(*t*), the state equations of SOC control loop are

$$\begin{aligned} \dot{x}\_1(t) &= -x\_2(t) + \text{SOC}^\*,\\ \dot{x}\_2(t) &= -\frac{1}{QV\_\text{b}^\*} u(t). \end{aligned} \tag{8}$$

This can be converted to a LQR form by applying *<sup>d</sup> dt* as

$$\begin{aligned} \dot{z}\_1(t) &= -z\_2(t), \\ \dot{z}\_2(t) &= -\frac{1}{QV\_\mathbf{b}^\*} \mathcal{W}\_\mathbf{b}(t) \end{aligned} \tag{9}$$

where *z*i(*t*) =*x*˙i(*t*). Thus, *z*˙(*t*) = *Az*(*t*)+*BW*b1(*t*) and the objective is to regulate *z*1(*t*) =*e*(*t*) to 0. Define the cost function

$$J = \int\_0^\infty [q\_1 z^2(t) + q\_2 z\_2^2(t) + \mathcal{W}\_{\mathbf{b}1}^2(t)]dt,\tag{10}$$

and use the method of Reference [34] for the design of the gains (*k*1soc, *k*2soc) to achieve smooth response in the SOC control. Numerical design is provided in Section 4.

#### *3.4. Determining the BES Capacity*

The battery capacity depends on the desired slowest power ramp of the PV and the BES combined. The minimum BES capacity (*Q*min) is chosen such that during the maximum power disturbance (Δ*P*max) the system operates at desired slowest power ramp (*R*min) keeping the SOC within the desired range (SOCmin, SOCmax) for all the time.

Figure 6 shows the typical desired response of the system. For maximum PV power fluctuation Δ*P*max (in W), the BES should be able to supply power with minimum ramp *R*min (in W/s) for the time interval *T* where *T* = <sup>Δ</sup>*P*max *<sup>R</sup>*min . Assuming that the battery voltage remains relatively constant at *V*<sup>∗</sup> <sup>b</sup> (in V) during this period, the total charge supplied by the battery is 0.5*T*Δ*P*max *V*∗ b (in As). If ΔSOCmax is the maximum permissible fluctuation in SOC from its nominal value, SOCn, during this period, then the minimum battery capacity required, *Q*min (in As), is given by

$$Q\_{\rm min} = \frac{\Delta P\_{\rm max}^2}{2V\_{\rm b}^\* R\_{\rm min} \Delta \text{SOC}\_{\rm max}}.\tag{11}$$

#### **4. Numerical Designs, Results, and Comparisons**

This section presents some numerical designs of the proposed system and also investigates its performance in the context of both abrupt PV power variations and daily irradiation profile using simulations and laboratory-scale experimentation. The structure of the this section is as follows. (1) Section 4.1 studies the performance of proposed system in response to abrupt PV disturbances in a simulated hybrid dc/ac system. (2) Section 4.2 shows the simulation results of applying the proposed system to address abrupt PV disturbances in a real irradiation profile data. (3) Section 4.3 investigates the performance of the proposed method in mitigating the duck-curve phenomenon using simulations on practical data. (4) Section 4.4 shows the results of a laboratory-scale realization of the proposed method. (5) Section 4.5 shows the qualitative comparison of the proposed method with existing methods to mitigate PV power fluctuations.

#### *4.1. Abrupt Disturbances: Case Study 1*

The proposed controller is applied to the study system of Figure 2 to study the impact of abrupt PV disturbances. The design of system components are discussed first.
