A Bi-Level Control Strategy for PV-BES System Aiming at the Minimum Operation Cost of BES

With the increased penetration of the photovoltaic (PV) energy, the power system stability problem becomes an issue, as the output power of PV plants has unpredictable fluctuations. To maintain the power stability of the PV plants, battery energy storages (BESs) play an important role due to their fast and accurate response speed. However, it is challenging that the BES with multiple sub-modules responds well to the PV power fluctuations resulting from the various influence factors, such as defects, faults, and partial shading. Therefore, a bi-level control strategy is proposed in this paper, aiming at minimizing the operation cost of BES in maintaining power stability. The control strategy consists of the PV power fluctuations identification block and the mitigation block. In specific, the identification block can output the power fluctuation of a PV system by the PV power fluctuation identification technique. The technique is developed based on the characteristics of PV-string current under electrical faults and partial shading conditions. Meanwhile, the mitigation block can manage the multiple battery sub-modules with different regulation characteristics to meet the power fluctuations. At last, the promising results are obtained by MATLAB\Simulink with the coordinated operation of those two blocks, including the precise condition of the PV system and the optimal power output of each battery sub-module. Therefore, a comprehensive bi-level control strategy is developed to regulate the operation of battery sub-modules for PV-BES systems.


INTRODUCTION
To reduce the greenhouse gas emissions, replacing the fossil energy generation with renewable energies has become an inevitable trend in the modern power grid. Photovoltaic (PV) plants play an essential role in renewable energies and are regarded as one of the fastest-growing renewable energy systems of recent decades. As reported by the International Renewable Energy Agency (IRENA), the cumulative global PV installations exceeded 580 GW at the end of 2019 (IRENA, 2020). However, different from the conventional generators, the output power of PV plants is characterized by high intermittency and randomness. Meanwhile, the PV plants cannot provide the system inertia due to their lack of the rotation parts (Akshay and Abraham, 2019;Zhang et al., 2021). Therefore, how to strengthen the power regulation capability of PV plants has become a topic of concern recently. At the beginning, the below maximum power point tracking (MPPT) controller operation schemes are introduced as in Tarraso et al. (2017); Sangwongwanich et al. (2017) and Liu et al. (2014) to enable a certain capacity of power reserve from the PV plants. For example, the master-slave control is adopted in Tarraso et al. (2017), in which the master PV arrays reserve power following the slave PV arrays operating at MPPT. Also, the control strategies in Sangwongwanich et al. (2017) and Liu et al. (2014) achieve the power reserve by enabling the PV arrays to reach MPPT periodically and estimating MPPT through power-voltage curve respectively. However, in those control strategies, a proportion of the captured solar energy has been wasted more or less, which leads to the reduced efficiency of PV plants.
To avoid the waste of the solar energy, battery energy storages (BESs) are combined with PV plants as PV-BES systems, as in Kumar and Singh, (2019); Gira and Dahiya, (2020); Narayanan et al. (2020). In detail, a PV-BES system is developed based on a learning-quantization current control strategy in Kumar and Singh, (2019), a multifunctional voltage source converter is used for PV-BES system in Gira and Dahiya, (2020), and a voltage regulation controller is adopted to regulate the DC link voltage to compensate reactive power in a PV-BES as shown in Narayanan et al. (2020). Also, BESs provide a power response as part of the virtual synchronous generators as in Hou et al. (2020). Technically speaking, BESs, especially hybrid BESs, have great advantages in responding PV power fluctuations as their fast response ability. However, the operation cost of BESs in those control strategies is generally ignored.
The operation cost of BESs in PV plants can be improved by well-designed control strategies from two perspectives. On one hand, the control strategy must precisely identify the influence factors of the PV power fluctuation, and the influence factors can be defects, faults, and partial shading. In detail, the defects such as diode failures, hot spots, cracks in cells, and delamination may lead to the permanent damage and energy reduction of a PV module (Munoz et al., 2011). The defects rarely happen, because the development of PV cell technology has extended the warranties of a PV module to more than 25 years. Also, the electrical faults, such as line-to-ground (LG) fault, line-to-line (LL) fault, and arc fault (Pillai et al., 2019) may cause the permanent damage and energy reduction of a PV system. Moreover, the partial shading is usually due to bird droppings, dust, fallen leaves, trees, and buildings. Thus, different from defects and faults, the power fluctuations of PV plants caused by the partial shading should be identified by the control strategy, and mitigated by BESs.
To identify the partial shading, it is necessary to monitor the operation condition and output power of the PV plants. The current-voltage (I-V) characteristics of PV modules are commonly used to analyze the condition of PV plants (Wang et al., 2016;Chen et al., 2018Chen et al., , 2019. However, I-V testers are required to acquire the I-V curves of PV arrays which will cause extra costs. Since the MPPT controller keeps tracking the maximum power point (MPP) to output maximum power, the operation points during the partial shading and electrical faults are the same. Thus, it is difficult to differentiate the partial shading and electrical fault based on the operation points from I-V curves. Methodologies based on statistical analysis can be applied to study the performance of PV plants (Garoudja et al., 2017;Jenitha and Immanuel Selvakumar, 2017;Harrou et al., 2018). Nevertheless, a large amount of data on irradiance and temperature is needed. The partial shading and LL faults can be classified by machine learning tools for condition monitoring of PV systems (Akram and Lotfifard, 2015;Harrou et al., 2019). But, it is mandatory to collect and emulate numerous operation conditions to acquire sufficient training data. The performance of PV systems can also be evaluated by Gaussian mixture models and empirical mode decomposition (Ding et al., 2019). Extra sensors can be designed and installed on each PV module to detect potential malfunctions (Guerriero et al., 2016). The digital twin approach is developed to estimate the condition of a distributed power electronic-based PV system (Jain et al., 2020). Therefore, a cost-effective and reliable control strategy to identify the partial shading of PV plants is still lacking.
On the other hand, the control strategy must precisely manage the hybrid BESs at the same time, as they have different regulation characteristics. With the developments of battery technologies, BESs consist of several sub-modules with different regulation characteristics become dominating in the near future , to broaden the BESs' regulation capability. For example, the BES in Zhangbei's demonstration contains lithium battery sub-modules, sodium-sulfur sub-modules, and redox flow sub-modules. Thus, it is challenging to control battery sub-modules with different rated power, capacity, ramping rate, and real-time SoC in responding power fluctuations. In detail, sub-modules as in Lou et al. (2016) respond to the power fluctuations in proportion to their rated power, but the different ramping rates between the power type and energy type sub-modules are ignored. Also, power fluctuations are decomposed into the high component and the low component by Fourier transformation as in Bao et al. (2015); Hirase et al. (2016), and sub-modules take the corresponding component according to their ramping rate. Nevertheless, in those control strategies, SoC cannot be recovered until it crosses the upper/ lower thresholds.
Control strategies including SoC recovery stage are further developed in Tan and Zhang (2017); Megel et al. (2018); Doenges et al. (2020). For example, an SoC recovery phase is arranged after each response of the power fluctuations, as in Doenges et al. (2020), and a state-machine-based control strategy is shown in Tan and Zhang, (2017). However, SoC crossing the upper/lower thresholds cannot be eliminated, due to the randomness of recovery stage. A BES regulation cost function is formulated in Megel et al. (2018), in which SoC is first regarded as one of the cost influence factors.
Up to now, none of the control strategies can minimize the BES operation cost from both PV power fluctuation identification and mitigation. Therefore, a bi-level control strategy for BES in PV-BES system is proposed in this paper, in which the operation cost of BES is minimized. The specific contributions of this paper are summarized as follows. 1) An identification block with PV power fluctuation identification technique is developed. It can output accurate power fluctuation since the characteristics of PVstring current under electrical faults and partial shading conditions are considered. 2) A PV power fluctuation mitigation technique is developed based on the regulation characteristics of BES including rated power, rated capacity, ramping rate and real-time SoC.
The rest of the paper is organized as follows. The framework of PV-BES system with the proposed control strategy is introduced in the next section. The details of the bi-level control strategy for PV-BES system including the power fluctuations identification block and the power fluctuations mitigation block are presented in the following section. At last, the performance of the control strategy and the conclusion of the paper are in the last two sections.

