Photovoltaic System with a Battery-Assisted Quasi-Z-Source Inverter: Improved Control System Design Based on a Novel Small-Signal Model

: This paper deals with a photovoltaic (PV) system containing a quasi-Z-source inverter (qZSI) and batteries connected in parallel with the qZSI’s lower-voltage capacitor. The control system design is based on knowledge of three transfer functions which are obtained from the novel small-signal model of the considered system. The transfer function from the d -axis grid current to the battery current has been identiﬁed for the ﬁrst time in this study for the considered system conﬁguration and has been utilized for the design of the battery current control loop for the grid-tied operation. The transfer function from the duty cycle to the PV source voltage has been utilized for the design of the PV source voltage control loop. The PV source voltage is controlled so as to ensure the desired power production of the PV source. For the maximum power point tracking, a perturb-and-observe algorithm is utilized that does not require the measurement of the PV source current, but it instead utilizes the battery current during the stand-alone operation and the d -axis reference current during the grid-tied operation. The corresponding tracking period was determined by using the transfer function from the duty cycle to the battery current and in accordance with the longest settling time noted in the corresponding step response. The proposed control algorithm also has integrated protection against battery overcharging during the stand-alone operation. The considered system has been experimentally tested over wide ranges of irradiance and PV panel temperature.


Introduction
Solar energy as a clean and fully renewable source of energy can be harnessed all over the world and directly converted to electricity by means of photovoltaic (PV) systems. The main component of these systems is a PV source composed of multiple interconnected PV panels. The PV source produces dc voltage and current, so in the case of the grid-tied operation or the stand-alone operation with ac loads, it is commonly combined with a dc-dc boost converter, to ensure required voltage boost and maximum power production of a PV source, and a voltage-source inverter [1][2][3]. The alternative is the utilization of a quasi-Z-source inverter (qZSI) [4], which enables both the boost and control of the PV source voltage, thus eliminating the requirement for a dc-dc converter. The qZSI ensures boost of the input voltage by means of an impedance network and the additional shootthrough (ST) switching state, which is achieved by short circuiting one or all of the inverter legs during the zero-switching states of the inverter.
The combination of the PV source and the qZSI has been in the scope of many recent studies. In [5,6], PV systems containing the qZSI in the grid-tied applications are analyzed, where the main tasks of the corresponding control algorithms are to ensure the maximum unity power factor. During the stand-alone operation, the d-axis and q-axis load voltage controllers provide the reference values for the corresponding current controllers. The control system design is based on knowledge of three transfer functions which were obtained according to the novel small-signal model of the considered system derived in this study due to the mentioned shortcomings of the existing models proposed in [11,[13][14][15]. The transfer function from the d-axis current to the battery current-determined here for the first time for the considered system configuration-is utilized for the design of the battery current control loop for the grid-tied operation. The transfer function from the duty cycle to the PV source voltage is utilized for the design of the PV source voltage control loop. The proposed P&O MPPT algorithm provides the reference PV source voltage. Unlike the conventional P&O MPPT algorithm, the proposed algorithm does not require the measurement of the PV source current. Instead, the battery current is utilized during the stand-alone operation, whereas the reference d-axis current is utilized during the grid-tied operation. This does not imply installation of additional sensors because these two currents are anyway required in the control system, regardless of the MPPT algorithm. In this way, the PV source current sensor may be omitted. The tracking period of the proposed P&O algorithm was determined by using the transfer function from the duty cycle to the battery current, in accordance with the longest settling time noted in the corresponding step response. To prevent overcharging of the batteries during the stand-alone operation, the PV source operating point in some cases needs to depart from the MPP. This kind of battery overcharging protection is integrated within the proposed control algorithm. The proposed control strategy was tested experimentally-for both the grid-tied and stand-alone operation-by using the laboratory setup of the considered system.

System Configuration
The considered PV system, including the corresponding control algorithm, is shown in Figure 1. The main components of the system are the PV source with the corresponding terminal capacitor C in , the qZSI with the batteries added in parallel with the lower-voltage capacitor C 2 , and the three-phase output LCL filter, composed of inductors L f1 and L f2 , capacitors C f , and damping resistors R d .
The control system of the qZSI is implemented in the d-q synchronous reference frame, with the inverter output voltages defined as follows [22]: where v od , v oq represent the d and q axis components of the inverter output voltage, respectively; v d , v q represent the d and q axis components of the inverter bridge output voltage, respectively; i d , i q represent the d and q axis components of the inverter output current, respectively; ω is the angular frequency.
A properly selected bandwidth of the inverter output current controller ensures fairly accurate approximation of the LCL filter with the L filter [23], i.e., L f = L f1 + L f2 , R f = R f1 + R f2 , where R f1 and R f2 represent the corresponding parasitic resistances. The control system of the qZSI is implemented in the d-q synchronous reference frame, with the inverter output voltages defined as follows [22]: where vod, voq represent the d and q axis components of the inverter output voltage, respectively; vd, vq represent the d and q axis components of the inverter bridge output voltage, respectively; id, iq represent the d and q axis components of the inverter output current, respectively; ω is the angular frequency. A properly selected bandwidth of the inverter output current controller ensures fairly accurate approximation of the LCL filter with the L filter [23], i.e., Lf = Lf1 + Lf2, Rf = Rf1 + Rf2, where Rf1 and Rf2 represent the corresponding parasitic resistances.

Grid-Tied Operation
During the grid-tied operation, the synchronous reference frame phase-locked loop (PLL) ensures the synchronization of the inverter output voltage with the grid voltage by maintaining vod = Vg,max and voq = 0, where Vg,max is the amplitude of the grid phase voltage. Note also that, during the grid-tied operation, the system angular frequency is equal to the grid angular frequency, where the angle θ required for the coordinate transformations

Grid-Tied Operation
During the grid-tied operation, the synchronous reference frame phase-locked loop (PLL) ensures the synchronization of the inverter output voltage with the grid voltage by maintaining v od = V g,max and v oq = 0, where V g,max is the amplitude of the grid phase voltage. Note also that, during the grid-tied operation, the system angular frequency is equal to the grid angular frequency, where the angle θ required for the coordinate transformations is obtained as an integral of the angular frequency. The implementation of the PLL ensures the grid active (p grid ) and reactive power (q grid ) to be defined as follows [22]: During the grid-tied operation, the active power injected to the grid is defined by i d , whereas the reactive power is defined by i q . The reference d-axis current (i * d ) is obtained as the output of the battery current controller, whereas the reference q-axis current (i * q ) is set to zero.

Stand-Alone Operation
During the stand-alone operation, two controllers are introduced to control voltages v od and v oq . The reference of the d-axis voltage controller (v * od ) is set equal to the amplitude of the phase load voltage (V l,max ). On the other hand, the reference q-axis voltage (v * oq ) is set to zero in order to ensure the load active (p load ) and reactive power (q load ) to be defined as follows [22]: p load = 3 2 i d V l,max q load = − 3 2 i q V l,max (3) Note that, during the stand-alone operation, the angular frequency obtained by the phase-locked loop amounts to ω = 2πf l , where f l is the desired fundamental frequency of the load voltage/current (in this study, 50 Hz).

Maximum Power Point Tracking of the Photovoltaic Source
The I-V characteristics of the PV source are not linear and the electric power generated by the PV source varies with the irradiance and the temperature of the PV panels. However, there is an operating point where the PV source generates maximum power. Therefore, the MPPT algorithm is utilized to ensure the MPP operation of the PV source for different values of the solar irradiance and the PV panel temperature. In the considered system shown in Figure 1a, the proposed P&O MPPT algorithm tracks the MPP with the corresponding tracking period by varying the PV source voltage (v pv ). The main advantage of this algorithm is that it does not require the measurement of the PV source current, which allows elimination of the corresponding sensor. During the grid-tied operation, the MPPT algorithm detects the MPP based on v pv and the reference d-axis grid current, whereas during the stand-alone operation it detects the MPP based on v pv and the battery current (i bat ). Note that during the stand-alone operation, the battery current is not controlled, so in the case of the fully charged batteries, further charging has to be prevented. For that purpose, the maximum battery charge signal (MBC in Figure 1a) is implemented in the control algorithm. The detailed analysis of the proposed MPPT algorithm is given in Section 4.
In this study, the sinusoidal pulse-width modulation (PWM) with injected third harmonic and dead time is implemented [24]. The ST states are injected by means of the zero-sync PWM, proposed and detailed in [24], whose logic diagram is shown in Figure 1b. This method ensures wider range of the duty cycle and lower qZSI losses in comparison to the conventional ST states injection method without dead time.

Small-Signal Model of the System
The small-signal model of the considered system is obtained by considering the equivalent circuits of the qZSI in the non-ST state and ST state, which are shown in Figure 2a,b, respectively. R L1 and R L2 represent the parasitic resistances of the impedance network inductors. Note that the influence of the terminal capacitor C in is neglected, which implies that the PV source current (i pv ) equals the qZSI inductor current (i L1 ). In this paper, a symmetrical impedance network is considered, i.e., L 1 = L 2 = L, C 1 = C 2 = C, R L1 = R L2 = R L . During the non-ST state, the impedance network is coupled to the load/grid, which allows the power flow from the PV source and the batteries to the load/grid. In this state, the diode D (Figure 1a) is forward biased, and the capacitors C 1 and C 2 are being charged, whereas the currents through L 1 and L 2 are decreasing. The dynamic state-space equations of the qZSI for the non-ST state, obtained based on Figure 2a, are given as follows: The state-space variables are the two inductor currents (iL1 and iL2), the voltage across C1 (vC1), and the battery current (ibat). The input variables of the model are the PV source voltage (vpv), the input current of the inverter bridge (ipn), and the battery open-circuit voltage (V0bat). Finally, the duty cycle (d0) is defined as T0/Tsw, where T0 and Tsw represent the ST state period and the switching period, respectively, whereas Rbat utilized in (4) represents the equivalent resistance of the batteries.
The ST state always occurs only during the zero-switching state, in which the impedance network is practically disconnected from the load/grid. During the ST state, the inverter bridge is short-circuited, which causes blocking of the diode D (Figure 1a  The state-space variables are the two inductor currents (i L1 and i L2 ), the voltage across C 1 (v C1 ), and the battery current (i bat ). The input variables of the model are the PV source voltage (v pv ), the input current of the inverter bridge (i pn ), and the battery open-circuit voltage (V 0bat ). Finally, the duty cycle (d 0 ) is defined as T 0 /T sw , where T 0 and T sw represent the ST state period and the switching period, respectively, whereas R bat utilized in (4) represents the equivalent resistance of the batteries.
The ST state always occurs only during the zero-switching state, in which the impedance network is practically disconnected from the load/grid. During the ST state, the inverter bridge is short-circuited, which causes blocking of the diode D (Figure 1a), discharging of the capacitors C 1 and C 2 , and an increase in i L1 and i L2 . The utilization of the ST state ensures the boost of the PV source voltage. The dynamic state-space equations of the qZSI for the ST state are obtained, based on Figure 2b, as: where The system average state-space equations are obtained by using state-space averaging, as follows: where The dynamic small-signal model of the considered system is obtained from the average state-space equations by utilizing the small-perturbation method and Laplace transforma- tion. The I-V characteristic of the PV source may be described in the Laplace domain by utilizing the equivalent PV source resistance (R fn ), as follows [5,6]: v pv (s) = −R f n i L1 (s) (7) Finally, the average state-space equations in the Laplace domain, with the considered perturbation of the PV source voltage as per (7), are given as follows: In (7)- (11), capital letters represent the steady-state values of the considered variables, V 11 = V C1 − I bat R bat + V 0bat , I 11 = I bat − 2I L1 + I pn , whereas "~" denotes the variables obtained as the Laplace transform of the corresponding perturbation (e.g., d 0 is equal to the Laplace transform of ∆d 0 ).
Equations (8)- (11) are used to obtain transfer functions which may be used for control system design. The first transfer function from the duty cycle to the PV source voltage is obtained from (8)- (11). However, the transfer functions from the duty cycle to the battery current and from the d-axis grid current to the battery current require one more equation. In the non-ST state, this equation is defined as: where V pn represents the peak value of the inverter bridge input voltage of the ideal qZSI. In (12), the input power of the inverter bridge is assumed equal to the inverter output power expressed in the d-q coordinate system, which implies neglecting of the inverter bridge losses and output LCL filter losses.
In the ST state, there is no exchange of energy between the ac and dc sides of the inverter bridge. Consequently, the average equation is obtained by multiplying the inverter input power during the non-ST state (left side of (12)) with the factor (1 − d 0 ), as follows: In (13), v od may be obtained as a function of V pn and the amplitude modulation index (m a ), as follows: With respect to (14), (13) becomes: By utilizing the small-perturbation method and Laplace transformation, (15) becomes: where capital letters represent the steady-state values of the considered variables. The transfer function from the d-axis grid current to the battery current is obtained based on (8)- (11) and (16). In the five considered equations, there are nine variables, so in order to obtain the desired transfer function, the perturbances of three variables should be set to zero. It is assumed that, during the perturbation of the d-axis grid current, the modulation index, the open-circuit voltage of the batteries, and the duty cycle remain constant. Finally, with m a (s) = 0, v 0bat (s) = 0, and d 0 (s) = 0, the transfer function from the d-axis grid current to the battery current is given as follows: where The transfer function obtained in (17) is required for the design of the battery current control loop utilized during the grid-tied operation. On the other hand, the transfer function from the duty cycle to the battery current was obtained from (8)- (11) and (16), by considering the assumptions v 0bat (s) = 0, m a (s) = 0, i d (s) = 0, as follows: where P 0 = −4V 11 + 8D 0 V 11 − 4I 11 R L + 4I pn R L − 4D 0 I 11 R f n + 4D 0 I pn R f n , 11 R L R f n + 4CI pn R L R f n P 2 = −4CLV 11 + 8CD 0 LV 11 − 8CI 11 LR L − 4CI 11 LR f n + 8CI pn LR L + 4CI pn LR f n , The transfer function given in (18) was utilized only for the selection of the MPPT algorithm tracking period (T mppt ) because the longest settling time of the battery current response is noted for step changes in the duty cycle. Note that the transfer function from the duty cycle to the battery current has been already derived in [13][14][15], but errors have been detected in the corresponding small-signal model. First, in the system of Equation (5) in [14], (1-d 0 )V 0bat in the second equation should be replaced by (d 0 −1)V 0bat . The second detected error is the utilization of an equation that defines the steady-state battery current for the determination of the dynamic model of the system. The transfer function from d 0 to v pv is obtained from (8)- (11), by considering the assumptions i bat (s) = 0 and v 0bat (s) = 0. This transfer function is required for the design of the PV source voltage control loop for both the grid-tide and stand-alone operation, and it is expressed as follows: The steady-state values of the state-space variables are obtained from (6), by setting the right side equal to zero, as follows: In the case R L = 0, the expressions for the voltages V C1 and V C2 obtained from (20) are equal to the expressions well-known from the literature [4]. The steady-state values obtained in (20) differ from those obtained in [13][14][15] due to the above-described errors in the corresponding small-signal model.

Control Schemes for the Grid-Tied Operation and Stand-Alone Operation
The control algorithm of the considered PV system deals with multiple tasks. During the grid-tied operation, the battery current is controlled through the adjustment of the reference d-axis grid current. On the other hand, during the stand-alone operation, the d and q axis components of the load voltage are controlled through the adjustment of the corresponding reference d and q axis currents, respectively. In both the considered cases, the PV source power is controlled through the adjustment of the PV source voltage. The detailed analysis of the respective control loops is given below.

Control of the Battery Current for the Grid-Tied Operation
The battery current control loop is shown in Figure 3. The output value of the battery current controller is the reference d-axis grid current (i * d ), which practically means that the battery controller controls the active power injected to the grid. The inner control loophighlighted in grey in Figure 3-contains the d-axis current controller and the transfer function of the output filter, with neglected dynamics of the inverter bridge. Note that the output filter was modeled as an L filter (L f = L f1 + L f2 , R f = R f1 + R f2 ) since the properly selected bandwidth of the d-axis current controller ensures fairly accurate approximation of the LCL filter with the L filter [23]. The transfer function from the d-axis grid current to the battery current given in (17) was utilized to obtain the battery current, which is then filtered by the first order filter in the feedback loop. In the case RL = 0, the expressions for the voltages VC1 and VC2 obtained from (20) are equal to the expressions well-known from the literature [4]. The steady-state values obtained in (20) differ from those obtained in [13][14][15] due to the above-described errors in the corresponding small-signal model.

Control Schemes for the Grid-Tied Operation and Stand-Alone Operation
The control algorithm of the considered PV system deals with multiple tasks. During the grid-tied operation, the battery current is controlled through the adjustment of the reference d-axis grid current. On the other hand, during the stand-alone operation, the d and q axis components of the load voltage are controlled through the adjustment of the corresponding reference d and q axis currents, respectively. In both the considered cases, the PV source power is controlled through the adjustment of the PV source voltage. The detailed analysis of the respective control loops is given below.

Control of the Battery Current for the Grid-Tied Operation
The battery current control loop is shown in Figure 3. The output value of the battery current controller is the reference d-axis grid current (i * d), which practically means that the battery controller controls the active power injected to the grid. The inner control loophighlighted in grey in Figure 3-contains the d-axis current controller and the transfer function of the output filter, with neglected dynamics of the inverter bridge. Note that the output filter was modeled as an L filter (Lf = Lf1 + Lf2, Rf = Rf1 + Rf2) since the properly selected bandwidth of the d-axis current controller ensures fairly accurate approximation of the LCL filter with the L filter [23]. The transfer function from the d-axis grid current to the battery current given in (17) was utilized to obtain the battery current, which is then filtered by the first order filter in the feedback loop. The q-axis grid current control loop is identical to the inner control loop shown in Figure 3, including the values of the controller parameters, with the corresponding reference value (i * q) set to zero to ensure zero reactive power. Figure 4 shows the control loop of the d-axis load voltage (vod) during the stand-alone operation. The reference d-axis voltage (v * od) defines the amplitude of the phase load voltage since the reference q-axis voltage (v * oq) is set to zero, as shown in Figure 1a. The output value of the voltage controller in Figure 4 is the reference d-axis load current. The corresponding inner loop in Figure 4 is the same as that for the grid-tied operation (Figure 3), including the values of the current controller parameters. The transfer function of the load is utilized to obtain vod from id. The load is modeled as a resistiveinductive load with the corresponding inductance Ll and the resistance Rl. The q-axis grid current control loop is identical to the inner control loop shown in Figure 3, including the values of the controller parameters, with the corresponding reference value (i * q ) set to zero to ensure zero reactive power. Figure 4 shows the control loop of the d-axis load voltage (v od ) during the standalone operation. The reference d-axis voltage (v * od ) defines the amplitude of the phase load voltage since the reference q-axis voltage (v * oq ) is set to zero, as shown in Figure 1a. The output value of the voltage controller in Figure 4 is the reference d-axis load current. Figure 4 is the same as that for the grid-tied operation (Figure 3), including the values of the current controller parameters. The transfer function of the load is utilized to obtain v od from i d . The load is modeled as a resistive-inductive load with the corresponding inductance L l and the resistance R l .  The same control loop as in Figure 4 is utilized for the load q-axis voltage during the stand-alone operation, including the values of the controllers' parameters. Due to the fact that v * oq equals zero, the reference q-axis current (i * q) defines the reactive power required by the load. This means that, in the case of the resistive load, the q-axis current will be equal to zero, whereas in the case of the resistive-inductive load, this current will be negative.

Control of the Photovoltaic Source Voltage and Maximum Power Point Tracking
The control loop of the PV source voltage is shown in Figure 5. The reference PV source voltage (v * pv) is provided by the MPPT algorithm, whereas the output signal of the respective voltage controller is the duty cycle. The transfer function from the duty cycle to the PV source voltage, given in (19), is utilized to obtain the PV source voltage based on the duty cycle. The control scheme shown in Figure 5 is utilized for the tuning of the PV source voltage controller. As shown in Figure 5, the PV source voltage is controlled by varying the duty cycle, which is enabled by connecting the batteries in parallel with C2, yielding [4]: where the mean values of the considered variables are denoted by capital letters. The battery voltage (Vbat) is approximately constant, so the variation of the duty cycle (d0) results in the variation of Vpv. The equivalent duty cycle is obtained as the sum of the duty cycle obtained by the controller and the corresponding feed-forward signal (D0) obtained according to (21) as Vbat/(V * pv + 2Vbat).
In the conventional P&O MPPT algorithm, the MPP is achieved by considering the PV source voltage and power, which requires the measurement of the PV source voltage and current. The P&O MPPT algorithm proposed in this study requires the PV source voltage and the reference d-axis grid current during the grid-tied operation, whereas it requires the PV source voltage and the battery current during the stand-alone operation. In this way, the PV source current sensor is omitted. In addition, the currents i * d and ibat are required by the control algorithm, regardless of the MPPT algorithm. This means that the number of required sensors in the system is reduced by one. Note also that the MBC signal is implemented in the control algorithm in order to disable charging of the already fully charged batteries during the stand-alone mode. In the case of MBC = 0, battery charging is enabled and the system operates in the MPP, whereas in the case of MBC = 1, the battery current is limited to values higher than or equal to zero to prevent further charging. There- The same control loop as in Figure 4 is utilized for the load q-axis voltage during the stand-alone operation, including the values of the controllers' parameters. Due to the fact that v * oq equals zero, the reference q-axis current (i * q ) defines the reactive power required by the load. This means that, in the case of the resistive load, the q-axis current will be equal to zero, whereas in the case of the resistive-inductive load, this current will be negative.

Control of the Photovoltaic Source Voltage and Maximum Power Point Tracking
The control loop of the PV source voltage is shown in Figure 5. The reference PV source voltage (v * pv ) is provided by the MPPT algorithm, whereas the output signal of the respective voltage controller is the duty cycle. The transfer function from the duty cycle to the PV source voltage, given in (19), is utilized to obtain the PV source voltage based on the duty cycle. The control scheme shown in Figure 5 is utilized for the tuning of the PV source voltage controller. The same control loop as in Figure 4 is utilized for the load q-axis voltage during the stand-alone operation, including the values of the controllers' parameters. Due to the fact that v * oq equals zero, the reference q-axis current (i * q) defines the reactive power required by the load. This means that, in the case of the resistive load, the q-axis current will be equal to zero, whereas in the case of the resistive-inductive load, this current will be negative.

Control of the Photovoltaic Source Voltage and Maximum Power Point Tracking
The control loop of the PV source voltage is shown in Figure 5. The reference PV source voltage (v * pv) is provided by the MPPT algorithm, whereas the output signal of the respective voltage controller is the duty cycle. The transfer function from the duty cycle to the PV source voltage, given in (19), is utilized to obtain the PV source voltage based on the duty cycle. The control scheme shown in Figure 5 is utilized for the tuning of the PV source voltage controller. As shown in Figure 5, the PV source voltage is controlled by varying the duty cycle, which is enabled by connecting the batteries in parallel with C2, yielding [4]: where the mean values of the considered variables are denoted by capital letters. The battery voltage (Vbat) is approximately constant, so the variation of the duty cycle (d0) results in the variation of Vpv. The equivalent duty cycle is obtained as the sum of the duty cycle obtained by the controller and the corresponding feed-forward signal (D0) obtained according to (21) as Vbat/(V * pv + 2Vbat).
In the conventional P&O MPPT algorithm, the MPP is achieved by considering the PV source voltage and power, which requires the measurement of the PV source voltage and current. The P&O MPPT algorithm proposed in this study requires the PV source voltage and the reference d-axis grid current during the grid-tied operation, whereas it requires the PV source voltage and the battery current during the stand-alone operation. In this way, the PV source current sensor is omitted. In addition, the currents i * d and ibat are required by the control algorithm, regardless of the MPPT algorithm. This means that the number of required sensors in the system is reduced by one. Note also that the MBC signal is implemented in the control algorithm in order to disable charging of the already fully charged batteries during the stand-alone mode. In the case of MBC = 0, battery charging is enabled and the system operates in the MPP, whereas in the case of MBC = 1, the battery current is limited to values higher than or equal to zero to prevent further charging. There- As shown in Figure 5, the PV source voltage is controlled by varying the duty cycle, which is enabled by connecting the batteries in parallel with C 2 , yielding [4]: where the mean values of the considered variables are denoted by capital letters. The battery voltage (V bat ) is approximately constant, so the variation of the duty cycle (d 0 ) results in the variation of V pv . The equivalent duty cycle is obtained as the sum of the duty cycle obtained by the controller and the corresponding feed-forward signal (D 0 ) obtained according to (21) as V bat/ (V * pv + 2V bat ).
In the conventional P&O MPPT algorithm, the MPP is achieved by considering the PV source voltage and power, which requires the measurement of the PV source voltage and current. The P&O MPPT algorithm proposed in this study requires the PV source voltage and the reference d-axis grid current during the grid-tied operation, whereas it requires the PV source voltage and the battery current during the stand-alone operation. In this way, the PV source current sensor is omitted. In addition, the currents i * d and i bat are required by the control algorithm, regardless of the MPPT algorithm. This means that the number of required sensors in the system is reduced by one. Note also that the MBC signal is implemented in the control algorithm in order to disable charging of the already fully charged batteries during the stand-alone mode. In the case of MBC = 0, battery charging is enabled and the system operates in the MPP, whereas in the case of MBC = 1, the battery current is limited to values higher than or equal to zero to prevent further charging. Therefore, the system operating point may depart from the MPP in the case of MBC = 1. Figure 6a shows the PV source power (p pv ), the grid power (p grid ), the d-axis grid current, and the battery power (p bat ) during the grid-tied operation. In this case, the battery current is considered constant since the battery current reference is set to a constant value. The power relation during the grid-tied operation with omitted power losses is defined as follows: Figure 6a shows the PV source power (ppv), the grid power (pgrid), the d-axis grid current, and the battery power (pbat) during the grid-tied operation. In this case, the battery current is considered constant since the battery current reference is set to a constant value. The power relation during the grid-tied operation with omitted power losses is defined as follows: The constant battery power means that the variation of the grid injected power follows the variation of the PV source power (the power losses may also be assumed to change proportionally to the PV source power). Hence, the variation of pgrid with vpv is the same as the variation of ppv with vpv, as shown in Figure 6a. The MPP of the PV source power corresponds to the MPP of the grid injected power, so ppv may be replaced by pgrid in the MPPT algorithm. Finally, pgrid may be replaced by the reference d-axis grid current since the grid voltage is considered constant (Vg.max = const.). Note that the system is robust to a grid voltage sag, since Tmppt amounts to a few hundred ms. Figure 6b shows the flow chart of the MPPT algorithm during the grid-tied operation. As compared to the conventional P&O algorithm, the PV source power is here replaced by the reference d-axis grid current.  Figure 7a shows the PV source power (ppv), the load power (pload), the battery power (pbat), and the battery current during the stand-alone operation. In this case, the load power is considered to be slowly varying in comparison with the PV source dynamics, so it may be regarded as constant during the PV source power variation. The power balance equation for the stand-alone operation with omitted power losses is defined as follows: The constant load power means that the variation of the battery power follows the variation of the PV source power. During battery discharge, the battery power decreases with the increase in the PV source power, whereas during charging, although its absolute value increases with the increase in the PV source power, the battery power changes sign The constant battery power means that the variation of the grid injected power follows the variation of the PV source power (the power losses may also be assumed to change proportionally to the PV source power). Hence, the variation of p grid with v pv is the same as the variation of p pv with v pv , as shown in Figure 6a. The MPP of the PV source power corresponds to the MPP of the grid injected power, so p pv may be replaced by p grid in the MPPT algorithm. Finally, p grid may be replaced by the reference d-axis grid current since the grid voltage is considered constant (V g.max = const.). Note that the system is robust to a grid voltage sag, since T mppt amounts to a few hundred ms. Figure 6b shows the flow chart of the MPPT algorithm during the grid-tied operation. As compared to the conventional P&O algorithm, the PV source power is here replaced by the reference d-axis grid current. Figure 7a shows the PV source power (p pv ), the load power (p load ), the battery power (p bat ), and the battery current during the stand-alone operation. In this case, the load power is considered to be slowly varying in comparison with the PV source dynamics, so it may be regarded as constant during the PV source power variation. The power balance equation for the stand-alone operation with omitted power losses is defined as follows: and actually continues to decrease in value. Therefore, in both considered battery modes, the maximum PV source power corresponds to the minimum battery current, as shown in Figure 7a. Consequently, during the stand-alone operation, the PV source power may be replaced by the battery power in the MPPT algorithm. Finally, the battery power may be replaced by the battery current provided that the battery voltage is considered as approximately constant.  Figure 7b shows the flow chart utilized for the determination of the PV source reference voltage (v * pv) during the stand-alone operation, which consists of two parts. The first part is the proposed P&O algorithm, where the PV source power is replaced with the battery current. The second part encompasses conditions added to prevent overcharge of the batteries, which are grey colored in Figure 7b. In the case when the battery charging is allowed, the MBC value equals 0 and v * pv is set to achieve the MPP. However, in the case when the batteries are fully charged, the MBC value equals 1 and v * pv is set to ensure that the battery current does not drop below zero, thus preventing further charging. In the case when MBC = 1 and the battery current is negative, the reference PV source voltage is increased, which, in turn, causes the decrease in the PV source power (i.e., the new PV source operating point is placed right of the MPP on the I-V (or P-V) characteristics of the PV source). The battery current eventually oscillates at around zero. The corresponding mean value may slightly differ from zero, but this error is practically negligible and it may be further reduced by decreasing the variation step of v * pv (Δvpv). Note that the PV source power could be alternatively decreased by decreasing the reference voltage (i.e., by placing the operating point left of the MPP). However, the first-mentioned approach results in lower current ripple and power losses and was, hence, utilized in this study. Figure 8 shows the laboratory setup of the considered PV system. The main components are denoted as follows:

Laboratory Setup
1. DC power supply Chroma 62050H 600S, programmed to emulate 16 series-connected PV panels KC200GT (Kyocera). 2. Hall-effect transducers LA 55-P/SP52 [25] (for the battery current and the grid/load phase currents), DVL 500 [26] (for the PV source voltage), CV 3-500 [27] (for the grid voltages), and LV 25-P (for the load voltages) (LEM). The constant load power means that the variation of the battery power follows the variation of the PV source power. During battery discharge, the battery power decreases with the increase in the PV source power, whereas during charging, although its absolute value increases with the increase in the PV source power, the battery power changes sign and actually continues to decrease in value. Therefore, in both considered battery modes, the maximum PV source power corresponds to the minimum battery current, as shown in Figure 7a. Consequently, during the stand-alone operation, the PV source power may be replaced by the battery power in the MPPT algorithm. Finally, the battery power may be replaced by the battery current provided that the battery voltage is considered as approximately constant. Figure 7b shows the flow chart utilized for the determination of the PV source reference voltage (v * pv ) during the stand-alone operation, which consists of two parts. The first part is the proposed P&O algorithm, where the PV source power is replaced with the battery current. The second part encompasses conditions added to prevent overcharge of the batteries, which are grey colored in Figure 7b. In the case when the battery charging is allowed, the MBC value equals 0 and v * pv is set to achieve the MPP. However, in the case when the batteries are fully charged, the MBC value equals 1 and v * pv is set to ensure that the battery current does not drop below zero, thus preventing further charging. In the case when MBC = 1 and the battery current is negative, the reference PV source voltage is increased, which, in turn, causes the decrease in the PV source power (i.e., the new PV source operating point is placed right of the MPP on the I-V (or P-V) characteristics of the PV source). The battery current eventually oscillates at around zero. The corresponding mean value may slightly differ from zero, but this error is practically negligible and it may be further reduced by decreasing the variation step of v * pv (∆v pv ). Note that the PV source power could be alternatively decreased by decreasing the reference voltage (i.e., by placing the operating point left of the MPP). However, the first-mentioned approach results in lower current ripple and power losses and was, hence, utilized in this study. Figure 8 shows the laboratory setup of the considered PV system. The main components are denoted as follows:
The  The major part of the control algorithm was executed with the sampling frequency of 10 kHz. Exceptions are the MPPT algorithm-executed with 5 Hz-and the battery current sampling and filtering-executed with 20 kHz-with the time constant of the corresponding first-order filter (Tfi) set to 5 ms. In this way, the steady-state error of the measured battery current-that otherwise exists when the battery current waveform is sampled with lower frequencies-is eliminated. The sampling frequency of the MPPT algorithm (fmppt = 1/Tmppt) was chosen so as to ensure that all the corresponding transients disappear within a single sampling interval. Note that fmppt has to be a multiple of the sampling frequencies of 10 kHz and 20 kHz due to the multitask operation of MicroLabBox.
The synchronous reference frame PLL with the moving average filter (MAF) [28] was utilized in this study during the grid-tied operation. The corresponding controller parameters have been set to Kpll = 0.0464 rad/Vs and Tpll = 0.02 s, whereas the MAF widow was set to 0.01 s in order to completely remove the 100 Hz harmonics and all its multiples from the filtered voq [29].
The duty cycle (d0) is converted into the control voltage (vctrl) of the LM555CN timer, which results in the desired T0 (Figure 1b). The equation that defines vctrl according to d0 is given as follows [24]: The major part of the control algorithm was executed with the sampling frequency of 10 kHz. Exceptions are the MPPT algorithm-executed with 5 Hz-and the battery current sampling and filtering-executed with 20 kHz-with the time constant of the corresponding first-order filter (T fi ) set to 5 ms. In this way, the steady-state error of the measured battery current-that otherwise exists when the battery current waveform is sampled with lower frequencies-is eliminated. The sampling frequency of the MPPT algorithm (f mppt = 1/T mppt ) was chosen so as to ensure that all the corresponding transients disappear within a single sampling interval. Note that f mppt has to be a multiple of the sampling frequencies of 10 kHz and 20 kHz due to the multitask operation of MicroLabBox.
The synchronous reference frame PLL with the moving average filter (MAF) [28] was utilized in this study during the grid-tied operation. The corresponding controller parameters have been set to K pll = 0.0464 rad/Vs and T pll = 0.02 s, whereas the MAF widow was set to 0.01 s in order to completely remove the 100 Hz harmonics and all its multiples from the filtered v oq [29]. The duty cycle (d 0 ) is converted into the control voltage (v ctrl ) of the LM555CN timer, which results in the desired T 0 (Figure 1b). The equation that defines v ctrl according to d 0 is given as follows [24]: where V cc represents the supply voltage of the timer (5 V in this study), T t represents the corresponding time constant (20.8 µs in this study), and T sw is set to 0.2 ms in this study.

Accuracy Verification of the Proposed Transfer Functions
The accuracy verification of the proposed transfer functions was carried out by comparison of the waveforms calculated by means of the transfer function with those obtained by measurement. Figure 9a shows the setup utilized for the verification of the transfer function from i d to i bat . The input signal of the transfer function is the measured waveform of i d , whereas the output signal denoted as i bat is the calculated battery current, which is then filtered with the same first-order filter as the measured battery current (i bat-measured ). Finally, the filtered calculated battery current denoted as i bat/id-tf is compared with the filtered measured battery current. Note that all the measurements for the verification of the transfer function from i d to i bat were carried out during the grid-tied operation for the constant PV source power.
where Vcc represents the supply voltage of the timer (5 V in this study), Tt represents the corresponding time constant (20.8 μs in this study), and Tsw is set to 0.2 ms in this study.

Accuracy Verification of the Proposed Transfer Functions
The accuracy verification of the proposed transfer functions was carried out by comparison of the waveforms calculated by means of the transfer function with those obtained by measurement. Figure 9a shows the setup utilized for the verification of the transfer function from id to ibat. The input signal of the transfer function is the measured waveform of id, whereas the output signal denoted as ibat is the calculated battery current, which is then filtered with the same first-order filter as the measured battery current (ibat-measured). Finally, the filtered calculated battery current denoted as ibat/id-tf is compared with the filtered measured battery current. Note that all the measurements for the verification of the transfer function from id to ibat were carried out during the grid-tied operation for the constant PV source power.  Figure 9b shows the setup utilized for the verification of the transfer functions from d0 to ibat and from d0 to vpv. The input signal for both the considered transfer functionsthe duty cycle (d0)-is determined by the control algorithm. The output signal of the transfer function from d0 to vpv (vpv/d0-tf) is compared with the measured vpv (vpv-measured), whereas the filtered output signal of the transfer function from d0 to ibat (ibat/d0-tf) is compared with the filtered measured battery current ibat-measured. These two transfer functions were tested during the stand-alone operation for the constant load power.
The accuracy verification of the transfer function from id to ibat was carried out for three different combinations of the irradiance value (Z) and the PV panels' temperature (Tpv). The linearization of the considered transfer function was carried out for Z = 600 W/m 2 and Tpv = 30 °C. These values represent the approximate average values of Z and Tpv encompassed in the measurements in this study (i.e., Z is varied from 300 W/m 2 to 1000 W/m 2 , whereas Tpv is varied from 10 °C to 50 °C). The linearization was carried out in the MPP, where the input parameters of the transfer function from id to ibat, defined in (17), are given in Table 1.   Figure 9b shows the setup utilized for the verification of the transfer functions from d 0 to i bat and from d 0 to v pv . The input signal for both the considered transfer functions-the duty cycle (d 0 )-is determined by the control algorithm. The output signal of the transfer function from d 0 to v pv (v pv/d0-tf ) is compared with the measured v pv (v pv-measured ), whereas the filtered output signal of the transfer function from d 0 to i bat (i bat/d0-tf ) is compared with the filtered measured battery current i bat-measured . These two transfer functions were tested during the stand-alone operation for the constant load power.
The accuracy verification of the transfer function from i d to i bat was carried out for three different combinations of the irradiance value (Z) and the PV panels' temperature (T pv ). The linearization of the considered transfer function was carried out for Z = 600 W/m 2 and T pv = 30 • C. These values represent the approximate average values of Z and T pv encompassed in the measurements in this study (i.e., Z is varied from 300 W/m 2 to 1000 W/m 2 , whereas T pv is varied from 10 • C to 50 • C). The linearization was carried out in the MPP, where the input parameters of the transfer function from i d to i bat , defined in (17), are given in Table 1.  The value of R fn is obtained for the considered operating point based on the corresponding I-V characteristic of the PV source, whereas the R bat value corresponds to the internal resistance of 22 lead-acid batteries connected in series. Figure 10 shows the comparison of i bat-measured and i bat/id-tf for the step variations of i * d of ±2 A in three different operating points. First, the i d value was varied in the linearization point (Z = 600 W/m 2 , T pv = 30 • C) and the corresponding waveforms are shown in Figure 10a. The maximum steady-state error in this case amounts to 4%. The transfer function accuracy was also tested for two operating points different than the linearization point. The waveforms shown in Figure 10b were recorded for Z = 1000 W/m 2 and T pv = 10 • C, and the waveforms shown in Figure 10c were recorded for Z = 500 W/m 2 and T pv = 50 • C. The maximum steady-state error in Figure 10b,c amounts to 10.5% and 8%, respectively. The value of Rfn is obtained for the considered operating point based on the corresponding I-V characteristic of the PV source, whereas the Rbat value corresponds to the internal resistance of 22 lead-acid batteries connected in series. Figure 10 shows the comparison of ibat-measured and ibat/id-tf for the step variations of i * d of ±2 A in three different operating points. First, the id value was varied in the linearization point (Z = 600 W/m 2 , Tpv = 30 °C) and the corresponding waveforms are shown in Figure  10a. The maximum steady-state error in this case amounts to 4%. The transfer function accuracy was also tested for two operating points different than the linearization point. The waveforms shown in Figure 10b were recorded for Z = 1000 W/m 2 and Tpv = 10 °C, and the waveforms shown in Figure 10c were recorded for Z = 500 W/m 2 and Tpv = 50 °C. The maximum steady-state error in Figure 10b,c amounts to 10.5% and 8%, respectively. The accuracy verification of the transfer functions from d0 to ibat and from d0 to vpv- (18) and (19), respectively-was carried out for three values of Tpv and with Z set to 600 W/m 2 . The linearization of these two transfer functions was carried out in the MPP, with the input parameters given in Table 2.  Figure 11 shows the comparison of vpv-measured and vpv/d0-tf for the step variations of d0 of ±0.011, for three different operation points. First, the variation of d0 was carried out in the linearization point (Z = 600 W/m 2 , Tpv = 30 °C) and the corresponding waveforms are shown in Figure 11a. The maximum steady-state error in this case amounts to 1.6%. In the case of Tpv = 10 °C and Tpv = 50 °C, waveforms shown in Figure 11b,c, respectively, the maximum steady state error amounts to 2.5% and 4.3%, respectively. The accuracy verification of the transfer functions from d 0 to i bat and from d 0 to v pv - (18) and (19), respectively-was carried out for three values of T pv and with Z set to 600 W/m 2 . The linearization of these two transfer functions was carried out in the MPP, with the input parameters given in Table 2.  Figure 11 shows the comparison of v pv-measured and v pv/d0-tf for the step variations of d 0 of ±0.011, for three different operation points. First, the variation of d 0 was carried out in the linearization point (Z = 600 W/m 2 , T pv = 30 • C) and the corresponding waveforms are shown in Figure 11a. The maximum steady-state error in this case amounts to 1.6%. In the case of T pv = 10 • C and T pv = 50 • C, waveforms shown in Figure 11b,c, respectively, the maximum steady state error amounts to 2.5% and 4.3%, respectively. In Figure 11a, waveforms denoted as vpv/d0-tf-lit were obtained by the utilizing the transfer function taken from the literature [11], with the input parameters taken from Table 2. Note that vpv/d0-tf-lit had to be reduced 20 times in order to fall within the range in Figure  11a. This huge error in the obtained result suggests that the transfer function reported in [11] probably contains one or more overlooked errors. Figure 12 shows the comparison of ibat-measured and ibat/d0-tf for the step variation of d0 of −0.011, for three different operation points. The lowest maximum steady-state error of approximately 4% is noted for the linearization point shown in Figure 12a (Z = 600 W/m 2 , Tpv = 30 °C). In the case of Tpv = 10 °C and Tpv = 50 °C with Z = 600 W/m 2 -waveforms shown in Figure 12b,c, respectively-this error amounts to approximately 12%. It is assumed this error is a consequence of the variation of ma and ipn with the duty cycle, whereas the transfer function defined in (18) is derived with both ma and ipn considered as constant. However, the transfer function from d0 to ibat is only utilized for the determination of the MPPT algorithm tracking period (Tmppt). Therefore, the estimation of the steady-state value by the considered transfer function is not as important as the estimation of the settling time. Figure 12 shows that the settling time of ibat/d0-tf is approximately the same as the settling time of ibat-measured for all the considered operation points. This approves the utilization of the transfer function from d0 to ibat for the determination of Tmppt, since the longest settling time of the battery current response is noted for step changes in the duty cycle. In Figure 11a, waveforms denoted as v pv/d0-tf-lit were obtained by the utilizing the transfer function taken from the literature [11], with the input parameters taken from Table 2. Note that v pv/d0-tf-lit had to be reduced 20 times in order to fall within the range in Figure 11a. This huge error in the obtained result suggests that the transfer function reported in [11] probably contains one or more overlooked errors. Figure 12 shows the comparison of i bat-measured and i bat/d0-tf for the step variation of d 0 of −0.011, for three different operation points. The lowest maximum steady-state error of approximately 4% is noted for the linearization point shown in Figure 12a (Z = 600 W/m 2 , T pv = 30 • C). In the case of T pv = 10 • C and T pv = 50 • C with Z = 600 W/m 2waveforms shown in Figure 12b,c, respectively-this error amounts to approximately 12%. It is assumed this error is a consequence of the variation of m a and i pn with the duty cycle, whereas the transfer function defined in (18) is derived with both m a and i pn considered as constant. However, the transfer function from d 0 to i bat is only utilized for the determination of the MPPT algorithm tracking period (T mppt ). Therefore, the estimation of the steadystate value by the considered transfer function is not as important as the estimation of the settling time. Figure 12 shows that the settling time of i bat/d0-tf is approximately the same as the settling time of i bat-measured for all the considered operation points. This approves the utilization of the transfer function from d 0 to i bat for the determination of T mppt , since the longest settling time of the battery current response is noted for step changes in the duty cycle.

Tuning of the PI Controllers
The high noted accuracy of the transfer functions from id to ibat and from d0 to vpv allows the control loops shown in Section 4 to be utilized for the tuning of the system controllers. The d-and q-axis current controllers in the inner loops in Figures 3 and 4, respectively, were tuned according to the recommendation in [22]. However, it was important to ensure the bandwidth of these current loops to be lower than the resonant frequency of the LCL filter, which is defined as follows The parameter τi in (26) was set to 0.5 ms in order to ensure the fast response of id and iq without the overshoot. The bandwidth of the current control loops with the utilized controller parameters from (26) amounts to 337 Hz, which is significantly lower than fres = 1200 Hz. In this way, the approximation of the LCL filter with the L filter is justified.
The parameters of the battery current controller were determined based on the battery current control loop shown in Figure 3, by considering the corresponding Bode plot shown in Figure 13

Tuning of the PI Controllers
The high noted accuracy of the transfer functions from i d to i bat and from d 0 to v pv allows the control loops shown in Section 4 to be utilized for the tuning of the system controllers. The dand q-axis current controllers in the inner loops in Figures 3 and 4, respectively, were tuned according to the recommendation in [22]. However, it was important to ensure the bandwidth of these current loops to be lower than the resonant frequency of the LCL filter, which is defined as follows [23]: The parameters of i d and i q PI controllers are calculated as follows: The parameter τ i in (26) was set to 0.5 ms in order to ensure the fast response of i d and i q without the overshoot. The bandwidth of the current control loops with the utilized controller parameters from (26) amounts to 337 Hz, which is significantly lower than f res = 1200 Hz. In this way, the approximation of the LCL filter with the L filter is justified.
The parameters of the battery current controller were determined based on the battery current control loop shown in Figure 3, by considering the corresponding Bode plot shown in Figure 13      . The phase margin of 69 • at the crossover frequency of 1000 rad/s was achieved by utilizing the controller parameters K u = 0.00186 A/V, T u = 9.99·10 −5 s. This analysis was carried out with the pure resistive, star-connected load of R t = 53 Ω, resulting in approximately the nominal output power of 3 kW. Note that for the resistive-inductive load, the phase margin becomes even higher, whereas for higher R t values (i.e., for power lower than nominal), the phase margin slightly decreases.       As for the MPPT algorithm, the corresponding fixed variation step of v * pv (∆v pv ) was set to 5 V. For this value of ∆v pv , the longest transient, of approximately 0.15 s, is noted for the transfer function from d 0 to i bat . Finally, T mppt is set to 0.2 s in order to ensure the proper multitask operation of MicroLabBox, as explained above.
The parameters given above were implemented into the system, which was tested both during the grid-tied operation and the stand-alone operation. The results are presented in the next section. As for the MPPT algorithm, the corresponding fixed variation step of v * pv (Δvpv) was set to 5 V. For this value of Δvpv, the longest transient, of approximately 0.15 s, is noted for the transfer function from d0 to ibat. Finally, Tmppt is set to 0.2 s in order to ensure the proper multitask operation of MicroLabBox, as explained above.
The parameters given above were implemented into the system, which was tested both during the grid-tied operation and the stand-alone operation. The results are presented in the next section.

Experimental Results
The experimental testing of the considered system was carried out for different operation conditions. During the experimental testing, the irradiance value was varied from 300 W/m 2 to 1000 W/m 2 , whereas the PV source temperature was varied from 10 °C to 50 °C. First, the steady-state analysis was carried out to determine the basic features of the considered system, including the accuracy of the proposed MPPT algorithm, the system power distribution, and the efficiency, as well as to gain a more complete insight into the operation of the system. The dynamic analysis of the system, on the other hand, is crucial for the validation of the proposed concept, so it was carried out in a more meticulous way in order to determine the system response with respect to the variation of different system variables, such as the irradiance or the load-resistance value. Note that the value of the PV source power is not required by the proposed control algorithm. Therefore, the PV source power calculation is enabled only in order to determine the static tracking efficiency of the proposed MPPT algorithm. The PV source current has been measured for this purpose by means of the Hall-effect transducers LA 55-P/SP52 (LEM).

Steady-State Analysis
The steady-state results are shown in Figure 16. The measurements were carried out during the grid-tied operation for the temperatures Tpv = 10 °C and Tpv = 50 °C, and for all the considered irradiances. The reference battery current was varied in order to achieve different battery power values and, hence, different values of the grid power and current. The increase in the positive (discharging) battery power (pbat) results in an increase in the d-axis current injected to the grid (id) for approximately the value of Δpbat/(1.5Vg,max), whereas the increase in the negative (charging) battery power results in the decrease in id for approximately the value of Δpbat/(1.5Vg,max). Note that the inverter losses remain practically constant during the variation of pbat. As expected, the achieved PV source power (ppv), denoted "x" in Figure 16a, is higher for Tpv = 10 °C than for Tpv = 50 °C. This power is practically equal to the maximum available PV power (ppv-MPP), denoted "o" in Figure 16a, for all the considered operating points. The static tracking efficiency (STE) of the proposed P&O algorithm calculated as Ppv/Ppv-MPP for all the considered measurement points is shown in Table 3. The considered efficiency ranges from 96.9% to 100%, which corresponds to the values given in [30,31] for the conventional P&O algorithm. In [31], the

Experimental Results
The experimental testing of the considered system was carried out for different operation conditions. During the experimental testing, the irradiance value was varied from 300 W/m 2 to 1000 W/m 2 , whereas the PV source temperature was varied from 10 • C to 50 • C. First, the steady-state analysis was carried out to determine the basic features of the considered system, including the accuracy of the proposed MPPT algorithm, the system power distribution, and the efficiency, as well as to gain a more complete insight into the operation of the system. The dynamic analysis of the system, on the other hand, is crucial for the validation of the proposed concept, so it was carried out in a more meticulous way in order to determine the system response with respect to the variation of different system variables, such as the irradiance or the load-resistance value. Note that the value of the PV source power is not required by the proposed control algorithm. Therefore, the PV source power calculation is enabled only in order to determine the static tracking efficiency of the proposed MPPT algorithm. The PV source current has been measured for this purpose by means of the Hall-effect transducers LA 55-P/SP52 (LEM).

Steady-State Analysis
The steady-state results are shown in Figure 16. The measurements were carried out during the grid-tied operation for the temperatures T pv = 10 • C and T pv = 50 • C, and for all the considered irradiances. The reference battery current was varied in order to achieve different battery power values and, hence, different values of the grid power and current. The increase in the positive (discharging) battery power (p bat ) results in an increase in the d-axis current injected to the grid (i d ) for approximately the value of ∆p bat /(1.5V g,max ), whereas the increase in the negative (charging) battery power results in the decrease in i d for approximately the value of ∆p bat /(1.5V g,max ). Note that the inverter losses remain practically constant during the variation of p bat . As expected, the achieved PV source power (p pv ), denoted "x" in Figure 16a, is higher for T pv = 10 • C than for T pv = 50 • C. This power is practically equal to the maximum available PV power (p pv-MPP ), denoted "o" in Figure 16a, for all the considered operating points. The static tracking efficiency (STE) of the proposed P&O algorithm calculated as P pv /P pv-MPP for all the considered measurement points is shown in Table 3. The considered efficiency ranges from 96.9% to 100%, which corresponds to the values given in [30,31] for the conventional P&O algorithm. In [31], the efficiency of the conventional algorithm has been approximately 2% lower in the case of irradiance values lower than 600 W/m 2 than in the case of irradiance values higher than 600 W/m 2 . Finally, it may be concluded that, by omitting the PV current sensor as in the P&O algorithm proposed in this study, the static tracking efficiency of the algorithm is not adversely affected. efficiency of the conventional algorithm has been approximately 2% lower in the case of irradiance values lower than 600 W/m 2 than in the case of irradiance values higher than 600 W/m 2 . Finally, it may be concluded that, by omitting the PV current sensor as in the P&O algorithm proposed in this study, the static tracking efficiency of the algorithm is not adversely affected.  In the battery discharging mode (Ibat = 1 A), the system efficiency (Figure 16b), calculated as pgrid/(pbat + ppv), is higher for the higher Tpv value in the whole considered range of irradiance values. This increase in efficiency is probably a consequence of lower switching losses of the IGBTs in the inverter bridge in the case of Tpv = 50 °C due to the lower input voltage, as shown in Figure 16e. However, as the battery current drops from 1 A to −1 A, the current injected to the grid also drops (Figure 16c), whereas the corresponding THD value rapidly increases (Figure 16d). This implies higher current ripple and, thus, higher value of the high-order harmonics, resulting in higher power losses of the output LCL filter. At some point, an increase in these losses with Tpv becomes more dominant than a decrease in switching losses, so the system efficiency starts to drop with Tpv (Figure 16b, Ibat = −1 A).

Dynamic Analysis
The dynamic analysis of the considered system was carried out for Tpv value of 30 °C during the grid-tied operation and the stand-alone operation. For this type of analysis, the temperature was set to a constant value (in the middle of the considered range) due to the fact that, in real applications, the temperature cannot change abruptly as opposed to the irradiance or load.  In the battery discharging mode (I bat = 1 A), the system efficiency (Figure 16b), calculated as p grid /(p bat + p pv ), is higher for the higher T pv value in the whole considered range of irradiance values. This increase in efficiency is probably a consequence of lower switching losses of the IGBTs in the inverter bridge in the case of T pv = 50 • C due to the lower input voltage, as shown in Figure 16e. However, as the battery current drops from 1 A to −1 A, the current injected to the grid also drops (Figure 16c), whereas the corresponding THD value rapidly increases (Figure 16d). This implies higher current ripple and, thus, higher value of the high-order harmonics, resulting in higher power losses of the output LCL filter. At some point, an increase in these losses with T pv becomes more dominant than a decrease in switching losses, so the system efficiency starts to drop with T pv (Figure 16b, I bat = −1 A).

Dynamic Analysis
The dynamic analysis of the considered system was carried out for T pv value of 30 • C during the grid-tied operation and the stand-alone operation. For this type of analysis, the temperature was set to a constant value (in the middle of the considered range) due to the fact that, in real applications, the temperature cannot change abruptly as opposed to the irradiance or load. Figure 17 shows the waveforms of the system variables in the case of the irradiance variation, with the reference battery current set to zero (i * bat = 0 A). At the beginning, the irradiance (Z) is equal to 600 W/m 2 and changes approximately every 10 s in the following order: 300 W/m 2 , 700 W/m 2 , 1000 W/m 2 , 800 W/m 2 . Figure 17a shows that the decrease in the irradiance causes a decrease in the PV source power. Due to i * bat = 0 A, the battery power is equal to zero, whereas the variation of the grid power follows the variation of the PV source power. The d-axis grid current (i d ) follows the reference value (i * d ), which varies with the irradiance in order to maintain i * bat = 0 A, as shown in Figure 17b. On the other hand, the q-axis grid current is equal to zero, which ensures the unity power factor. Figure 17c shows that the qZSI input current (i L1 ) follows the irradiance change, whereas the battery current (i bat ) stays equal to the reference value of 0 A. The PV source voltage (v pv ) follows v * pv , generated by the MPPT algorithm, which decreases with the irradiance, as shown in Figure 17d. Finally, Figure 17e shows the duty cycle (d 0 ) and modulation index (m a ), which are practically constant during the experiment due to the fact the v pv variations were marginal. Figure 17 shows the waveforms of the system variables in the case of the irradiance variation, with the reference battery current set to zero (i * bat = 0 A). At the beginning, the irradiance (Z) is equal to 600 W/m 2 and changes approximately every 10 s in the following order: 300 W/m 2 , 700 W/m 2 , 1000 W/m 2 , 800 W/m 2 . Figure 17a shows that the decrease in the irradiance causes a decrease in the PV source power. Due to i * bat = 0 A, the battery power is equal to zero, whereas the variation of the grid power follows the variation of the PV source power. The d-axis grid current (id) follows the reference value (i * d), which varies with the irradiance in order to maintain i * bat = 0 A, as shown in Figure 17b. On the other hand, the q-axis grid current is equal to zero, which ensures the unity power factor. Figure  17c shows that the qZSI input current (iL1) follows the irradiance change, whereas the battery current (ibat) stays equal to the reference value of 0 A. The PV source voltage (vpv) follows v * pv, generated by the MPPT algorithm, which decreases with the irradiance, as shown in Figure 17d. Finally, Figure 17e shows the duty cycle (d0) and modulation index (ma), which are practically constant during the experiment due to the fact the vpv variations were marginal. It may be seen that the proposed MPPT algorithm accurately tracks the maximum available PV power (ppv-MPP) for all the considered irradiance values, with the fast responses to irradiance variations. On the other hand, the battery controller ensures high robustness to disturbances in the system and zero steady-state error. Note that d0 and ma are practically constant during the whole experiment, with the only exception being the transient at t = 11 s, where Z decreases in a step manner from 600 W/m 2 to 300 W/m 2 . This It may be seen that the proposed MPPT algorithm accurately tracks the maximum available PV power (p pv-MPP ) for all the considered irradiance values, with the fast responses to irradiance variations. On the other hand, the battery controller ensures high robustness to disturbances in the system and zero steady-state error. Note that d 0 and m a are practically constant during the whole experiment, with the only exception being the transient at t = 11 s, where Z decreases in a step manner from 600 W/m 2 to 300 W/m 2 . This means that the assumptions utilized for determination of transfer function from i d to i bat , defined in (17), are justified. Figure 18 shows the waveforms of the system variables in the case of the reference battery current variation, with Z set to 700 W/m 2 . At the beginning, i * bat is set to 0 A and then changes approximately every 10 s in the following order: Figure 18a shows that p grid increases with the p bat , whereas p pv is constant and equal to p pv-MPP due to the constant values of Z and T pv . The battery current follows its reference value and there is no overshoot in the i bat response during the step variations of i * bat , as shown in Figure 18c (similar i bat waveforms may be obtained by the utilization of a simulation model of the battery control loop shown in Figure 3). Figure 18d shows that the PV voltage oscillates around the MPP, which is a feature of all P&O algorithms, but with no adverse impact on the system performance. The modulation index and the duty cycle are practically unaffected by i * bat variations, as shown in Figure 18e. means that the assumptions utilized for determination of transfer function from id to ibat, defined in (17), are justified. Figure 18 shows the waveforms of the system variables in the case of the reference battery current variation, with Z set to 700 W/m 2 . At the beginning, i * bat is set to 0 A and then changes approximately every 10 s in the following order: 1.5 A, 1 A, 2 A, 0 A, −1.5 A, −1 A, −2 A, 0 A. Figure 18a shows that pgrid increases with the pbat, whereas ppv is constant and equal to ppv-MPP due to the constant values of Z and Tpv. The battery current follows its reference value and there is no overshoot in the ibat response during the step variations of i * bat, as shown in Figure 18c (similar ibat waveforms may be obtained by the utilization of a simulation model of the battery control loop shown in Figure 3). Figure 18d shows that the PV voltage oscillates around the MPP, which is a feature of all P&O algorithms, but with no adverse impact on the system performance. The modulation index and the duty cycle are practically unaffected by i * bat variations, as shown in Figure 18e.  Figure 19 shows the responses recorded for the case of the irradiance and load resistance variation with Vl,max set to 340 V in order to ensure approximately the same output voltage level as in the utility grid. At the beginning, Z is equal to 600 W/m 2 and it is varied at 12 s, 22 s, 41 s, and 51 s, in the following order: 300 W/m 2 , 700 W/m 2 , 1000 W/m 2 , 800 W/m 2 , respectively. On the other hand, the load resistance is changed at 32 s from 175 Ω to 90 Ω (i.e., the load power is increased from 990 W to 1926 W). Figure 19a shows that ppv follows ppv-MPP as accurately as during the grid-tied operation and is not affected by the  Figure 19 shows the responses recorded for the case of the irradiance and load resistance variation with V l,max set to 340 V in order to ensure approximately the same output voltage level as in the utility grid. At the beginning, Z is equal to 600 W/m 2 and it is varied at 12 s, 22 s, 41 s, and 51 s, in the following order: 300 W/m 2 , 700 W/m 2 , 1000 W/m 2 , 800 W/m 2 , respectively. On the other hand, the load resistance is changed at 32 s from 175 Ω to 90 Ω (i.e., the load power is increased from 990 W to 1926 W). Figure 19a shows that p pv follows p pv-MPP as accurately as during the grid-tied operation and is not affected by the load resistance variation. i d increases with the load power with a smooth transient, whereas i q is equal to zero due to the applied pure resistive load, as shown in Figure 19b. The battery current in this operation is not controlled, so it increases with the irradiance decrease. As a result of the decrease in the load resistance, i bat increases to cover the load power requirements. load resistance variation. id increases with the load power with a smooth transient, whereas iq is equal to zero due to the applied pure resistive load, as shown in Figure 19b. The battery current in this operation is not controlled, so it increases with the irradiance decrease. As a result of the decrease in the load resistance, ibat increases to cover the load power requirements. Note in Figure 19e that, in the case of Z = 300 W/m 2 , the values of the modulation index and duty cycle are significantly different than in the case of higher irradiances. This is due to the occurrence of the so-called load-caused current (LCC) boost [32][33][34], where the impedance network diode blocks during the non-ST state, which is normally not the case. However, this does not affect the MPPT algorithm, which still achieves tracking of ppv-MPP. In this study, the LCC boost has been detected online as described in Appendix B. Note that all the variables required for the LCC boost detection are already known in the considered control algorithm. Figure 19f shows the phase voltage (voa) and current (ia), which are in this case practically sinusoidal (THD ≈ 4%).

Stand-Alone Operation
The same experiment as in Figure 19 was performed for the case of the non-linear load, which was composed of the three-phase full-bridge diode rectifier and the resistive load. Figure 20 shows that the system performance was equally as good as in the case of the linear resistive load. Figure 20f shows that voa is slightly more distorted (THD ≈ 7%) despite of the existence of the low-order harmonics in ia. It is assumed that the distortion of the phase currents causes the ripple of id and iq to be higher than in case of the linear load. Note in Figure 19e that, in the case of Z = 300 W/m 2 , the values of the modulation index and duty cycle are significantly different than in the case of higher irradiances. This is due to the occurrence of the so-called load-caused current (LCC) boost [32][33][34], where the impedance network diode blocks during the non-ST state, which is normally not the case. However, this does not affect the MPPT algorithm, which still achieves tracking of p pv-MPP . In this study, the LCC boost has been detected online as described in Appendix B. Note that all the variables required for the LCC boost detection are already known in the considered control algorithm. Figure 19f shows the phase voltage (v oa ) and current (i a ), which are in this case practically sinusoidal (THD ≈ 4%).
The same experiment as in Figure 19 was performed for the case of the non-linear load, which was composed of the three-phase full-bridge diode rectifier and the resistive load. Figure 20 shows that the system performance was equally as good as in the case of the linear resistive load. Figure 20f shows that v oa is slightly more distorted (THD ≈ 7%) despite of the existence of the low-order harmonics in i a . It is assumed that the distortion of the phase currents causes the ripple of i d and i q to be higher than in case of the linear load.  At t = 11 s, the batteries are fully charged, MBC changes to 1 and ppv departs from ppv-MPP by increasing v * pv to achieve ibat ≈ 0 A and prevent further charging of the batteries. The length of the respective transient period is approximately 1.5 s. Further, at t = 26 s, the irradiance decreases to 600 W/m 2 , resulting in a transient period of approximately 2 s. After this transient, the batteries were slightly discharging because of the error related to the Δv * pv value, as described above. At t = 41 s, the irradiance decreases to 300 W/m 2 and the battery current becomes positive (discharging) due to the low PV source power. Consequently, ppv is again set equal to ppv-MPP by the control algorithm to achieve minimum discharging current. At t = 56 s, the irradiance increases to 500 W/m 2 , causing a rapid increase in the PV source power, which results in negative ibat (charging). As a result, the control algorithm increases v * pv to achieve ibat ≈ 0 A, which is accomplished in approximately 2.5 s. Finally, at t = 71 s, MBC becomes 0, allowing the batteries to be charged again. Consequently, v * pv decreases to ensure ppv = ppv-MPP, which is accomplished in approximately 1.5 s.  At t = 11 s, the batteries are fully charged, MBC changes to 1 and p pv departs from p pv-MPP by increasing v * pv to achieve i bat ≈ 0 A and prevent further charging of the batteries. The length of the respective transient period is approximately 1.5 s. Further, at t = 26 s, the irradiance decreases to 600 W/m 2 , resulting in a transient period of approximately 2 s. After this transient, the batteries were slightly discharging because of the error related to the ∆v * pv value, as described above. At t = 41 s, the irradiance decreases to 300 W/m 2 and the battery current becomes positive (discharging) due to the low PV source power. Consequently, p pv is again set equal to p pv-MPP by the control algorithm to achieve minimum discharging current. At t = 56 s, the irradiance increases to 500 W/m 2 , causing a rapid increase in the PV source power, which results in negative i bat (charging). As a result, the control algorithm increases v * pv to achieve i bat ≈ 0 A, which is accomplished in approximately 2.5 s. Finally, at t = 71 s, MBC becomes 0, allowing the batteries to be charged again. Consequently, v * pv decreases to ensure p pv = p pv-MPP , which is accomplished in approximately 1.

Conclusions
The accuracy of the three derived transfer functions utilized for the control system design was found to be satisfactory, with the maximum steady-state errors of the calculated responses not surpassing 12%. The dynamic transients obtained by the transfer functions from the d-axis current to the battery current and from the duty cycle to the PV source voltage corresponded to measurements with negligible error. This confirmed the accuracy of the proposed small-signal model and allowed these two transfer functions to be utilized for PI controller tuning and the analysis of the system stability. In addition, the settling times of the transients obtained by the transfer function from the duty cycle to the battery current matched well with those obtained experimentally. This allowed the considered transfer function to be utilized for the determination of the tracking period of the MPPT algorithm because the longest settling time of the battery current response is noted for step changes in the duty cycle.
The recorded experimental responses of the system variables to the rapid changes in the irradiance and the reference battery current during the grid-tied operation confirm excellent MPP tracking and stable operation. A maximum settling time of 0.4 s is noted for the abrupt decrease in the PV source power of 1000 W, whereas the static tracking efficiency of the proposed MPPT algorithm ranged from 96.9% to 100%. As for the reference battery current variations, the settling time of all the considered transients amounted to approximately 0.3 s. During the stand-alone operation, the MPP tracking was again excellent and the system responded to the rapid changes in the irradiance as well as during the grid-tied operation. This confirms the validity of the proposed MPPT algorithm,

Conclusions
The accuracy of the three derived transfer functions utilized for the control system design was found to be satisfactory, with the maximum steady-state errors of the calculated responses not surpassing 12%. The dynamic transients obtained by the transfer functions from the d-axis current to the battery current and from the duty cycle to the PV source voltage corresponded to measurements with negligible error. This confirmed the accuracy of the proposed small-signal model and allowed these two transfer functions to be utilized for PI controller tuning and the analysis of the system stability. In addition, the settling times of the transients obtained by the transfer function from the duty cycle to the battery current matched well with those obtained experimentally. This allowed the considered transfer function to be utilized for the determination of the tracking period of the MPPT algorithm because the longest settling time of the battery current response is noted for step changes in the duty cycle.
The recorded experimental responses of the system variables to the rapid changes in the irradiance and the reference battery current during the grid-tied operation confirm excellent MPP tracking and stable operation. A maximum settling time of 0.4 s is noted for the abrupt decrease in the PV source power of 1000 W, whereas the static tracking efficiency of the proposed MPPT algorithm ranged from 96.9% to 100%. As for the reference battery current variations, the settling time of all the considered transients amounted to approximately 0.3 s. During the stand-alone operation, the MPP tracking was again excellent and the system responded to the rapid changes in the irradiance as well as during the grid-tied operation. This confirms the validity of the proposed MPPT algorithm, whose utilization reduces system implementation costs due to the elimination of one current sensor compared to the conventional P&O algorithm. During the rapid changes in the load power (both for the linear and the non-linear load), the settling time amounted to approximately 0.2 s. Finally, it was shown that the implementation of the maximum battery charge signal during the stand-alone operation prevents overcharging of the batteries by setting the battery current approximately to zero.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
Three inductors, all with inductances of 4.32 mH, were available. Two inductors were placed on the inverter side (L f1 = 8.64 mH), whereas one was placed on the grid side (L f2 = 4.32 mH). The capacitance C f was obtained as follows [35]: I n 20ωV n = 7 100 P n 3ωV 2 n = 7 100 3000 3 · 314.159 · 230 2 ≈ 4 µF (A1) In (A1), I n and V n represent RMS phase current and voltage, respectively. Selected C f ensures the reactive power of filter capacitors not to be higher than 7% of nominal power (P n ) (recommendation 5-10%). In this way, the resonant frequency (f res ) of 1200 Hz, calculated in (25), meets the following condition [36]: 10 f < f res < f sw /2 (A2) where f represents the fundamental frequency of the output inverter voltage/current (50 Hz in this study), whereas f sw represents the switching frequency (5 kHz in this study). Finally, the corresponding damping resistance is obtained as follows [37]:

Appendix B
The load-caused current (LCC) boost is characterized by the diode in the qZSI impedance network blocking during the non-ST state. Based on the equivalent circuit for the non-ST state, shown in Figure 2a, the LCC boost occurs if the following condition is met: The occurrence of the LCC boost causes the unintended boost increase. The existence of the PV source voltage controller in this study eliminates the potential adverse effects of the LCC boost. In the case of the ideal qZSI, with considered sinusoidal output currents, the maximum value of i pn is equal to the peak phase current I ph,max . Figure A1 shows the current of both the impedance network inductors. The LCC boost certainly will not occur if: The minimum values of the inductor currents I L1,min , I L2,min are calculated as:  The current ripples in (A6) are considered equal and may be calculated according to the equivalent circuit for the ST state, shown in Figure 2b, as follows: By applying (A6) and (A7), (A5) becomes: By applying I L2 = I L1 − I bat and I L1 = P pv /V pv , (A5) becomes: In the case of the ideal qZSI, the following applies: P pv + P bat = P out P bat = I bat V bat P out = 3 V ph,max 2 I ph,max cos φ = 3 4 V pv M a I ph,max cos φ 1−2d 0 In (A10), capital letters represent the mean values of the considered variables. V ph,max represents the peak phase voltage, whereas Z l represents the equivalent output impedance, which may be obtained as V ph,max /I ph,max . Finally, by applying (A10), (A9) becomes: Equation (A11) has been utilized for the online detection of the LCC boost during the experimental investigation of the considered system.