Power Generation Control Algorithm for the Participation of Photovoltaic Panels in Network Stability

The push for renewable energy and sustainable development has led to an ever-increasing integration of grid-tied photovoltaic (PV) systems. To maximize revenue, this resource generally operates in maximum power point trackers (MPPT) mode. However, to ensure grid stability and reliability, system operators will continue to introduce new requirements, eventually forcing PV plants to adhere to primary frequency regulation. To perform this task, PV plants will have to be capable of operating outside the MPP and varying their power production, to maintain an active power reserve, according to grid request. This article presents an innovative model-based (MB) tracking algorithm devoted to supporting power network regulation. Due to the updated formulation, the algorithm can vary the power curtailment according to a reduction factor given by the power system operators. Results show the remarkable performance and accuracy of the new algorithm, providing power regulation capability in the range 20%–100% of the maximum available power. Moreover, the impact of the employment of constant reduction coefficients on the algorithm performances has been evaluated. Validation has been performed based on the data collected over an observation interval of more than six months. Due to its flexibility, this could be the basis for the participation of PV systems to frequency regulation.


I. INTRODUCTION
T HE rising concern for global warming and the increase in the cost of gas due to the war in Ukraine have increased the need for renewable energy sources (RESs). It is estimated that 314 GW of renewable power capacity has been added worldwide in 2021 [1]. Of that, photovoltaic (PV) accounts for 175-GW beating wind capacity addition (105 GW) and hydropower (26 GW). Yearly, PV capacity additions have exceeded those of wind power in the past five years. Steady growth in the PV sector is expected in the upcoming years, Manuscript  reaching a yearly added installed capacity of 347 GW in 2026, according to the "Medium Scenario" detailed in the report of Solar Power Europe [2]. Undoubtedly, PV systems are expected to play a key role in the energy transition across the globe. Based on this change, some crucial challenges will need to be overcome with respect to the standard power system operation control and planning. Apart from providing energy to end customers, the power system operators' most important responsibility is to maintain the supply's reliability and security. Any mismatch between the active power supplied by the generators and used by consumers leads to grid instability. This leads to premature aging of generating units, equipment damage, and overload of transmission lines.
In traditional power plants, primary frequency regulation consists of the inertial response and droop control of rotating electric generators. However, grid-tied PVs operating in maximum power point (MPP) do not have any stored energy (moving parts) to participate in frequency regulation. This results in the reduction of the inherent energy buffer, which compromises the functionality and reliability of the overall system. Therefore, as the penetration of PVs in the grid increases, so does their importance in grid control, thus resulting in the introduction of specific grid regulations [3], [4]. The solution lies in emulating the inertial response of conventional generators by giving PV systems the capability to vary their power production according to grid requests.
Scientific literature suggests different approaches to achieve this task: installing battery or other energy storage systems, integrating a dump load to dissipate excessive power, or operating PVs in power curtailment mode by modifying MPP tracking (MPPT) algorithms, so that a portion of output power is available for frequency regulation [5], [6], [7], [8], [9]. Adding battery energy storage is the most commonly used solution. The surplus of the PV power can be stored in the energy storage device, thus allowing the PV system to operate in MPPT mode. However, the battery storage solution is also the most expensive due to the higher initial cost and the limited lifetime of battery systems compared to the PV system [10], [11]. The power curtailment approach is theoretically the most cost-effective. This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ The electric power industry typically groups frequency regulation into two subcategories: primary (on the time scale of a few seconds and below) and secondary (on time scales ranging from a few seconds to several minutes). Many articles show the feasibility of participation of PV plants in both types of grid frequency regulation, as well as the optimal power curtailment level, without focusing on the power reduction strategies [12], [13], [14], [15].
PV plants' active power control will also find applications in islanded microgrids and regulation markets [16]. In islanded microgrid power systems, the variability of renewable generation is particularly problematic. For example, the island of Puerto Rico requires large new PV and battery facilities to provide primary frequency regulation and controlled power ramp rates, significantly increasing capital and maintenance costs [17]. On the other hand, as the need for frequency regulation rises, in liberalized electricity markets, it will make economic sense for privately owned PV plants to provide frequency regulation services rather than operating in MPPT.
In the countries where grid regulations have been revised, PV plants are required to partially participate in primary frequency regulation effort, by reducing the power production when the grid frequency is higher than nominal. This can be achieved using traditional hill-climbing methods by imposing an upper limit for the produced power, so that further MPPT is disabled once this point is reached. These and many other constant power generation (CPG) strategies proposed in [18], [19], and [20] enable working at reduced power (RP), without providing the knowledge of the maximum available power and the available power reserve at any given moment. However, the limitation of all these strategies is that while they can be used by the transmission system operator (TSO) for the goal of reducing frequency to the nominal value, they cannot be used for the opposite task of increasing the grid frequency, as the latter requires insight about the available power reserve.
In the previous works [21], [22], the authors have presented a model-based (MB) MPP tracking algorithm, which requires a preliminary database collection of MPP parameters to identify the model coefficients.
This article is a technical extension of a previously published work, in which the MPP model was adapted to the tracking of a predefined RP [23]. The proposed MB strategy in this article enables working at RP as a percentage of the maximum available power, therefore maintaining accurate MPP estimation even while working at RP point (RPP). Hence, the available power reserve at any working instance is known and available for frequency regulation.
The algorithm's performance had been evaluated on a dataset of curves acquired on a real panel for over six months, demonstrating accurate operation at 80% and 90% of maximum available power. Moreover, [24] showed, in simulation, that the algorithm can provide a PV module the ability to operate at any power level between 80% and 100% of maximum available power for a wide range of irradiation and temperature conditions. This article will present a complete validation of the method, extending the operating range to 20%-100% of the available power. Moreover, three strategies for calculating the necessary coefficients of the model will be presented and compared. Finally, the contribution of the uncertain estimation of the reduction factors has been analyzed to evaluate the impact of neglecting the dependency of the reduction factors on the dataset.