FRAMEWORK OF THE PV-BES SYSTEM INCLUDING THE BI-LEVEL CONTROL STRATEGY
The equivalent model of the PV-BES system including the bi-level control strategy for BES are shown as Figure 1, consists of PV plants, BES with several sub-modules, and DC-DC converter. In specific, the PB-BES system is a hybrid system which shares the power from the PV system and BES through a DC link by using a bi-directional DC-DC converter. Furthermore, the bi-level control strategy consists of the PV power fluctuation identification block and the mitigation bock, and the process of the control strategy can be summaries as follows. In detail, the PV system is in normal operation and the BES is charging or discharging on schedule. The presence of partial shading and electrical faults affect the operation of the PV system leading to power fluctuations. In this case, PV power fluctuation identification block will check the causes of power fluctuations, and the warning information is displayed when an electrical fault happens. The instructions are sent to the mitigation block to regulate the operation of the BES system when the partial shading occurs. At last, the mitigation block further manages the output power of battery sub-modules according to their regulation characteristics.
In this section, the models of PV plants and BES are introduced as follows. The PV module consists of series and parallel connected PV cells, which composes of a negative type (N-type) layer, a positive type (P-type) layer, and a PN junction. Due to the PV effect, a PV cell can absorb photon energy from sunlight to produce free-moving electrons to generate electricity. The PV module is developed based on a single-diode model. The PV array is connected to a MPPT controller and it keeps tracking the MPPs to output the maximum power from the PV plant. The perturb and observe method is adopted for the MPPT algorithm. As in Figure 2, an equivalent circuit of PV module of single-diode is depicted. The current output from a PV module is I pv , the current generated by photon energy is I ph , and they can be expressed as 1) and 2) respectively. The model of PV module can be developed based on those equivalent circuit and equations.
Where the I o is the saturation current, I d is the diode current, I sh is the current passing shunt resistance, I sc is the short-circuit current, V PV is the output voltage, R s is the series resistance, R sh is the shunt resistance, n is the ideality factor of the diode, q is the electron charge, k is the Boltzmann constant, S is the solar irradiance in W/m 2 , J o is the temperature coefficient of a PV cell, T is the cell temperature, T ref is the reference temperature of 298 K. Generally, the BES system adopts conventional lead-acid batteries since they are stable and low-cost. However, the leadacid battery is limited in lifetime, requires a long charging time, is greatly affected by temperature, needs routine maintenance, and causes serious pollution. With the development of new-material batteries, the lithium-ion battery has the advantages of high  November 2021 | Volume 9 | Article 785420 energy density, fast charging, and long lifetime. Therefore, the lithium-ion battery is adopted to develop the BES system. The energy stored in the battery is limited and varies during charging and discharge period. Thus, it is important to determine the model parameters before modelling a battery. The capacity of a battery is affected by many factors. For example, the larger the discharge current, the smaller the battery discharge capacity. Besides, the discharge capacity is higher at high temperatures. During the charging and discharge period of a battery, the voltage of a battery varies with the capacity. When the capacity of battery decreases, the voltage will decrease. The remaining capacity of a battery can be described by the state of charge (SOC). The SOC can be expressed by 3, in which Q r is the remaining capacity, Q is the capacity of battery.
The typical battery discharge mode is constant current discharge under different currents. The characteristic curve is shown in Figure 3A, including the exponential region and the rated region. Specifically, the voltage is at the fully charged condition. The voltage decreases rapidly with the discharging of the battery. In the rated region, the voltage almost remains unchanged. After the rated region, the voltage decreases slowly to zero. The equivalent circuit of a battery is composed of a controlled voltage source (E) and a series-connected internal resistance (R b ) as shown in Figure 3B. In that figure, V b and i b represent the terminal voltage and the current, respectively. It is supposed that the internal resistance is unchanged. Also, the mathematical model of battery can be expressed as (4), in which E o is the voltage when the battery capacity is zero, K is the polarization voltage, A is the magnitude of exponential region, i 1 is the low frequency current, B is reciprocal of time constant of rated region. At last, the BES system can be developed based on the mathematical model.

