Grid-Connected Solar PV System with Maximum Power Point Tracking and Battery Energy Storage Integrated with Sophisticated Three-Level NPC Inverter

In this research


Introduction
As many countries are dependent on nonrenewable resources such as coal, petroleum, and natural gas for electricity generation, there is an energy crisis and environmental problems. Clean electricity generation necessitates renewable energy sources such as solar PV and wind generation systems [1][2][3][4][5][6][7][8][9][10]. Te power extracted from solar PV is controlled by implementing suitable algorithms to improve power electronic systems. Te essential function of the power electronic systems is to extract maximum power from solar and wind [11][12][13][14][15][16][17][18][19][20]. Te conversions of stages in single and double-power electronic system confgurations are generally used for power transfer from solar or wind to the grid in applications of a three-phase system. Te two steps of conversion in a power electronic system are the DC/DC converter and the DC-to-AC inverter. Te PV module's maximum power point (MPPT) is tracked by the DC/DC converter, which then provides the proper DC voltage to the DC/AC inverter. Tree-phase sinusoidal voltages or currents are generated by inverters, allowing electricity to be distributed to the PV system's load or the grid in a stand-alone system [21][22][23][24][25][26][27][28][29][30][31][32][33][34][35]. A single-stage conversion for a power electronic system if used is required to match all the necessities of a double-stage conversion. It reduces overall cost, and higher efciency can be achieved but requires a complex control method for the operation. In single-stage PV energy systems, high-power applications in industries generally require a three-phase voltage source converter (VSC) for power conversion [36][37][38][39][40][41][42][43][44][45]. Te power extracted from solar and wind energy systems is highly intermittent and unpredictable. Tis causes major factors for solar and wind energy systems. Tis necessitates essential requirements for solar PV integration with battery energy storage which reduces the fuctuating and unpredictable nature of power extracted from a PV module. Tis can also improve power system reliability, fexibility, operation, and control which in turn increases the overall system accessibility [46][47][48][49][50]. Typically, a three-phase PV system with battery storage will have two converters, one for each phase. Both DC/AC power conversion and battery charging/discharging regulation need the use of converters. Maximum power extraction from the PV module is achieved through the use of appropriate MPPT algorithms, and the design and research of various confgurations of a three-phase NPC inverter coupled to three-phase solar PV with MPPT and battery storage in a grid-connected system allow for regulation of current on the AC side and of the charging and discharging characteristics of the batteries [51][52][53][54][55][56][57][58][59]. Tis ensures a fexible increase of control of power and thus results in higher efciency and lower cost for the system. Te organization of the remaining paper is as follows. Tree-level inverter topology and consideration of the voltages of the capacitor are described in Section 2. Integration of solar PV with MPPT control and battery storage with a proposed topology is described in Section 3. Te proposed topology is simulated and validated with its linking of system control which is described in Section 4. Te proposed topology prototype and the experimental results are described in Section 5. Conclusions are given in Section 6.

