Modeling of Photovoltaic MPPT Lead Acid Battery Charge Controller for Standalone System Applications

. This paper presents the circuitry modeling of the solar photovoltaic MPPT lead-acid battery charge controller for the standalone system in MATLAB/Simulink environment. A buck topology is utilized as a DC-DC converter for the charge controller implementation. The maximum power of the photovoltaic panel is tracked by the Perturb and Observe MPPT algorithm. The battery charge controller charges the lead-acid battery using a three-stage charging strategy. The three charging stages include the MPPT bulk charge, constant voltage absorption charge, and float charge stage. The performance analysis of the model is carried out in the following aspects, there are MPPT tracking performance, battery charging performance and overall charge controller efficiency performance are benchmarked with commercial MPPT charge controller for validation. The performance result shows that the MPPT is capable to track to the PV panel maximum point at any solar irradiance variation within 0.5 seconds with maximum power tracking efficiency up to 99.9 %. The three-stage charging strategy also successfully demonstrated. The overall charge controller average efficiency achieved up to 98.3 % which matches many high end commercial solar PV MPPT charge controller product specifications. This validated model contributes to a better sizing of PV panel and battery energy storage for the small and medium standalone PV system.


Introduction
Solar photovoltaic energy has gained significant attention in the past decade. It is one of the fastest growing renewable energy up to 181 GW installation globally as of 2018 [1]. This is simply due to the steady reduction of photovoltaic module costs over the past decade. Moreover, the ease of installation, flexible scalability and less maintenance due to no moving part involved in its operation make it widely accepted by many industries. The photovoltaic system relies on sunlight to generate electricity. This limits its application to only day time when sunlight is available. To utilize solar energy at any time of the day including when sunlight is not available, battery energy storage is one of the solutions. Therefore solar PV charge controller plays an important role to make this solution feasible.
The solar PV charge controller is widely used in standalone system applications including street lighting [2], telecommunication base station, rural electrification [3], etc. A Solar PV MPPT charge controller includes an MPPT tracker and a battery charge controller. The MPPT tracks the maximum power from the PV panel and delivers it to the battery charge controller. The charge controller charges the battery through a multi-stage charging strategy to effectively charge the battery without damaging the battery caused by excessive charge gassing and overheat. Many past works of literature are covering various MPPT algorithms review [4][5][6][7], MPPT modeling and implementation in Simulink [8]. However, these works of literature do not evaluate the MPPT tracking performance in terms of tracking time and tracking efficiency. There is also no discussion on how this MPPT can be integrated with a battery charge controller. On the battery charge controller side, there are literatures solely present on multi-stage charging strategies [9], comparative study of various multi-stage charger [10], solar PV charge controller [11]. However, these charge controller presented are charged without MPPT and there is no performance analysis in terms of charger efficiency. There are also literatures presented on the modeling of solar PV MPPT charge controller [12][13], however the presented model lack of modeling detail and does not have any performance analysis in term of efficiency and no benchmark with commercial charge controller for model validation. In summary, the above literatures presented models that are lack of completeness and didn't present MPPT and overall charge controller efficiency performance analysis and benchmark with commercial MPPT charge controller for model validation. This paper presents the complete modeling of the solar PV MPPT charge controller in Simulink and its performance analysis in the following sections.

Methodology
The overview of the solar photovoltaic MPPT battery charge controller model developed in MATLAB/Simulink environment is shown in Fig. 1 Fig. 2. The MPPT charge controller block includes a P&O MPPT tracker and a lead-acid battery three-stage charger. The MPPT charge controller block output a PWM control signal to switch the switching device of the DC-DC converter. This is a common design for many commercial solar PV MPPT battery charge controller. The solar PV array model and battery model are directly obtained from the Simulink Simscape Electrical blockset library. The model is capable of charging a 48 V battery from 2 kW PV array source. This model is tested and simulated under the Simulink environment for performance analysis. The following sections explain the circuitry model and charge controller block in detail.

