File Exchange

image thumbnail

Configurable Simulink Model for DC-DC Converters with PWM PI Control

version (715 KB) by Yi Cao
A Simulink model configurable to buck, boost and buck-boost DC-DC converters with PWM PI control


Updated 01 Apr 2009

View Version History

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This package includes a configurable Simulink model for three different types of DC-DC converters (Buck, Boost and Buck-Boost converters) with a PWM PI controller. The example provided shows a case to boost voltage from 5 volts to 25 volts. It can be used to learn DC-DC converters and their control. The model itself also provides an example how to mask a subsystem in Simulink. A HTML and a pdf files are provided to explain the principles of the unform Simulink model for three different types of DC-DC converters. The model does not require other Simulink blocks, such as SimPowerSystems.

Cite As

Yi Cao (2021). Configurable Simulink Model for DC-DC Converters with PWM PI Control (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (36)

Ibrahima Ba

Good job !

yijia wei

Neeraj Nishad

khairi elrmali

i try to find performance of solar panel pwm charging controller i choose LS1024B charge controller
and circuit schematic to simulate

Aman Mohammad

I made a buck-boost dc-dc bidirectional converter in simulink matlab to charge and discharge battery. how can I make gate signal for switches to condtrol charge and discharge_

Jacob Godi

Abdelhedi Riadh

How can you reach 4000 seconds in simulation !!!
i want to introduce Supercapacity models but i can not reach more than 5 second in simulation because its becames veryy slowly :/
thanks for your help :)

Al Dodson

Default values for C and L are 440 and 20, respectively. I'm assuming the units are Farad and Henry. The default sampling frequency for the PWM is 0.2Hz. These are very odd values for a DC-DC converter. I changed components to 470microFarads and 22microHenries and changed PWM frequency to 25kHz. The results are not good.


bijeta Chakraborty

Tony Lennon

This is a helpful model. If you are looking for more resources about pulse width modulation (PWM), please visit this web page.

Dick Benson

Nice job, thanks for your efforts.

Manjunath Matam

Prof Yi Cao Sir,

MTech Student
NIT Warangal University

Respected Sir,

I am grateful and thanking you much for uploading DC DC converter Mathematical and MATLAB Simulink model that are simulated in your hands for public accessing and specially for students.

From your model, I am one of the such kind where received much technical information for my Uninterruptible Power Supply project . In which , your model helps me a lot regarding design of DC DC chopper and battery charger circuit.

Thanking you Sir

Yours Sincerely

Mr.Matam Manjunath

ramkumar pasumarthi

at present i am working on this project "Digital Combination of Buck and Boost Converters
to Control a Positive Buck–Boost Converter and
Improve the Output Transients" can you help with the code or documentation i need simlink for pwm can please reply my mail id is

zhang caizhi

Hi,Dr. Cao
Thanks for your excellent work!
I don't understand the PWMPID controler, Could you tell me why did you design the controler like that?

colhano colhn

V. Poor

Yi Cao


Could you detail what improvement you are willing to see?


Mehran Ali

give me subsystem oof converter plz

mona sayed

Sanjay Karndhar

Theodosios Tziomakas

boudjaltia hamid


Steve DeMers

I was wondering if there is any way to use this DC-DC converter with some of the electric drives in the SimPowerSystems library?

chita samir


Andres Vermeire

hak jfk

halis çiçek

fifi loulou


kolli fateh

houari azeddine

srinivasan seenu

you are giving models this will be helpful for our project

Yi Cao


Thanks for suggestions. A pdf file has been added to the zip file to explain the model and general priniples of DC-DC converters. Please let me know if you find any error of the document.

CyberWalker IRIS

Excellent work! I've sent you an email regarding an electronic schematic on this project.

zhor hassar


MATLAB Release Compatibility
Created with R2007b
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!