Power control strategy of a photovoltaic system with battery storage system

In this paper, an intelligent approach based on fuzzy logic has been developed to ensure operation at the maximum power point of a PV system under dynamic climatic conditions. The current distortion due to the use of static converters in photovoltaic production systems involves the consumption of reactive energy. For this, separate control of active and reactive powers using a proportional-integral controller is applied. Using batteries for energy storage in the photovoltaic system has become an increas-ingly promising solution to improve energy quality: current and voltage. For this purpose, the energy management of batteries for regulating the charge level under dynamic climatic conditions has been studied. The research presented in this paper provides an important contribution to the application of fuzzy theory to improve the power and performance of a hybrid system comprising a grid-connected PV, battery, and energy management strategy. Therefore, to highlight the advantage of the FL-MPPT studied in this paper, its performance has been compared and analyzed with conventional P&O and NNT algorithms. Simulation results are carried out in MatLab/ Simulink tools. According to the analysis of the results, a better energy quality has been proven.


Introduction
Nowadays, the reduction of greenhouse gas emissions has become a genuine concern for all governments around the world. Therefore, the exploitation of green and clean energy resources (solar and wind energy) is an essential solution for environmental protection on the one hand and to meet the enormous energy demand on the other hand. Thanks to its advantages, cost and ease of installation and maintenance as well as their high efficiency, the use of photovoltaic (PV) systems for the production of electrical energy from solar irradiation has known a significant development in different fields such as modern buildings, pumping systems, and rural areas [1][2][3][4][5].
Recently, numerous works on the study of PV conversion systems have been performed like control, storage [6], meteorological and operational parameters [7,8], and thermal regulation [9]. However, developing a reliable control technique for operation at maximum power is necessary. A variety of approaches such as perturb and observe Page 2 of 20 Bedoud et al. Journal of Engineering and Applied Science (2022) 69:116 (P&O), hill climbing (HC), incremental conductance (IC), genetic algorithms (GA), artificial neural network (ANN), and fuzzy logic (FL) [10,11] have been studied and developed to extract and maintain operation at the maximum power point (MPP) from the PV system. Regarding literature, P&O and HC are the widely used PV system algorithms for their low cost and simplicity and ease of implementation [12][13][14]. These two algorithms have the same operating principle except that the output control variables are duty cycle for HC and voltage for P&O. The two major drawbacks of these algorithms are the oscillation around the optimal power point and poor tracking of the MPP in the case of sudden changes in meteorological conditions notably the temperature (T) and irradiation (G). So, to deal with these drawbacks, a modified P&O algorithm is reported in many research for its better performance and dynamic efficiency compared to classical P&O [13,15].
Likewise, for the same reasons, several works have studied and developed an improved version of HC called IC, which can extract the MPP even in the case of different and rapid operating conditions, with fast convergence. Authors in [13,14,16,17] have confirmed that the difficulty of the implementation and the high cost are the main disadvantages of the IC algorithm compared to P&O.
Currently, the efficiency and the excellent performance of the maximum power point tracking (MPPT) approaches based on artificial intelligence such as genetic algorithms (GA), artificial neural network (ANN), and fuzzy logic (FL) have attracted the attention of researchers. A. Alice Hepzibah in [14] has argued that these algorithms are more stable and ensure a quick response time for all irradiance levels.
However, the fuzzy logic MPPT (FL-MPPT) algorithm allows for more efficient power extraction, is simple to use, and does not require a sensor to measure temperature and irradiation, in contrast to other algorithms such as ANN, which need a large database for training, testing, and validation. Using FL-MPPT offers attractive properties: precise MPP localization, ensures efficient and fast tracking, with fewer oscillations and reliable behavior. The high performance of FL-MPPT is experimentally verified and tested under different climate variations in [18]. This motivates us to develop the FL-MPPT algorithm based on Mamdani's method. The triangular membership function has been used because it is the fastest form [19,20]. Therefore, a suitable compromise between expert knowledge and inference system rules is required.
Moreover, knowing that PV energy is random, then using an energy management strategy is a necessary solution for maintaining a balance between supply and demand [21]. In the case of high energy production, it can be stored in batteries and used either during the night or shortcoming of the photovoltaic generator (PVG) [6,22]. Indeed, the intended goal through the work done in this paper is to ensure a good control strategies of PV system in order to have a better energy quality injected into the grid and in the other hand, to ensure better energy management of battery storage system (BSS) under variation of irradiation and temperature. The primary purpose of BSS management and control is to increase battery cycle life by reducing current fluctuation, avoiding battery overcharging, and maintaining a balance between supply and demand [23]. Despite a large number of works on this topic, a few papers have studied the application of the FL-MPPT to a PV system connected to the grid and equipped with an energy management system. The novelty of the main contributions of our work is the application of FL-MPPT on the PV system with BSS as well as the comparative study on the performance of this algorithm with conventional P&O algorithm and advanced NNT algorithm for MPP tracking and also the quality analysis of the current injected into the grid. This research work deals with five (05) control strategies under variable climatic conditions: -Fuzzy-based MPPT control to track the maximum power point; -DC-DC converter control using duty cycle based on PI regulators; -DC-Bus control; -DC-AC inverter control; -Comparative study; -BSS energy management.