DC-DC Converter
The DC-DC converter converts the DC input voltage source to either higher or lower DC output voltage. Since the PV array voltage is higher than the battery voltage, a buck topology is commonly chosen for solar PV charge controller application [14][15][16]. The buck converter operates as a regulator to step down the input voltage from the PV array while maintaining its power delivery to charge the battery. This is achieved by stepping down the input voltage and increasing the output current delivered to the battery. The buck converter circuit consists of a MOSFET switching device, a high power inductor, Schottky diode, and an input and output capacitor as shown in Fig. 1. The reverse blocking diode D1 is used to prevent the reverse flow of current back to the PV array from the battery during night time. The MOSFET Ron is set to 0.02 Ω and the Schottky diode D2 forward voltage is set to 0.5 V. The MOSFET is switch by a pulse generator with 1000 Hz switching frequency.
The output voltage of the buck converter can be determined by the ratio between Vout the output voltage and Vin the input voltage of buck converter (1) where D is the duty cycle of the PWM signal.
The duty cycle can also determine the effective input resistance seen by the PV array source where MPPT can be achieved. The effective input resistance Rin seen by the source can be determined in (2) where Rload is the load or battery resistance and D is the duty cycle.
The buck converter inductor ripple current peak to peak magnitude under steady-state condition can be determined in (3) where Vin is the input voltage from the PV array, D is the duty cycle, fsw is the switching frequency and L is the inductor value.
Similarly, the buck converter output capacitor ripple voltage peak to peak magnitude under steady-state condition can be determined in (4) where Vin is the input voltage from the PV array, D is the duty cycle, fsw is the switching frequency and C is the capacitor value.
From equation (1), (3) and (4), for inductor value of 10 mH and capacitor value of 1000 uF, the buck converter ripple current and voltage can be determined. For switching frequency fsw of 1000 Hz, PV input voltage Vin of 120 V, duty cycle D of 0.4, the inductor ripple current ∆IL is around 0.288 mA and output capacitor ripple voltage ∆Vc is around 2.3 nV, which are small enough to be a flat DC.

Maximum Power Point Tracking Algorithm
The P&O MPPT is commonly used in many small and medium commercial solar PV charge controller and gridconnected inverter due to its tracking effectiveness and simplicity of implementation. The MPPT algorithm track the maximum power of the PV array and output its duty cycle relevant to the tracked maximum power to the battery charge controller. The P&O MPPT algorithm flowchart is shown in Fig. 3. This algorithm operates based on the trial and error process in tracking the maximum power point. The algorithm observes the power changes and perturbs the PV panel operating voltage by changing the duty cycle to the converter switching device which in turn changing the effective input resistance (2) of the buck converter. It then observes again if it reaches the maximum power and this process repeats itself indefinitely. The implementation of the MPPT Perturb & Observe Algorithm in Simulink is shown in Fig. 4. It is implemented using only Simulink blocks without using any scripting code. Each block is labelled with its function with respect to the flowchart. The P&O MPPT algorithm takes in voltage and current reading from the PV array, the previous sample (K-1) function is carried out by the unit delay block. The three if-else conditions of the P&O algorithm are carryout by the condition switch block, the ∆D block allows the user to set the perturbation step size of the duty cycle, the duty cycle increment and decrement function are carried out by an adder with a memory block D(K-1) feedback loop. The D(K) limit block limit the duty cycle exceeding the range between 0.4 to 0.6. The output of the duty cycle is connected to the battery charge controller section. The PV power output is also connected to the battery charge controller for conversion efficiency computation.

Lead Acid Battery Charger Controller
The battery charge controller was developed to charge a lead-acid battery using the three-stage charging method. The three-stage charging includes the constant current charging, constant voltage charging, and float charging stage. The first stage constant current charging also refer as bulk charging stage where the charge current is charge at its rated capacity, in this case, the charge current is at MPPT. The second stage constant voltage charging also refer as absorption charging stage where the battery is charged at a constant voltage, in this stage the MPPT is disabled. Finally, the third stage float charge simply maintains the battery State of Charge (SoC) at 100 % when the battery is fully charged. This is to prevent the battery gassing reaction and overheat due to an uncontrolled excessive charge at over 100 %. The flow chart of the battery charge controller is shown in Fig. 5. The charge controller measures the battery SoC and voltage. In the first condition, if the battery SoC is less than 100 % then the charger enters into the constant current or constant voltage charging stage, else enters float stage where duty cycle D(K) is zero. In the second condition, the battery voltage level is used to determine the MPPT bulk or constant voltage absorption charging stage. If the battery voltage is less than the constant voltage set point, the charger switch to MPPT constant current bulk charging stage, else disable MPPT and switch to constant voltage absorption charging stage. The implementation of a battery charge controller in Simulink is shown in Fig. 6. The battery charge controller read in the battery voltage and SoC as input. The Simulink utilized the compare to constant block as if condition to determine if the battery SoC less than 100 %, if the condition is true it will disable the float stage by allowing the MPPT duty cycle to pass through the multiply block so that the charger enters into either bulk or absorption charging stage. If the condition is false, meaning the battery already reaches its SoC of 100 % it will enable float stage by sending zero to set the duty cycle to zero.
The condition to determine the charger to enter MPPT or constant voltage charging stage is carryout by the battery voltage is less than or equal the constant voltage set-point, if the condition is true then enable MPPT charging by allowing MPPT duty cycle to pass through the MPPT/CV charging multiply block, then through the disable float stage multiply block to the PWM generator block for output to the buck converter switching device. If the condition is false, the charger enters into constant voltage absorption charging stage by rapid switching between MPPT and zero through the MPPT/CV multiply block so that the battery voltage can maintain at the constant voltage set-point until float stage is reached.

