**2. Linear load modeling in Simulink**

This paragraph deals with the modelling of linear elements commonly encountered in the electrical energy conversion. Elementary linear dipoles are described by a system of linear differential equations. There are several different ways to describe linear differential equations. The state-space representation (SSR) is the most easy to use with Matlab. The SSR is given by equations *(1*) and *(2*).

$$
\dot{\mathbf{X}} = \mathbf{A} \,\, \mathbf{X} + \mathbf{B} \,\, \mathbf{U} \tag{1}
$$

$$\mathbf{Y} = \mathbf{C} \,\mathbf{X} \tag{2}$$

where X is an n by 1 vector representing the state (commonly current through an inductance or voltage across the capacitance ), U is a scalar representing the input (voltage or current), and Y is a scalar representing the output. The matrices A (n by n), B (n by 1), and C (1 by n) determine the relationships between the state and input and output variables.

The commonly elementary dipoles encountered in power electronics are:


### **2.1. RL series dipole**

The variation of the current through the dipole is governed by equation (*3*).

$$\mathbf{v}(\mathbf{t}) = \mathbf{R} \,\mathbf{i}(\mathbf{t}) + \mathbf{L} \,\mathrm{d}\mathbf{i} \,\mathrm{d}\mathbf{t} \implies \mathbf{i}(\mathbf{t}) = \frac{1}{\mathbf{L}} \int (\mathbf{v}(\mathbf{t}) - \mathbf{R} \,\mathrm{i}(\mathbf{t})) \,\mathrm{d}\mathbf{t} \tag{3}$$

The RL series dipole is modelled by the scheme illustrated in figure 1.

## **2.2. RLC series dipole**

The variation of the current through the dipole is governed by equation (4) and the variation of the voltage across the capacity is governed by equation (5).

#### Simulation of Power Converters Using Matlab-Simulink 45

$$\mathbf{v}(t) = R\,\mathbf{i}(t) + v\_{\mathcal{C}}(t) + L\,\mathrm{d}\mathbf{i}\,/\mathrm{d}t \quad \Rightarrow \,\mathrm{i}(t) = \frac{1}{L} \int (v(t) - Ri(t) - v\_{\mathcal{C}}(t)) \, dt \tag{4}$$

$$\mathbf{i(t)} = \mathbf{C} \, d\mathbf{v}\_{\mathbf{C}} \Big/ dt \implies v\_{\mathbf{C}}(t) = \frac{1}{\mathbf{C}} \Big/ \mathbf{i} \, dt \tag{5}$$

**Figure 1.** Model of a RL series dipole

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

realized by switching functions.

SSR is given by equations *(1*) and *(2*).



**2.1. RL series dipole** 

**2.2. RLC series dipole** 

**2. Linear load modeling in Simulink** 


In this chapter, we propose a method for simulating static converters with Simulink based on the variable topology approach where switching conditions of semiconductor are

This paragraph deals with the modelling of linear elements commonly encountered in the electrical energy conversion. Elementary linear dipoles are described by a system of linear differential equations. There are several different ways to describe linear differential equations. The state-space representation (SSR) is the most easy to use with Matlab. The

where X is an n by 1 vector representing the state (commonly current through an inductance or voltage across the capacitance ), U is a scalar representing the input (voltage or current), and Y is a scalar representing the output. The matrices A (n by n), B (n by 1), and C (1 by n)

The variation of the current through the dipole is governed by equation (4) and the variation

<sup>1</sup> v(t) R i(t) L di dt i(t) v(t) R i(t) dt L (*3*)

determine the relationships between the state and input and output variables.

The commonly elementary dipoles encountered in power electronics are:

The variation of the current through the dipole is governed by equation (*3*).

The RL series dipole is modelled by the scheme illustrated in figure 1.

of the voltage across the capacity is governed by equation (5).

X AX BU (1)

Y CX (2)

can be laborious as well as obtain switching conditions of the semiconductor.

The RLC series dipole is modelled by the scheme illustrated in figure 2.

a) RLC series dipole b) i-v model

#### **Figure 2.** Model of a RLC series dipole

### **2.3. RC parallel dipole**

The variation of the voltage across the dipole is governed by equation (6).

$$\dot{\mathbf{u}}(t) = \mathbf{C} \,\mathrm{d}\mathbf{v} \Big/ \mathrm{d}t + v(t) / R \quad \Rightarrow \quad v(t) = \frac{1}{\mathbf{C}} \int \left( \dot{\mathbf{i}}(t) - v(t) \Big/ \mathbf{R} \right) dt \tag{6}$$

The RC parallel dipole is modelled by the scheme illustrated in figure 3.

#### **2.4. L in series with RC parallel dipole**