BI-LEVEL CONTROL STRATEGY FOR BES IN PV-BES SYSTEM
The bi-level control strategy consists of the power fluctuations identification block and the power fluctuation mitigation block. Initially, a PV array in a row of three modules and a column of four modules is developed as Figure 4A. The PV module (CS3U-375MS-AG, Canadian Solar Inc) with a maximum power of 375 W is used. The I-V and P-V characteristics of the PV system at the irradiance of 600 W/m 2 and temperature of 25°C is shown in Figure 4B. The PV system can produce a maximum power of 2.68 kW at the MPP of 158.40 V and 16.93A. The MPPs move to (159.60 V, 14.16 A) and (124.20 V, 16.94 A) when one of the PV modules is in partial shading with an irradiance of 300 and 100 W/m 2 respectively. For a four-module string, the LG faults when 25%, 50%, and 75% of the PV modules in a PV string are evaluated as shown in Figure 4A. The 25% means that one PV module of four series-connected PV modules is under faulty conditions. The I-V and P-V curves are shown in Figure 4C. The MPP of 25% LG fault is (124.80 V, 16.97 A). The MPPs of 25 and 50% LG fault are the same at (158.40 V, 11.29 A). In this case, the potential LL faults can be caused by 25% or 50% of modules between two strings are misconnected as shown in Figure 4A. The MPPs of 25 and 50% LL faults are (124.80 V, 16.98 A) and (160.80 V, 11.34 A) as depicted in Figure 4D.