A. Traditional Algorithms
Traditionally, the control of the inverters connected to the PV panels has been developed to maximize the produced energy by exploiting the typical P-V characteristic of the panels, characterized by a single MPP and a hill shape.
One commonly used algorithm is the perturb and observe (P&O) method, which allows good results with a low computational burden: the MPP is reached by perturbing the state and comparing the power produced by the PV panel with respect to the previous value. The algorithm efficiency strictly depends on the chosen voltage perturbation. If the voltage step V is small, the algorithm's speed is limited by the high number of iterations required to converge. Moreover, if it is also lower than the measurement noise, it can be unstable. On the other hand, if the chosen voltage step V is large, the reached power point can be theoretically far from the theoretical one (at least of V ), but its speed increases. To overcome this issue, stepchanging methods have been adopted to minimize the energy not produced by the panel due to the algorithm.
Other algorithms are based on similar concepts, such as the incremental conductance method, which measures the value of the ratio I / V assuming that in the MPP its value equals zero, and it changes its sign in the right part of the curve. Again, this algorithm is based on the assumption that the PV module has to work around the local maximum.
These algorithms are not efficient when the radiation suddenly changes in the daytime (such as in cloudy and partially shaded conditions). In the first case, the dynamic of the algorithm is limited by the choice of V ; in the second case, the P-V curve is characterized by different local maxima, so the algorithm could converge to local MPPs that are different from the global MPP.

