LVRT capability based on P-V curve ﬁtting under partial shading conditions

The new generation of photovoltaic (PV) systems represents higher sustainability during grid faults thanks to increased ancillary services, such as low voltage ride-through (LVRT) capability used when the PV system is subjected to voltage sag. Unlike previously presented strategies that just dealt with voltage sag problem under uniform radiation conditions, in this study, a new control strategy implementing LVRT capability during low-voltage faults under partial shading conditions is proposed. First, radiation levels are estimated by using the least-squares curve ﬁtting (LSCF) algorithm. Second, the voltage/current of maximum power points (MPPs) and minimum power points are calculated. Also, the corresponding algebraic function for the (Power - Voltage) P-V curve is extracted using only PV voltage and power vectors. Finally, under partial shading conditions, the moving operating point to the right side of MPP is well-achieved through a power proportional-integral controller. To validate the effectiveness of the proposed control strategy, simulations and experiments are conducted on PV systems. The simulation and experimental results and the comparison made between this algorithm’s performance and other methods conﬁrm that the proposed algorithm outperforms other methods in terms of high accuracy, fast dynamic and low oscillations in different partial shading conditions and with different radiations.


INTRODUCTION
Photovoltaic (PV) arrays are becoming an ever more widespread form of alternative to the burning of fossil fuels around the world. Similar to other renewable sources of energy such as wind and hydropower, solar power offers the benefits of being pollution-free in addition to causing no greenhouse gases emissions after installation. Additionally, due to the reduced cost of generating PV cells, the installation capacity of PV arrays is growing daily, so that the global capacity installation exceeded 402 GW in 2017 [1].
With the high increase in the penetration of PV arrays, grid codes dictate that during voltage sag, the PV array must remain connected to the grid. According to IEEE std. 1159-1995, voltage sag is defined as a sudden decrease in the root mean square (RMS) value of voltage by 10% to 90% over a period ranging from 0.5 cycles to 1 min [2].
During low-voltage fault (voltage sag), the PV system is disconnected from the electricity grid, and problems like power Common methods for reducing the amount of power generated by the PV system during voltage sag are: (i) Modifying MPP tracking (MPPT) algorithm, (ii) using a DC chopper for absorbing additional active power, and (iii) using a storage system to store additional active power.
In the first method (modifying the MPPT algorithm), the PV system-generated power can be decreased by moving the operating point from MPP. To do so, DC/DC converter switches can be turned on and off by short-and open-circuiting the PV system [13]. This method takes advantage of simplicity. However, as during voltage sag, the generated active power from the PV panel reduces to zero, the injected active power to the grid is also zero. In [12], moving the operating point to the right side of MPP (downhill sections) has been realised by controlling the DC-link voltage. This method suffers from the problem of slow dynamic response. To overcome this problem, a feed-forward controller can be added to the DC-link control loop [12]. The operating point of the PV system can also be moved using a proportional-integral (PI) controller [17][18][19][20] or, to reduce cost and complexity, a proportional controller [21]. Another applicable method is to use an adaptive controller, which not only moves the operating point from MPP but improves total harmonic distortion [14].
In the second method (using a DC chopper for absorbing the additional active power), a resistor can be connected across the PV system. By doing so, the additional generated power from the PV system is lost in the resistance. However, this method results in the reduction of system overall efficiency. On the other hand, using additional components such as DC chopper, resistor, and active power controller leads to system complexity and is not economically sensible [11].
In the third method (using a storage system to store additional active power), the generated active power is stored in an energy storage system. The energy storage system is connected across the PV system during voltage sag. By applying an appropriate control system, the additional generated active power is stored in the storage system. One of the most significant advantages of this method is the injection of energy from the storage system to the grid, if required (in low active power generation). Due to the limited lifetime of energy storage systems (such as batteries) and their high cost, this method is also not considered economically reasonable [11].
A review on methods for the movement of the operating point from MPP, including power control-, current control-, and perturb and observe (P&O) algorithm-based methods is provided in [17]. In power control-based methods, a PI power controller is used to move from and track MPP according to the power generated by the PV panel. In current control-based methods, a PI current controller is used to move from and track MPP according to the PV panel current. Also, in methods based on the P&O algorithm [22], MPP can be moved to the right or left side of the P-V curve. Among these methods, power control-based methods take advantage of a faster dynamic response over other methods. A new control strategy for P-V curve modification is introduced in [19] to improve dynamic response. In this method, the P-V curve is first linearised under uniform irradiation conditions, and then a PI controller is used to track and move from MPP.
The previously presented methods just dealt with the problem of voltage sag under uniform radiation conditions [8-11, 22, 23]. In this study, a new control strategy capable of LVRT during voltage sag under partial shading condition, when the P-V curve has several local peaks, is proposed for a two-stage single-phase grid-connected PV system.
In the proposed control strategy, a PI controller is used to track the desired operating point, which keeps the amplitude of the injection current to the grid constant during voltage sag by moving the operating point from MPP. Moreover, calculating the minimum power points (LPPs) and MPPs are presented. The main contributions of this study are as follows: 1. Create LVRT capability in a PV system in partial shading conditions. 2. Estimation of radiation levels by using the least-squares curve fitting (LSCF) algorithm. 3. Calculation of MPPs and LPPs of P-V curve in partial shading. 4. Extracting algebraic function for P-V curve using only PV voltage and power vectors. 5. Precise and fast movement of the operating point to the right side of MPP through a simple power-PI controller. 6. Simulation and experimental study to validate the effectiveness of the proposed control strategy.
The rest of this study is organised as follows: A short description of LVRT capability in PV systems is provided in Section 2. The proposed control strategy implementing LVRT capability during low-voltage faults under partial shading conditions is presented in Section 3. This section presents the different parts of the proposed control strategy, including the LSCF algorithm for estimating radiation levels, calculating MPPs and LPPs, calculating voltage sag, and moving from MPP. Also, the corresponding algebraic function for the P-V curve is extracted using only voltage and power vectors. To validate the accuracy of the proposed control strategy, simulations and experiments are conducted, and the results are provided in Section 4. Finally, this study is concluded in Section 5.