Power Fluctuations Identification Block
According to those practical results, the MPP varies with partial shading and electrical faults conditions. However, there are cases in which the MPP is the same at partial shading and electrical faults. Since the defects rarely happen, they are not considered in this paper. For instance, the PV system operates at almost the same MPP under the condition of partial shading of 100 W/m 2 , 25% LG fault, and 25% LL fault. The MPPs of 50 and 75% LG faults are approximately the same as the 50% LL fault. Therefore, it is difficult to detect and differentiate the partial shading and November 2021 | Volume 9 | Article 785420 electrical faults in a PV-BES system, which is also a main challenge to the identification block.
To develop the identification block, the string current under the various conditions is evaluated to design the condition monitoring algorithm and current sensing scheme, based on the investigated performance of the PV system in conditions of normal operation, partial shading, and electrical fault. A reliable and convenient condition monitoring technique is developed for the identification block, investigating the effects of the MPPT controller on electrical faults and partial shading.
In specific, the string current of PV array is analyzed to derive the mathematical model for condition monitoring of PV system. The LG fault and LL faults are studied to derive the equation of the string current. Only single LG faults and LL faults are considered since multiple LG faults and LL faults will cause apparent faulty current or short-circuit current. Thus, the operation condition and MPPs are different from partial shading. When an LG fault occurs within a PV string, there are two potential working conditions. The case one is that the faulty string still works with voltage higher than the voltage at the MPP (V mp ) and current lower than the current at the MPP (I mp ). The unfaulty strings work with a voltage lower than V mp to ensure that the PV array is operating at a point nearby the MPP to generate the maximum power. Another case is that the faulty string is open circuit since it cannot meet the operation voltage of unfaulty string. The unfaulty string works at MPP. This is due to the MPPT controller keeps tracking the MPP to ensure that the PV array generates the maximum power. Therefore, equations can be derived to estimate the percentage of PV modules of the faulty string (P) to sustain the operation. For instance, the PV array in structure of row (x) × column (y). Eq. 5 can be used to represent this case, in which I uf is the current of the unfaulty string, y* is the number of the unfaulty string. In this case, the y* is y-1. Hence, Eq. 6 is established.
Furthermore, when LL fault occurs, suppose a number of m modules in the beginning part of the first string (S1) and a number of n modules in the beginning part of the second string (S2) are misconnected. The voltage of the beginning part of S1 equals to the voltage of the beginning part of S2. Since the MPPT controller keeps tracking the MPP, the voltage of unfaulty strings is slightly lower than V mp . Besides, the voltage of unfaulty string is almost same as V mp . Thus, Eq. 7 can be derived to estimate the condition of PV array, in which I sc is the short circuit current, V oc is the open circuit voltage. According to the characteristics of PV string current, the algorithm can be developed based on the 5) and 7) to monitoring the LG faults and LL faults as depicted in Figure 5. The Hall-effect current sensors can be installed on the beginning and terminal of PV strings to measure the current of each PV string. Other non-invasive magnetic sensors such as magnetoresistance sensors can also be used and the price is typically lower than 1 USD. The current of the beginning of PV string (I S1a , I S2a , . . . I Sya ) and terminal of PV string (I S1b , I S2b , . . . I Syb ) can be measured to detect LG and LL faults. The power fluctuation identification block is developed on the basis of the algorithm. The algorithm is relatively simple compared to other condition monitoring algorithms and the computational cost is low. The power identification block alarms the system when LG and LL faults are detected. The instructions are sent to power fluctuation mitigation blocks when partial shading is detected. The innovation is that it can identify partial shading and electrical faults when the MPPs are the same in these two cases.