B. MB Algorithms
A further step in enhancing MPP tracking has been done by implementing MB algorithms. Those algorithms are not based on the knowledge of the PV characteristic of the panel but its electrical behavior. Due to the a priori knowledge of the photoconversion, they can be suitable to enhance the tracking speed and the dynamic performance of the MPPT algorithms. Of course, those methods are complex and could require a complex computational burden. In order to avoid this, two different strategies could be adopted. On the one hand, one could hybridize MB models with traditional tracking techniques; on the other hand, model simplifications could reduce the computational burden in terms of physical parameter and necessary measurements.
The authors have developed a simplified MB MPPT technique by solving the equations of the single diode model of the panel, and the MPP voltage and current can be derived from the electrical characteristic of the panel and the weather conditions where G is the radiation, T is the panel temperature, α, β, δ 1 , and δ 2 are the correction coefficients depending on the panel, and V MP0 and I MP0 are the MPP voltage and current at reference working conditions G 0 and T 0 . With simple considerations [21], (1) can be rearranged in the well-known four parameters equation In practical applications, the MP voltages and currents are not known; therefore, (2) can be iteratively applied to reach the MPP. This method requires few iteration steps (less than 5 in real working conditions), and it provides similar results to the one achieved by the hill-climbing methods on clear sunny days [25]. Differently from hill-climbing techniques, MB MPPT dynamic response is not affected by a sudden change in the radiation and results in an improvement in variable weather days [22]. On the other hand, particular attention has to be paid to the identification of the alpha parameters: they slightly change over time, so an automatic update has to be implemented. A weighted least squares method has been shown to improve the robustness of the parameter estimation when bad data are present in the estimation database (such as partially shaded curves) [26].

III. ALGORITHM FOR POWER REGULATION A. State of the Art
There are various algorithms in literature enabling a PV plant to work at RP. The simplest method employs a modified fractional open circuit voltage MPPT method, using a ratio between the voltage of the RPP and the open-circuit voltage [27]. An obvious drawback is that this strategy occasionally requires disconnecting the plant to measure the opencircuit voltage. Similarly, Sangwongwanich et al. [28] employ a fast MPPT operation, and once the maximum power is known, the desired power curtailment is performed. It is a costeffective sensorless strategy, but, on the other hand, it requires continuous oscillation between the maximum and desired power. Different authors [29], [30], [31] present methods to estimate the MPPT from measured irradiance and PV cell temperature, which can be used to implement a power reduction strategy. Other active power regulation strategies are based on curve fitting [32], [33], [34], [35]. The most recent one [34] accomplishes real-time estimation of the MPP and model parameters via a curve fitting method derived from single-diode PV model. It does not require irradiance and temperature sensors, keeping the system's cost and complexity to a minimum. Reference [35] is an improvement of the previous work, which succeeds in maintaining operating reserves at partial shading conditions.
In [18], three CPG control solutions for single-phase gridconnected PV systems have been compared, based on the control of current, power, or the P&O algorithm. The third solution, P&O-CPG, proved to be the most robust and is also separately discussed in [19] and [20]. All CPG strategies enable working at RP, without providing the knowledge of the maximum available power and the available power reserve at any given moment. In [36] and [37], this limitation is overcome considering a multistring system, using a master-slave approach. In [36], the master PV strings operate in MPPT to determine the total available PV power, while the other slave PV strings use the estimated available power from the master PV string to calculate their operating point in the P-V characteristic curve of the PV; while in [37], the master PV panels are in short circuit and in open circuit and provide the values for the estimation of the MPP. However, the intrinsic differences present even between "identical" panels will always result in some estimation error if this approach is followed.
Hill climbing algorithms have been developed to reach the condition of maximum power and cannot optimally work outside this point. Their employment will therefore result in an oscillating tracker between the maximum and the desired RPP.
Most of these algorithms have been compared in [38] in terms of abilities, steady state, and dynamic errors. All of them are based either on the control of the generated power or on the direct calculation of the PV voltage via modified hill climbing methods. The outcome of this article underlined that high-performance RPP algorithms for steady-state operations highly degrades their performances in dynamic conditions; conversely, a modified MB algorithm, which is characterized by high dynamic performances, is supposed to fulfill both steady state and dynamic operations with a reduced error.

