Control Systems Ii: Mutaz Ryalat
Control Systems Ii: Mutaz Ryalat
Mutaz Ryalat
Mechatronics Department(ME)
School of Applied Technical Sciences (SATS)
The German-Jordanian University (GJU)
MR
c • Lecture 2 1/38
ME547-8
CONTROL SYSTEMS II
MR
c • Lecture 2 2/38
3.5 Converting a Transfer Function to State Space
MR
c • Lecture 2 3/38
Transfer Function Representation
q where Y (s) and U (s) are the Laplace Transforms of y(t) and u(t),
respectively.
MR
c • Lecture 2 5/38
Transfer Function Representation
MR
c • Lecture 2 7/38
TFs to State-Space Models
MR
c • Lecture 2 8/38
TFs to State-Space Models
MR
c • Lecture 2 9/38
ẋ1 = x2
ẋ2 = x3 (2)
ẋ3 = −30x1 − 31x2 − 10x3 + 5u(t)
Or, in matrix form:
ẋ1 0 1 0 x1 0
ẋ2 = 0 0 1 x2 + 0 u(t)
ẋ3 −30 −31 −10 x3 5
x1
y = 1 0 0 x2
x3
MR
c • Lecture 2 10/38
TFs to State-Space Models
MR
c • Lecture 2 11/38
q Then, consider Y /W = N (s), which implies that
Y (s) = s2 W (s) + 7sW (s) + 2W (s)
(4)
y(t) = ẅ + 7ẇ + 2w
q The time-domain differential equations for the whole system:
...
w = −9ẅ − 26ẇ − 24w + u(t).
(5)
y(t) = ẅ + 7ẇ + 2w
q The differential equation is third order, and thus there are three
state variables: x1 = w, x2 = ẇ, and x3 = ẅ.
q The first derivatives are:
ẋ1 = x2
ẋ2 = x3
(6)
ẋ3 = −24x1 − 26x2 − 9x3 + u(t)
y = 2x1 + 7x2 + x3 .
MR
c • Lecture 2 12/38
ẋ1 = x2
ẋ2 = x3
(7)
ẋ3 = −24x1 − 26x2 − 9x3 + u(t)
y = 2x1 + 7x2 + x3 .
MR
c • Lecture 2 13/38
3.6 Converting from State Space to a Transfer Function
MR
c • Lecture 2 14/38
State space equations:
Consider a system:
ẋ = Ax + Bu (8)
y = Cx + Du, (9)
Laplace transform assuming zero initial conditions:
sX(s) = AX(s) + BU (s)
(10)
Y (s) = CX(s) + DU (s)
which implies:
(sI − A)X(s) = BU (s) .
Premultiply both sides with (sI − A)−1 to obtain:
X(s) = (sI − A)−1 BU (s) + (sI − A)−1 x(0) .
From (9), the Laplace transform of the output is:
Y (s) = C(sI − A)−1 BU (s) +DU (s) .
| {z }
CX(s)
MR
c • Lecture 2 15/38
For SISO system, the TF is by definition:
Y (s)
G(s) = = C(sI − A)−1 B + D .
U (s)
MR
c • Lecture 2 16/38
Find the transfer function for the following system
ẋ1 2 3 −8 x1 1
ẋ2 = 0 5 3 x2 + 4 u(t)
ẋ3 −3 −5 −4 x3 6
x1
y= 1 3 6 x2
x3
MR
c • Lecture 2 17/38
Solution
2 3 −8 1
A= 0 5 3 , B = 4 , C = 1 3 6 , D = 0.
−3 −5 −4 6
Y (s)
G(s) = = C(sI − A)−1 B .
U (s)
s 0 0 2 3 −8
(sI − A) = 0 s 0 − 0 5 3
0 0 s −3 −5 −4
s − 2 −3 8
= 0 s − 5 −3
3 5 s+4
2
s −s+5 3s + 25 8s + 49
−9 s2 + 2s − 32 3s − 6
adj(sI − A) −3s + 15 −5s + 1 s2 − 7s + 10
(sI−A)−1 = =
det(sI − A) s3 − 3s2 − 27s + 157
MR
c • Lecture 2 18/38
Solution
MR
c • Lecture 2 19/38
3.7 Linearization
MR
c • Lecture 2 20/38
Linearization
ẋ = f (x, u) (11)
y = h(x, u), (12)
MR
c • Lecture 2 21/38
Equilibria and Linearization
MR
c • Lecture 2 22/38
Equilibria and Linearization
∂f (x, u) ∂f (x, u)
f (x, u) ≈ f (x0 , u0 )+ (x−x0 )+ (u−u0 )
∂x x0 ,u0 ∂u x0 ,u0
MR
c • Lecture 2 23/38
q Introduce new variables δx = x − x0 and δu = u − u0 .
q Expand the nonlinear equation into McLaurin series around the
equilibrium and keep only the first order terms:
ẋ0 + δ ẋ ≈ f (x0 , u0 ) + Aδx + Bδu,
where A and B are Jacobians of f with respect to x and u,
evaluated at (x0 , u0 ), that is:
∂f ∂f
A= (x0 , u0 ); B = (x0 , u0 )
∂x ∂u
I.e. the elements of A and B are given by:
∂fi
A = [aij ], where [aij ] = ,
∂xj
∂fi
B = [bij ], where [bij ] = .
∂uj
q The system:
δ ẋ = Aδx + Bδu, (13)
is called the linearization of the nonlinear model ẋ = f (x, u) at
(x0 , u0 ).
MR
c • Lecture 2 24/38
Example: The simple pendulum system
q Derive the equilibrium points for the for the simple pendulum
system shown and determine the corresponding linear model.
q where θ is the angle (assumed to be measured), T the controlled
torque, l the pendulum length, M its mass.
MR
c • Lecture 2 25/38
Solution
q where ωo = gl , u = mlT
p
2.
q sin(x1 = θ) = 0 =⇒ θo = 0, π.
MR
c • Lecture 2 27/38
Solution: linearization
ẋ1 x2 f1 (x, u)
ẋ = = = = f 1 (x, u)
ẋ2 −ωo2 sin(x1 ) + u f2 (x, u)
MR
c • Lecture 2 29/38
Introduction
d2 y i2
M 2
= Mg − C 2
dt y (14)
di
e = Ri + L
dt
q State Space Representation:
q The first step in developing the control for the maglev system is
converting the system dynamics to a state space representation.
q The state variables are chosen as follows:
x1 = y(t), x2 = ẏ(t), x3 = i(t) . The system input u(t) will be e(t) .
MR
c • Lecture 2 32/38
System Dynamics
x2 = 0 =⇒ x2,e = 0
x 2 r
3 gM 2 2 gM Mg
= =⇒ x3 = d =⇒ x3,e = d (18)
d C C C
r
Mg
u = Rx3 =⇒ ue = Rd ,
C
yields the following equilibrium point:
r r
Mg Mg
x1,e = d, x2,e = 0, x3,e = d , ue = dR . (19)
C C
Note: we are interested in the equilibrium point (e = u) corresponding to
levitation of the steel ball. The equilibrium point corresponding to x3 = 0
is not of interest since this implies the electromagnet is turned off.
MR
c • Lecture 2 35/38
Linearizing the System Dynamics
δ ẋ = Ãδx + B̃δu.
MR
c • Lecture 2 36/38
Linearizing the System Dynamics
MR
c • Lecture 2 37/38
Linearizing the System Dynamics
h q i
q Substituting the equilibrium point (19) xe = d, 0, d MCg and
q
ue = dR MCg into (21), yields
0 1 0
0 1 0
q
2
A= C x3 C x3 = 2g 0 −2 Cg
2 M x31
0 −2 M x21 d M
0 0 −R 0 0 −RL
L (xe ,ue )
0
B = 1
1
L