lec01
TRANSCRIPT
2E1262 2006
2E1262 Nonlinear ControlAutomatic Control
• Disposition
5 credits, lp 2
28h lectures, 28h exercises, 3 home-works
• Instructors
Bo Wahlberg, professor,[email protected]
Krister Jacobsson, teaching assistant,[email protected]
STEX (entrance floor in S3 building), administration,[email protected]
Lecture 1 1
2E1262 2006
Course Goal
To provide participants with a solid theoretical foundation of nonlinearcontrol systems combined with a good engineering understanding
You should after the course be able to
• understand common nonlinear control phenomena
• apply the most powerful nonlinear analysis methods
• use some practical nonlinear design methods
Lecture 1 2
2E1262 2006
2E1262 Nonlinear Control
Lecture 1
• Practical information
• Course outline
• Nonlinear control phenomena
• Nonlinear differential equations
Lecture 1 3
2E1262 2006
Today’s Goal
You should be able to
• Recognize some phenomena in nonlinear systems
• Transform differential equation to first-order form
• Mathematically describe saturation, dead-zone, relay, back-lash
• Derive equilibrium points
Lecture 1 4
2E1262 2006
Course Information
• All info and handouts are available at
http://www.s3.kth.se/control/kurser/2E1262
• Get an E computer account for the computer exercise (see STEX)
• Homeworks are mandatory and have to be handed in on time
Lecture 1 5
2E1262 2006
Material
• Textbook: Khalil, Nonlinear Systems, Prentice Hall, 3rd ed.,2002. Optional but highly recommended.
• Lecture notes: Copies of transparencies
• Exercises: Class room and home exercises
• Homeworks: 3 computer exercises to hand in
• Software: Matlab (provided by KTH Library)
Alternative textbooks (decreasing mathematical brilliance):Sastry, Nonlinear Systems: Analysis, Stability and Control; Vidyasagar,Nonlinear Systems Analysis; Slotine & Li, Applied Nonlinear Control; Glad &Ljung, Reglerteori, flervariabla och olinjara metoder.Only references to Khalil will be given.
Two course compendia sold by STEX.
Lecture 1 6
2E1262 2006
Course Outline
• Introduction: nonlinear models, computer simulation (L1-L2)
• Feedback analysis: linearization, stability theory, describingfunction (L3-L6)
• Control design: compensation, high-gain design, Lyapunovmethods (L7-L10)
• Alternatives: gain scheduling, optimal control, neural networks,fuzzy control (L11-L13)
• Summary (L14)
Lecture 1 7
2E1262 2006
Linear Systems
Definition: Let M be a signal space. The system S : M → M islinear if for all u, v ∈ M and α ∈ R
S(αu) = αS(u) scaling
S(u + v) = S(u) + S(v) superposition
Example: Linear time-invariant systems
x(t) = Ax(t) + Bu(t), y(t) = Cx(t), x(0) = 0
y(t) = g(t) � u(t) =
∫ t
0
g(τ)u(t − τ)dτ
Y (s) = G(s)U(s)
Notice the importance to have zero initial conditions
Lecture 1 8
2E1262 2006
Linear Systems Have Nice Properties
Local stability=global stability Stability if all eigenvalues of A (orpoles of G(s)) are in the left half-plane
Superposition Enough to know a step (or impulse) response
Frequency analysis possible Sinusoidal inputs give sinusoidaloutputs: Y (iω) = G(iω)U(iω)
Lecture 1 9
2E1262 2006
Linear Models are not Enough
Example:Positioning of a ball on a beam
φ x
Nonlinear model: mx(t) = mg sin φ(t), Linear model: x(t) = gφ(t)
Lecture 1 10
2E1262 2006
Can the ball move 0.1 meter in 0.1 seconds from steady state?
Linear model (step response with φ = φ0) gives
x(t) ≈ 10t2
2φ0 ≈ 0.05φ0
so that
φ0 ≈ 0.1
0.05= 2 rad = 114◦
Unrealistic answer. Clearly outside linear region!
Linear model valid only if sin φ ≈ φ
Must consider nonlinear model. Possibly also include othernonlinearities such as centripetal force, saturation, friction etc.
Lecture 1 11
2E1262 2006
2 minute exercise: Find a simple system x = f(x, u) that is stablefor a small input step but unstable for large input steps.
Lecture 1 12
2E1262 2006
Stability Can Depend on Reference SignalExample: Control system with valve characteristic f(u) = u2
Σ 1s
1(s+1)2
Motor Valve Process
−1
r y
Simulink block diagram:
1
(s+1)(s+1)y
s
1
−1
u2
Lecture 1 13
2E1262 2006
STEP RESPONSES
0 5 10 15 20 25 300
0.2
0.4
Time tO
utpu
t y
0 5 10 15 20 25 300
2
4
Time t
Out
put y
0 5 10 15 20 25 300
5
10
Time t
Out
put y
r = 0.2
r = 1.68
r = 1.72
Stability depends on amplitude of the reference signal!
(The linearized gain of the valve increases with increasing amplitude)
Lecture 1 14
2E1262 2006
Stable Periodic Solutions
Example: Position control of motor with back-lash
y
Sum
5
P−controller
1
5s +s2
Motor
0
Constant
Backlash
−1
Motor: G(s) = 1s(1+5s)
Controller: K = 5
Lecture 1 15
2E1262 2006
Back-lash induces an oscillation
Frequency and amplitude independent of initial conditions:
0 10 20 30 40 50−0.5
0
0.5
Time t
Out
put y
0 10 20 30 40 50−0.5
0
0.5
Time t
Out
put y
0 10 20 30 40 50−0.5
0
0.5
Time t
Out
put y
How predict and avoid oscillations?
Lecture 1 16
2E1262 2006
Automatic Tuning of PID ControllersRelay induces a desired oscillation whose frequency and amplitudeare used to choose PID parameters
Σ Process
PID
Relay
A
T
u y
− 1
0 5 10
−1
0
1
Time
uy
Lecture 1 17
2E1262 2006
Harmonic Distortion
Example: Sinusoidal response of saturation
a sin t y(t) =∑∞
k=1 Ak sin(kt)Saturation
100
10−2
100
Frequency (Hz)
Ampli
tude
y
0 1 2 3 4 5−2
−1
0
1
2
Time t
100
10−2
100
Frequency (Hz)
Ampli
tude
y
0 1 2 3 4 5−2
−1
0
1
2
Time t
a = 1
a = 2a = 2a = 2a = 2
Lecture 1 18
2E1262 2006
Example: Electrical power distribution
Nonlinearities such as rectifiers, switched electronics, andtransformers give rise to harmonic distortion
Total Harmonic Distortion =
∑∞k=2 Energy in tone k
Energy in tone 1
Example: Electrical amplifiers
Effective amplifiers work in nonlinear region
Introduces spectrum leakage, which is a problem in cellular systems
Trade-off between effectivity and linearity
Lecture 1 19
2E1262 2006
Subharmonics
Example: Duffing’s equation y + y + y − y3 = a sin(ωt)
0 5 10 15 20 25 30−0.5
0
0.5
0 5 10 15 20 25 30−1
−0.5
0
0.5
1
Time t
Time t
ya
sin
ωt
Lecture 1 20
2E1262 2006
Nonlinear Differential Equations
Definition: A solution to
x(t) = f(x(t)), x(0) = x0 (1)
over an interval [0, T ] is a C1 function x : [0, T ] → Rn such that (1)
is fulfilled.
• When does there exists a solution?
• When is the solution unique?
Example: x = Ax, x(0) = x0, gives x(t) = exp(At)x0
Lecture 1 21
2E1262 2006
Existence Problems
Example: The differential equation x = x2, x(0) = x0
has solution x(t) =x0
1 − x0t, 0 ≤ t <
1
x0
Solution not defined for tf =1
x0
Solution interval depends on initial condition!
Recall the trick: x = x2 ⇒ dx
x2= dt
Integrate ⇒ −1
x(t)− −1
x(0)= t ⇒ x(t) =
x0
1 − x0t
Lecture 1 22
2E1262 2006
Finite Escape Time
Simulation for various initial conditions x0
0 1 2 3 4 50
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Time t
x(t)
Finite escape time of dx/dt = x2
Lecture 1 23
2E1262 2006
Uniqueness Problems
Example: x =√
x, x(0) = 0, has many solutions:
x(t) =
{(t − C)2/4 t > C
0 t ≤ C
0 1 2 3 4 5−1
−0.5
0
0.5
1
1.5
2
Time t
x(t)
Lecture 1 24
2E1262 2006
Physical Interpretation
Consider the reverse example, i.e., the water tank lab process with
x = −√x, x(T ) = 0
where x is the water level. It is then impossible to know at what timet < T the level was x(t) = x0 > 0.
Hint: Reverse time s = T − t ⇒ ds = −dt and thus
dx
ds= −dx
dt
Lecture 1 25
2E1262 2006
Lipschitz Continuity
Definition: f : Rn → R
n is Lipschitz continuous if there existsL, r > 0 such that for allx, y ∈ Br(x0) = {z ∈ R
n : ‖z − x0‖ < r},
‖f(x) − f(y)‖ ≤ L‖x − y‖
Euclidean norm is given by
‖x‖2 = x21 + · · · + x2
n
Slope L
Lecture 1 26
2E1262 2006
Local Existence and UniquenessTheorem:If f is Lipschitz continuous, then there exists δ > 0 such that
x(t) = f(x(t)), x(0) = x0
has a unique solution in Br(x0) over [0, δ].
Proof: See Khalil, Appendix C.1. Based on the contraction mappingtheorem
Remarks
• δ = δ(r, L)
• f being C0 is not sufficient (cf., tank example)
• f being C1 implies Lipschitz continuity(L = maxx∈Br(x0) f ′(x))
Lecture 1 27
2E1262 2006
State-Space Models
State x, input u, output y
General: f(x, u, y, x, u, y, . . .) = 0
Explicit: x = f(x, u), y = h(x)
Affine in u: x = f(x) + g(x)u, y = h(x)
Linear: x = Ax + Bu, y = Cx
Lecture 1 28
2E1262 2006
Transformation to Autonomous System
A nonautonomous system
x = f(x, t)
is always possible to transform to an autonomous system byintroducing xn+1 = t:
x = f(x, xn+1)
xn+1 = 1
Lecture 1 29
2E1262 2006
Transformation to First-Order System
Given a differential equation in y with highest derivative dnydtn
,
express the equation in x =(y dy
dt. . . dn−1y
dtn−1
)T
Example: Pendulum
MR2θ + kθ + MgR sin θ = 0
x =(θ θ
)Tgives
x1 = x2
x2 = − k
MR2x2 − g
Rsin x1
Lecture 1 30
2E1262 2006
Equilibria
Definition: A point (x∗, u∗, y∗) is an equilibrium, if a solution startingin (x∗, u∗, y∗) stays there forever.
Corresponds to putting all derivatives to zero:
General: f(x∗, u∗, y∗, 0, 0, . . .) = 0
Explicit: 0 = f(x∗, u∗), y∗ = h(x∗)Affine in u: 0 = f(x∗) + g(x∗)u∗, y∗ = h(x∗)Linear: 0 = Ax∗ + Bu∗, y∗ = Cx∗
Often the equilibrium is defined only through the state x∗
Lecture 1 31
2E1262 2006
Multiple Equilibria
Example: Pendulum
MR2θ + kθ + MgR sin θ = 0
θ = θ = 0 gives sin θ = 0 and thus θ∗ = kπ
Alternatively in first-order form:
x1 = x2
x2 = − k
MR2x2 − g
Rsin x1
x1 = x2 = 0 gives x∗2 = 0 and sin(x∗
1) = 0
Lecture 1 32
2E1262 2006
Some Static and Dynamic Nonlinearities
Sign
Saturation
Relay
eu
MathFunction
Look−UpTable
Dead Zone
Coulomb &Viscous Friction
Backlash
|u|
Abs
Lecture 1 33
2E1262 2006
2 minute exercise: Construct a rate limiter (i.e., a system that limitthe rate of change of a signal) using one of the previous models
?−1s
Hint: Try a saturation!
Lecture 1 34
2E1262 2006
Next Lecture
• Simulation in Matlab
• Linearization
Lecture 1 35