B. MB RPP Tracker
MB algorithms are based on the physical behavior of the panel; for this reason, they can theoretically predict not only the MPP but also a generic point outside the maximum as long as the simplification hypothesis is met. In particular, the fourparameters algorithm requires the PV current to be not far from the MP current. This constraint is fulfilled in the leftmost part of the V -I curve due to the flatness of the PV characteristic.
Considering (2), it has already been demonstrated that by using a current different from I MP , the algorithm converges in a few steps to the MP voltage. Therefore, if the ratios between the voltage and current at the desired RP and the voltage and current at the MPP are known, it would be possible to work at any chosen power by altering the original equation.
If the following coefficients are introduced: as the voltage and current ratio coefficients, by substituting (3) in the MB MPP tracker (2), the RPP tracking (RPPT) equation can be obtained By implementing (4) in such a way, it will theoretically converge to any desired power level, in the same manner that the traditional equation (2) would converge to the MPP. It is worth highlighting that the MB coefficients are the ones already evaluated for the MPP tracker; therefore, they are constant with respect to the desired power level.
It should be underlined that the power reduction factor cannot be assumed equal to the voltage reduction factor K V ; hence, the value of K V must be numerically found.
Implementing a control strategy based on the RPPT equation onto a dc/dc boost converter (in case of a two-stage configuration) or inverter would consist of the logic shown in Fig. 1. The requested power level is an input provided to the algorithm. The MB equation requires the measurement of current and temperature of the panel and provides an output the reference voltage. The measured voltage is subtracted from the reference voltage and the result is propagated to a PI controller, which defines the required duty cycle.

C. Parameters Identification
For the traditional MB algorithm, also in this case, the parameters must be identified on a real database of curves. First, the A 0 -A 3 parameters can be identified using a weighted least squares approach.
From the N acquired V -I characteristics, V MP and I MP have been computed; together with the related temperature T P , the problem can be written in the following form: A good tradeoff between complexity and accuracy in the inversion of the problem is given by using a weighted least squares approach, in which the maximum power provides the weight matrix; in this case, the minimization is performed in the produced power  Since a full dataset of I -V curves has been generated, the values of K V and K I , for any power level, can be found using (3).

IV. DATABASE COLLECTION
To test the proposed algorithm, an actual set of PV curves has been acquired on a real test panel, consisting of 72 cells and characterized by a short-circuit current I sc = 5. 36 A, an open voltage V 0 = 44.2 V, and rated power P r = 180 W. The curves have been acquired employing a linear load connected to the panel able to vary the voltage at its terminal from short-circuit to open-circuit voltage. A linear variation has been chosen between the two-panel states in a ramp time equal to 100 ms while acquiring PV current and voltage. The voltage has been measured using a resistive divider, while the current has been acquired through a closed-loop Hall effect sensor (LA25NP). The transducers' outputs have been connected to a DAQ board and then acquired by a PC, which also controls the voltage ramp of the linear load. Each curve has been acquired with a 100-kHz sampling frequency. A 1-min delay has been inserted between two consecutive acquisitions.
It is well known that the panel V -I characteristics strictly depend on irradiation and temperature; therefore, it is also necessary to monitor their values. A CMP21 pyranometer has been used to acquire solar radiation, while a PT100 RTD has been placed to measure the panel temperature. The whole setup is depicted in Fig. 2. 113 days of real measurement data over a six-months interval were used, including cloudy days and partial shading. The total number of considered curves is equal to 55 613.

V. ALGORITHM VALIDATION
The collected database has been used to validate the proposed algorithm. Its performance is evaluated when power ranging from 20% to 100% of its maximum power is needed.

