**4.3. Buck DC-DC converter**

The buck converter was introduced in section 2.2.1 including equations 1 through 5 which describe buck converter behavior. To further develop tools in power electronics design in Matlab, consider the following design example.

It is desired to design a buck converter for a particular automotive application. The supply voltage in a typical automobile while running is 13.8 volts. The device to be powered is purely resistive at 100 ohms and requires a constant 5 volt supply. A maximum of 5% current and voltage ripple is desired. The design has physical size constraints, so a switching frequency of 100 kHz or above is decided upon to keep inductor size at a minimum. Analytically, minimum inductor size is given by Eq. (25) (Shaffer, 2007),

$$L\_{\rm{CCM}} = \frac{\left(V\_S - V\_O\right)R}{2fV\_S} = \frac{\left(13.8 - 5\right)100}{2\left(100e3\right)\left(13.8\right)} = 318.8\,\mu H\tag{25}$$

To account for current ripple, the scaling factor lambda is developed,

$$\mathcal{A} = \frac{2V\_O}{R\left(\Delta I\right)} = \frac{2\left(5\right)}{100\left(0.05\right)} = 2\tag{26}$$

Inductor size accounting for current ripple follows with,

Modelling and Characterization of Power Electronics Converters Using Matlab Tools 159

$$L = \mathcal{A}\left(L\_{\rm CCM}\right) = \mathcal{B}\left(318.8\right) = 637.6\,\mu H \tag{27}$$

Capacitor size determines output voltage ripple according to the relationship,

158 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

harmonic distortion.

**4.2. DC-DC converter** 

**4.3. Buck DC-DC converter** 

(Shaffer, 2007),

Matlab, consider the following design example.

*CCM*

Inductor size accounting for current ripple follows with,

There is good agreement between the simulated and experimental data given in Table 6. The values diverge particularly toward the upper firing angles. Divergence and inconsistencies are expected due to variations in the load resistance due to thermal effects. THD is expected to be lower for low firing angles as less harmonic components are present in undisturbed waveforms closely resembling the smooth curve of the input sine wave. The more the voltage waveform is modified by the TRIAC firing at higher angles the more high frequency components are produced, and therefore the more total

A designer concerned with the behavior of DC-DC converters introduced in earlier sections may wish to consider the voltage gain of the buck, boost, and buck-boost converters as a starting point. The Matlab workspace can be used to plot Vload/Vsource as introduced in section

Recognizing that duty ratio ranges between 0 and 1 for all PWM converters, a Matlab workspace script program is used to create the plot shown in Fig. 21 to show output voltage of each type of DC-DC converter introduced in section 2 as a function of duty ratio. Note the

The buck converter was introduced in section 2.2.1 including equations 1 through 5 which describe buck converter behavior. To further develop tools in power electronics design in

It is desired to design a buck converter for a particular automotive application. The supply voltage in a typical automobile while running is 13.8 volts. The device to be powered is purely resistive at 100 ohms and requires a constant 5 volt supply. A maximum of 5% current and voltage ripple is desired. The design has physical size constraints, so a switching frequency of 100 kHz or above is decided upon to keep inductor size at a minimum. Analytically, minimum inductor size is given by Eq. (25)

*VO R I*

*S O*

To account for current ripple, the scaling factor lambda is developed,

*V VR*

*S*

2 2 100 3 13.8

2 2 5

*L H fV e*

 13.8 5 100

> 

100 0.05

318.8

(26)

(25)

2

2.2 for each converter to graphically represent the curves for consideration.

asymptotic behavior of the boost and buck-boost at higher duty ratios.

$$C = \frac{\left(1 - \frac{V\_O}{V\_S}\right)}{8Lrf^2} = \frac{\left(1 - \frac{5}{13.8}\right)}{8\left(637.6\,\mu\right)0.05\left(100\,\text{e}\,\text{3}\right)^2} = 250\,\mu F\tag{28}$$

**Figure 21.** DC-DC Converter Vload/Vsource

The analytic development of parameters may be used for simulation, but Matlab/Simulink offers another option. A Matlab program can be created to calculate and store system parameters, and used to support a Simulink simulation. First, the following script program is written to calculate system parameters (Fig. 22).

```
%Buck Evaluation Parameters
Vin=13.8; %Volt - Input Voltage, use highest value if source varies
Vout=5; %Volt - desired output voltage
fs=100e3; %1/Second - define switching frequency
vripple=0.05; %max acceptable voltage ripple
iripple=0.05; %max acceptable current ripple
R=100; %ohm - load resistance, purely resistive assumed (j0)
P=1/fs; %Second - switching period
d=Vout/Vin; %unitless ratio - duty ratio calculation
Lccm=(((Vin-Vout)*R)/(2*fs*Vin)); %Henry - minimum L value for CCM
Lambda=(2/iripple)*(Vout/R); %inductor scaling factor - intermediate 
calculation
L=Lccm %Henry - inductor size at absolute minimum for CCM
%L=Lccm*Lambda %Henry - inductor size accounting for current ripple
C=(1-(Vout/Vin))/(8*L*vripple*fs^2) %Farad - capacitor calculation
```
**Figure 22.** Buck Converter Simulink Simulation

