Solar PV Battery Charging with ANN and P&O MPPT in MATLAB
Solar PV Battery Charging with ANN and P&O MPPT in MATLAB
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
Solar PV battery charging with ANN and P&O MPPT in MATLAB/Simulink demonstrates two different Maximum Power Point Tracking techniques for extracting solar energy and charging a battery through a DC–DC Zeta converter.

The model compares an Artificial Neural Network (ANN) MPPT controller with a conventional Perturb and Observe (P&O) MPPT controller under changing solar irradiation conditions. The main objective is to observe PV power tracking, battery charging behavior, transient response, and MPPT performance.
SEO Meta Description: MATLAB/Simulink model of a solar PV battery charger using ANN and P&O MPPT with a Zeta converter. Compare PV power tracking, battery charging, and dynamic performance under changing irradiation.
SEO Keywords: Solar PV battery charging MATLAB, ANN MPPT MATLAB, P&O MPPT Simulink, solar battery charger MATLAB, Zeta converter MATLAB, neural network MPPT, photovoltaic MPPT comparison, battery charging Simulink, solar charger controller
Solar PV output varies mainly with:
Solar irradiation
Cell temperature
Operating voltage
Connected load and battery condition
To obtain the available maximum power from the PV array, an MPPT controller is required.
This MATLAB/Simulink model implements and compares:
ANN-based MPPT
P&O-based MPPT
Both controllers operate the same solar PV battery charging system so that their responses can be compared under identical operating conditions.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The complete system contains:
Solar PV array
DC–DC Zeta converter
ANN MPPT controller
P&O MPPT controller
Battery charging control
Battery SOC protection logic
Load
PV measurement
Battery measurement
Load measurement
The PV array supplies power to the load and simultaneously provides the remaining available power for battery charging.
Main System Parameters
Parameter | Value |
Single PV module power | 250 W |
PV voltage at maximum power point | 39.9 V |
PV current at maximum power point | 8.1 A |
Modules connected in series per string | 4 |
Parallel strings | 2 |
Maximum PV array power | Approximately 2000 W |
Standard irradiation | 1000 W/m² |
Cell temperature | 25°C |
Battery voltage during simulation | Approximately 48 V |
Battery capacity | 200 Ah |
Load power | Approximately 500 W |
Irradiation change time | 5 s |
Reduced irradiation | 500 W/m² |
𝐏𝐕 𝐀𝐫𝐫𝐚𝐲 𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧
The solar array is formed using multiple PV modules.
The configuration used in the simulation is:
4 PV modules in series in each string
2 parallel strings
Total installed PV capacity of approximately 2 kW
Under:
1000 W/m² irradiation
25°C cell temperature
the PV system can generate close to its rated maximum power.
When irradiation is reduced to 500 W/m², the available PV power decreases accordingly.
𝐙𝐞𝐭𝐚 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫
A DC–DC Zeta converter is used between the PV array and the battery/load side.
A major advantage of this converter for the demonstrated system is its ability to support:
Step-up operation
Step-down operation
Controlled PV operating point
Battery charging
MPPT-based power transfer
The converter switching signal is generated according to the duty cycle provided by the MPPT and battery charging controller.
𝐀𝐍𝐍 𝐌𝐏𝐏𝐓 𝐂𝐨𝐧𝐭𝐫𝐨𝐥𝐥𝐞𝐫
The ANN-based MPPT controller uses an Artificial Neural Network to determine the required PV operating reference.
ANN Inputs
The neural network receives:
Solar irradiation
Temperature
Based on these inputs, the ANN estimates the voltage corresponding to the required maximum-power operating region.
ANN MPPT Process
The control process can be summarized as:
Irradiation and temperature are measured.
These signals are supplied to the ANN model.
ANN generates the required PV voltage reference.
The reference is compared with the measured PV voltage.
The voltage error is processed by a controller.
A required converter duty cycle is generated.
The PWM generator produces switching pulses.
The Zeta converter adjusts the PV operating point.
Maximum available PV power is transferred to the battery and load.
𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐂𝐡𝐚𝐫𝐠𝐢𝐧𝐠 𝐏𝐫𝐨𝐭𝐞𝐜𝐭𝐢𝐨𝐧
The MPPT duty cycle is not supplied continuously without considering battery condition.
The charging logic monitors:
Battery State of Charge
Battery voltage
Fully charged battery voltage limit
The converter switching signal is allowed when the battery is within the permitted charging range.
Charging Logic
Battery Condition | Charging Action |
SOC below 100% and voltage below full-charge limit | Charging enabled |
SOC reaches or exceeds 100% | Charging disabled |
Battery voltage reaches full-charge limit | Charging disabled |
This control helps prevent continued charging after the battery reaches its permitted charging condition.
𝐏&𝐎 𝐌𝐏𝐏𝐓 𝐂𝐨𝐧𝐭𝐫𝐨𝐥𝐥𝐞𝐫
The second model uses conventional Perturb and Observe MPPT.
Unlike the ANN controller, the P&O algorithm determines the operating direction by continuously monitoring changes in:
PV voltage
PV current
PV power
The controller makes a small change in the converter duty cycle and observes the resulting PV power.
Depending on whether the operating condition moves toward or away from the maximum power point, the controller changes the direction of the next duty-cycle adjustment.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The same operating conditions are applied to both ANN and P&O models.
Initial Condition
For the first 5 seconds:
Irradiation = 1000 W/m²
Temperature = 25°C
The PV array operates near its high-power condition.
Irradiation Change
After 5 seconds:
Irradiation changes from 1000 W/m² to 500 W/m²
This step change is used to analyze:
MPPT tracking response
PV voltage response
PV current response
PV power response
Battery charging current
Battery SOC
Load power
Transient performance
𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐝 𝐒𝐢𝐠𝐧𝐚𝐥𝐬
Several measurements are available in the Simulink model.
PV Measurements
PV voltage
PV current
PV power
Battery Measurements
Battery voltage
Battery current
Battery SOC
Load Measurements
Load voltage
Load current
Load power
These measurements make it easier to compare the behavior of both MPPT controllers.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
ANN MPPT Performance
At approximately 1000 W/m², the PV array produces close to:
PV power: 2000 W
When the irradiation changes to 500 W/m², the PV output falls to approximately:
PV power: 1000 W
The ANN controller provides a relatively smooth transition between the two irradiation levels.
PV Power Comparison
Time/Condition | Irradiation | Approx. PV Power |
Initial operating condition | 1000 W/m² | 2000 W |
After 5 seconds | 500 W/m² | 1000 W |
This demonstrates the effect of solar irradiation on available photovoltaic power.
𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐂𝐡𝐚𝐫𝐠𝐢𝐧𝐠 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞
The load consumes approximately 500 W.
Therefore, when PV generation is higher than the load demand, the remaining PV energy is available for battery charging.
During high irradiation, the demonstrated battery charging current is approximately:
−30 A
After irradiation decreases to 500 W/m², the charging current reduces to approximately:
−10 A
The negative current direction represents the battery charging convention used in the simulation.
Battery Response
Operating Condition | Approx. Battery Current |
PV irradiation at 1000 W/m² | −30 A |
PV irradiation at 500 W/m² | −10 A |
The SOC gradually increases according to the available charging current.
A higher charging current produces a faster SOC increase, while lower PV generation results in a smaller charging rate.
𝐋𝐨𝐚𝐝 𝐏𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞
The load power is maintained at approximately:
500 W
Even when solar irradiation changes, the model demonstrates controlled energy distribution between:
PV array
Load
Battery
When PV power is higher than the required load power, the additional available energy is used for battery charging.
𝐀𝐍𝐍 𝐯𝐬 𝐏&𝐎 𝐌𝐏𝐏𝐓
The most important part of the simulation is the comparison between ANN and P&O MPPT.
Performance Aspect | ANN MPPT | P&O MPPT |
Input information | Irradiation and temperature | PV voltage and current |
Tracking approach | Neural-network-based prediction | Perturbation and observation |
PV voltage response | Smoother | More oscillatory |
PV current response | Smoother | More transient variation |
Irradiation-change response | Faster and smoother | Takes time to settle |
Oscillation near operating point | Lower in demonstrated response | More noticeable |
Sudden irradiation change | Better transient behavior | Larger temporary deviation |
Battery charging response | Smooth | Greater transient variation |
𝐏&𝐎 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞 𝐃𝐮𝐫𝐢𝐧𝐠 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐭𝐢𝐨𝐧 𝐂𝐡𝐚𝐧𝐠𝐞
When irradiation changes from 1000 W/m² to 500 W/m², the P&O controller shows a more noticeable transient response.
The simulation demonstrates:
Temporary reduction in PV power
Larger variation in PV voltage
Larger variation in PV current
Additional settling time
Oscillations before reaching the new operating point
During the transition, PV power temporarily drops significantly before recovering toward the new maximum power level.
This behavior occurs because the P&O controller has to repeatedly perturb the operating point to identify the new maximum-power region.
𝐀𝐍𝐍 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞 𝐃𝐮𝐫𝐢𝐧𝐠 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐭𝐢𝐨𝐧 𝐂𝐡𝐚𝐧𝐠𝐞
The ANN controller provides a noticeably smoother response in the demonstrated simulation.
When irradiation changes:
PV voltage changes smoothly
PV current transitions with lower oscillation
PV power reaches the new operating region quickly
Battery charging current changes smoothly
Transient disturbance is reduced
This makes the ANN MPPT controller attractive for solar battery charging applications where fast changes in environmental conditions may occur.
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
2 kW solar PV array
ANN-based MPPT control
Conventional P&O MPPT control
Direct comparison of two MPPT methods
Zeta DC–DC converter
Battery charging control
Battery SOC monitoring
Battery overcharging protection logic
Irradiation variation from 1000 to 500 W/m²
PV voltage, current, and power monitoring
Battery voltage, current, and SOC monitoring
Load voltage, current, and power monitoring
Dynamic MPPT performance analysis
Battery charging response comparison
𝐖𝐡𝐲 𝐔𝐬𝐞 𝐀𝐍𝐍 𝐟𝐨𝐫 𝐌𝐏𝐏𝐓?
ANN-based MPPT can be useful because a trained neural network can establish the nonlinear relationship between environmental conditions and the required PV operating point.
Irradiation
Temperature
to predict the required operating voltage.
The demonstrated results show advantages such as:
Faster dynamic response
Reduced oscillation
Smooth PV power tracking
Better behavior during irradiation variation
Smooth battery charging transition
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This MATLAB/Simulink model is useful for understanding:
Solar PV battery charging systems
ANN-based MPPT control
P&O MPPT implementation
Neural-network-based renewable energy control
DC–DC converter control
PV energy management
Battery charging systems
Solar energy storage
MPPT performance comparison
Renewable energy control research
Intelligent power electronic converters
𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐎𝐮𝐭𝐜𝐨𝐦𝐞𝐬
By studying this model, students, researchers, and engineers can understand:
How a PV array responds to irradiation changes
How ANN can be applied to MPPT control
How P&O searches for the maximum power point
How the duty cycle controls the Zeta converter
How battery SOC can be included in charging logic
How battery charging current changes with available solar power
How ANN and P&O responses can be compared using simulation waveforms
Why transient response is important in MPPT systems
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Solar PV Battery Charging with ANN and P&O MPPT in MATLAB/Simulink model demonstrates two different approaches for maximum power extraction and battery charging.
Under the same changing irradiation conditions:
Both controllers track the available solar power.
PV output changes from approximately 2000 W to 1000 W when irradiation changes from 1000 W/m² to 500 W/m².
Battery charging current changes according to the available PV power.
P&O MPPT shows greater oscillation and transient deviation during irradiation changes.
The ANN MPPT provides a smoother and faster response in the demonstrated simulation.
Overall, the model provides a clear comparison of intelligent ANN-based MPPT and conventional P&O MPPT for solar PV battery charging using a Zeta converter.



Comments