control systems - lehigh universityinconsy/lab/css/me389/lectures/lecture01_modeling.pdf2 classical...
TRANSCRIPT
1
Classical Control – Prof. Eugenio Schuster – Lehigh University 1
Control Systems
Lecture 01 Modeling
Classical Control – Prof. Eugenio Schuster – Lehigh University 2
What is Control for?
Feedback control can help: • reference following (tracking) • equilibrium regulation • disturbance rejection • stability • performance
First step in this design process: DYNAMIC MODEL
CHANGING DYNAMIC BEHAVIOR
2
Classical Control – Prof. Eugenio Schuster – Lehigh University 3
Modeling Approaches
• First Principles Modeling
o Uses fundamental physics law
• System Identification
o Uses forced input-output
Classical Control – Prof. Eugenio Schuster – Lehigh University 4
First-Principles Dynamic Models
MECHANICAL SYSTEMS:
xvaxv
xbuxm
==
=
−=velocity
acceleration
maF = Newton�s law
mbsm
UV
mu
vmb
vo
o
+=!!!!! →!=+
1Transform Laplace
Transfer Function
sdtd→
Real world is more complex than static maps → We need Dynamic Models
3
Classical Control – Prof. Eugenio Schuster – Lehigh University 5
First-Principles Dynamic Models MECHANICAL SYSTEMS: αIF = Newton�s law
2
2 sin
mlI
Tlmgml c
=
==
=
+−=
θωα
θω
θθ
angular velocity
angular acceleration
moment of inertia
2sin2sinmlT
lg
mlT
lg cc =+!! →!=+
≈θθθθ θθ
Linearization
Classical Control – Prof. Eugenio Schuster – Lehigh University 6
First-Principles Dynamic Models
2mlT
lg c=+ θθ
θ
θ=
=
2
1
x
x
212
21
mlTx
lgx
xx
c+−=
=
Reduce to first order equations:
uxlgx
mlTu
xx
x c!"
#$%
&+
!!"
#
$$%
&
−=⇒≡!"
#$%
&≡
10
010
, 22
1 State Variable Representation
General case:
JuHxyGuFxx+=
+=
4
Classical Control – Prof. Eugenio Schuster – Lehigh University 7
First-Principles Dynamic Models ELECTRICAL SYSTEMS:
Kirchoff�s Current Law (KCL): The algebraic sum of currents entering a node is zero at every instant
Kirchoff�s Voltage Law (KVL)
The algebraic sum of voltages around a loop is zero at every instant
iR
vR vC
iC
vL
iL + + +
)()()()( tGvtitRitv RRRR =⇔=
Resistors:
)0()(1)()()(0
C
t
CCC
C vdiC
tvdttdvCti +=⇔= ∫ ττ
∫ +=⇔=t
LLLL
L idvL
tidttdiLtv
0
)0()(1)()()( ττ
Capacitors:
Inductors:
Classical Control – Prof. Eugenio Schuster – Lehigh University 8
First-Principles Dynamic Models ELECTRICAL SYSTEMS:
+ -
RI RO
A(vp-vn)
+
-
ip
in
iO vO
vn
vp
+
+
+ 0==
=
np
np
iivv
∞→−= AvvAv npO ),(
OP AMP:
To work in the linear mode we need FEEDBACK!!!
5
Classical Control – Prof. Eugenio Schuster – Lehigh University 9
First-Principles Dynamic Models ELECTRICAL SYSTEMS:
Inverting integrator
K v1 vO
∫
( ) ( ) ∫−=⇒∞=tIOO dv
CRvtvR
01
2 )(10)( µµOC
RCK 1
−=
+ -
R1 C v1 vO
R2
IOO v
CRv
CRdtdv
12
11−=
KCL:
Classical Control – Prof. Eugenio Schuster – Lehigh University 10
First-Principles Dynamic Models ELECTRO-MECHANICAL SYSTEMS: DC Motor
me
at
KeiKTθ=
=
armature current
shaft velocity
torque
emf
0=+++−
+−=
edtdiLiRv
TbJ
aaaa
mmm θθ
Obtain the State Variable Representation
6
Classical Control – Prof. Eugenio Schuster – Lehigh University 11
First-Principles Dynamic Models HEAT-FLOW:
( )
qC
T
TTR
q
1
121
=
−=
Temperature Difference Heat Flow
Thermal resistance Thermal capacitance
( )IoI
I TTRRC
T −""#
$%%&
'+=
21
111
Classical Control – Prof. Eugenio Schuster – Lehigh University 12
First-Principles Dynamic Models FLUID-FLOW:
outin wwm −=
Mass rate
Outlet mass flow Inlet mass flow
( )outin wwA
hhAm −=⇒=ρ
ρ1
A: area of the tank ρ: density of fluid h: height of water
Mass Conservation law
7
Classical Control – Prof. Eugenio Schuster – Lehigh University 13
Identified Dynamic Models First-order Dynamic Systems – Step Response:
H (s) = 1s+σ
⇒ h(t) = e−σ t
στ
1= Time Constant
Impulse Response
00
<
>
σ
σ Stable
Unstable
Classical Control – Prof. Eugenio Schuster – Lehigh University 14
Identified Dynamic Models First-order Dynamic Systems – Step Response:
Y (s) = Ks+σ
1s⇒ y(t) = K
σ1− e−σ t( ) Step Response
0 0.5 1 1.5 20
0.05
0.1
0.15
0.2
0.25
Time [s]
Out
put
B = Kσ⇒ K =σB
0 0.5 1 1.5 2−20
−15
−10
−5
0
Time [s]
ln((f
latto
p−ou
tput
)/fla
ttop) σ = −m
m: slope
8
Classical Control – Prof. Eugenio Schuster – Lehigh University 15
)cos()( φω += tAtu )(sG ))(cos()( ωφωω jGtAjGyss ∠++=
Stable Transfer Function
• After a transient, the output settles to a sinusoid with an amplitude magnified by and phase shifted by . • Since all signals can be represented by sinusoids (Fourier series and transform), the quantities and are extremely important. • Bode developed methods for quickly finding and for a given and for using them in control design.
)( ωjG )( ωjG∠
)( ωjG )( ωjG∠
)( ωjG )( ωjG∠)(sG
Identified Dynamic Models General-order Dynamic Systems – Frequency Response:
Classical Control – Prof. Eugenio Schuster – Lehigh University 16
Identified Dynamic Models General-order Dynamic Systems – Frequency Response:
• Find and from the experiment
• Infer the transfer function
)( ωjG )( ωjG∠
)(sG
9
Classical Control – Prof. Eugenio Schuster – Lehigh University
Model Classification
17
Spatial Dependence
Lumped parameter system Ordinary Diff. Eq. (ODE)
Distributed parameter system Partial Diff. Eq. (PDE)
Linearity
Linear
Nonlinear
Temporal Representation
Continuous-time
Discrete-time
Domain Representation
Time
Frequency
)(tff = ),( xtff =
Model Representation Control Technique
Classical Control – Prof. Eugenio Schuster – Lehigh University
Spatial Dependence
18
Distributed Parameter Systems PDE
Lumped Parameter Systems ODE
nnee
ne SVn
rnDr
rrtn
+!"#
$%& −
∂∂
∂∂
−=∂∂ 1 ( )rtSn ,
00=
∂∂
=r
e
rn a
eare nn ==
aeare nn =
=
nee
e Sndtdn
+−=τ1 )(tSn
( ) 00 ee nn =
1 Reduction
2 Keep the PDE representation (problem specific)
Control: Interior Boundary
Linearity: Nonlinear/Linear
( )rtnn ee ,= ( )tnn ee =
Linear/Nonlinear Distributed Parameter Control
Linear/Nonlinear Lumped Parameter Control
10
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearity
19
Nonlinear (ODE) Systems Linear (ODE) Systems
( )( )uxthy
uxtfx,,,,
=
=
Nonlinear Control
utDxtCyutBxtAx)()()()(
+=
+=
( ) ( ) ( )( )uuyytgy mnn ,,,,,, 11 −−=
1 Linearization
2
DuCxyBuAxx
+=
+=LTI
LTV
( )( )uxhyuxfx,,
=
=Autonomous
Non-Autonomous
( ) ( ) ( ) ububyayay mm
nn
n0
110
11 ++=+++ −
−−
−
[ ]
yu
xxx Tn1= states
input
output
Linear Control
Output/State Feedback
Estimation: How to estimate states from input/output?
Keep the nonlinearities
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearity
20
Particular type of nonlinearities: Constraints
Anti-windup Techniques
1 A priori
2 A posteriori
DuCxyBuAxx
+=
+=LTI
Constraint is considered for control design
Constraint is NOT considered for control design
)(),(, ysatusatyu →
iii xxx <<
input/output constraints state constraints
11
Classical Control – Prof. Eugenio Schuster – Lehigh University
Temporal Representation
21
Continuous-time Systems Discrete-time Systems
System Identification
( ) ( ) ( ) ububyayay mm
nn
n0
110
11 ++=+++ −
−−
−
[ ] ( )[ ] ( ) [ ] ( )[ ]TmkubkTubTnkyaTkyakTy monk −++=−++−+ − ][11
)()()()()()(tDutCxtytButAxtx
+=
+=LTI
[ ] [ ] [ ][ ] [ ] [ ]kDukCxky
kBukAxkx+=
+=+1LTI
Sampled-Data Systems
Sampling Time
System Identification: How to create models from data? Fault Detection and Isolation: How to detect faults from data?
Classical Control – Prof. Eugenio Schuster – Lehigh University
Domain Representation
22
Continuous-time Systems Discrete-time Systems ( ) ( ) ( ) ububyayay m
mn
nn
01
101
1 ++=+++ −−
−− [ ] [ ] [ ] [ ]mkubkubnkyakyaky monk −++=−++−+ − ][11
( ) ( ) )()( 011
1011
1 sUbsbsbsYasasas mm
nn
n +++=++++ −−
−−
011
1
011
1
)()()(
asasasabsbsbsb
sUsYsT n
nn
n
mm
mm
++++++++
== −−
−−
)())(()())((
21
21
n
m
pspspszszszsK
−−−−−−
=
Laplace Transform Z Transform
KzpT
i
i
TF poles zeros gain
( ) ( ) )()(1 111 sUzbbsYzazaza m
mon
nn
n−−−
− ++=++++
nn
nn
mmo
zazazazbb
zUzYzT −−
−
−
++++++
== 1111)(
)()(
)())(()())((
21
21
n
m
pzpzpzzzzzzzK
−−−−−−
=
ωjs =
)()()( ωωω jTejTjT ∠=
Tjez ω=
)()()(TjeTTjTj eeTeT
ωωω ∠=Frequency Response
Modern Control
Classical Control
12
Classical Control – Prof. Eugenio Schuster – Lehigh University
Optimality
23
Continuous-time Systems Discrete-time Systems ( ) ( ) ( ) ububyayay m
mn
nn
01
101
1 ++=+++ −−
−− [ ] [ ] [ ] [ ]mkubkubnkyakyaky monk −++=−++−+ − ][11
Optimal Control
utDxtCyutBxtAx)()()()(
+=
+=
kkkkk
kkkkk
uDxCyuBxAx
+=
+=+1
( )∑−
=
++1
021
21min
N
kkk
Tkkk
TkNN
TNu
uRuxQxxSxk
( )∫ ++T
TTT
T
tudttutRtutxtQtxTxSTx
0)(
)()()()()()(21)()(
21min
Classical Control – Prof. Eugenio Schuster – Lehigh University
Model Uncertainties
24
How to deal with uncertainties in the model?
1
2 Adaptive Control
Design for a family of plants
Update model (controller) in real time
Robust Control
B Model-based control
A Non-model-based control
PID Extremum Seeking
Robust & Adaptive Control
13
Classical Control – Prof. Eugenio Schuster – Lehigh University
Model Classification
25
Spatial Dependence
Lumped parameter system Ordinary Diff. Eq. (ODE)
Distributed parameter system Partial Diff. Eq. (PDE)
Linearity
Linear
Nonlinear
Temporal Representation
Continuous-time
Discrete-time
Domain Representation
Time
Frequency
)(tff = ),( xtff =
Model Representation Control Technique
Classical Control – Prof. Eugenio Schuster – Lehigh University
Dynamic Model
26
MECHANICAL SYSTEM: αIT = Newton�s law
22 sinmlT
lg
mlb c+−−= θθθ
Which are the equilibrium points when Tc=0?
At equilibrium: πθθθθ ,0sin00 =⇒−=⇒==lg
cTblmgI +−−= ωθα sin
damping coefficient
angular velocity
angular acceleration
moment of inertia 2mlI ===
=
θωα
θω
Open loop simulations: pend_par.m, pendol01.mdl
Stable
Unstable
14
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearization
27
( )uxxxxfx nnn ,,,,, )1()2()1()( …−−=Dynamic System:
( )oo uxf ,,0,,0,00 …= Equilibrium
Denote oo uuuxxx −=−= δδ ,
( )uuxxxxxfx oonnn δδδδδδ ++= −− ,,,,, )1()2()1()( …
Taylor Expansion
( )
uuf
xxf
xxf
xxf
xxf
uxfx
oooooo
oooo
uxuxux
n
uxn
n
uxnoo
n
δδδ
δδδ
,,,0,,0,0
)1(
,,0,,0,0)1(
)2(
,,0,,0,0)2(
)1(
,,0,,0,0)1(
)( ,,0,,0,0
∂
∂+
∂
∂+
∂
∂+
+∂
∂+
∂
∂+≈ −
−−
−
……
……
…
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearization
28
( )uxfx ,=Dynamic System:
( )oo uxf ,0 = Equilibrium
Denote oo uuuxxx −=−= δδ ,
( )uuxxfx oo δδδ ++= ,Taylor Expansion
( ) uufx
xfuxfx
oooo uxuxoo δδδ
,,,
∂∂
+∂∂
+≈
⇒∂∂
≡∂∂
≡oooo uxux u
fGxfF
,,, uGxFx δδδ +≈
mn RuRx ∈∈ ,
15
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearization
29
oo
oo
oo
oo
uxm
nn
m
ux
uxn
nn
n
ux
uf
uf
uf
uf
ufG
xf
xf
xf
xf
xfF
,1
1
1
1
,
,1
1
1
1
,,
!!!!!
"
#
$$$$$
%
&
∂∂
∂∂
∂∂
∂∂
=∂∂
≡
!!!!!
"
#
$$$$$
%
&
∂∂
∂∂
∂∂
∂∂
=∂∂
≡
uGxFx δδδ +≈
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearization
30
What happens around θ=0?
By Taylor Expansion:
( ) ( ) yytohyy ≈⇒+= sin...sin
⇒= yθ ( ) 22 sinmlTy
lgy
mlby c+−−=
-3 -2 -1 0 1 2 3-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
x
sin(x)
22 mlTy
lgy
mlby c+−−=
Linearized Equation:
y
sin(
y)
16
Classical Control – Prof. Eugenio Schuster – Lehigh University
Linearization
31
What happens around θ=π?
By Taylor Expansion:
( ) ( ) xxtohxx ≈⇒+= sin...sin
⇒+= xπθ ( ) 22 sinmlTx
lgx
mlbx c++−−= π
-3 -2 -1 0 1 2 3-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
x
sin(x)
22 mlTx
lgx
mlbx c++−=
( ) 22 sinmlTx
lgx
mlbx c++−=
Linearized Equation:
x
sin(
x)