Merely by executing this program the values of C and L will be written to the Matlab workspace, and are also saved into temporary memory for use in a Simulink simulation. Such a simulation is constructed as shown in Fig. 23 for the buck converter.

**Figure 23.** Buck Converter Simulink Simulation

Note the large red arrow in the script program which shows a command that is commented out. If we wished to evaluate this circuit with proper design considerations for current ripple, this line can be commented back in to the program. However, for the purpose of examining the behavior of the converter at the CCM/DCM borderline, the value of LCCM is used for the following evaluation. The capacitor size automatically changes accordingly when the program is reevaluated, highlighting the great advantage that computer-based systems have over analytic calculations: the ability to modify parameters at will without having to perform additional calculations. The circuit is set to run over the duration of 0 to 100\*P, with all simulation settings default except Max step size set to P/20 to increase resolution. Examine and consider the actual simulation values shown in the Simulink simulation diagram of Fig. 23, and waveforms shown in Fig. 24. Note the values of L and C and other values shown in the upper left of the Simulink diagram as calculated from the workspace program.

**Figure 24.** Buck Converter Voltage and Current Waveforms

Observe the buck converter's inductor current characteristics operating on the borderline of CCM and DCM behavior by nearly falling to zero. A related behavior is observed in the inductor voltage waveform as the energy contained in the inductor field exponentially decays nearly to zero before the source-switch closes and raises the voltage level. Also note the instantaneous voltage polarity change on the inductor – this capability is what makes power electronic converters possible (keep in mind that when the polarity across the inductor is negative, current is still flowing in the same direction through the load). The slight variation in load current is observed exhibiting ripple behavior. The circuit's efficiency is also evaluated at 92% with the loss model block developed in section 4.0.

### **4.4. Buck-boost DC-DC converter**

160 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

R=100; %ohm - load resistance, purely resistive assumed (j0)

L=Lccm %Henry - inductor size at absolute minimum for CCM

Vin=13.8; %Volt - Input Voltage, use highest value if source varies

Lccm=(((Vin-Vout)\*R)/(2\*fs\*Vin)); %Henry - minimum L value for CCM Lambda=(2/iripple)\*(Vout/R); %inductor scaling factor - intermediate

%L=Lccm\*Lambda %Henry - inductor size accounting for current ripple C=(1-(Vout/Vin))/(8\*L\*vripple\*fs^2) %Farad - capacitor calculation

Merely by executing this program the values of C and L will be written to the Matlab workspace, and are also saved into temporary memory for use in a Simulink simulation.

> Load Current Instant. Inductor Voltage Inductor Current Load Current Load Current Ripple Output Power Circuit Losses Ef f iciency Measurements

Note the large red arrow in the script program which shows a command that is commented out. If we wished to evaluate this circuit with proper design considerations for current ripple, this line can be commented back in to the program. However, for the purpose of examining the behavior of the converter at the CCM/DCM borderline, the value of LCCM is used for the following evaluation. The capacitor size automatically changes accordingly

L

C R

Output Power Power Loss Efficiency

iripple%

iload

0.04934

0.0225

0.9154

0.2435

5.572

Waveforms

Such a simulation is constructed as shown in Fig. 23 for the buck converter.

duty ratio

0.0003188

m

a

k

[VSS] [iSS]

Diode

5 ideal iripple%

0.3623

**Figure 22.** Buck Converter Simulink Simulation

P=1/fs; %Second - switching period

%Buck Evaluation Parameters

Vout=5; %Volt - desired output voltage

fs=100e3; %1/Second - define switching frequency vripple=0.05; %max acceptable voltage ripple iripple=0.05; %max acceptable current ripple

d=Vout/Vin; %unitless ratio - duty ratio calculation

**Figure 23.** Buck Converter Simulink Simulation

Continuous pow ergui

[VD] [iD]

0.0003188 5e-007

C

iripple\*100

d

g m a k SS

1e+005

0.05 Ideal iload

Vin\*d/R Lccm

13.8

Vin

Period 1/fs Duty d

L

Vin

calculation

fs

Continuing with practical designs, consider an application for a portable electronic device that requires power such as a laptop or cellular phone. These devices require precisely controlled voltage levels for supply to sensitive electronics. Batteries, however, do not exhibit stable output voltage characteristics as illustrated in Fig. 25 for two typical battery types.