A. Parameters Identification
To focus the attention on the power control algorithm, the A WLS coefficients have been periodically updated, as it is known that they vary over time [39]. In particular, a monthly update has been chosen, by considering data collected on the first sunny day. The coefficients have been calculated according to (6), and the results are listed in Table I.   K V and K I have been first calculated for all the V -I curves with generated power from 20% to 100% of the maximum available power with a step of 5%. In Figs. 3 and 4, the distributions of the calculated K V and K I for generating 20%, 40%, 60%, and 80% of the maximum available power are shown.
From the figures, it can be clearly seen a different behavior between K V and K I distributions. In the first case, the values of K V are noticeably different from each other and their distribution width increases with the power value. Moreover, the mean value of each distribution is negatively biased with respect to the value of the RP, but a high correlation can be observed. On the other hand, K I distributions, in any case, are practically overlapped: this can be explained by the flat characteristic of the V -I curve at low voltage levels. Also, the standard deviation of the different K I values is similar, and so the correlation of K I with respect to the power reduction is limited. This leads to a good estimation of the MPP current  From a practical implementation point of view, a single value of K V and K I has to be chosen for the tracker. In this respect, three strategies to obtain K V and K I have been analyzed using the available data.
The first one was to calculate the mean value of K V and K I using all the 55 613 available data. The second approach was to calculate the values of K V and K I considering a single day of observation. In this regard, a day in the middle of the six-months observation has been selected: May 13. The mean values of K V and K I have been calculated and used as parameters of the algorithm. The third strategy was to calculate the coefficients using simulated data. To this end, a panel was designed in Simulink with very similar characteristics to the real panel, namely, a short-circuit current of I sc = 5.37 A and open-circuit voltage of V 0 = 44.5 V. However, its rated power was reduced to 173.6 W. This is because the real data were acquired after the panel had been operating on the roof for seven years and a panel capacity degradation of 0.5% per year was considered. By connecting the panel to an ideal voltage source with varying voltage, 1000 complete I -V curves were computed under different irradiation and temperature conditions. Afterward, using the same strategy for the actual data, the mean values of the voltage and current ratios were calculated.
The blue dotted lines in Figs. 5 and 6 represent the standard deviation limit of the distribution of voltage and current ratios obtained from all data. As it can be seen from the same two figures, using one day of measurements, or even data obtained from simulation leads to very similar values for the voltage and current ratios, for the various power levels. All of them fall within one standard deviation range. The K I ratio coefficient for lower power levels, obtained in simulation, diverges from the other two but still also remains within one standard deviation. It also leads to very similar RP operation, as it will be shown in the following. Therefore, considering simulated data, the mean value over one day or the total number of curves should not give very different results. Figs. 4 and 6 show that the coefficient K I is not affected much by the power reduction. As stated before, this feature is due to the shape of V -I curve of the panel, for which the current slope between short circuit and MPP is low. On the other side, different considerations can be made for K V (see Figs. 3 and 5). Its value strongly depends on the chosen power reduction, and it decreases by decreasing the power request. Again, it has to be highlighted that this value cannot be considered equal to the power reduction, and it cannot be considered constant in the overall set of data.

B. Performance Evaluation
As aforementioned, the scope of this article is the evaluation of the algorithm accuracy when it works between 20% and 100% of the maximum available power, with different evaluation strategies of the reduction coefficients. For this reason, the error in the estimation of the RP has been calculated on the overall set of 55 613 curves. Each of the three estimation methods of K V and K I has been considered and the results have been compared.
The relative error has been used to evaluate the performance of the RPPT algorithm. Since the maximum power for every point of analysis is a priori known, the relative error can be computed where P RP is the power predicted by the algorithm, K R is the power reduction factor, and P MP is the theoretical MPP. According to the european union (EU) regulation [40], the power plant working in power curtailment mode must operate with an error lower than ±2.5% with respect to the nominal power P n . If the ±2.5% limit is considered, the percentage of the curve inside those bounds can be seen in Table II. The worst results are obtained for working at 85% of maximum available power, and even in this case, the algorithm is operating adequately for 97.93%-98.04% of the data, depending on which set of coefficients are used. For all other power levels, the algorithm's accuracy is even higher, according to the limits defined by the standard.
In Fig. 7, the relative error distribution is shown for working at 85% of maximum power, using the three sets of coefficients. Similar or narrower distributions are also obtained when working at all other power levels. Through linear interpolation, the value of K V and K I can be obtained for any desired power level. In this work, using linear interpolation, K V and K I are  7. Error distribution when the PV panel is required to work at 85% of the maximum power (blue bars when K V and K I are calculated by using all data, red bars when using one day of observation, and yellow bars when using simulated data). calculated for the desired point of 82.5% of maximum power from the known values of the ratios for 80% and 85% of maximum power. This power level is chosen because it is the middle point between the two power levels, for which the algorithm's performance is the worst. In Table III, it is shown that the algorithm can track this desired power with similar accuracy to 80% of maximum power, with 97.93%-98.08% of the data remaining inside the ±2.5% limit. Furthermore, the relative error distribution remains similar and is shown in Fig. 8. From the figures, it can be seen the remarkable performance of the proposed algorithm. In fact, the algorithm seems to reach the limit imposed by the TSO in about all the panel working conditions with a single constant coefficient in both cases. However, a little positive bias can be observed in the error distribution in both cases. Bias could be explained by the total number of bad curves (i.e., with heavy shading or measurement error) not neglected during the estimation process and a possible correlation of the values of K V and K I due to panel temperature and solar radiation.
On the other hand, considering the symmetric 90th percentile of the distributions, the error falls under ±1.5% in all the considered cases. It has to be underlined that no filtering has been performed on the V -I database. Comparing the results with the ones obtained in [38], the errors of the proposed MB RPPT algorithm are in line with the ones obtained by the other algorithms when they are asked to work in a steady-state RPP condition (a mean value of 2% for the MB RPP against 0.5%-6.8%) and in a steady-state MPP condition [25] (a mean value of 0.2% versus 0.6%-8.9% reached by the other algorithms).