Results and Discussion
The MPPT battery charge controller for the standalone photovoltaic system model has been simulated successfully in MATLAB/Simulink environment for performance analysis. The Simulink model is configured using ode23tb (Stiff/TR-BDF2) solver with a variable step. The discrete type of simulation is set with a sample time of 10 μs per sample. The following sections detail out the performance analysis of the model in four aspects, there are MPPT tracking performance, battery charging performance, overall efficiency performance and validation with commercial MPPT charge controller.

MPPT Tracking Algorithm Performance
The tracking ability of the MPPT algorithm is verified through this performance analysis. The performance of the MPPT tracker is carryout by varying the solar irradiance input to the PV array ranging from 100 W/m 2 to 1000 W/m 2 in 100 W/m 2 step with 2 seconds interval. At 1000 W/m 2 a sudden drop to 100 W/m 2 is also introduced at 20s of the step irradiance to simulate fast passing cloud. The solar irradiance pattern above is constructed using a signal building block. The PV array is set based on a commercial module with maximum power voltage of 30.9 V, maximum power current of 8.1 A, open-circuit voltage of 36.6 V and short-circuit current of 8.75 A . It configures in 2 parallel strings with 4 panels per string and produces a total of 2 kW power. The module temperature is set at 25°C. The MPPT perturbation step ∆D is set to 1e-6. To run this model without any algebraic loop error, the algebraic loop solver has set to Line Search based algorithm in Simulink. The performance of the MPPT tracker is shown in Fig. 7.
It can be seen that the MPPT algorithm has successfully tracked close to its maximum power from the PV array with its respective solar irradiance level. The tracking time of the MPPT is less than 0.5 seconds with the highest tracking efficiency of 99.9 % at solar irradiance of 300 W/m 2 with a tracked maximum power of 579 W. The inefficiency is due to the tracking error caused by the P&O algorithm oscillate near its maximum point. This is a known inherent problem of the P&O MPPT algorithm. The tracking error can be further reduced by reducing the perturbation step ∆D, however, this will increase the tracking time proportionally.

Battery Charge Controller Performance
The performance of the battery charge controller is carryout by charging the battery through the sequence of MPPT bulk, constant voltage absorption and float charging stages to demonstrate the three stages charging capability of the charger. The battery block is set to a lead-acid battery, 48 V, 100 AH capacity, state of charge of 99.7 % and simulation duration of 60 sec. The PV array solar irradiance is set at 1000 W/m2 which produces 2000 W of power. The charge controller PWM frequency is set at 1000 Hz and the battery constant voltage set point is set at 55.4 V. The performance of the battery charge controller is shown in Fig. 8. It can be seen that initially, the charge controller charges the battery at MPPT bulk charging stage when the battery SoC and voltage are less than 100 % and 55.4 V respectively. The charger switch to a constant voltage absorption charging stage when the battery voltage reaches 55.4 V at 15 sec. In this stage, the charge controller no longer charges the battery at MPPT power, the duty cycle is switch between MPPT and zero to maintain the constant voltage of 55.4 V which can be seen at duty cycle time from 15 sec to 42 sec. When the SoC reaches 100 % at 42 sec, the charge controller switch to float stage where the duty cycle is zero and the battery voltage drop to the floating voltage of 52.8 V.

