Linearization problem The simplest example

Linear Systems
Lecture 3–1
'
$
Linearization problem
Consider a non-linear time-invariant system of the form
ẋ(t) = f x(t), u(t) ,
y(t) = g x(t), u(t)
(1)
such that x ∈ Rn , u ∈ Rm , y ∈ Rp , and
Slide 1
A:
∂f(x,u) ∂f(x,u) ∂g(x,u)
,
∂x ,
∂u ,
∂x
and
∂g(x,u)
∂u
exist and are continuous.
The question is:
✗ How to approximate system (1) by a linear model?
&
%
'
$
The simplest example
Consider the static time-invariant system
y(t) = ku(t) + η.
Slide 2
(2)
This system is nonlinear, but intuitively it seems to be “almost linear.”
Indeed, this system can easily be made linear. To this end notice that
for any constant u(t) = ue the output y(t) is also constant and given by
.
ye = kue + η. Let’s call the pair (ye , ue ) the equilibrium point.
Define now new signals:
.
yδ (t) = y(t) − ye
and
.
uδ (t) = u(t) − ue ,
which are deviations of y and u from the equilibrium point. Then
yδ (t) = kuδ (t),
(2δ )
which is linear. Thus, nonlinear system (2) can be made linear by an
appropriate (cf. equilibrium) shift of its input and output signals.
&
%
Linearization
Linear Systems
Lecture 3–2
'
$
A little bit more complicated example
Consider now the system
ẋ(t) = −ax(t) + bu(t) + ηx ,
(3)
y(t) = x(t) + ηy .
Assume again that the input u(t) = ue is constant. Then
Slide 3
Zt
e−a(t−s) (bue + ηx )dt =
x(t) =
0
1
a (1
− e−at )(bue + ηx ).
As limt→∞ e−at = 0, system (3) approaches it equilibrium pointa (xe , ue ),
where
xe =
a This
1
a (bue
+ ηx ).
is called the steady-state.
&
%
'
$
A little bit more complicated example (contd)
Let’s write now system (3) in terms of the deviations
.
xδ (t) = x(t) − xe
and
.
uδ (t) = u(t) − ue .
We get:
ẋδ (t) = −axδ (t) + buδ (t),
Slide 4
yδ (t) = xδ (t),
(3δ )
.
where yδ (t) = y(t) − xe − ηy . Equation (3δ ) is thus a linear equivalent of
the nonlinear system (3).
&
%
Linearization
Linear Systems
Lecture 3–3
'
$
Equilibrium
The pair (xe , ue ) is called equilibrium if
f xe , ue = 0.
Let (xe , ue ) be an equilibrium of (1). Then x(t), y(t), and u(t) can be
presented as follows:
Slide 5
x(t) = xe + xδ (t),
y(t) = ye + yδ (t),
and
u(t) = ue + uδ (t),
.
where ye = g xe , ue .
Eqn. (1) can then be rewritten as follows:
ẋδ (t) = f xe + xδ (t), ue + uδ (t) ,
yδ (t) = g xe + xδ (t), ue + uδ (t) − ye
(1δ )
&
%
'
$
Tailor series expansion
One can expand f(·) and g(·) as followsa :
∂f ∂f f x, u = f(xe , ue ) + ∂x
x + ∂u
u + o xδ , u δ ,
xe ,ue δ
xe ,ue δ
∂g g x, u = g(xe , ue ) + ∂g
∂x x ,u xδ + ∂u x ,u uδ + o xδ , uδ ,
e
e
e
e
where o(η) is any function of a variable η such that limkηk→0
ko(η)k
kηk
= 0.
Slide 6
a Given an n-dimensional function φ(η) of an m-dimensional argument η, the partial
derivative of φ with respect to η (the Jacobian matrix ) is defined as the following n × m
matrix:
 ∂φ (η)

∂φ1 (η)
1
...
∂η1
∂ηm



..
..
∂φ(η) . 
=
.
∂η
.
.