C. RPPT Algorithm Uncertainty
Finally, it is useful to evaluate the error introduced by the uncertain knowledge of the values of K V and K I . When the algorithm is working in real conditions, it will not be possible to obtain an updated value of the reduction factors. For this reason, the error introduced by using the values K V and K I from the proposed strategies has been evaluated against the accuracy achieved by the algorithm using the correct values of K V and K I , namely, the impact of the use of a single couple of K V -K I has been determined. If the error values Fig. 9. Error distribution when the PV panel is required to work at 80% using the actual K V and K I values and the one calculated from the simulated curve.
are overlapped to the one obtained by using the outputs of the three described strategies of evaluation of the reduction factors, it means that the contribution to the error in the RPPT due to the unknowledge of the correct reduction factors is negligible.
For this reason, for each curve, the actual values of K V and K I have been evaluated and the algorithm has been forced to work with the obtained values. Then, the error has been computed again as in (7) and compared with the ones obtained in Section V-B. As an example, the error distribution for a generation of 80% of the available power is shown in Fig. 9.
As expected, the error distribution increases when a single K V -K I couple is used; when the actual values are calculated and employed in the algorithm, the distribution has reduced second-order moment (in the considered case, the standard deviation is equal to 0.82% against 0.92%). However, the use a single extraction of K V and K I does not significantly affect the 95th percentile of the distribution nor the 2.5% limit imposed by the standard. The error is obviously increased in its standard deviation, but as it is far from being a Gaussian, this is not reflected in its percentile. Therefore, from a metrological point of view, the employment of a single couple of values of K V and K I slightly increases the overall uncertainty, but still it is fully compliant with the TSO requirements for more than the 98% of the observations.

VI. CONCLUSION
Grid-tied PV systems are designed to operate at maximum available power, do not have any stored energy, and therefore do not participate in power network frequency regulation. As the penetration of PVs in the grid is increasing, it becomes more and more strategic to provide these plants the ability to vary their power production according to the request of the grid operators. In the optics of the control of any panel singularly, the authors have proposed an MB power curtailment algorithm designed to operate at 20%-100% of maximum available power, starting from an MB MPP tracker. A model estimation procedure has been carried out, and the algorithm has been validated for different power levels using 113 days of measurement data collected over a six-months interval. It has been demonstrated that similar results can be achieved by obtaining the values of the parameters K V and K I by simulating a single standard curve. Results confirm the goodness of the algorithm by reaching the TSO requirement in more than 98% of the measured data in the overall observed power range. Moreover, it has been demonstrated that, from a metrological point of view, the employment of a single couple of values of K V and K I rather than the actual values of K V and K I computed on each curve slightly increases the overall uncertainty, but still it is fully compliant with the TSO requirements. Similar results are expected when a string is considered, as the model is based on the electrical behavior of a single cell. Due to its flexibility and robustness, this could be the first step in the practical implementation of the participation of PV plants in power network regulation.