**Figure 25.** Typical Battery Output Voltage Discharge Characteristics

As the battery undergoes its normal discharge cycle, its supplied voltage varies significantly as Fig. 25 shows. A solution is required in order to provide a relatively constant input voltage to electronic devices fed from a source whose voltage varies. The buck-boost converter is very effective for this application as it can provide a well regulated load voltage, as discussed in Section 2.3.

Assume a designer wishes incorporate a converter for its voltage stability characteristics into a portable electronic device. Portable electronics require continuous current in order to retain information in volatile memory registers, therefore CCM mode is required. The designer will be concerned with minimizing the power losses of the converter in order to provide the maximum battery life possible. Simulink provides an effective option to determine optimal configuration of parameters to maximize efficiency. The synchronous converter as introduced earlier can be modeled in Simulink as shown in Fig. 26. The asynchronous converter is modeled by changing the active load switch to a diode, and changing the power & efficiency calculation block accordingly (see Fig. 15).

Parameters for simulation are defined in a workspace program according to data sheets for the IRFP450 MOSFET and SB245E Diode, as these are common devices. A median battery supply voltage of 5 volts is chosen as well as a 5 volt output from the converter as this is a common required voltage for electronic devices. Simulated buck-boost inductor behavior as described earlier is plotted in Fig. 27.

The synchronous and asynchronous buck-boost converters can be evaluated at various load currents in order to yield the overall efficiency of each in order to optimize power transfer. After some trial runs are executed to explore the range of load current that should be simulated, a minimum and maximum load current test range of 1mA to 1A are chosen. The converters are evaluated accordingly; efficiency data is recorded, and subsequently plotted in the Matlab workspace as shown in Fig. 28.

The curves shown in Fig. 28 can be used to select the appropriate buck-boost converter topology and design load current for various applications. If inductor size is not a consideration, the designer will elect to use a synchronous converter at a switching frequency of 10kHz as this configuration yields maximum efficiency for all loads examined (keep in mind that larger inductors allow lower switching frequencies). If perhaps size is a consideration and a minimum switching frequency of 50kHz must be used, the designer will choose a 50kHz asynchronous converter for loads ranging from 10mA to ~50mA, and a synchronous converter for loads above 50mA. Other considerations may regulate various switching frequencies, topologies, and load current such as harmonic considerations, available control circuitry for the load switch, etc. – Fig. 28 can be used for these various applications to choose the most efficient converter configuration.

**Figure 26.** Buck-Boost Converter Simulation Diagram

162 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

As the battery undergoes its normal discharge cycle, its supplied voltage varies significantly as Fig. 25 shows. A solution is required in order to provide a relatively constant input voltage to electronic devices fed from a source whose voltage varies. The buck-boost converter is very effective for this application as it can provide a well regulated load voltage,

Assume a designer wishes incorporate a converter for its voltage stability characteristics into a portable electronic device. Portable electronics require continuous current in order to retain information in volatile memory registers, therefore CCM mode is required. The designer will be concerned with minimizing the power losses of the converter in order to provide the maximum battery life possible. Simulink provides an effective option to determine optimal configuration of parameters to maximize efficiency. The synchronous converter as introduced earlier can be modeled in Simulink as shown in Fig. 26. The asynchronous converter is modeled by changing the active load switch to a diode, and

Parameters for simulation are defined in a workspace program according to data sheets for the IRFP450 MOSFET and SB245E Diode, as these are common devices. A median battery supply voltage of 5 volts is chosen as well as a 5 volt output from the converter as this is a common required voltage for electronic devices. Simulated buck-boost inductor behavior as

The synchronous and asynchronous buck-boost converters can be evaluated at various load currents in order to yield the overall efficiency of each in order to optimize power transfer. After some trial runs are executed to explore the range of load current that should be simulated, a minimum and maximum load current test range of 1mA to 1A are chosen. The converters are evaluated accordingly; efficiency data is recorded, and subsequently plotted

The curves shown in Fig. 28 can be used to select the appropriate buck-boost converter topology and design load current for various applications. If inductor size is not a consideration, the designer will elect to use a synchronous converter at a switching frequency of 10kHz as this configuration yields maximum efficiency for all loads examined

changing the power & efficiency calculation block accordingly (see Fig. 15).

**Figure 25.** Typical Battery Output Voltage Discharge Characteristics

as discussed in Section 2.3.

described earlier is plotted in Fig. 27.

in the Matlab workspace as shown in Fig. 28.

**Figure 27.** Buck-Boost Inductor Voltage and Current Waveforms

**Figure 28.** Buck-Boost Converter Synchronous and Asynchronous Efficiency