Power Fluctuation Mitigation Block
Once the part of power fluctuations of PV has been decided to be responded by the BES, the power fluctuation mitigation block can further manage the battery sub-modules with different regulation characteristics. To minimize the operation cost and to maintain the SoC level of each battery sub-module, the operation cost function is defined as (8). In specific, the different coefficients of the cost function can distinguish the model differences in response to the power fluctuations. Furthermore, SoC n,t can be can be written as a function of BES charging and discharging power in (9). And, Eq. 8 can be deduced as (10). J n,t a n P c n,t 2 + P d n,t 2 + b n S n ·SoC n,t − S n ·SoC 0 n 2 (8) Where, J n,t represents cost function of the nth battery sub-module at t intercal; P n,t c and P n,t d represents the charging and discharging power of the nth battery sub-module respectively, and either P n,t c or P n,t d is zero because the sub-module operates on the charging or the discharging mode; SoC n,t is the real-time SoC of the nth sub-module, and SoC n 0 is a constant representing the reference value, around which SoC n,t varies; S n represents the rated capacity of the nth sub-module; a n and b n are positive constants, indicating that the degree of the influence from the output power and SoC on operation cost, and the value of a n and b n are empirical value from the experimental data; η c and η d are the charging\discharging efficiency of the modules; α n c , α n d , β n,t c , β n,t d , and c n,t variates. The duty of the power fluctuation mitigation block is to distribute the power demand to each module. At the beginning, the objective of the mitigation block is to minimize the operation cost of the BES. Meanwhile, the power demand must be met, and each module must be constrained by their regulation characteristics including rated power, capacity, ramping rate, and SoC. Furthermore, the distribution can be achieved to solve an optimization problem. In detail, the objective function of the power fluctuation mitigation block is shown as (11), adding the operation cost of each sub-module together. The equality and inequality constraints are listed as (12)-(15). At last, the quadratic programming is applied to solve the optimization problem. Because the quadratic function is a convex function, and the minimum value exists.
N n 1 P n,t P ref P min n ≤ P n,t ≤ P max n (13) SoC min n ≤ SoC n,t ≤ SoC max n (15)