Methods
The proposed system structure is shown in Fig. 1. It mainly includes the PVG, DC-DC boost converter, battery, and inverter connected to the grid through inductors. It is understood that the use of the boost converter is to convert the input voltage to a higher output voltage. When the switch is open, the energy is stored in the inductor and will be discharged otherwise [24]. Generally, the structure consists of two parts: the first part is consecrated to the control of the PV conversion chain (Fuzzy MPPT, DC-DC converter, DC-Bus and DC-AC inverter). While in the second part, the BSS energy management was carried out. It can be seen that the BSS is directly connected to the DC bus through the control management system.

PV array modeling
The PV panel consists of multiple modules connected in series or parallel to increase the voltage level or current level, respectively. Figure 2 shows the PV cell equivalent circuit composed of a current source, two resistances (series and shunt), and an antiparallel diode. The current source ( I s ) is expressed by de following equation [14,25]: where G and T are the irradiance and the environment temperature, respectively. K sc is coefficient of short-circuit current. Under standard conditions, the current, irradiation, and temperature are as follows: As shown in Eq. (1), the current varies according to irradiation and temperature change; on the other hand, the I sat current depends only on temperature variation [26]. Following Kirchhoff 's law, the output current of the PV panel ( v pv ) is given by [4,13,14,27]: So, we can write [28]: With: And: (1)

DC-DC converter
The boost converter transfer function can be written as follows [26]: According to the power conservation law the relationship between input/output average currents is given by: The DC bus equation is expressed by:

DC-AC inverter
The inverter which is the adaptation stage, gives us the possibility to convert DC-voltage into AC-voltage with desired frequency and amplitude. We notice that the inverter control allows to ensure a better quality of the currents and powers (P, Q) injected into the grid. The relationship between the input/output inverter voltages is given by [29]: where v dc is the DC voltage, v in (i = a, b, c) and S j (j = 1,2,3) are the AC voltages and the switching state signals. The grid voltages equation is given by [29]: In the aim to control the active (P) and reactive (Q) powers separately, the decoupling between these two electrical quantities has been studied and realized. For a balanced system, we can write the powers P g and Q g as follows [29]: Indeed, we can write: where v gdq is the grid voltage and I gdq is the grid current.

Fuzzy MPPT control
The main objective of the work exposed in this subsection is the extraction of the MPP from the PVG and, therefore, current I MPP and voltage v MPP used to define and adjust the duty cycle based on efficient and robust fuzzy MPPT algorithm. The PV electrical behavior, current and power at temperature and irradiation equal to 25 °C and 1KW/m 2 , respectively, are shown in Fig. 3. In the case of short circuit current ( I sc ), the voltage is equal to zero, and for open circuit voltage ( V oc ), the PV current is zero. The V oc and the I sc are 48.2 V and 6.05 A, respectively. Moreover, the optimal voltage ( V MPP ) and current ( I MPP ) which implies an optimal power ( P MPP ) are 40.51 V and 5.68 A, respectively (see Fig. 3), where P MPP varies depending on the climatic variation. In order to ensure maximum power extraction, we used a fuzzy logic based MPPT control technique to generate the duty cycle (D) of the boost converter. Figure 4 show the control system of the boost converter. The FL-MPPT consists of three blocks: fuzzification, inference system, and defuzzification. Figure 5 shows the structure of FL-MPPT algorithm. The power variation ∆P and voltage variation ∆v are used as input variables of the fuzzy inference system and ∆D as the output. The relation between these variables is defined based on fuzzy set theory. The fuzzy system inputs and output are given by: The membership function allows it to pass from numerical input variables to fuzzy variables during fuzzification. However, it is necessary to ensure the criteria given by [30]: where, E(k) and �E(k) represent the error and the error variation at the instant k. E(k) allows us to locate the operating point relative to the MPP at instant k. On the other hand, �E(k) presents the displacement direction. The optimal power point value is ensured when E(k) is zero thanks to the dynamic variation of the duty cycle according to climatic conditions.
In inference system block, the rules will be applied on the previously fuzzified input data. The inference method of Mamdani with Max-Min combination has been used. Figure 6 shows the 3D surface of the fuzzy rules presented in Table 1 It should be noted that defuzzification makes it possible to transform fuzzy variables into numerical variables. The centroid algorithm has been used. Finally, the D is defuzzified using Eq. 16 [30].

