Professional Documents
Culture Documents
1 PDF
1 PDF
• Linearization
To be able to
• Stability definitions
◮ linearize, both around equilibria and trajectories,
• Simulation in Matlab/Simulink ◮ explain definitions of local and global stability,
◮ check local stability and local controllability at equilibria
◮ simulate in Simulink,
Material
◮ Glad& Ljung Ch. 11, 12.1,
( Khalil Ch 2.3, part of 4.1, and 4.3 )
(Slotine and Li, pp 40-57)
◮ Lecture slides
( x0 (t), u0 (t))
x̃(t)
( x0 (t) + x̃(t), u0 (t) + ũ(t))
Hint:
( x0 (t), u0 (t))
Plug-in x(t) = t−2 + x̃(t), expand the expressions,
and finally remove higher order terms (≥ 2) of x̃. x̃(t)
1
Example: Rocket
ḣ(t) = v(t)
v u(t)
m(t) v̇(t) = − + me (t)
ṁ(t) = −u(t)
h(t)
Part II: Stability definitions
h0 (t)
Let u0 (t) " u0 > 0; x0 (t) = v0 (t) ; m0 (t) = m0 − u0 t.
m0 (t)
0 1 0
0
−ve u0 ve
Linearization: ˙x̃(t) = 0 0 m0 (t)2
x̃(t) + m0 (t)
ũ(t)
0 0 0 −1
x(t)
Definition: (Euclidean norm) r
x1
pp xpp x = x2 R
x3
q xq = ( x12 + x22 + . . . + xn2 )1/2 x2
x3
x1
(Proof in Lecture 4)
2
Example Local Controllability
Theorem Assume
The linearization of ẋ = f ( x, u)
ẋ1 = − x12 + x1 + sin( x2 ) has the linearization
ẋ2 = cos( x2 ) − x13 − 5x2 d
( x(t) − x0 ) = A( x(t) − x0 ) + B (u(t) − u0 )
dt
1
at x0 =
−1 1
gives A =
0 −3 −5 around the equilibrium ( x0 , u0 ) then
Eigenvalues are given by the characteristic equation ◮ ( A, B ) controllable [ f ( x, u) nonlinear locally controllable
0 = det(λ I − A) = (λ + 1)(λ + 5) + 3
Here nonlinear locally controllable is defined as:
This gives λ = {−2, −4}, which are both in the left half-plane,
hence the nonlinear system is LAS around x0 . For every T > 0 and ε > 0 the set of states x(T ) that can be
reached from x(0) = x0 , by using controls satisfying
qu(t) − u0 q < ε , contains a small ball around x0 .
5 minute exercise:
Remark: This is a bit bit more detailed model of the ball and beam than we
saw in Lecture 1.
However... Example
An inverted pendulum with vertically moving pivot point
phi
1
Bosch 2008 (Automatic parking assistance) φ¨(t) =( + u(t)) sin(φ (t)),
l
◮ Multiple turns where u(t) is acceleration, can be written as
◮ parking lot > car length + 80 cm
ẋ1 = x2
1
More parking in lecture 12 ẋ2 = ( + u) sin( x1 )
l
3
Part IV: Simulation
Example (cont’d): Numerical iteration
Often the only method
x k+1 = f ( x k )
ẋ = f ( x)
to find fixed point ◮ ACSL
x∗ = f ( x∗ ) ◮ Simnon
◮ Simulink
F ( ẋ, x) = 0
When does the iteration converge? ◮ Omsim
http://www.control.lth.se/∼cace/omsim.html
f ( x) x x
x f ( x) x ? ◮ Dymola http://www.dynasim.se/
f ( x) ◮ Modelica
http://www.dynasim.se/Modelica/index.html
f ( x)
Special purpose
x0 x0 x0 x0 x0 ◮ Spice (electronics)
◮ EMTP (electromagnetic transients)
◮ Adams (mechanical systems)
1
s+1
Step Transfer Fcn Scope
t
Clock To Workspace1
1
y
s+1
Signal Transfer Fcn To Workspace
Generator
How To Get Better Accuracy Points were correct, only the plot was bad
1
Modify Refine, Absolute and Relative Tolerances, Integration
method 0.8
0.4
Refine = 1 Refine = 10
1 1
0.6 0.6
0
0.4 0.4
0.2 0.2
−0.2
0 0
−0.4 −0.4
−0.6
−0.6 −0.6
−0.8 −0.8
−0.8
−1 −1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
−1
0 1 2 3 4 5 6 7 8 9 10
4
Use Scripts to Document Simulations Submodels, Example: Water tanks
Equation for one water tank:
ḣ = (u − q)/ A
p √
If the block-diagram is saved to stepmodel.mdl, q = a 2 h
the following Script-file simstepmodel.m simulates the system:
Corresponding Simulink model:
open_system(’stepmodel’)
set_param(’stepmodel’,’RelTol’,’1e-3’)
1
set_param(’stepmodel’,’AbsTol’,’1e-6’) 1
1/A
s
f(u) 1
Sum q
set_param(’stepmodel’,’Refine’,’1’) In Gain Integrator Fcn
tic 2
h
sim(’stepmodel’,6)
toc
Make a subsystem and connect two water tanks in series.
subplot(2,1,1),plot(t,y),title(’y’)
subplot(2,1,2),plot(t,u),title(’u’) q
q In
1 In
h 1
h Out
In Subsystem2
Subsystem
command
1/A 1 a*sqrt(2*g*u[1]) 1
1 s upilot L x
In1 Output Point q
Input Point Integrator states
Gain Fcn
2
h t
Clock time
Today
Next Lecture
◮ Phase plane analysis
◮ Classification of equilibria