Tree-Level Inverter Topology.
In the year 1981, inverters of three-level topology were introduced [6,7]. Since then and now, they are widely used in many applications such as pulse width modulation rectifers, high voltage DC, active power flters (APFs), static compensators, motor drives, and renewable energy applications [7,8]. Te circuit topology of the three-phase three-level neutral-point-clamped (NPC) inverter is shown in Figure 1(a). Tree-level phase voltages at the AC side are provided by the converter having two capacitors at the DC side. It is assumed normally that the capacitor voltages are balanced to avoid even-harmonic injection and power ripple efects on AC side voltages [7,9]. In diferent applications, the methods for balancing capacitor voltages are discussed and studied in many papers [6,7,[9][10][11][12][13][14][15][16].

Strategies for Balancing Voltages of Capacitor.
Many designs have been presented in which modulation methods are used to equalize capacitor voltages. Tey include sinusoidal carrier-based pulse width modulation (SPWM) and space vector pulse width modulation (SVPWM) [17]. Te balancing of DC-link capacitors is performed by injection of the signal of suitable zero-sequence into the signals of modulation based on diferent strategies in SPWM applications [12,13,16,18]. To achieve voltage balance in a threephase three-level NPC inverter, it is necessary to have a thorough grasp of the efect of switching patterns on capacitor voltages in the vector space. Voltages on capacitors may be equalized using either conventional SVPWM, virtual SVPWM (VSVPWM), or a combination of the two [14,15,19]. Te control system generates the following reference vector ( V → ref ) which helps the inverter to generate the output voltage immediately in the theory of ideal vector control. Te total number of generations of vectors for NPC inverter of three-phase three-level is limited to 27 because of the limitation of inverter switches. Selection of suitable possible vectors in each time segment is performed to produce the reference vector V → ref . Specifcally, any space vector modulation (SVM) system, including SVPWM and VSVPWM, must be designed such that the average of all potential vectors applied is identical to the vector reference. Te equation expresses the mathematical connection between the reference vector and the time at which the appropriate vectors might be applied.
where time frame T s is chosen as small as possible. A suitable average vector is generated mathematically during this duration of time with the consideration of the update of the control period. Te inverter selected vector V → i has time segment T i and n represents several applied vectors. Calculation of the generation of the reference vector with three variables T 1 , T 2 , and T 3 is performed by substituting the values of three diferent vectors (n � 3) in equation (1). Calculation of timing segments applies various methods of PWM vector described in [6,7,[9][10][11][13][14][15]. Te space vector diagram for the NPC inverter of three-phase threelevel for DC-link balanced capacitors is shown in Figure 1(b) [6]. 19 diferent voltage vectors are selected from its 27 switching states. Te states of switching of phases of the inverter are associated with each vector having a number which is shown in Figure 1(b). At the AC side of the inverter, the voltage vectors are divided into fve groups concerning their amplitudes and their voltage efects on diferent capacitors: 200, 220, 020, 022, 002, and 202 numbers represent the six long vectors; 000, 111, and 222 numbers represent three zero vectors; 210, 120, 021, 012, 102, and 201 numbers represent six medium vectors; 211, 221, 121, 122, 112, and 212 numbers represent six upper short vectors; and 100, 110, 010, 011, 001, and 101 numbers represent six lower short vectors. Te AC side of the three-phase three-level inverter has the same efect when a short vector V → i is selected and two choices of the vectors with balanced voltages are available. For example, at the inverter AC side, the same efect of the short vector numbered "211" will occur at vector number "100." Te choice of a diferent DC capacitor for power delivery to the AC side will cause a diferent efect on the inverter AC side, and depending on the condition of switching and the current direction in AC side, a diferent capacitor charging or discharging will occur. Te connection for the involvement of diferent capacitors for power transfer is selected with vector number "100" or "211," as shown in Figure 2.
In suggested applications of a three-level NPC inverter, balancing the voltages across the capacitors is a top priority, making the selection of acceptable short vectors crucial. To generate an AC-compatible waveform, it is expected that the DC capacitor voltages are balanced, as shown in the vector diagram in Figure 1(b). Te equation's implementation of the necessary reference vector (1) is chosen by selecting the suitable vectors and then calculating their corresponding timing segments (T i ) using Figure 1(b). Te control system maintains balanced capacitor voltages during normal operation but during a transient or an unpredicted operation, inaccurate AC side waveform will be produced by the abovementioned method which is entirely diferent from the vector which is requested by a system of control and thus leading to the production of unpredicted dynamic behavior, even-harmonics, and unbalanced current. It may not always be practical to use applications that need balanced capacitor voltages. By comparing the voltages of the capacitors, the work may be prioritized or ignored. In this work, both balanced and unbalanced capacitor voltages are viable options for the suggested approach. In such situations, generating a precise reference vector from equation (1) is crucial for achieving the necessary system aims, regardless of whether the capacitor voltages are balanced or not. Figure 3 is a schematic depicting the DC and AC sides of a three-phase three-level grid-connected NPC inverter. An "N"-shaped system with several circuit confgurations, where "N" is the inverter's application, is used to illustrate the DC side system. Te DC voltage across each capacitor may be equal or varied depending on the components of the DC side system, which may include a wind generator with a rectifying circuit, a battery storage system, solar photovoltaics, or a combination of these. One of the most signifcant ideas presented in this work is the investigation of switching efects on the DC side of a system consisting of the integration of these systems on a three-phase three-level NPC inverter.

Strategies for Unbalancing Capacitor Voltages.
A control system with two degrees of freedom for the dq0 feld, vd, vq, and v0 of the inverter ensures that the zerosequence voltage, v0, on the AC and DC sides of the inverter does not infuence the behavior of the system. Users are free to manage and share capacitor voltages via the inverter's DC bus while maintaining the inverter's fxed vd, vq, and v0 (as seen in Figure 3), which does not afect the AC side system's behavior. By regulating and running the inverter under both balanced and unbalanced voltages of the capacitor, correct voltages at the AC side may be readily generated. Power from either battery storage can be transferred at a diferent voltage if a photovoltaic (PV) module is connected across the DC capacitors of an inverter, if two solar PV modules are installed with ofset maximum power point tracking (MPPT) or if battery storage is connected to either capacitor.

Unbalanced Capacitor Voltage Efect on the Vector
Diagram. Te magnitude and angles of short and medium vectors in the vector diagram will become diferent if the voltages of the capacitor are unbalanced as described in Figure 1(b) which can be compared with the case of balanced  International Transactions on Electrical Energy Systems capacitor voltages in which the short and medium vectors have equal magnitude and angles. Te comparison between two cases for V C1 < V C2 in the frst sector of the sextant in Figure 1(b) is shown in Figure 4. In Figure 4, the change in vectors under balanced and unbalanced DC capacitor voltages in the frst sector as shown in Figure 1(b) is represented by the vector diagram assuming V c1 < V c2 . Calculation of the switching state vector V → I is given in [20] which is defned as follows: where a → � e j(2Π/3) and each phase's voltage is denoted as V aN , V bN , and V cN , where "N" represents the number of phases (a). Te vectors in the frst sector can be computed using equation (2), with results provided in equations (3)-(9) if the length of the long vectors is assumed to be 1 unit ((2/3)V dc ) and the voltage of capacitor C1, Te calculation of vectors in the other sectors is performed similarly. Te efect in values of the voltages of the capacitor can change the magnitudes and the angles of the vectors as shown by equations (3)- (9). Te two voltages of the capacitor are the same for the two short vectors if h � 0.5, i.e., V → sl1 � V → su1. Te magnitudes of the vectors will be diferent for diferent values of the voltages of the capacitor. Te efect on the inverter DC and AC sides will be diferent due to the diferent magnitudes of short vectors. Te efect of any short vector is the same on the AC side of the inverter, and then redundancy occurs in short vectors of each pair. Te short vectors are not considered to be redundant anymore if the two voltages of the capacitor are diferent. Diferent timing segments are necessary and important for each diferent short vector to generate the required requested vector based on equation (1) when h ≠ 0.5.

Efects on Inverter AC Side with the Selection of Vectors under the Condition of Unbalanced DC Voltage.
Te implementation of diferent combination groups is performed for the generation of reference vectors based on equation (1). Te selection of the possibility of diferent vectors in the frst sector is based on diferent selections of short vectors for the generation of reference vectors V * �→ as shown in Figure 5.
Selection of suitable vectors with proper timing segments of any of the combinations (221-210-100), (221-220-100), (221-200-100), (221-200-zero), (000-220-zero), and (220-200-zero), where "zero" can be "000" or "111" or "222" is based on equation (1) for the generation of reference vector V * �→ as shown in Figure 5(a). Te selection of accurate vectors and their fexibility in choosing them is demonstrated in Figure 5(a). Diferent instantaneous efects on the DC and AC sides of the inverter may be achieved by the selection of appropriate timing segments that yield the same reference vector. Examination of the accurate voltage generated is very much essential to investigate inverter AC side behavior. An accurate current of the three-phase inverter AC side must generate the exact required voltage V * �→ (t). Te average value of the vector V * �→ requested for suitable shorttime segment T s is only produced due to the inverter's inability to generate the accurate value of the required voltage in each phase. Te voltage generated deviates from the requested vector which is determined by a calculation of the error vector e → (t) which is used to investigate the behavior of voltages at the AC side in continuous time given as follows: where V apl �� �→ (t) represents the applied vector at the time "t." Te connection of impedance between the inverter and the grid has current harmonics across it given by this error. If this impedance is replaced by an inductor, then the inductors' ripple current Ir L � �→ can be given as follows: where e → (t) is given as follows: It is assumed that the generation of current in an inductor by the requested vector V *

�→
(t) is sinusoidal which can be used to derive equation (13) and is usually acceptable in the system behavior in continuous time. Te magnitude of ripples in an inductor current is given by the absolute value of error E(t) based on equations (11) and (12). It is very important to minimize the error at each time segment to reduce the magnitude of ripples of higher frequency. From equations (1) and (11), if E(T s ) � 0, then the error sum during the time segment T s is zero. Te three nearest vectors (TNV) are chosen to reduce the sum of the errors to zero. Selection of better three nearest vectors with a group (221, 210, 100, or 211) is considered for the generation of the required vector V * �→ as shown in Figure 5(a). Te three nearest vectors are selected to reduce the smart training algorithm error E(t) for each vector and thus separate time segments for applying each vector into two or shorter timing segments. Tere is an International Transactions on Electrical Energy Systems efect of increasing switching losses due to this TNV method. Te most easily common acceptable solution is to divide the time segments of vectors by two and this can reduce time segment T s and the error E(t) while improving the required vector accuracy generated by the system of control. Te accuracy in the calculation of the required vector is improved by sampling time reduction and vector time calculation according to the digital control basic rule.

Efects on Inverter DC Side with the Selection of Vectors under Condition of Unbalanced DC Voltage.
Te voltages of a capacitor depend on the sum of the incoming currents entering into the inverter DC side which can have diferent efects with diferent vectors. Te currents i p , i o , and i t represent the currents at the DC side system based on DC side system circuit topology and capacitor voltages as shown in Figure 3. Te implementation of vectors in an inverter can have a direct efect on inverter incoming currents which are related to the switching of inverter and current from an inverter AC side. In Part II-B, we learned that the vectors we choose afect the currents and power that are sent to the capacitors from the AC side. It is possible to describe direct current (DC) power transmission from the AC side of an inverter as follows: where v Ia , v Ib , and v Ic represent the immediate voltages of an inverter at the AC side with a reference voltage at the point "N," and i a , i b , and i c represent the currents in an inverter. Te short vectors p(t) in the frst sector of the vector diagram as described in Figure 4 are given by the following equations: Te lower and upper capacitor voltages are afected by the selection of the lower and upper short vectors with lower groups "100" and "110" and upper groups "211" and "221," by ignoring the behavior of the DC side system. Te upper capacitor is charged without any efect on the lower capacitor voltage by a selection of vector "211" and similarly  International Transactions on Electrical Energy Systems lower capacitor is discharged without having any efect on the upper capacitor voltage by the selection of vector "100" when i a > 0. Observation of currents in an inverter and rate of charging and discharging of capacitor voltages based on h and V dc values are given by equations (15) and (16). While conducting precise research into the regulation of the charging and discharging rates of the capacitor voltages, it is crucial to take the system's behavior on the DC side into account.

Integration of Solar PV and Battery Storage Using an Advanced Tree-Phase Tree-Level NPC Inverter with Proposed Topology under Unbalanced DC Capacitor Voltage
Condition. Based on the information presented in Sections 1 and 2, a suggested topology for an inverter is shown in Figure 6 for the integration of grid-connected solar PV and battery storage. No additional converter is needed for this purpose.
If implemented, the suggested inverter topologies have the potential to lower system costs while simultaneously increasing total system efciency, especially in medium-and high-power applications. Figure 6 is an overarching setup diagram (a). In the suggested setup, the battery may be charged and discharged as electricity is transferred from a renewable energy source to the grid, all thanks to the intervention of a control system. Te suggested method allows for the independent regulation of the lower capacitor voltage (V C1 ), which may be utilized to regulate battery charging and discharging and the simple implementation of MPPT operation through regulation of the total of the capacitor voltages (V C1 + V C2 = V dc ). Total harmonic distortion (THD) current on the AC side is kept to a minimum, thanks to the correct inverter output voltage waveform made possible by the unbalanced voltages of the capacitor at the DC side of the inverter. In the absence of solar PV power, the system may not function well with a single battery, but the current setup is fexible enough to handle a variety of scenarios. Te superior setup, seen in Figure 6, consists of two batteries coupled across two capacitors through two relays (b). Similar to the setup shown in Figure 6(a), Figure 6(b) shows a system in which electricity is produced from a renewable energy source and batteries are charged or discharged when one relay is closed and the other is open (a). When the renewable energy source is unavailable, both relays can be engaged to transfer or absorb active and reactive electricity between the DC bus and the grid. Te requirement of PWM control equipment is not necessary, and as per the requirements, the selection of these relays is considered to be ON or OFF. Te power of renewable energy source or grid can be easily managed, and it charges the two batteries when these relay switches are operated. After one battery is completely charged, the relay across it may be unlocked, but the relay across the other battery remains closed so that it can be charged. For avoiding relay damage and disruption of current in an inductor, special care must be taken to make sure that inductor current L batt is zero before any of these relays are opened.

Control Confgurations.
Te closing of the relay at the top, closing of the relay at the bottom, and closing of both relays at the top and bottom are the three diferent control confgurations of relays that are to be obtained in Figure 6(b). Te control system confguration block diagram for the closing of the relay at the top is shown in Figure 7. According to Figure 7, the network supervisory block is responsible for ensuring that the inverter transfers the necessary amount of active and reactive electricity to the grid.
Te availability of PV power generation, variables of the current battery, and grid data available are the factors that must be considered for efcient power transfer. Te condition of MPPT can be achieved by the MPPT block by requesting the required DC voltage across the PV. Te available PV power measurement gives the accurate required DC voltage by having another control loop with slower dynamics. Te required voltage (V * dc ) can be calculated by the MPPT algorithm which is given in [3,4]. Te required current in an inverter in the axis of dq is obtained by equation (17) based on the required active (p * ), reactive power (q * ), and the voltage at the grid in the dq-axis, i.e., v sd and v sq .
Calculation of the required voltage vector requested by the inverter is made by using a proportional and integral (PI) controller and control structure decoupling. Figure 7 describes the proposed system of control. When the available energy in the grid cannot meet the requested power load demand, then the battery can be discharged for PV support or can be charged by the energy of PV to transfer the required amount of power to the grid in the proposed system. A suitable sector in the vector diagram is determined only after defning and assessing of requested reference voltage vector. Te relative errors in the capacitor voltages are calculated by using equations (18) and (19) to determine the selection of required short vectors.
where V * C1 and V * C2 represent the required voltages of the capacitor and V C1 and V C2 represent the real voltages of capacitors C 1 and C 2 . Te capacitor charging or discharging is decided by selecting suitable short vectors. Te relative errors in the voltages of the capacitor and their efciency on the behavior of the control system are the important factors to be considered for selecting the suitable short vector. Tis International Transactions on Electrical Energy Systems short vector selection idea is based on a decision function "F," defned as follows: where G 1 and G 2 represent the associated gains with each of the relative error capacitor voltages. Te selection of suitable relative errors in the capacitor voltages is considered to be important based on the values of G 1 and G 2 for better control of chosen voltages of the capacitor. Te values of G 1 and G 2 must be the same with the values of equal reference voltage for the application of a three-phase three-level inverter under balanced capacitor voltages condition. Te values of G 1 and G 2 are diferent and depend completely on the required voltages of the capacitor for the proposed application under unbalanced capacitor voltages condition. PV operated to achieve MPPT condition can be made by equations V * C2 � V * dc − V C1 and V * C1 � V BAT selecting G 2 >> G 1 and battery charging and discharging can be made by controlling voltage C 1 . Te selection of suitable short vectors in each step of time is decided based on the sign of decision function F. Charging C 1 or discharging C 2 in a specifed step of time is made by selecting the necessary short vectors for the positive sign of decision function F using equations (14)- (16). Similarly, charging C 2 or discharging C 1 in a specifed step of time is made by selecting the necessary short vectors for a negative sign of decision function F. Te inverter generates the required active power (p * ) and reactive power (q * ) on the AC side by implementing the required voltage vectors and applying suitable timing segments for the applied vectors based on the control system diagram given in Figure 7. Strict control of the capacitor voltage V C2 for G 2 >> G 1 with a reference value of (V * dc − V C1 ) and more fexible control of capacitor voltage V C1 with a reference value of the battery voltage, V BAT , provide suitable MPPT condition on the DC side. Suitable short vectors are applied to implement the  International Transactions on Electrical Energy Systems required vector by selecting the given reference values for the decision function (F). Te required power P * is delivered to the grid by generating the required vector in the AC side and thus having the maximum available power (PPV) transfer for PV arrays with suitable MPPT control. Te transfer of excess power (P PV − P * ) to the battery storage or absorbing the power defcit (P * − PPV) from the battery storage is made by automatically controlling the capacitor voltage V C1 by the control system. Te generation of capacitor voltage references can be changed for the same control system for obtaining the confguration of the relay closing at the bottom. Two batteries are connected to the grid when PV power generation is not available at night which represents the confguration where the closing of the relay at the top and bottom is made. Modifed incremental conductance MPPT is shown in Figure 8. During the variation in irradiance, the PV voltage change (ΔV) is very low, whereas there is a signifcant PV power variation (ΔP) because the change in irradiance afects PV current instead of PV voltage. Consequently, the ΔP/ΔV steps will be large. Terefore, this moves the operating point far away from the new MPP, which in turn increases the time to reach the new MPP. Terefore, the algorithm efciency is decreased. In order to overcome this problem, a modifed variable step-size is used in this work, which depends only on the PV power change (ΔP).

Proposed Topology and Control System Having Simulation and Validation Results
Te efciency of the proposed confguration and control system is verifed by carrying out simulations using MATLAB/Simulink software. Te inverter is connected to the grid by an LCL flter. Te simulation system block diagram is shown in Figure 9. Te simulation carries the three PV modules which are connected in series. Te simulation also carries each PV unit mathematical model as given in the following equation [21]:

International Transactions on Electrical Energy Systems
where I SC represents the PV short circuit current. It is assumed that concerning diferent irradiance levels, I SC will change in the simulation. When a solar irradiation level is 1000 W/m 2 , I SC is 6.04 A, and the PV panel's open circuit voltage V OC � 44 V. Table 1 gives the main parameters of the simulated system. To achieve maximum MPPT condition and to get fexibility for battery charging and discharging G 2 >> G 1 as explained earlier in Section 3.2. Any value more than 100 based on experiments is suitable for this ratio. Te selection of a short vector is afected on the other hand by the ratio of G 2 /G 1 only. But other results are not afected by increasing this ratio. Good control of the DC capacitor voltage V dc is achieved by selecting the ratio of G 2 /G 1 to 200 as shown in Table 1. During the transient condition, the fuctuation in battery current is reduced and smoothed by battery inductance L BAT .
Te battery current overshoot will be increased by decreasing the battery inductance value but the battery inductor value can accept a wide range of values. Also, its value is dependent on its transient voltages and its adjacent capacitor value. Te studies of simulation suggest that the value of L BAT must be low and chosen to 5 mH because of size and cost factors for practical considerations. Te system modeling in the dq-frame decides the selection of values of K p and K i . Te technique of decoupling is used to convert the current control loop to a simple system as shown in Figure 7. Tese method details are given in [22]. Te efciency of the proposed topology and control algorithm with two diferent situations is verifed by simulation for theoretical purposes with a step change in reference inputs under the following conditions: (1) It is assumed that the solar irradiance is constant for the required active and reactive power transfer to the grid with the efect of a step change.
(2) It is assumed that the required active and reactive power transfer to the grid is constant for solar irradiation with the efect of a step change.
Te internal mathematical error calculation in a limited microprocessor working system is reduced with a reference input with a controlled change in its slope rather than using step change in a practical system which also prevents the protection system activation. In irradiations of the sun, the system inputs generally do not change immediately with a step change in practical situations. It is assumed that the solar irradiance is constant for the required active power with a slope-controlled change to be transferred to the grid by the proposed system simulation by considering this practical application in mind. Te simulation results can be compared with the experimental results described in Section 5 and validation of the proposed system is carried out using the same situation by performing tests in the laboratory.

First Teoretical Situation.
Te PV module produces the short circuit current I SC � 5.61 A in the frst situation with solar irradiance level assumption according to equation (21). Te required PV module voltage V * dc � 11.73 V is fxed to extract maximum power from the PV system which generates electrical power of 558 W from the control block of MPPT described in Figure 7. At t � 0, the required active power transferred to the grid is fxed at 662W and t � 40 ms; it is changed to 445 W and at time t � 100 ms, the reactive power changes from 0 to 250 VAr. Te simulation of the frst theoretical situation is shown in Figure 10. Te required active and reactive power is accurately carried out by the proposed control system as shown in Figures 10(a) and 10(b) and the maximum power is extracted from the PV module by accurately controlling the PV voltage to 177.3 V as shown in Figure 10(c). Before time t � 40 ms, the battery is in discharging mode with a current of 1.8 A indicating insufcient PV power generation, i.e., when the grid power is more than the PV power and after time t � 40 ms, it is in charging mode with the current of −1.8 A indicating that the battery is charged with PV module extra power, i.e., when the power of PV is more than the power of grid as shown in Figure 10(d). Te AC side inverter currents are shown in Figure 10(e) and the low THD currents are less than 1.92% at the grid side because of the presence of an LCL flter as shown in Figure 10(f). Te dynamic response of the complete system is very good as shown by the simulation results given in Figure 10.
Te waveforms of an inverter for the same situation are shown in Figure 11. V ab represents the line-to-line voltage as shown in Figure 11(a) and V ao represents the phase-tomidpoint inverter as shown in Figure 11

Second Teoretical Situation.
It is assumed that the PV module produces the short circuit currents I SC = 4.8, 4, and 5.61 A with levels of diferent solar irradiance in the second situation. Te PV unit's maximum power with a generation of 485, 404, and 558 W can be achieved by fxing the V * dc values to 115.6, 114.1, and 117.3 V as shown in the MPPT control block. Te active power supplied to the grid throughout the simulation period is kept constant at 480 W, while the reactive power is held constant at 0. On display in Figure 12 is a simulation of the second theoretical scenario. A diagram depicting an inverter's ability to provide the necessary active power is presented in Figure 12(a). Maximum power output from PV modules is obtained by precise regulation of PV voltage for varying degrees of solar irradiance, as seen in Figure 12(b). In Figure 12(c), we see the precise results of battery charging and draining. Te power grid meets the required load demand through the integration of battery power and PV power generation. Te proposed control strategy generates accurate PWM vectors by having the acceptable quality of grid-side current waveforms as shown in Figure 12(d). Te transient response provided by an inverter using the proposed strategy is very fast. At any time, the reactive power is 0 because the voltage in a-phase voltage and grid current is always in-phase as shown in Figure 12(e).

Practically-Oriented Simulation.
At t � 0, the required active power delivered to the grid is fxed at 295 W; at time t � 40 ms, the required active power begins to decrease because of a change in the slope control; and at t � 90 ms, it stayed fxed fnally at 165 W in the third simulation. Te PV module produces the short circuit current I SC � 2.89 A with solar irradiance level assumption according to equation (21). Te MPPT condition is achieved by fxing the required voltage V * dc of the PV module to 112.8 V which can generate electrical power of 305 W. Te reduction of active power transferred to the grid follows the required active power as shown in Figure 13(a). Before time t � 40 ms, the battery carries a current of 0.1 A, and later, the battery carries an increased current which is fnally fxed at 2.2 A because of the power transfer reduction to the grid as shown in Figure 13(b). At t � 40 ms to 90 ms, the AC currents in an inverter slowly decrease from 3.4 A rms to 1.9 A·rms and fnally stayed constant as shown in Figure 13(c). Te required MPPT condition is achieved by fxing the DC voltage at 112.8 V during this simulation. Te specifed situation will not allow equal voltages of the capacitor because of the unbalanced condition of the DC bus operation and also battery voltage during simulation is 60 V.

Experimental Result
A laboratory prototype of the system is constructed to verify the proposed system's functionality and efectiveness (see Figure 14). Parameters values of experimental setup are shown in Table 2. Te experimental outcomes are shown in Figures 15-20. During the steady state, the PV system transfers 220 W of active electricity to the grid, while the battery draws 75 W of power. Tis is seen in Figures 16 and  17. As can be seen in Figure 15, our simulation accurately depicts the phase "a" output voltage relative to the PWM inverter's center frequency when T s is set to 100 s. Grid-side steady-state phase "a" and "b" currents, as seen in Figure 15, provide the inverter with the switching performance it needs.
Te phase "a" inverter and grid current are responsible for the LCL flter design's performance, as seen in Figure 17. Figure 18 shows the decreased PV output caused by phase "a" battery and grid current. Figure 21 shows the THD value of grid current at 12 V, and Figure 22 shows the FFT of lineto-line output voltage at a frequency of 50 Hz and a modulation index of m � 0.8.
To begin with, the battery is the absorbing power of roughly 75 W, which indicates that the battery carries a positive current. When the PV output decreases, the battery's absorbing power decreases, and it begins discharging to raise the PV output's power. Constant power and current via phase "a" of the grid are maintained by adjusting the battery current. To verify the simulation fndings presented in part IV-C, a new test is created for the identical scenario as stated above. Te results are shown in Figure 19. Te PV simulator generates 300 W of power for the evaluation. Achieving the necessary MPPT condition is as simple as setting the DC side voltage of the inverter to 112.3 V. During battery charging, the inverter's voltage is about 63.6 V and the lower capacitor voltage V C1 is around 64.2 V since it is operating under an imbalanced DC voltage situation to meet the needs of power transmission. Initially, as seen in Figure 18, the current in the battery is zero, and this is when the PV electricity is sent to the grid. Due to the battery charging generated by transferring PV excess power to the battery, the grid's necessary power is reduced, and the battery absorbs power or has a positive current. Te phase "a" grid current refects less energy being sent to the grid. Figure 20 depicts the steady-state phase "a" voltage and current waveforms on the grid and how they must be in phase to keep the power factor at unity.

16
International Transactions on Electrical Energy Systems Figure 19: CH1, current in the battery; CH2, phase "a" current in the grid.  International Transactions on Electrical Energy Systems 17

Conclusion
Integration of solar PV with MPPT and battery storage with an advanced three-phase three-level NPC voltage source inverter topology is studied and described. A modifed INC-MPPT method is proposed which has 99.5% tracking efciency under varying irradiance. Te generation of the accurate voltage of AC under conditions of an unbalanced voltage of DC is made by an extended advanced unbalanced three-level vector modulation technique with a theoretical framework that has been proposed. Te power fow control between solar PV with simultaneous MPPT operation, battery, and grid system with a novel algorithm of control for the proposed system has also been made. Te proposed integration of solar PV and battery storage using an advanced three-phase threelevel NPC inverter under unbalanced DC capacitor voltages condition can regulate the battery charging and discharging and implement the operation of MPPT through the regulation of capacitor voltages C 1 and C 2 . Te efciency of the proposed topology and control algorithm with two diferent situations is verifed by simulation for theoretical purposes with a step change in reference inputs. Te efectiveness of the suggested architecture and control method is evaluated using the simulated data. Te suggested system's fndings describe the AC side current regulation in conjunction with battery charging and discharging currents at various degrees of solar irradiation. Validation of suggested topology using laboratory prototype demonstrates good PV and battery storage control in delivering electricity to the AC grid.

Data Availability
Te data used in this study are available from the corresponding author on request.

Conflicts of Interest
Te authors declare that they have no conficts of interest.