Control management and energy storage
Several works have studied the control of the energy loss rate caused by the batterybased energy storage and management system [31]. Indeed, in the work published by W. Greenwood et al. [32], the authors have used the percentage change of the ramp rate. Other methods have been exposed in [33]. The management technique developed in this paper gives us the possibility of controlling the battery state of charge (SOC) and discharge according to the desired electrical quantities (voltage and current) at a steady voltage as well as the energy generated by the PV system with reduced response time. All this, under different weather variations while avoiding complete destocking and the overcharging of the battery to increase its life cycle. The SOC and the battery voltage v Bat can be calculated as a function of I Bat by the equations below [34][35][36]: where:  With v Bat−oc is the BSS open-circuit voltage, R is the battery internal resistance, C Bat is the capacity (Ah), v P is the polarization voltage, v 0 is voltage constant of the BSS. β and α and represent capacity and the exponential voltage, respectively. Indeed, an implementation of the proposed technique based on proportion integral regulators (PI) is illustrated in Fig. 9. Two control loops are considered: the first loop (19)    However, in the case where v dc is higher than its reference value, the charging circuit operates as a buck converter in charging mode. On the other hand, when v dc is lower than its reference value, the charging circuit operates as a boost converter in discharging mode.

Results and discussion
The modeling and control algorithms of the whole system have been developed using MatLab/Simulink software during 8.5 s of simulation. The electrical parameters of the adopted PV module "Sun Power SPR-230E-WHT-D" and the Battery are summarized in Tables 2 and 3, respectively, given in Appendix. Regarding the profiles of solar irradiation and temperature, Fig. 10 depicts the different shapes of solar irradiation and temperature such as ramp up, ramp down, and step up recommended by the European dynamic standard test EN-50530 [18,26] as an input's disturbance. This, in order to take into account of possible real atmospheric conditions. Under these conditions, the PV generator voltage and current are calculated instantaneously and used as inputs of the fuzzy MPPT algorithm to impose the duty cycle (D) of the boost converter. Likewise, the DC voltage will subsequently be used as input of the   inverter control algorithm to generate the control signals of the IGBTs semi-conductor and the storage system. Figure 11 shows that the DC voltage is well balanced; it converges rapidly towards the reference value V DC-ref = 600 V with slight variations at the ramp up and ramp down of solar irradiation with a constant value of temperature T = 25 °C for 1 ≤ t < 3 and T = 45 °C for 4, 8 ≤ t < 5, 5 . However, under rapidly increasing irradiation from 500 W/m 2 to 800 W/m 2 for t = 7.5 s, a significant pick is noticed. Therefore, the effectiveness of the control weakens this variation, especially in the case of rapidly increasing irradiation which is the main challenge.
Furthermore, the waveform of the active powers injected into the grid is depicted in Fig. 12. In the beginning, solar irradiation has been fixed to 500 W/m 2 for 1 s.  Afterward, the solar irradiation increases gradually from 500 W/m 2 up to 1000 W/ m 2 for 2 s, and the active power instantly changed from 5 to 9 KW. As a result, the proposed FL-MPPT algorithm fastly tracks the new MPP without overshoots. For 4.8s ≤ t < 5.5s , temperature is constant T = 45 °C and solar irradiation followed a ramp down to reach 500 W/m 2 . The waveforms of active power are smoother and significantly influenced by the evolution of solar irradiation. In the case where solar irradiation is constant G = 500 W/m 2 and temperature followed a decreasing ramp for 6.7s ≤ t < 6.9s , it can be observed a slight increase in active power and it kepts at 5.4 KW. A fast step-up transient of solar radiation from 500 W/m 2 to 800 W/m 2 at constant temperature T = 25 °C for t = 7.5 s has been taken place. Hence, the MPP is accurately and consistently tracked according to solar irradiation intensity. As illustrated in Fig. 13, the reactive power remains unchanged and keeps its reference value (Q = 0) regardless the climatic conditions. So, the unity power factor is achieved. Figure 14 shows the voltage ( v g ) and the current ( I g ) injected to the grid, respectively, with a sinusoidal shape of the three (03) voltage and current phases. However, the voltage injected into the grid remain of constant amplitude as illustrated in Fig. 14a. On the other hand, the current injected into the grid varies in the sense of the solar irradiation change as shown in Fig. 14b. Ramp-up or rapidly increasing irradiation (t = 7.5 s) leads to an increasing of PV system's current. To highlight the advantage of the FL-MPPT studied in this paper, its performances have been compared and examined with conventional P&O and NNT algorithms under EN50530 dynamic test as shown in Figs. 15a and 16a. Accordingly, this has been evaluated by the analysis of the total harmonic distortion (THD), response time, and ripple around the MPP. The NNT-MPPT algorithm is a multilayer network with one input layer consisting of 01 neuron, two hidden layers with 04 and 40 neurons respectively, and one output layer. P PV and V PV are the inputs, and D is the output of the NNT. Indeed, the Levenberg-Marquardt (LM) algorithm is used for NNT training combined with gradient descent and Newton's method with the mean square error performance function. As approximators function, "purelin" function is used in the output layer and sigmoid as the activation function "tansig" in the hidden layers. Table 4 summarizes the comparative analysis for G = 1000 W/m 2 and T = 45 C °. The enlarged waveforms (zoom) of the power and current in Figs. 15b and 16b show a reduced ripple with the proposed FL-MPPT algorithm so low energy losses. Moreover, from spectrum analysis of I PV depicted in Fig. 17, the minimum value of the THD is 3.29% for FL-MPPT algorithm. This latter achieves excellent performance including fast response time of 0.03 s compared to 0.1 s and 0.08 s in [37] and [38] respectively, and reduced power (P PV = 4.92 W) and current oscillations with ripple of 3.35 compared to 24.56 and 62.45 for NNT and P&O respectively. This, ensures a better quality of energy injected to the grid. However, in a step when the PV system is under rapidly increasing irradiation and temperature is maintained at a fixed value T = 25 C ° for t = 7.5 s, the FL-MPPT performs significantly better than P&O-MPPT in terms of overshoot and response time.
The European EN-50530 dynamic test highlights the performances of the FL-MPPT algorithm. As advantages from results analysis: • The proposed control algorithm has proved its performance in terms of response time and overshoot even for rapidly increasing irradiation; • The active power is stable smoother and evolves according to the irradiation intensity reaching at each moment the maximum power thanks to FL-MPPT which continuously located the MPP and depicts THD less than 5% which is as per IEEE-519 standard [39]; • The unity power factor is achieved; • The energy losses are low due to the smoothest waveform with smaller oscillations around the MPP and fast response time.
Although the proposed approach is the best in terms of performance and power quality, it has limitations particularly in operating conditions under partial shading. In these conditions, the characteristic Ppv = f(Vpv) presents several MPP called partial maximum. For this, in the case of partial shading, the use of metaheuristic methods is recommended to plot the global maximum power point. Figures 18 and 19 show the outputs of control management and energy storage system: battery current ( I Bat ) and Battery voltage ( v Bat ), respectively. It is noted that the battery current follows perfectly the reference current delivered by the PI regulator of the DC voltage with less ripple. When the battery current is negative, the battery absorbs energy from the PV system. Otherwise, the management system ensures the discharge of the battery. Figure 20 shows the battery state of charge (SOC) which illustrates the battery state of charge.

Conclusions
This study develops and exposes PV conversion chain associated with a battery storage system under MatLab/Simulink environment. However, for better PV System efficiency, the development of consistent control strategies and BSS energy management must accompany the installation. The simulation results show that despite the gradual or sudden variation in irradiation and temperature recommended by EN50530 dynamic test, the feasibility and effectiveness of the control and control management systems are proved. Active power and DC voltage follow their desired values accurately. Reactive power is kept at zero to ensure the unity power factor. The FL-MPPT algorithm  application for faster tracking of MPP improves the system performance, and energy quality is injected into the grid with fewer oscillations. The equal THD = 3.29% is the lowest value compared with the other algorithms, such as P&O and NNT. Also, the economical and simpler FL-MPPT algorithm does not require auxiliary circuits (sensors to measure temperature and irradiation) like P&O or a large database like NNT for learning. Indeed, the work developed in this paper presents a promising solution for controlling powers, ensuring the unity power factor, and maintaining a balance between demand and supply. Finally, as perspectives of this work, the practical online control techniques development and the implementation of a storage system management and diagnosis of inverter faults will undoubtedly be the subject of our future work.