LVRT CAPABILITY
During voltage sag, the PV system is disconnected from the electricity grid. Consequently, problems like power outages, voltage flickers, instability, and frequency deviations appear in the grid. To rectify the problems caused by voltage sag, LVRT capability is one of the most important grid code requirements, which forces the grid-connected PV inverter to inject reactive current component into the electricity grid. Indeed, the LVRT capability during voltage sag can be regarded as an ancillary service that helps the grid-connected PV systems connected to the electricity grid and injects reactive power to assist the voltage recovery [4,6,19].  Figure 1 demonstrates the required amount of reactive power to be injected into the electricity grid (grid code requirements) as a function of voltage sag defined as Equation (1) for different countries [4][5][6][7][8]24]: with v pu and v N being the grid voltage and the nominal grid voltage, respectively. As an instance, for the dashed line in Figure 1, for voltage sag more than 0.5 p.u (ΔV > 0.5 p.u.), the reactive power must be injected into the electricity grid at a constant rate. Otherwise, for ΔV < 0.5 p.u., the injected reactive power is directly related to the voltage sag value.
For the dashed line in Figure 1, depending on the grid voltage v pu , the required amount of reactive current I q to be injected into the electricity grid can be calculated as a function of the nominal grid current I N as follows: where I N is the nominal current before voltage sag and k is an adjustment factor (k ≥ 0.2).