In a L in series with RC parallel dipole, the variation of the current through the inductance is governed by equation (*7*) and the variation of the voltage across the capacity is governed by equation (8).

$$v v\_i(t) = v\_o(t) + L \frac{d\dot{i}\_L}{dt} \implies \dot{i}\_L(t) = \frac{1}{L} \left[ (v\_i(t) - v\_o(t)) \right] dt \tag{7}$$

$$\dot{i}\_L(t) = \dot{i}\_R(t) + \mathbb{C}\frac{dv\_o}{dt} \implies v\_o(t) = \frac{1}{\mathbb{C}} \left[ \left( \dot{i}\_L(t) - \dot{i}\_R(t) \right) \right] dt \tag{8}$$

$$\dot{u}\_R(t) = |v\_o(t)\rangle\text{R} \tag{9}$$

The L in series with RC parallel dipole is modelled by the scheme illustrated in figure 4.

**Figure 3.** Model of a RC parallel dipole

a) L series with RC parallel dipole b) v-i model

**Figure 4.** Model of a L in series with RC parallel dipole

#### **3. DC-DC converter model in Simulink**

This part will be dedicated to the DC-DC converter modelling with Simulink. The input generator is a DC voltage source and the output generator is also a DC voltage source. The output voltage is always smoothed by a capacitor. Only the non-isolated DC-DC converters are studied in this paragraph. The switches are assumed ideal, as well as passive elements (L, C)

### **3.1. Buck converter**

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

 <sup>1</sup> () () () () () *<sup>L</sup> i o L io di v t v t L i t v t v t dt dt L*

 <sup>1</sup> () () () () () *<sup>o</sup> L R o LR dv i t i t C v t i t i t dt dt C*

() () *R o*

1 in

v 1 <sup>L</sup>

vi vo

in

i

iR

This part will be dedicated to the DC-DC converter modelling with Simulink. The input generator is a DC voltage source and the output generator is also a DC voltage source. The output voltage is always smoothed by a capacitor. Only the non-isolated DC-DC converters are studied in this paragraph. The switches are assumed ideal, as well as passive elements

The L in series with RC parallel dipole is modelled by the scheme illustrated in figure 4.

a) RC parallel dipole b) i-v model

a) L series with RC parallel dipole b) v-i model

**Figure 3.** Model of a RC parallel dipole

<sup>R</sup> vL vi <sup>C</sup> vo

L

iL

v R C

i

iR iC

**Figure 4.** Model of a L in series with RC parallel dipole

iR iC

**3. DC-DC converter model in Simulink** 

(L, C)

(*7*)

(8)

*i t vt R* (9)



> i L

> > i R

1 <sup>s</sup> -K-1/L

iC

v

1 s

i

<sup>C</sup> vo

s -K-1/C -K-

1/R

1

out 1

1 out

#### *3.1.1. Operating phases*

The buck converter circuit is illustrated in figure 5a. The most common strategy for controlling the power transmitted to the load is the intersective Pulse Width Modulation (PWM). A control voltage vm is compared to a triangular voltage vt. The triangular voltage vt determines the switching frequency ft. The switch T is controlled according to the difference vm – vt (figure 5b). Three operating phases are counted (figure 5c):


#### **Figure 5.** Buck converter

The variation of the current through the capacitor C is governed by equation (*10*). The variation of the voltage across the capacity is governed by equation (*11*). Equation (*12*) describes the variation of the voltage across the inductance which depends on the operating phase. F is a logical variable equal to one if vm is greater than or equal to vt, F equal to zero if vm is less than vt. Sign(iL) is also a logical variable which is equal to one if iL is positive, sign (iL) equal to zero if iL is zero.

$$\dot{i}\_C(t) = \dot{i}\_L(t) - \dot{i}\_o(t) = \mathbb{C}\frac{dv\_o}{dt} \tag{10}$$

$$v\_o(t) = \frac{1}{C} \int\_C i\_C(t) \, dt = \frac{1}{C} \int (i\_L(t) - i\_o(t)) \, dt \tag{11}$$

$$\upsilon\_L(t) = \left(\upsilon\_i(t) - \upsilon\_o(t)\right)^\* F - \upsilon\_o(t) \ast^\* \overline{F} \ast \text{sign}(i\_L) \tag{12}$$

#### *3.1.2. Open-loop buck converter*

Simulink model of the open-loop buck converter is shown in figure 6a. The Buck block is illustrated in figure 6c. Equation (*12*) is modelled by blocks addition, multiplication and logic. The structure of the converter requires a current iL necessarily positive or zero. Also, the inductance current is modelled by an integrator block that limits the minimum value of iL to zero.

The PWM control block is illustrated in figure 6b.

In the case of a resistive load, the load block is constituted by a gain block (value 1/R).

c) Buck block

**Figure 6.** Buck converter described in Simulink
