Professional Documents
Culture Documents
CONVERTER
(USING MATLAB)
(ELEC5564 – COURSEWORK 2)
WRITTEN BY
SUBMITTED TO
Dr. Li ZHANG
24 November 2010
AIMS AND OBJECTIVES
To understand and describe the equations, methods and/or algorithms that are commonly
used in modelling and analyzing a DC-DC Boost converter
To study the effects of sampling step on the precision and accuracy of the program
simulation
To study the effects of various parameters including; output capacitor value, input inductor
value and duty ratio on the current ripple, voltage ripple, variations from transient state to
steady state and generally, the behaviour of a DC-DC Boost converter
2
PRINCIPLES OF OPERATION OF A DC-DC BOOST CONVERTER
The DC-DC boost converter is an example of a classical switched-mode power supply circuit which is
mostly used for power applications having the output voltages higher than the input voltages. The
DC-DC converter is also used to regulate the dc output voltage under varying load and input
voltages.
L iL Dode iO
+ VL -
iC
+
Vi VSW C VC VO R
-
The switching signal to the switch (typically a MOSFET switch) is usually a pulse-width modulated
(PWM) signal which consequently turns the switch ON and OFF. The duration of the ‘ON’ and ‘OFF’
(i.e. the switching sequence) is determined by the duty ratio of the PWM signal and their sum is
equal to the switching period. The circuit goes from its initial transient state when the inductor
current and capacitor voltage build up to a steady state.
When the switch is ON, the diode is reverse bias and the circuit is separated into two parts as shown
in figure 2.The left part of the circuit shows the dc supply voltage charging the inductor while the
right shows that the output capacitor maintains the output voltage using previously stored energy.
When the switch is OFF as seen in figure 3, both the dc supply voltage and energy stored in the
inductor will charge the output capacitor and also supply power to the load hence the output
voltage is boosted1 as shown by equation 1.
Vi
V o= −−−−−−−−−−−−−−−−−−−− (1 )
( 1−k )
Once more, the output voltage can be maintained at the constant required level by changing the
duty ratio and consequently controlling the switching sequence.
L io
iL
+ vL -
1 ic
http://fayazkadir.com/blog/?page_id=460
VI vc C Vo R
3
L1 L2
Figure 2: DC-DC Boost converter circuit (when switch is ON)
L D
iL P io
+ vL -
ic
+vc
VI C - Vo R
L3 L4
The switching devices are assumed to be ideal thus the dc-dc boost converter circuit varies as a
function of time as a result of the switching action. The state of a system is defined by the values of
fundamental variables (the state variables) describing its state-space model. For the dc-dc boost
converter being considered, the state variables defining the system are the capacitor voltage VC and
the inductor current iL. The other variables being considered are the output current and the input
voltage. The state-space describing the ‘ON’ and ‘OFF’ states are enumerated as follows;
SWITCH ON
diL V i
= −−−−−−−−−−−−−−−−−−−−−−− (2 )
dt L
d V C −V C
= −−−−−−−−−−−−−−−−−−−−−−(3)
dt CR
d iL
[ ][
dt =
dVC
dt
0 0
0
−1
CR
iL
VC
1
0 ][ ] [ ]
+ L V i−−−−−−−−−−−−−( 4 )
iL
V o =[ 0 1 ]
[ ]
VC
−−−−−−−−−−−−−−−−−−−−( 5 )
4
SWITCH OFF
d i L −V C V i
= + −−−−−−−−−−−−−−−−−−−−( 6 )
dt L L
dV C iL V C
= − −−−−−−−−−−−−−−−−−−−−(7)
dt C CR
d iL
[ ] [ ][ ] [ ]
−1
0 1
dt = L iL +
L V i−−−−−−−−−−−−( 8 )
dVC 1 −1 V C
0
dt C CR
iL
V o =[ 0 1 ]
[ ]
VC
−−−−−−−−−−−−−−−−−−−−( 9 )
The equations 4 and 8 can be combined to give a state-space model equation which describes the
circuit operation. This resulting equation in equation 10 is referred to as a switched state-space
model.
d iL ( 1−D ( t ) )∗−1
[ ][
dt =
dVC
dt
0
(1−D ( t ))
1
C
L
−1
CR
][ ] [ ]
iL
VC
1
+ L V i−− (10 )
0
y ( t ) =C x ( t ) + Du ( t )−−−−−−−−−−−−−−−−(11)
˙
x (t)= A x ( t ) + B u ( t ) −−−−−−−−−−−−−−−−(12)
(1−D (t ) )
1
C
L
−1
CR
]
1
[]
B= L , C = [ 0 1 ] , D=0.
0
5
The fundamental concept of the numerical solution of ordinary differential equations is that of
combining evaluated function values at different times in order to approximate the derivatives of the
required equation. The mode of combining these evaluated function value is determined by a finite
difference approximation scheme. For this modelling exercise the Improved Euler method otherwise
known as the Trapezoidal method is used.
dy
where, f ( t , y )=
dt
This calculates the next value of the state variables (inductor current, iL and capacitor voltage, Vc) by
using the present value of these state variables, the sampling time and the derivative of these state
variables.
Then it uses the backward Euler as a corrector to give correction to the estimation of the forward
Euler method;
This calculates the next value of the state variables (inductor current, iL and capacitor voltage, Vc) by
using the estimated value of these state variables given by the forward Euler (or predictor), the
sampling time, the next time and the derivative of these state variables given by the forward Euler.
The final solution is calculated by taking the mean of the two previously calculated values from the
predictor and the corrector as shown below;
Since the two values being added have been estimated using equations 13 and 14, the final solution
can be re-written in terms of present state variable value, sampling time, derivative of the state
variable evaluated at the present variable value and derivative of the state variable evaluated at the
next variable value. The described method is represented graphically in figure 4;
6
f(t)
f(t+h)
f(t)
t t+h time
Figure 4: Trapezoidal method for calculating integration
FLOWCHART
7
Start
While
t<Tmax
Yes
if No
balk<Ton
Yes
Increment t
Stop
MATLAB CODE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NAME: OLADAPO Opeoluwa Ayokunle %%
% STUDENT ID: 200581534 %%
% TITLE: SIMULATION OF A DC-DC BOOST CONVERTER %%
8
% MODULE: ELEC5564M %%
% DATE: 24/11/2010 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%User inputs; duty cycle (k), sample time (h) and number of samples (n)
k = input ('Enter duty cycle (k): ');
h = input ('Enter sample time in seconds (h): ');
n = input ('Enter the desired number of samples (n): ');
%This loop performs the forward and backward euler approximations for the
%specified maximum time
while (t<Tmax)
balk = mod(t,Tp); %Calculates the remainder of dividing
present time with switching period
if balk < Ton
iL_dot = Vi/L; %Calculates diL/dt for 'ON' period used
for forward euler
Vc_dot = -Vc/(C*R); %Calculates dVc/dt for 'ON' period used
for forward euler
else
iL_dot = Vi/L - Vc/L; %Calculates diL/dt for 'OFF' period
used for forward euler
Vc_dot = iL/C - Vc/(C*R); %Calculates dVc/dt for 'OFF' period
used for forward euler
end
Vc1 = Vc + h*Vc_dot; %Performs forward euler approximation
for Vc
iL1 = iL + h*iL_dot; %Performs forward euler approximation
for iL
if balk < Ton
iL_dot_1 = Vi/L; %Calculates diL/dt for 'ON' period used
for backward euler
Vc_dot_1 = -Vc1/(C*R); %Calculates dVc/dt for 'ON' period used
for backward euler
else
iL_dot_1 = Vi/L - Vc1/L; %Calculates diL/dt for 'OFF' period
used for backward euler
Vc_dot_1 = iL1/C - Vc1/(C*R); %Calculates dVc/dt for 'OFF'
period used for backward euler
end
Vc2 = Vc + h*Vc_dot_1; %Performs backward euler
approximation for Vc
iL2 = iL + h*iL_dot_1; %Performs backward euler
approximation for iL
9
t_array = [t_array, t]; %Stores the
currrent value of time in an array
Vc_backward_euler = [Vc_backward_euler, Vc2]; %Stores Vc from
backward euler approximation in an array
iL_backward_euler = [iL_backward_euler, iL2]; %Stores iL from
backward euler approximation in an array
Vc_forward_euler = [Vc_forward_euler, Vc1]; %Stores Vc from
forward euler approximation in an array
iL_forward_euler = [iL_forward_euler, iL1]; %Stores iL from
forward euler approximation in an array
Vc=Vc1; %Reinitializes Vc as Vc1
iL=iL1; %Reinitializes iL as iL1
t=t+h; %increments time by the sampling time
end
%This loop creates an array Vin of constant values of Vi and length of the
%time
for g=1:timelength
Vin = []; %Defines an empty array Vin for storing the values of Vi
Vin = [Vin Vi]; %Stores Vi in Vin
end
Vout = (Vc_forward_euler + Vc_backward_euler)./2; %Calculates the
output voltage using trapezoidal approximation
Iout = Vout./R; %Calculates the
output current
Iin = (iL_forward_euler + iL_backward_euler)./2; %Calculates the
input current using trapezoidal approximation
figure(3); plot(t_array,Vin); hold on; %Plots the input voltage vs. time
title('INPUT VOLTAGE OF BOOST CONVERTER');
xlabel('t, sec');
ylabel('Supply Voltage(Vi), Volts');
figure(4); plot(t_array,Iin); hold on; %Plots the input current vs. time
title('INPUT CURRENT OF BOOST CONVERTER');
xlabel('t, sec');
ylabel('Inductor Current(iL), Amperes');
The modelled dc-dc boost converter is as shown in figure 1 with circuit parameters; V i=12V, R=3Ω,
fs=20 kHz, C=470µF, L=100µH. The model has been considered for three different operating duty
10
ratio, k=0.25, 0.45 and 0.75 at sampling time 1µS and the generated plots of output voltage/current
variation with time and input voltage/current with time showing their respective variations from
transient state to steady state is shown in figures 5 – 10. The average value of input current at
steady state, input current ripple, average value of output voltage at steady state and output voltage
ripple at the three different conditions is shown in Table 1.
K (duty ratio) Average Input Average Output Input Current Output Voltage
Current (Amperes) Voltage (Volts) Ripple (%) Ripple (%)
Table 1: Input current, output voltage, input current ripple and output voltage ripple variations with duty ratio
The sampling time is changed from 1µS to 50µS, the program was run again. The results for different
operating conditions of duty ratio, k = 0.25, 0.45 and 0.75 were observed to be same and shown in
figures 11 and 12. It is observed that the program run time reduced from 3.091secs to 0.012secs. It is
also observed that the modelled dc-dc boost converter delivers power to the load in an oscillatory
manner and it does not deliver power to the load at steady state thus reducing the accuracy of the
program and also invalidating the designed model.
Limiting both the Input Current Ripple and the Output Voltage Ripple to within 2%
As seen from table 1, the input current ripple is maximum at duty ratio, k = 0.25 where average input
current is 6.769A while the output voltage ripple is maximum at duty ratio, k = 0.75 where average
output voltage is 46.54V. Therefore, the input current ripple at k = 0.25 and the output voltage ripple
at k = 0.75 has to be limited to within 2% so as to limit the current/voltage ripple at the three
operating conditions.
I pp
% ripple current= −−−−−−−−−−−−−−−(16)
i L(avg)
I pp∗R
a= −−−−−−−−−−−−−−−−−−−−−−(17)
Vi
R
L= −−−−−−−−−−−−−−−−(18)
1+ a
f s [2∗¿( )
1−a
]
∆Vo k T p
% ripple voltage= = −−−−−−−−−−−−−−(19)
Vo RC
11
Therefore, I pp=0.14 A , a=0.035, Lnew =1.07 mH ∧¿ C new =625 μF .
The new value of input inductance and output capacitance is put in the program and the program
was run again. The simulated results are as shown in Table 2.
K (duty ratio) Average Input Average Output Input Current Output Voltage
Current (Amperes) Voltage (Volts) Ripple (%) Ripple (%)
Table 2: Input current, output voltage, input current ripple and output voltage ripple variations with duty ratio
(with Lnew =1.07 mH ∧¿ C new =625 μF )
It can be observed that changing the input inductance and the output capacitance ensures that both
the input current ripple and the output voltage ripple are within 2% thus increasing the output
current and the output voltage and overall the power delivered to the load while also improving the
time taken for the state variables to reach steady state (i.e. the settling time) and by reducing the
number of oscillations thus improving the overall performance and stability of the modelled dc-dc
boost converter. The results for the three operating conditions are shown in figures 17 – 18.
12
Plots of Output Voltage/Current and Input Voltage/Current variations with time at different
operating conditions, sampling time and improved current/voltage ripple
25
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 5: Output Voltage/Current variation with time (for k=0.25 and sampling time 1µS)
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
30
20
10
-10
-20
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 6: Input Voltage/Current variation with time (for k=0.25 and sampling time 1µS)
13
C a p a c it o r/ L o a d V o lta g e (V c ), V o lts
OUTPUT VOLTAGE OF BOOST CONVERTER
40
30
20
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
14
12
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 7: Output Voltage/Current variation with time (for k=0.45 and sampling time 1µS)
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
60
40
20
-20
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 8: Input Voltage/Current variation with time (for k=0.45 and sampling time 1µS)
14
C a p a c it o r/ L o a d V o lt a g e (V c ), V o lt s
OUTPUT VOLTAGE OF BOOST CONVERTER
70
60
50
40
30
20
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
25
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 9: Output Voltage/Current variation with time (for k=0.75 and sampling time 1µS)
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
140
120
100
80
60
40
20
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 10: Input Voltage/Current variation with time (for k=0.75 and sampling time 1µS)
15
C apac itor/Load V oltage(V c ), V olts
OUTPUT VOLTAGE OF BOOST CONVERTER
1500
1000
500
-500
-1000
-1500
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
t, sec
200
-200
-400
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
t, sec
Figure 11: Output Voltage/Current variation with time (for k=0.25, 0.45, 0.75 and sampling time 50µS)
12.5
12
11.5
11
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
t, sec
3000
2000
1000
-1000
-2000
-3000
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
t, sec
Figure 12: Input Voltage/Current variation with time (for k=0.25, 0.45, 0.75 and sampling time 50µS)
16
C a p a c ito r/L o a d V o lta g e (V c ), V o lts
OUTPUT VOLTAGE OF BOOST CONVERTER
25
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 13: Output Voltage/Current vs. time (k=0.25, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 14: Input Voltage/Current vs. time (k=0.25, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
17
C a p a c it o r/ L o a d V o lt a g e (V c ), V o lt s
OUTPUT VOLTAGE OF BOOST CONVERTER
30
25
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 15: Output Voltage/Current vs. time (k=0.45, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
25
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 16: Input Voltage/Current vs. time (k=0.45, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
18
C a p a c it o r/ L o a d V o lta g e (V c ), V o lts
OUTPUT VOLTAGE OF BOOST CONVERTER
50
40
30
20
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
20
15
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 17: Output Voltage/Current vs. time (k=0.75, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
12.5
12
11.5
11
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
60
50
40
30
20
10
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
t, sec
Figure 18: Input Voltage/Current vs. time (k=0.75, sampling time 1µS, Lnew =1.07 mH ∧¿ C new =625 μF )
19
CONCLUSION
The method used for solving the ordinary differential equation is the Trapezoidal method otherwise
known as the Improved Euler method. This method was used because; it is quite simple in
implementing compared to other methods, the calculation of the solution is faster than other
methods since the method utilizes the concept of piecewise linear approximation and the final
solution converges very fast. In spite of all these advantages, it also has disadvantages of higher
error and inaccuracy due to its utilization of the piecewise linear approximation concept and also
involves the estimation of the derivatives of the function at each interval of time. Therefore, great
care has to be observed in choosing the sampling step for estimating each time interval and also in
the estimation the function derivatives at each time interval.
The above program uses a sampling step of 1µS which gives accurate results and also a program
execution time of 3.091 seconds. Increasing the sampling step to 50µS gives inaccurate results
therefore it is concluded that the sampling time has to be chosen so as to maximize the program
efficiency and also the program accuracy.
The input current/output voltage ripple has effects on the efficiency of the dc-dc boost converter as
observed when the ripple is limited to within 2% of the average values. Therefore, it is desirable to
limit current/voltage ripple to the lowest minimum to achieve the best possible efficiency of the
converter. It is also worth noting that great care has to be taken in choosing the new values of input
inductance and output capacitance as this has determines the filter size since larger inductor values
means the filter has to become large. The most efficient way of reducing the ripple current is by
reducing the switching frequency as seen in equation 18.
Thus it can be concluded that the best model and design of a dc-dc boost converter minimizes ripple
current/voltage to the minimum by choosing appropriate input inductor and output capacitor values
and utilizing a sampling step small enough to maximize program efficiency and accuracy.
20
REFERENCES
21