Simulation of open-loop Buck converter in Simulink

Ming Sun

Ming Sun / November 17, 2022

6 min read––– views

In Ref. [1], we built a simple open-loop Buck converter in Xscheme. In this tutorial, we are going to create a simple open-loop Buck converter in Matlab.

Equations

In order to create the model in Matlab, we have to derive equations first. For a Buck converter inductor, we have the following:

`L*{di_L}/{dt}=D*V_{text(in)}-V_{out}`
(1)

For the output capacitor, we have:

`C*(dV_{out})/dt+V_{out}/R=i_L`
(2)

Eq. 1 can be rearranged as:

`{di_L}/{dt}=1/L*(D*V_{text(in)}-V_{out})`
(3)

Eq. 2 can be rearranged as:

`(dV_{out})/dt=1/C*(i_L-V_{out}/R)`
(4)
  • Next we are going to use Simulink to implement Eq. 1 and Eq. 2. First, let us import to integrator into the simulink cavans as shown in Fig. 1.
Import integrator and mark the signal
Fig. 1Import integrator and mark the signal
  • To mimic the switching behavior on the VSW net, we will use a pulse generator. Fig. 2 shows the settings of the pulse generator. The amplitude is set to be 3.8, which represents Vin=3.8V. The duty cycle is set to be 0.5, which represents 50% duty cycle of the Buck converter control D.
Import pulse generator
Fig. 2Import pulse generator
  • Add product, divide and subtract block. Basically, we are preparing the model as required by Eq. 3 and Eq. 4.
Add product, divide, subtract block
Fig. 3Add product, divide, subtract block
  • Finished model is as shown in Fig. 4.
Completed simulink model for open-loop Buck converter
Fig. 4Completed simulink model for open-loop Buck converter

Simulation

Finally, we can run the model. Before we do so, let us change the simulation time to 1ms as shown in Fig. 5.

Simulation results
Fig. 5Simulation results

Also, we need to constrain the max step size as well. In my setting, I set the max step size to be 25ns, which means within a switching period, simulink has to have at least 40 simulation points.

Simulink model settings
Fig. 6Simulink model settings

The simulation results are as shown in Fig. 7.

Simulation results
Fig. 7Simulation results

Zoomed-in waveform is as shown in Fig. 8.

Simulation results - zoom in
Fig. 8Simulation results - zoom in

References and materials

[1] Simulation of open-loop switching regulators in Xschem

[2] Matlab self-paced online course

[3] Open-loop Buck converter simulink model - pdf

[4] Open-loop Buck converter simulink model - download


HomeWikis
SnippetsAbout
Google ScholarLinkedIn