PROPOSED CONTROL STRATEGY
LVRT capability is one of the most important requirements of the grid, which imposes the grid-connected DC/AC converters to inject the reactive current component into the electricity grid. On the other hand, since during voltage sag, the grid voltage is smaller than its nominal value, provided that the maximum PV power is extracted from the PV system, the active component of the current injected into the electricity grid increases. Increasing active and reactive current components and consequently increasing output current passing through PV inverter will give rise to detrimental effects on inverter switches. By implementing LVRT capability, an incompatibility is observed between the active power generated by the PV system and the active power injected into the electricity grid. By reducing the active power injected into the electricity grid, the additional power generated by the PV system is stored in the DC-link capacitor, leading to DC-link overvoltage and damage to the DC-link capacitor. Therefore, to prevent the PV inverter overcurrent and DC-link overvoltage, the active power extracted from the PV system must be decreased by moving from the MPP when implementing LVRT capability during voltage sag [7,[12][13][14][15]. Figure 2 depicts a two-stage single-phase grid-connected PV system together with the proposed control strategy. The PV system consists of a PV array, a DC/DC converter (usually a boost converter), DC-link and a DC/AC converter. By adjusting the DC/DC converter duty cycle (D conv ), the operating point of the PV system is set at MPP. The DC/AC converter is responsible for injecting the extracted power into the electricity grid and keeps the DC-link voltage constant by applying P-Q control algorithms [25].
According to Figure 2, the proposed control strategy includes the following main steps: 1. Estimating radiation levels using the LSCF algorithm, 2. calculating MPPs and LPPs based on the estimated radiation levels and PV panel characteristics, 3. calculating voltage sag (ΔV), 4. moving operating point from MPP under partial shading conditions.
All the above-listed steps are carried out when implementing LVRT capability during voltage sag under partial shading conditions and will be discussed in the following subsections.

Estimating radiation levels using LSCF algorithm
By using the LSCF algorithm, parameters of the vector x defined as Equation (3) can be obtained.
radiation levels, and N j (j = 2, 3) the number of PV cells under G 2 and G 3 , respectively. N cs represents the number of seriesconnected PV cells in each module, and N m is the number of PV modules in each PV array.
The Levenberg-Marquardt algorithm is an effective method to implement the LSCF algorithm, in which the unknown vector x in Equation (3) is updated in each repetition 'k' using the following relation: where H = J T J and ∇ f = J T R represent a Hermitian matrix and gradient vector, respectively. In addition, J and R indicate the Jacobian matrix and residual vector, respectively. Λ is damping vector (here, it is 0.001).
Hermitian matrix H and gradient vector ∇ f for three different radiation levels are given by S 1100000 S 0200000 S 0110000 S 0101000 S 0100100 S 0100010 S 1010000 S 0110000 S 0020000 S 0011000 S 0010100 S 0010010 S 1001000 S 0101000 S 0011000 S 0002000 S 0001100 S 0001010 S 1000100 S 0100100 S 0010100 S 0001100 S 0000200 S 0000110 where the terms S tuvwxyz are the sum of the partial derivatives as follows: where V i and I i represent the sampled PV array voltage and current, respectively. The parameter n is also the number of samples. V str is the voltage across the PV array, which is the sum of the shaded and unshaded PV cells voltages.

Calculating MPPs and LPPs
There have been a great number of methods, such as the leastsquare method introduced in the literature for calculating MPPs and LPPs [26]. In [27][28][29], MPPs are calculated using PV panel specifications and radiation levels. In this study, all MPPs and LPPs are calculated by using estimated radiation levels and PV panel characteristics (see Section 3.1) Figure 3(a) demonstrates the PV array with the characteristics as Table 1. A shadow having three different radiation levels (G 1 , G 2 and G 3 ) is applied to the PV array. From the simulation results presented in Figure 3(b), the P-V curve has three MPPs (MPP1, MPP2 and MPP3), in addition to two minimum power points (LPP1 and LPP2).
As mentioned earlier, under partial shading conditions, the P-V curve contains MPPs in addition to LPPs (see Figure 3(b))  [30][31][32]. To implement the proposed control strategy, all these points must be specified. MPPs for the number of 'n' different radiation levels can be calculated as Equation (4). Authors in [26] presented only the process of calculating MPPs and did not provide how to calculate LLPs. The general relationship for the calculation of LPPs for the number of 'n' different radiation levels is as Equation (5): where ΔV D is voltage drop directing bypass diode (ranging from 0.7 to 1 p.u.), and V mp0 and I mp0 are the maximum voltage and current of the PV module at standard test condition (STC), respectively. In addition, I sc0 and V oc0 are short-circuit current and open-circuit voltage of the PV module at STC, respectively. λ is an empirical coefficient, N m is the number of PV modules in the PV array, and m is the number of PV strings. It must be noted that the value of parameters V mp0 , N cs , and ΔV D remain unchanged under different radiation levels.
To verify the formulas in Equations (4) and (5), voltage and current of different MPPs and LPPs are obtained and presented in Table 2. As can be seen, the difference between these values (simulations and formulas) are very small (0.01-0.05).

Calculating voltage sag (ΔV)
Recently, many voltage sag detection methods have been proposed, such as the RMS method, peak value method (orthogonal signal generator-based sag detection techniques), the missing voltage technique, Direct-Quadrature (DQ) method, droop control method, and wavelet transform method [16]. Some of them suffer from disadvantages in terms of response delay. The RMS method computes the RMS value of the input signal by using a running average window of one cycle. Therefore, theoretically, this method will introduce one cycle delay in order to give the correct value. The wavelet transform-based voltage sag detection has become of high interest because of its fast detection speed. However, the implementation of this method is, unfortunately, not easy in real-time.
In this study, a DQ technique is employed to detect voltage sag, in which values of d-q components of the grid voltage is obtained using a phased-loop locked unit. The grid voltage can be calculated as where v gd and v gq are the dand q-component of the grid voltage, respectively. Then, the grid voltage v pu and its nominal value v N are used to obtain voltage sag ΔV as Equation (1).

Moving operating point from MPP under partial shading condition
During voltage sag, the PV system is disconnected from the electricity grid. Consequently, problems like power outages, voltage flickers, instability, and frequency deviations appear in the grid. To overcome the problems caused by voltage sag, LVRT capability is one of the most significant requirements of the grid, which imposes the grid-connected inverters to inject the reactive current component into the electricity grid. Besides, during voltage sag, the voltage amplitude is smaller than its nominal value, and as long as the operating point of the PV system is the MPP, the injected active current component to the grid increases, which in turn can make the inverter switches overcurrent. On the other hand, applying LVRT results in a mismatch between the active power generated by the PV system and the injected power to the electricity grid. In fact, by reducing the injected active power to the grid, the additional power generated by the PV system is stored in the DC-link capacitor, giving rise to DC-link overvoltage, which damages the DC-link capacitor. In a situation like this, the generated PV power can be decreased by moving the operating point from MPP. One of the most common methods for reducing the amount of power generated by the PV system is 'power reserves control scheme'.
To implement the proposed control strategy, at first, a special modification of the P-V curve is developed. Then, to track the desired reference power P pvref , for the maximum available power of P max , the scheduled power P sch is determined according to a reserves command as P sch = (1-reserves) P max , where 'reserves' might have a range from 0 to 1. Finally, the DC/DC converter duty cycle D conv was controlled to track P pvref as P pvref = min{P sch , P lim }, where P lim is a power limit set by the PV inverter control to maintain the transferred power during low-voltage faults. In practice, the PI controller is to track one of the 'set points' OP1 to OP6 (see Figure 3(b)), which are the intersection of the desired reference power P pvref with the modified P-V curve. The fast dynamic response, improved PV inverter efficiency, increased stability, and so forth, are among the benefits of moving the operating point to the right side of the MPP (downhill sections) under rapid radiation variations. Therefore, points located in the lower sections (points OP2, OP4 and OP6) are suitable candidates. The procedure of obtaining the fitted curve in addition to the flowchart of the proposed control strategy is presented in the following of this subsection.

3.4.1
Curve fitting to extract the corresponding algebraic function for the P-V curve, first, it is assumed that extrema points (the calculated MPPs & LPPs in Section 3.2) are as follows: As these points are either maxima (MPPs) or minima (LPPs), each point conforms to the vertex of a parabolic curve. At MPPs or LPPs, the slope is descending and ascending, respectively, so P-V parabolic curve corresponding to each point can be obtained as by substituting the vectors P and V as Equation (11), first, the P-V parabolic curve corresponding to each point is plotted in Figure 4 (in red solid line). Then, the complete P-V curve is drawn using interpolation (in blue dashed line).
In the next step, the corresponding algebraic function for the P-V curve must be obtained. To this end, the MATLAB curve fitting tool is used, and the following Gaussian function is obtained and plotted in Figure 5: where parameters a i , b i , and c i are available after curve fitting using MATLAB curve fitting toolbar.

Flowchart of the proposed control strategy
The flowchart of the proposed control strategy is shown in Figure 6. As can be seen, according to v pu , there exist two different operation modes as normal (v pu ≥ 0.9) and LVRT (v pu < 0.9). If the system in Figure 2 is in normal operation mode, the DC/DC converter duty cycle D conv is regulated in such a way that the reference power P ref (for the PI controller) is set to P max . In other words, under normal operating condition, the grid-connected PV inverter injects the maximum active power into the electricity grid.  During a low-voltage fault, the reference power P ref is set to the P pvref . As seen, first, MPPs and LPPs are calculated (see Section 3.2). Then, P CF is extracted by using the MATLAB curve fitting tool. Finally, OPi points, which are the intersection of the desired reference power P pvref with P CF , are extracted (by equating P CF and P pvref ) and tracked, provided that they are located in the right side of the MPP or downhill sections (V MPPi < V OPi < V LPPi ). It must be mentioned that all the MPPs and LPPs are automatically updated online by changing the radiation levels.

Simulation study
The proposed control strategy is developed in MAT-LAB/SIMULINK on a 3500 W PV system for PV system parameters as listed in Table 3 (PV module characteristics are  as Table 1) The applied shading pattern is similar to Figure 3 Figure 7(h). As shown in Figure 7(a), two different low-voltage faults are applied in intervals (2.5-2.65 s) and (2.9-3.05 s). When the grid operates under normal condition during intervals (0-2.5 s) and (2.65-2.9 s), the normal operation mode is selected. In this case, the operating point of the PV system is set to P max using the power-PI controller. In intervals (2.5-2.65 s), where the grid voltage falls to 0.7 p.u., LVRT operation mode is enabled. In this case, (P opi , V opi ) pairs, which are the intersection of the desired reference power P pvref with P CF , are extracted (by equating P CF and P pvref ) and tracked, provided that they are located on the right side of the MPP or downhill sections (V MPPi < V OPi < V LPPi ). Here, the operating point of the PV array is set to OP2 using the power-PI controller. Again, in intervals (2.9-3.05 s), the grid voltage falls to 0.4 p.u. and the LVRT operation mode is enabled, and the operating point of the PV array is set to OP6 using the power-PI controller.
It must be mentioned that if the calculated OPi points are located in more than one downhill section, the operating point of the PV array is set to OP2. The reason is that |V MPP1 -V OP2 | is smaller than |V MPP1 -V OP4 | and |V MPP1 -V OP6 |, leading to faster dynamic response. For further clarification, the movements from MPP1 to OP2 and OP6 are also shown in Figure 8. According to Figures 7(e) to (h) and 8, the movement time of Comparison of the proposed algorithm with [17,19] MPP1 to OP2 is much lesser than that of MPP1 to OP6. Therefore, the downhill section in which OP2 is located has a faster dynamic response.

Comparison and discussion
In this sub-section, a comparison is made between the proposed algorithm and the algorithms used in uniform shading conditions, and the results are presented in Figure 9. Results for the control algorithm using the PI power controller, the PI current controller, and the proposed control strategy are shown in yellow, red, and blue, respectively. As can be seen, the error between the reference power and PV power is about 8% and 15% for the PI power and the PI current controllers, respectively. Therefore, control algorithms based on the PI current and PI power controllers are inefficient in partial shading conditions. The leading cause is that the P-V curve is non-linear during voltage sag, so the PV panels are not able to track the reference powers.
In terms of stability, the control algorithm using the PI power controller delivers better performance than the PI current controller (instability can be obviously seen in the results for the control algorithm using the PI current controller). In terms of complexity, the PI current controller is a better choice as a multiplier is also required in a PI power controller to calculate PV power [17]. However, PI power controllers provide high accuracy tracking, which makes them suitable for the movement of the operating point from MPP under partial shading condition [24]. However, the proposed control strategy may also lead to some limitations such as high computational burden under

Experimental study
An experimental setup is used to verify the proposed control strategy during low-voltage faults under partial shading conditions as Figure 10. A PV string having two 60 W modules are used in series, and a DC-DC boost converter connected to a resistive load is used instead of a gridconnected PV inverter. The PV string is exposed to direct sunlight to extract maximum power. Then, a film sheet covering a part of the PV string is utilised to create shading condition. Experimental setup characteristics are given in Table 5.
At first, PV power and voltage are monitored, and the resultant vectors are given to the analogue-to-digital of DSP (TMS320F2812). Table 6 represents the main steps executed in DSP for obtaining D conv under non-fault operation and LVRT operation modes.  The experiments are carried out in three shading conditions as Set1: G 1 = 1000 W/m 2 , G 2 = 300 W/m 2 , G 3 = 100 W/m 2 Set2: G 1 = 1000 W/m 2 , G 2 = 700 W/m 2 , G 3 = 300 W/m 2 Set3: G 1 = 300 W/m 2 , G 2 = 400 W/m 2 , G 3 = 1000 W/m 2 First, the performance of the algorithm in set1 is evaluated as follows: Inputs N cs , N m , N j , I mp0 , V mp0 , V oc0 , I sc0 , λ, m, n Estimate radiation levels (G 1 , G 2 , …) using Equation (4) if v pu < 0.9 (low voltage ride-through operation mode) { Calculate MPPs & LPPs (using Equations (8) and (9)) Calculate (P opi , V opi ) using Non-fault operation mode (normal operation mode) In non-fault operation mode, the PV string is exposed to three different radiation levels. By using the 'MPPs and LPPS calculator' unit, PV power at MPP is calculated. Then, the MPP is compared to the power reference P pvref = 37 W. The DC/DC converter duty cycle D conv is regulated to set the operating point of the PV string to MPP by means of the PI power controller (see Figures 11(a) and (d) Also, the performance of the algorithm in the second set is shown in Figure 11.  Experimental results of PV system in the non-fault operation mode and low voltage ride-through operation mode. Left: Operating point of PV string at MPP; middle: Movement of operating point from MPP to OP1; right: Movement of operating point from MPP to OP2 in the P-V curve, for PV string current-violet: (d, e, f, j, k: 1 A/div, l, p, q, r: 500 mA/div) and for PV string voltage-orange: (d, e: 5 V/div, f, j, k: 10 V/div, l, p, q, r: 20 V/div); (a)-(f) set1: G 1 = 1000 W/m 2 , G 2 = 300 W/m 2 , G 3 = 100 W/m 2 ; (g)-(l) set2: G 1 = 1000 W/m 2 , G 2 = 700 W/m 2 , G 3 = 300 W/m 2 ; (m)-(r) set3: G 1 = 300 W/m 2 , G 2 = 400 W/m 2 , G 3 = 1000 W/m 2

CONCLUSION
A new control strategy capable of LVRT is proposed in this study for a two-stage single-phase during low-voltage faults under partial shading conditions. After estimating radiation levels by using the LSCF algorithm, the voltage/current of MPPs and LPPs are calculated. All the MPPs and LPPs are automatically updated online by changing the radiation levels. Then, the corresponding algebraic function for the P-V curve is extracted by means of only PV voltage and power vectors.
Finally, under partial shading conditions, where multiple local peaks are observed on the P-V curve, the moving operating point to the right side of MPP is well-achieved through a power-PI controller. Simulations and experiments are conducted on PV systems to validate the effectiveness of the proposed control strategy. Based on the accuracy of the fitted curve, employing the proposed control strategy gives rise to the improved results.
Using results, 8% and 15% improvements can be seen for the proposed method in comparison to other methods mentioned in the references. Performance evaluation of the proposed control strategy in more complex partial shading conditions (where there are more than three peaks), practical comparison between the movement of the operating point to the right side and left side of MPP, study of the proposed algorithm in the flexible power point tracking methods, such as power reserve control or constant power generation as well as a practical implementation of the proposed method in single-stage PV systems are recommended for future of this work.