Sliding Mode Control
Example. Let us consider the following dynamic system:
˙x1 = x2
˙x2 = −a0x1 − a1x2 + u
Analyze the dynamic behavior of the controlled system when the following nonlinear control law is used:
u = −α x1sign(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”
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.
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)Controlinputu(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]
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 → c1˙x1 + ˙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.
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 s3
Vc
C
R
The POG scheme of the Boost Converter is the following:
Vg
Idc
Parallel inputs
BTm - Bm -
Inductive section
-
L−1m
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
,
and
Rm =
R1 0 0 . . . 0 0 R2 0 . . . 0 0 0 R3 . . . 0 ... ... ... ... ...
0 0 0 . . . Rm
, Sm =
s1
s2
s3
...
sm
, Im =
I1
I2
I3
...
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
| {z }
L
˙Im V˙0
| {z }
˙x
= −Rm −Sm Sm −R1
| {z }
A
Im V0
| {z } x
+ Bm 0
| {z } B
Vg
|{z}u
(1)
In a compact form it is:
L ˙x = A x + B u
The energy Es stored in the system and the dissipating power Pd can be easily expressed as follows:
Es = 1
2xT L x, Pd = xT A x
The POG scheme of the Boost Converter when m = 3 is the following:
Vg
Idc
Parallel inputs
1 1 1 -
1 1 1
-
Inductive section
-
L−1
m
1 s
?
?
?
Im=
I1
I2
I3
-
Rm 6
6
- -
Switching coupling
-
s1s2s3
-
s1
s2
s3
Capacitive section
-
1 C
1 s
6 6 6 V0
-
- -
1 R
?
? 0
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
˙I1
˙I2
˙I3
V˙0
=
−R1 0 0 −s1
0 −R2 0 −s2
0 0 −R3 −s3
s1 s2 s3 −R1
I1
I2
I3
V0
+
1 1 1 0
Vg
The POG scheme can also be “directly” introduced in Simulink:
T_dcm Bg’* uvec
Tensione1 Bg* uvec
Tensione
Im Tempo3 Idc
Tempo2
Vc Tempo1
t Tempo
[s1; s2; s3]
Subsystem1
[s1 s2 s3]
Subsystem
K*uvec Resistance 1/R Load
resistance 1
Integrator1 s
1 Integrator s
K*uvec Inductance
Sk Goto s1
Constant2
0 Constant1 Vg
Constant
Clock
1/C Capacitor
Case m = 1. When m = 1 the system has the following structure:
Vg
L1
I1 D1
s1 Vc
C
R
The corresponding state space equations simplify as follows:
( L1 ˙I1 = −R1I1 − s1V0 + Vg
C ˙V0 = s1I1 − R1 V0
(2) In matrix form the dynamics of the system can be described as follows:
L1 0 0 C
˙I1
V˙0
= −R1 −s1
s1 −R1
I1
Vo
+1
0
Vg (3)
When s1 = 0, the two dynamic elements are “decoupled”:
( L1 ˙I1 = −R1I1 + Vg C ˙V0 = −R1 V0
⇒
I1(t) = e−R1L1tI10 + RVg
1
1 − e−R1L1t
V0(t) = e−RCt V0
When s1 = 0 the equilibrium point is: (I1, V0) = (RVg
1, 0). The corresponding state space trajectories are:
0 2 4 6 8 10 12 14 16 18 20
0 20 40 60 80 100 120 140 160 180 200
Trajectories when s1= 0
Current I1(t) VoltageV0(t)
When s1 = 1, the two dynamic elements are “coupled”:
( L1 ˙I1 = −R1I1 − V0 + Vg C ˙V0 = I1 − R1 V0
When s1 = 1 the equilibrium point is (I1, V0) = (RVg
1+R, RVgR
1+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 20
0 20 40 60 80 100 120 140 160 180 200
Trajectories when s1 = 1
Current I1(t) VoltageV0(t)
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 −¯s1
¯
s1 −R1
I1
V0
+
"
1 0
#
Vg = 0 →
I1
V0
= −−R1 −¯s1
¯
s1 −R1
−1"
1 0
# Vg from which one obtains:
"
I1
V0
#
= − R
R1 + R ¯s21
−R1 s¯1
−¯s1 −R1
Vg 0
= 1
R1 + R ¯s21
"
Vg
¯
s1R Vg
#
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 12
0 20 40 60 80 100 120 140 160 180 200
Current I1
VoltageV0
State space trajectory
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
0 5 10 15
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
0 50 100 150 200
CurrentI1VoltageV0
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.1 3.33
3.34 3.35 3.36 3.37 3.38
Time [ms]
CurrentI1(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]
Controls1(zoom)
• PWM switching period: Tc = 20µs.
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, s¯2, s¯3] = [0.5, 0.45, 0.48]. The mutual inductance coefficients Mji between inductors Li and Lj have been defied as follows:
Mji = Mc
pLiLj
where 0 < Mc < 1. For the m-order case, the equilibrium point can be computed as follows:
I1
I2
I3
V0
= −
−R1 0 0 −s1
0 −R2 0 −s2
0 0 −R3 −s3
s1 s2 s3 −R1
−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 12
0 50 100 150 200 250
Currents Ii(t) TensionV0(t)
Trajectories in the state space
• 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.1
0 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.1
0 50 100 150 200 250
Inductance currents I1(t), I2(t) and I3(t).
Ii(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.1 7.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
I1(t)[A]
Inductance current I1(t) (zoom)
Duty cycles [¯s1, s¯2, s¯3]
¯si
Time [s]
• PWM switching period: Tc = 20µs.
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 20
0 20 40 60 80 100 120 140 160 180 200
Corrente I1(t) Tensione V0(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:
V˙0 = 0 → s1I1 − 1
R Vref = 0 → s1 = Vref R I1
= ¯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
obtains the following nonlinear differential equation:
˙I1 = −R1I1
L1
− Vref2 R L1I1
+ Vg L1
↔ ˙I1 = f (I1) (4) The equilibrium points I1∗a,1b of this equation are obtained when ˙I1 = 0:
R1R I12−VgR I1+Vref2 = 0 → I1∗a,1b =
VgR ∓ q
Vg2R2 − 4 R1RVref2 2 R1R
The equilibrium points I1∗a,1b are real only if:
Vg2R2 − 4 R1RVref2 > 0 → Vref <
r 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[A]1
I1 [A]
I1∗a I1∗b
From this figure it is evident that the equilibrium point I1∗a is unstable, while the equilibrium point I1∗b is stable. Equation (4) can be linearized computing the Jacobian of function f (I1):
J(I1) = ∂f(I1)
∂I1
= −R1
L1
+ Vref2 R L1I12
One can easily verify that J(I1∗a) > 0 and J(I1∗b) < 0, that is point I1∗a is unstable and point I1∗b is stable.