Overall Charge Controller Efficiency Performance
The overall efficiency performance of the MPPT battery charge controller model is carryout by running the charge controller charging the battery under various solar irradiance ranging from 100 W/m 2 to 1000 W/m 2 at 100 W/m 2 interval in Simulink environment. The efficiency can be determined by the ratio of the output charging power delivery to the battery to the input power from PV array. The efficiency computation is implemented in the battery charge controller shown in Fig. 5. The mean block is used to average out the efficiency with a window size of 1 sec. This is to smooth out the efficiency oscillation caused by the MPPT algorithm. The efficiency performance is shown in Fig. 9. The average conversion efficiency up to 2000 W range is about 97.9% with the highest efficiency of 98.4 % and the lowest efficiency of 97.4%. The efficiency performance of this model is benchmarked with a commercial MPPT Charger controller from EPEVER iTracer IT6415ND as reference. The model overall efficiency performance within the efficiency range of 98% to 97% of the commercial charge controller product specification. The model conversion efficiency can be further improved by utilizing a lower drain-source resistance MOSFET and a lower forward voltage diode.

Model Performance Validation with Commercial MPPT Charge Controller
To validate the performance of this model is comparable with the commercial solar PV MPPT charge controller. A commercial solar PV MPPT charge controller is set up with 2 kW PV panel to charge 48 V battery. The commercial solar PV MPPT charge controller used for validation is from EPEVER iTracer-IT6415ND with MPPT tracking efficiency of 99.5% overall charge controller efficiency of 97-98%. The 48 V battery source consists of eight 12 V Lead Acid Gel type batteries with 100AH capacity. Four 12 V battery connected in series to form one set of 100 AH battery. And two sets of 48 V 100 AH battery set are connected in parallel to form a 200AH capacity battery system. The complete validation experiment setup is shown in Fig. 10. The validation experiment begins with recording the commercial MPPT charge controller PV input power, charging battery power and battery state of charge at 1 min interval. The recorded data is then saved as reference for the Simulink model validation. The simulated data is then compared with the recorded data for validation and performance comparison. Fig. 11 shows the validation results of PV input power, overall conversion efficiency and battery state of charge for 30 mins. It can be seen that the PV power input of the model and commercial MPPT charge controller almost overlapped with each other which indicates the model simulation PV input power is the same as the commercial PV MPPT charge controller data. The average overall efficiency performance of the PV MPPT charge controller model developed in Simulink is 98.3% which is comparable with the commercial PV MPPT charge controller recorded data with an average efficiency above 98.1%. The Simulink model has slightly higher efficiency, it could be the Simulink model environment is more ideal or can possibly cause by difference topology and components tolerance used in the commercial MPPT charge controller. The Battery State of Charge (SoC) charging rate also comparable with the real battery with about 12% of SoC difference. The difference could possibly cause by the following factors. The difference Lead Acid battery model parameters in Simulink and the real Lead Acid Gel battery. The battery SoC computation in the Simulink model is based on the integration of current flowing in with respect to time and its capacity, where else battery SoC computation for the commercial charge controller is based on the battery voltage level. The battery model in Simulink is always simulated under new battery conditions without being affected by the aging and capacity derated condition. On the other hand, the experiment setup battery used for validation has been 10 months old. The aging battery can cause the battery capacity to derate which possibly causes the SoC charging rate to be higher than the Simulink model. The MPPT charge controller Simulink model presented in this paper is fully reproducible, with that in mind the model in MATLAB/Simulink presented in this paper is made available by the authors for the reader to download at Mathworks official MATLAB Central File Exchange link below https://www.mathworks.com/matlabcentral/fileexchange/ 73115-mppt-solar-charge-controller-model

Conclusion
A detail circuitry modeling of a Solar PV MPPT battery charge controller model in Simulink is presented. The MPPT P&O tracking algorithm, buck converter circuit and three stages charge controller are clearly explained and are fully reproducible. The MPPT battery charge controller is capable to charge a 48 V lead-acid battery through tracking the maximum power from the 2 kW PV array power source and regulate the charging using a three-stage charging strategy. It achieved an average overall efficiency of 98.3% which matches many high end commercial solar PV MPPT charge controller product specifications. The Simulink model presented can be flexibly changed to meet any commercial MPPT charge controller with similar topology. The performance of the Simulink model also validated with a real commercial solar PV MPPT charge controller experimental setup. This validated model contributes to a better sizing of PV panel and battery energy storage for small and medium standalone PV systems.