Boost Converter Using Simulink
Boost Converter Using Simulink
The Boost converter circuit is shown in fig.1. I have accounted for the parasitic resistance in passive components as
well as the ON resistance for active device.
Vout
iL
vL
ic vc
ig iout
▪ Input voltage Vg
▪ Voltage control (duty cycle) d
▪ Load current iout
Converter outputs
▪ Capacitor voltage vC
▪ Inductor current iL
▪ Output voltage Vout
▪ Input current Ig
Step 1:
▪ Start Simulink either using the MATLAB command window or by clicking the Simulink button on the toolbar
▪ Create a new Simulink model file and save it as boost.slx
▪ From the Simulink place 3 instances of Constant block located under “Commonly used blocks”. Also place a
Subsystem block as well a Scope block.
At this point your model file will look something like fig. 2. Notice that I have renamed the blocks to identify their
respective characteristic.
Fig. 2: Initial set up for Boost converter model
Step – 2:
▪ Open the Boost converter subsystem block by double clicking on it.
Notice the default connection between In1 and Out1. Delete this connection.
▪ Add 2 more instances of In1 and 3 more instance of Out1 found under commonly used block
▪ Add an instance of Subsystem, mux, and demux found under commonly used block
▪ Navigate to user-defined functions and add a MATLAB Function block to your model file
▪ Go to the continuous library and add 2 instances of Integrator block to your model file.
Make the connections as shown in fig.3 and rename your blocks appropriately. Notice that by default Mux block has 2
inputs and Demux has 2 outputs. This can be changed by double clicking on the respective blocks and changing the
number of inputs/outputs
Open the Repeating Sequence block by double clicking. This block lets you set up switching frequency for the
converter as well as the amplitude VM for the PWM signal. Rather than setting it to some default value, this parameters
can be set as variables so that the user has control over changing them for different design.
𝑖𝐶 = −𝑖𝑜𝑢𝑡
𝐼𝑔 = 𝑖𝐿
𝑖𝐶 = 𝑖𝐿 − 𝑖𝑜𝑢𝑡
𝐼𝑔 = 𝑖𝐿
Over one switching period Ts the equations can be combined and represented as follow:
Inductor voltage,
Capacitor current,
𝐼𝑔 = 𝑖𝐿 ∙ 𝑑 + 𝑖𝐿 ∙ (1 − 𝑑)
Output voltage,
𝑖𝐶 = 𝑖𝐿 ∙ (1 − 𝑑) − 𝑖𝑜𝑢𝑡
𝐼𝑔 = 𝑖𝐿
The above equations can be entered directly to our MATLAB function. The 5 inputs via Mux are stored in an array
format. The code should look something as follow:
function y = CCMBoost(u,L,C,RL,Ron,Resr)
% Inputs:
% u = [Vg d iout v_C i_L]
%
% Parameters:
% L, RL, C, Resr, Ron
%
% Outputs:
% y =[dv_C/C di_L/L Vo ig]
dbar = 1-d;
% State equations
Vo = vC + Resr*((iL*dbar) - iout); % Output voltage
Ig = iL; % Input current
iC = (iL*dbar) - iout; % Capacitor current
vL = Vg - (Vo*dbar) - iL*((Ron*D) + RL); % Inductor voltage
% Output
y = [iC/C vL/L Vo Ig];
Save the MATLAB function. Now we want the parameters be set as variables so that the user can change them. In
order to do so, click on Edit Data in Editor menu as shown in fig. 6
Also, change the scope of L, C, RL, Ron and RESR from input to parameter. This can be done simply by clicking on
the respective input and selecting parameter from the drop-down menu. At the end, your port manager window
should look as follow:
Fig. 8: Port/Data Manager
Going back to the Boost subsystem block, you can set up initial conditions for the inductor current and capacitor
voltage. In order to do so, open the capacitor integrator block, and type in a variable name under the initial condition
field. Do the same for inductor integrator block as well. As an example, they can be named them as vC_0 and iL_0.
Now, you can connect all the blocks of the system as shown in Figure 11.
Fig. 11: Final connections
Right click on the Boost subsystem block, and select Create Mask. This will open Mask Editor, where you can create a UI for the
user to change the boost converter variables and parameters. In the Mask Editor, click on Parameters & Dialog tab. Then add all the
variables via the Edit button. Make sure that the variable name matches the ones used within the subsystems.
Apply your settings and close the editor window. Now if you try and open (double click on it) the Boost converter
subsystem block you will see a dialog box as follow,
Fig. 13: Setting parameters
I have set the parameters as follow:
𝑉𝑜𝑢𝑡 30
Load current, 𝑖𝑜𝑢𝑡 = = = 0.6 𝐴
𝑅 50
Inductance, L = 120 H
Capacitance, C = 50 F