Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the...

13
Capitolo 0. INTRODUCTION 8.1 Sliding Mode Control Example. Let us consider the following dynamic system: ˙ x 1 = x 2 ˙ x 2 = a 0 x 1 a 1 x 2 + u Analyze the dynamic behavior of the controlled system when the following nonlinear control law is used: u = αx 1 sign(x 1 s) where s = c 1 x 1 + x 2 Use the following parameters: a 0 =1, a 1 =2, α =3, c 2 =1.5. Solution. The characteristic polynomial of the non-controlled system is: p(s)= s 2 + a 1 s + a 0 . The given control law has a “variable structure” because when the function x 1 s changes sign the system changes its dynamic behavior. The characteristic polynomial of the feedback system is: p(s)= s 2 + a 1 s + a 0 + α sign(x 1 s). Systems’s trajectories when sign(x 1 s) > 0 (stable focus): -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -1.5 -1 -0.5 0 0.5 1 1.5 s =0 x 1 =0 Trajectories when u = αx 1 Variable x 1 (t) Variable x 2 (t) The red dashed lines are the lines along with the function x 1 s changes sign. See files “Sliding Example.m” and “Sliding Example mdl.slxZanasi Roberto - System Theory. A.A. 2015/2016

Transcript of Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the...

Page 1: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 0. INTRODUCTION 8.1

Sliding Mode Control