CASE STUDY
To verify the feasibility of the bi-level control strategy, the simulation model of the PV-BES system is developed by  Frontiers in Energy Research | www.frontiersin.org November 2021 | Volume 9 | Article 785420 7 MATLAB/Simulink based on the theory of PV-BES system explained above. In particular, The PV module (CS3U-375MS-AG, Canadian Solar Inc) with a maximum power of 375 W is used. Also, the BES consists of four battery sub-modules, and their regulation characteristics are shown in Table 1 including rater power, ramping rate, rated capacity, charging \discharging efficiency, response time, and cost function coefficients.
The weather conditions for 6 h are shown in Figures 6A,B, including the light irradiance and the environment temperature. The PV power fluctuations are shown in Figure 6C, which are total results from the shading. To mitigate the power fluctuations, two mitigation modes marked as Mode one and Mode two are achieved by the power mitigation block in Figure 6D and Figure 6E. In specific, the output power of PV keeps constant every 0.5 h in Mode 1, and the output power of PV is constant during the whole 6 h period.
Furthermore, the output power of each battery sub-module in those two Modes are shown in Figures 7A,B, while the corresponding SoC are shown in Figures 7C,D. In detail, the regulation cost of each sub-module is positively related to its cost coefficient and SOC offset, and the output power of each energy storage is allocated according to the lowest total regulation cost, according to the operation of battery sub-modules in Mode 1. For example, the battery sub-modules #1 is sensitive to the decline of SOC as it has a large adjustment cost coefficient Bi. Meanwhile, the battery sub-modules #1 makes full use of its advantages, as long as the step increase or drop of power fluctuations happen.
Moreover, the SOC of battery sub-module #4 varies in a relatively larger range, as it is with a low regulation cost coefficient B i . The output power decreases to ensure the SOC balancing until 4 h later, as its regulation cost increases significantly in Mode 1. Similarly, the battery sub-module #4 takes the most mitigation responsibility in the first 2 h in Mode 2, as it is with the low regulation cost coefficient B i . Its output power decreases with the increase of SOC offset.
At last, the proposed control strategy was compared with another two strategies, marked as Strategy #2 and Strategy #3, which are defined in Table 2, together with the regulation cost accumulated for 6 h. The BES in Mode 1 has a lower cost than it has in Mode 2. Meanwhile, The proposed bi-level control strategy meets the mitigation of PV power with the lowest regulation cost in both operation modes. In addition, the proposed control strategy can achieve the SoC balancing without the signal tracking error.

CONCLUSION
In this paper, a bi-level control strategy is developed to minimize the operational cost of BES for power stability of a PV-BES system. It consists of PV power-fluctuations identification block and mitigation block. The identification block is capable of identifying the electrical faults and partial shading conditions of a PV system based on the string-current characteristics. The information of power fluctuation of a PV system is outputted to the mitigation block to regulate the operation of battery sub-modules to meet the power fluctuations. The simulation results and case study results verified that bi-level control strategy can monitor the condition of the PV system and optimize the operation of each battery sub-modules. It will warn the system when an electrical fault occurs. The sub-battery modules operate only when the power fluctuations are caused by the partial shading. The results show that the BES can mitigate the fluctuations with the lowest regulation cost, according to their regulation characteristics. Thus, a competent bi-level control strategy is successfully developed to achieve the power stability of a PV-BES system in a reliable and low-cost manner.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

AUTHOR CONTRIBUTIONS
YH proposed the concept of the project, and acted as the project administrator. DS designed the system model and established the details of control strategy. ZL analyzed the data and carried out the simulation. All authors approved the submitted version.