File Exchange

image thumbnail

MPPT Solar Charge Controller Model

version 1.0.2 (34.8 KB) by Rodney Tan
This charge controller model perform solar photovoltaic Maximum Power Point Tracking to charge lead acid battery


Updated 12 Sep 2020

View Version History

View License

Full paper download link for detail description

This block perform solar photovoltaic Maximum Power Point Tracking based on Perturbation & Observation algorithm and charge lead acid battery using three stage charging algorithm.

<b><u>Block Setting</u></b>

<b>MPPT Duty Cycle Step Size</b>
Specify the MPPT duty cycle (delta) step size. Default value is 1e-5.

<b>Battery Charging Constant Voltage (V)</b>
Specify the battery charging constant voltage for absorption stage.

<b>PWM Switching Frequency (Hz)</b>
Specify the PWM switching frequency in Hz.

Cite As

Rodney Tan (2021). MPPT Solar Charge Controller Model (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (14)

Dr. J. A. Laghari

Dmitriy Tarola

moaz Ibrahim

Thank you, your paper very useful.

Yuuma Yamamoto

What if I'm using a lithium battery? specifically a LiFePO4 battery. Can I still use it for my simulation?

abdulrahman alanazi

Hi all ,
I need help to do some exercise and I'm willing to pay for who can do it
for contacting :

solar energy

for the full completed code please contact me:

Jelka Bisa


would this work with a matlab function block for the P&O algorithm?

明瑞 刘

mikalai dzedovich

M.Hossein Sanaye

Dear Rodney,
This model is just I was looking for my bachelor's final project to inspire.
I do admire your modular design and comprehensive plots. Just to share, I'm trying to simulate MPPT charge controller for a small wind turbine, I selected a modified Hill-Climbing-search algorithm, which in this specific application might be faster in convergence. For sure I will not use the model itself in my work, but as I learned a lot from every single block, I will refer to your great design. After all, I wish I could generate the controller code for actual implementation and further verification tests.
Also, I'd like to add a convergence speed calculator and maybe a programmable step size feature. If I was successful I'll post it for your review.
Best Regards


Great model. However i want to simulate for a 10 hour sunlight which is a 10*3600 seconds of simulation time and it gets so slow. Will decreasing the delta value or make the powergui continue help?
Thank you


Please, I need this model in R2015a.. Thank You

Pradipta Kumar Pal


MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!