Example. Let us consider the following dynamic system:{

x1 = x2x2 = −a0x1 − a1x2 + u

Analyze the dynamic behavior of the controlled system when the following

nonlinear control law is used:

u = −αx1 sign(x1s) where s = c1x1 + x2

Use the following parameters: a0 = 1, a1 = 2, α = 3, c2 = 1.5.

Solution. The characteristic polynomial of the non-controlled system is: p(s) =

s2 + a1s+ a0. The given control law has a “variable structure” because when

the function x1s changes sign the system changes its dynamic behavior. The

characteristic polynomial of the feedback system is:

p(s) = s2 + a1s + a0 + α sign(x1s).

Systems’s trajectories when sign(x1s) > 0 (stable focus):

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1.5

−1

−0.5

0

0.5

1

1.5

s=0

x1=0

Trajectories when u = −αx1

Variable x1(t)

Variablex2(t)

The red dashed lines are the lines along with the function x1s changes sign.

See files “Sliding Example.m” and “Sliding Example mdl.slx”

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 2: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.2

Systems’s trajectories when sign(x1s) < 0 with α > a0 (saddle):

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1.5

−1

−0.5

0

0.5

1

1.5

s=0

x1=0

Trajectories when u = αx1

Variable x1(t)

Variablex2(t)

Systems’s trajectories when the control law u = −αx1 sign(x1s) is used:

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1.5

−1

−0.5

0

0.5

1

1.5

s=0

x1=0

Trajectories when u = −αx1sign(x1s)

Variable x1(t)

Variablex2(t)

The controlled system is asymptotically stable.

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 3: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.3

When the trajectories reach the line s = 0, that is when x2 = −c1x1, the

control signal u(t) starts to switch at “infinite” frequency and the trajectories

“slides” along the straight line s = 0.

0 0.5 1 1.5 2 2.5 3 3.5 4−4

−3

−2

−1

0

1

0 0.5 1 1.5 2 2.5 3 3.5 4−4

−2

0

2

4

6

Variables(t)

Control

inputu(t)

Time [s]

Time [s]

Remembering that x2 = x1, the system dynamics in the “sliding” condition is:

s = 0, → x1 = −c1x1 → x1(t) = e−c1tx1(0)

The state variables tend to zero with a velocity (i.e. a settling time) which does

not depend on the system parameters, but it depends only on the coefficient

c1 of the sliding surface s = x2 − c1x1 = 0.

0 1 2 3 4−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

2.5

0 1 2 3 4−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

2.5

Variablex1(t)

Variablex2(t)

Time [s]

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 4: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.4

The control signal u(t) switches at infinite frequency and in each instant the

mean value of the control signal u(t) is equal to the “equivalent control ueq”

needed to keep the system trajectory on the sliding surface s = 0. The

equivalent control ueq can be determined imposing s = 0:

s = 0 → c1x1 + x2 = 0 → c1x2 − a0x1 − a1x2 + ueq = 0

from which one obtains:

ueq = −c1x2 + a0x1 + a1x2

The Sliding Mode control technique is characterized by the following features:

• It can be used only when the control signal u(t) can switch at high fre-

quency. It is suitable, for example, for controlling electric motors where

the control signal u(t) is usually a voltage.

• From a practical point of view the switching frequency is always “finite”,

and therefore the sliding surface s = 0 is always tracked with a small error.

• The “high frequency” switching of the control variable u(t) induces an

high frequency oscillation within the system called “chattering”. It the

chattering is not “properly filtered” it can cause vibrations or noise within

the system.

• The “external disturbances” which act on the system during the sliding

control and which does not saturate the control action are completely

and instantaneously “rejected”.

• On the sliding surface s = 0 the dynamics of the system depends only on

the parameters of the sliding surface.

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 5: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.5

Example: Interleaved Boost Converter

Let us consider the following physical system which describes an “Interleaved

Boost Converter with magnetic coupling” (m = 3):

Vg

L1

L2

L3

I1

I2

I3

D1

D2

D3

s1

s2

s3Vc

C

R

The POG scheme of the Boost Converter is the following:

Vg

Idc

Parallel inputs

� �BTm

- Bm-

Inductive section

- �

L−1

m

1

s

?

?

?

Im� -

� �

Rm

6

6

- -

Switching

coupling

- STm

-

� �Sm

Capacitive section

� -

1

C

1

s

6

6

6

V0

- �

- -

1

R

?

?

� � 0

Matrices Bm Lm, Rm, Sm and Im are defined as follows:

Bm =

1

1

1...

1

, Lm =

L1 M12 M13 . . . M1m

M12 L2 M23 . . . M2m

M13 M23 L3 . . . M3m... ... ... . . . ...

M1m M2m M3m . . . Lm

,

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 6: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.6

and

Rm =

R1 0 0 . . . 0

0 R2 0 . . . 0

0 0 R3 . . . 0... ... ... . . . ...

0 0 0 . . . Rm

, Sm =

s1s2s3...

sm

, Im =

I1I2I3...

Im

where si are the control signals:

si ∈ {0, 1}, i ∈ {1, 2, 3}

When si = 0 the switch is “closed” and when si = 1 the switch is “open”.

The corresponding state space equations can be written as follows:[Lm 0

0 C

]

︸ ︷︷ ︸

L

[ImV0

]

︸ ︷︷ ︸

x

=

[−Rm −Sm

Sm − 1

R

]

︸ ︷︷ ︸

A

[ImV0

]

︸ ︷︷ ︸x

+

[Bm

0

]

︸ ︷︷ ︸

B

[Vg

]

︸︷︷︸u

(1)

In a compact form it is:

L x = Ax +Bu

The energy Es stored in the system and the dissipating power Pd can be easily

expressed as follows:

Es =1

2xT Lx, Pd = xT Ax

The POG scheme of the Boost Converter when m = 3 is the following:

Vg

Idc

Parallel inputs

� �[1 1 1

]

-

111

-

Inductive section

- �

L−1

m

1

s

?

?

?

Im =

I1I2I3

� -

� �

Rm

6

6

- -

Switching

coupling

-[s1 s2 s3

]-

� �

s1s2s3

Capacitive section

� -

1

C

1

s

6

6

6

V0

- �

- -

1

R

?

?� � 0

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 7: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.7

From the POG scheme one obtains the following state space description:

L1 M12M13 0

M12 L2 M23 0

M13M23 L3 0

0 0 0 C

I1I2I3

V0

=

−R1 0 0 −s10 −R2 0 −s20 0 −R3 −s3s1 s2 s3 − 1

R

I1I2I3V0

+

1

1

1

0

[Vg

]

The POG scheme can also be “directly” introduced in Simulink:

T_dcmBg’* uvec

Tensione1

Bg* uvec

Tensione

Im

Tempo3

Idc

Tempo2

Vc

Tempo1

t

Tempo

[s1; s2; s3]

Subsystem1

[s1 s2 s3]

Subsystem

K*uvecResistance 1/R Load

resistance

1sIntegrator1

1sIntegrator

K*uvecInductance

Sk

Goto

s1

Constant2

0

Constant1

Vg

Constant

Clock

1/CCapacitor

Case m = 1. When m = 1 the system has the following structure:

Vg

L1I1D1

s1 Vc

C

R

The corresponding state space equations simplify as follows:{

L1I1 = −R1I1 − s1V0 + Vg

CV0 = s1I1 −1

RV0

(2)

In matrix form the dynamics of the system can be described as follows:[L1 0

0 C

] [I1

V0

]

=

[−R1 −s1s1 − 1

R

] [I1Vo

]

+

[1

0

]

Vg (3)

When s1 = 0, the two dynamic elements are “decoupled”:{

L1I1 = −R1I1 + Vg

CV0 = − 1

RV0

I1(t) = e−

R1L1

tI10 +

VgR1

[

1− e−

R1L1

t

]

V0(t) = e−t

RC V0

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 8: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.8

When s1 = 0 the equilibrium point is: (I1, V0) = (VgR1, 0). The corresponding

state space trajectories are:

0 2 4 6 8 10 12 14 16 18 200

20

40

60

80

100

120

140

160

180

200Trajectories when s1 = 0

Current I1(t)

Voltage

V0(t)

When s1 = 1, the two dynamic elements are “coupled”:{

L1I1 = −R1I1 − V0 + Vg

CV0 = I1 −1

RV0

When s1 = 1 the equilibrium point is (I1, V0) = (Vg

R1+R,

VgR

R1+R) and the state

space trajectories (see “Boost Example.m” and “Boost Example mdl.slx”) are:

0 2 4 6 8 10 12 14 16 18 200

20

40

60

80

100

120

140

160

180

200Trajectories when s1 = 1

Current I1(t)

Voltage

V0(t)

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 9: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.9

1) Feedforward control

Let us consider a constant duty cycle: s1 ∈ [0, 1]. The corresponding equili-

brium point can be determined from (3) imposing I0 and V0 = 0:[−R1 −s1s1 − 1

R

] [I1V0

]

+

[

1

0

]

Vg = 0 →

[I1V0

]

= −

[−R1 −s1s1 − 1

R

]−1[

1

0

]

Vg

from which one obtains:[

I1

V0

]

= −R

R1 +R s21

[− 1

Rs1

−s1 −R1

] [Vg

0

]

=1

R1 +R s21

[

Vg

s1RVg

]

If Vg = 100 V, s1 = 0.5, R1 = 5 Ohm and R = 100 Ohm, (see files

“Boost DC R100.m” and “Boost DC R100 mdl.slx”) the equilibrium point is:[

I1

V0

]

=

[

3.33 A

166.66 V

]

• State space trajectory starting from the origin, current I1 and voltage V0:

0 2 4 6 8 10 120

20

40

60

80

100

120

140

160

180

200

Current I1

Voltage

V0

State space trajectory

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

5

10

15

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

50

100

150

200

Current

I 1Voltage

V0

Time [s]

• Current I1 (zoom) and control variable s1 (zoom):

75 75.01 75.02 75.03 75.04 75.05 75.06 75.07 75.08 75.09 75.13.33

3.34

3.35

3.36

3.37

3.38

Time [ms]

Current

I 1(zoom)

75 75.01 75.02 75.03 75.04 75.05 75.06 75.07 75.08 75.09 75.1−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time [ms]

Control

s 1(zoom)

• PWM switching period: Tc = 20µs.

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 10: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.10

Case m = 3. For the simulation of an Interleaved Boost Converter of order

m with all independent parameters please refer to files “Boost DC M.m” and

“Boost DC M mdl.slx”. The following parameters have been used: number

of inductors m = 3; input voltage Vg = 100 V; main capacitor C = 200 µF;

load resistance R = 20 Ohm; self inductance coefficients [L1, L2, L3] =

[20, 18, 22] mH; resistances of the inductors [R1, R2, R3] = [1, 3, 2]

Ohm; duty cycles [s1, s2, s3] = [0.5, 0.45, 0.48]. The mutual inductance

coefficients Mji between inductors Li and Lj have been defied as follows:

Mji = Mc

LiLj

where 0 < Mc < 1. For the m-order case, the equilibrium point can be

computed as follows:

I1I2I3V0

= −

−R1 0 0 −s10 −R2 0 −s20 0 −R3 −s3s1 s2 s3 − 1

R

−1

1

1

1

0

[Vg

]=

7.81 A

5.67 A

5.75 A

184.38 V

• State space trajectories for the considered 3-th order case.

0 2 4 6 8 10 120

50

100

150

200

250

Currents Ii(t)

Tension

V0(t)

Trajectories in the state space

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 11: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.11

• Inductance currents I1(t), I2(t), I3(t) and load voltage V0.

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

2

4

6

8

10

12

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

50

100

150

200

250

Inductance currents I1(t), I2(t) and I3(t).

I i(t)[A]

V0(t)[V]

Load voltage V0(t)

Time [s]

• Inductance currents I1(t), I2(t), I3(t) and load voltage V0 (zoom).

75 75.01 75.02 75.03 75.04 75.05 75.06 75.07 75.08 75.09 75.17.78

7.79

7.8

7.81

7.82

75 75.01 75.02 75.03 75.04 75.05 75.06 75.07 75.08 75.09 75.1−0.2

0

0.2

0.4

0.6

0.8

1

I 1(t)[A]

Inductance current I1(t) (zoom)

Duty cycles [s1, s2, s3]

si

Time [s]

• PWM switching period: Tc = 20µs.

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 12: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.12

2) Feedback control

Let Vref denote the desired output voltage, let λ(V0) = 0 be the sliding surface

and let us consider the following control law s1(V0):

λ(V0) = Vref−V0 ⇒ s1(V0) =1 + sign(λ(V0))

2=

{1 if λ(V0) ≥ 0

0 if λ(V0) < 0

The obtained trajectories in the state space (I1, V0) (see files “Boost DC Sliding.m”

and “Boost DC Sliding mdl.mdl”) are the following:

0 2 4 6 8 10 12 14 16 18 200

20

40

60

80

100

120

140

160

180

200

Corrente I1(t)

Ten

sion

e V 0(t

)

Traiettorie nello spazio degli stati

The dynamics of the system on the sliding surface λ(V0) = Vref − V0 = 0 can

be obtained imposing λ(V0) = 0:

V0 = 0 → s1I1 −1

RVref = 0 → s1 =

Vref

RI1= s1

where s1 is the equivalent control. The control variable s1 ∈ {0, 1} theoreti-

cally switches at infinite frequency with duty-cycle equal to s1 ∈ [0, 1]. The

duty-cycle cannot exceed the maximum value:

s1 < 1 → I1 >Vref

R

When parameters R and I1 change, the duty-cycle s1 changes such to gua-

rantee that V0 = Vref . Substituting s1 in the first equation of system (2) one

Zanasi Roberto - System Theory. A.A. 2015/2016

Page 13: Sliding Mode Control - UNIMORE · The Sliding Mode control technique is characterized by the following features: • It can be used only when the control signal u(t) can switch at

Capitolo 8. STABILITY ANALYSIS 8.13

obtains the following nonlinear differential equation:

I1 = −R1I1

L1

−V 2ref

RL1 I1+

Vg

L1

↔ I1 = f (I1) (4)

The equilibrium points I∗1a,1b of this equation are obtained when I1 = 0:

R1RI21−VgRI1+V 2

ref = 0 → I∗1a,1b =VgR∓

V 2g R

2 − 4R1RV 2ref

2R1R

The equilibrium points I∗1a,1b are real only if:

V 2

g R2 − 4R1RV 2

ref > 0 → Vref <

R

4R1

Vg

Qualitative behavior of variable I1 as a function of current I1, see eq. (4).

0 5 10 15 20 25 30−5000

−4000

−3000

−2000

−1000

0

1000

2000

3000

4000

5000

Function I1 = I1(I1)

I 1[A]

I1 [A]

I∗1aI∗1b

From this figure it is evident that the equilibrium point I∗1a is unstable, while

the equilibrium point I∗1b is stable. Equation (4) can be linearized computing

the Jacobian of function f (I1):

J(I1) =∂f (I1)

∂I1= −

R1

L1

+V 2ref

RL1 I21

One can easily verify that J(I∗1a) > 0 and J(I∗1b) < 0, that is point I∗1a is

unstable and point I∗1b is stable.

Zanasi Roberto - System Theory. A.A. 2015/2016