∂φn (η)
∂φn (η)
...
∂η
∂η
1
m
&
%
Linearization
Linear Systems
Lecture 3–4
'
$
Linearization around (xe , ue )
If the deviations xδ and uδ are “small enough,” then Eqn. (1δ ) can be
approximated by the following linear model:
ẋδ (t) = Aδ xδ (t) + Bδ uδ (t),
(1linearized )
yδ (t) = Cδ xδ (t) + Dδ uδ (t),
where
Slide 7
.
Aδ =
.
Cδ =
.
Bδ =
.
Dδ =
∂f ∂x xe ,ue ,
∂g ∂x xe ,ue ,
∂f ∂u xe ,ue ,
∂g ∂u xe ,ue .
&
%
'
$
Inverted pendulum
em
θ
q
M
k
k -u
y
Slide 8
M : mass of the cart
m : mass of the pendulum
l : length of the pendulum
y : position of the cart
θ : angular rotation
u : force on the cart
µ : friction coefficient
g : acceleration of gravity
Nonlinear model:
(M + m)ÿ + ml θ̈ cos θ − ml(θ̇)2 sin θ + µẏ = u
lθ̈ − g sin θ + ÿ cos θ = 0
or, equivalently,
"
M+m
ml cos θ
cos θ
l
#"
ÿ
θ̈
#
=
"
ml(θ̇)2 sin θ − µẏ
g sin θ
#
+
"
1
#
u.
0
&
%
Linearization
Linear Systems
Lecture 3–5
'
$
Inverted pendulum: the state-space realization
The state vector:

x1

x
 2

 x3

x=
x4
Slide 9









y
 
θ
 
 
 ẏ 
 
=
θ̇
The state equation:

d
dt
x1

x
 2

 x3

x4








x3





x4


"
#−1 "
# " # !.
 M+m ml cos x

2 sin x − µx
mlx
1
2
3
2

4
+
u 
cos x2
l
g sin x2
0
=
|
{z
(4)
}
f(x,u)
"
. M+m ml cos x2
where Λ(x2 ) =
cos x2
l
#
is nonsingular (det Λ(x2 ) = l(M + m sin2 x2 )).
&
%
'
$
Inverted pendulum: equilibriums
Equilibrium points should correspond to ẋ ≡ 0. Then, from Eq. (4) one
can get that x3 ≡ 0, x4 ≡ 0, and
Λ(x2 )−1
Slide 10
"
#
u
g sin x2
= 0.
Therefore, the equilibrium points are:
  


(xe , ue ) = 

x1


 kπ  

 

, 0 ,
 0  


for every x1 ∈ R and k = 0, ±1, ±2, . . .
0
&
%
Linearization
Linear Systems
Lecture 3–6
'
$
Inverted pendulum: Jacobian matrices
Jacobian matricesa :
Slide 11
"
0 0 1 0
∂f1,2
∂x
=
∂f3,4
∂x
= Λ(x2 )
#
,
0 0 0 1
"
#
2
−1 0 mlx4 cos x2 + φ1 (x2 , x3 , x4 ) sin x2 −µ 2mlx4 sin x2
0
g cos x2 + φ2 (x2 , x3 , x4 ) sin x2
0
,
0
where φ1 and φ2 are some algebraic functions of x2 , x3 , and x4 ,
∂f
∂u
=

0

1

l(M+m sin2 x2 ) 
0


a Given
∂
∂η
&

l
− cos x2


.


two matrix functions M1 (η) and M2 (η), then
M1 (η)−1 M2 (η) = M1 (η)−1
∂M2 (η)
∂η
−
∂M1 (η)
M1 (η)−1 M2 (η) .
∂η
%
'
$
Inverted pendulum: linearization around (0, 0)
Slide 12
It’s readily verified that

0
0


0
0
∂f ∂x 0 = 
m
0 − g

M
0 m+M
Ml g

1
0
0

1


0

0
µ
−M
µ
Ml
and




∂f =

∂u 0


0
0
1
M
1
− Ml




,


which yield the “A” and “B” matrices of the linearized realization.
&
%
Linearization
Linear Systems
Lecture 3–7
'
$
Linearization of discrete-time systems
The linearization problem for discrete-time system
xk+1 = f xk , uk ,
yk = g xk , uk
where x ∈ Rn , u ∈ Rm , y ∈ Rp , has exactly the same solution as in the
continuous time, except that the equilibrium is obtained from
Slide 13
f xe , u e = xe .
&
%
Linearization