1 mrac for inverted pendulum
description
Transcript of 1 mrac for inverted pendulum
Model ReferenceModel ReferenceAdaptive ControlAdaptive Control
Survey of Control Systems (MEM Survey of Control Systems (MEM 800)800)
Presented byPresented byKeith SevcikKeith Sevcik
ConceptConcept
Design controller to drive plant response to mimic Design controller to drive plant response to mimic ideal response (error = yideal response (error = yplantplant-y-ymodel model => 0)=> 0)
Designer chooses: reference model, controller Designer chooses: reference model, controller structure, and tuning gains for adjustment structure, and tuning gains for adjustment mechanismmechanism
Controller
Model
AdjustmentMechanism
Plant
Controller Parameters
ymodel
u yplant
uc
MIT RuleMIT Rule
Tracking error:Tracking error:
Form cost function:Form cost function:
Update rule:Update rule:
– Change in is proportional to negative Change in is proportional to negative gradient ofgradient of
modelplant yye
)(2
1)( 2 eJ
e
eJ
dt
d
J
sensitivity
derivative
MIT RuleMIT Rule Can chose different cost functionsCan chose different cost functions EX:EX:
From cost function and MIT rule, control law can From cost function and MIT rule, control law can be formedbe formed
0 ,1
0 ,0
0 ,1
)( where
)(
)()(
e
e
e
esign
esigne
dt
d
eJ
MIT RuleMIT Rule
EX: Adaptation of feedforward gainEX: Adaptation of feedforward gain
Adjustment Mechanism
ymodel
u yplantuc
Π
Π
θ
Reference Model
Plant
s
)()( sGksG om
)()( sGksGp
-
+
MIT RuleMIT Rule
For system where is For system where is unknownunknown
Goal: Make it look like Goal: Make it look like
using plant (note, plant using plant (note, plant model is scalar multiplied by plant)model is scalar multiplied by plant)
)()(
)(skG
sU
sY k
)()(
)(sGk
sU
sYo
c
)()( sGksG om
MIT RuleMIT Rule
Choose cost function:Choose cost function:
Write equation for error:Write equation for error:
Calculate sensitivity derivative:Calculate sensitivity derivative:
Apply MIT rule:Apply MIT rule:
coccmm UGkUkGUGkGUyye
ee
dt
deJ )(
2
1)( 2
mo
c yk
kkGU
e
eyeyk
k
dt
dmm
o
'
MIT RuleMIT Rule
Gives block diagram:Gives block diagram:
considered tuning parameterconsidered tuning parameter
Adjustment Mechanism
ymodel
u yplantuc
Π
Π
θ
Reference Model
Plant
s
)()( sGksG om
)()( sGksGp
-
+
MIT RuleMIT Rule
NOTE: MIT rule does not guarantee NOTE: MIT rule does not guarantee error convergence or stabilityerror convergence or stability
usually kept smallusually kept small
Tuning crucial to adaptation rate Tuning crucial to adaptation rate and stability.and stability.
SystemSystem
MRAC of PendulumMRAC of Pendulum
TdmgdcJ c 1sin
cmgdcsJs
d
sT
s
21
)(
)(d2d1dc
T
77.100389.0
89.1
)(
)(2
sssT
s
MRAC of PendulumMRAC of Pendulum
Controller will take form:Controller will take form:
Controller
Model
AdjustmentMechanism
Controller Parameters
ymodel
u yplant
uc
77.100389.0
89.12 ss
MRAC of PendulumMRAC of Pendulum
Following process as before, write Following process as before, write equation for error, cost function, and equation for error, cost function, and update rule:update rule:
modelplant yye
)(2
1)( 2 eJ
e
eJ
dt
d
sensitivity
derivative
MRAC of PendulumMRAC of Pendulum
Assuming controller takes the form:Assuming controller takes the form:
cplant
plantcpplant
cmpmodelplant
plantc
uss
y
yuss
uGy
uGuGyye
yuu
22
1
212
21
89.177.100389.0
89.1
77.100389.0
89.1
MRAC of PendulumMRAC of Pendulum
plant
c
c
cmc
yss
uss
e
uss
e
uGuss
e
22
1
2
22
12
2
22
1
22
1
89.177.100389.0
89.1
89.177.100389.0
89.1
89.177.100389.0
89.1
89.177.100389.0
89.1
MRAC of PendulumMRAC of Pendulum
If reference model is close to plant, If reference model is close to plant, can approximate:can approximate:
plantmm
mm
cmm
mm
mm
yasas
asae
uasas
asae
asasss
012
01
2
012
01
1
012
22 89.177.100389.0
MRAC of PendulumMRAC of Pendulum
From MIT rule, update rules are then:From MIT rule, update rules are then:
eyasas
asae
e
dt
d
euasas
asae
e
dt
d
plantmm
mm
cmm
mm
012
01
2
2
012
01
1
1
MRAC of PendulumMRAC of Pendulum Block DiagramBlock Diagram
ymodel
e
yplantuc
Π
Π
θ1
Reference Model
Plant
s
77.100389.0
89.12 ss
Π
+
-
mm
mm
asas
asa
012
01
mm
mm
asas
asa
012
01
mm
m
asas
b
012
s
Π
-
+
θ2
MRAC of PendulumMRAC of Pendulum
Simulation block diagram (NOTE: Simulation block diagram (NOTE: Modeled to reflect control of DC Modeled to reflect control of DC motor)motor)
am
s+amam
s+am
-gamma
s
gamma
s
Step
Saturation
omega^2
s+am
Reference Model
180/pi
Radiansto Degrees
4.41
s +.039s+10.772
Plant
2/26
Degreesto Vol ts
35
Degrees
y m
Error
Theta2
Theta1
y
MRAC of PendulumMRAC of Pendulum
Simulation with small gamma = Simulation with small gamma = UNSTABLE!UNSTABLE!
0 200 400 600 800 1000 1200-100
-50
0
50
100
150
ym
g=.0001
MRAC of PendulumMRAC of Pendulum
Solution: Add PD feedbackSolution: Add PD feedback
am
s+amam
s+am
-gamma
s
gamma
s
Step
Saturation
omega^2
s+am
Reference Model
180/pi
Radiansto Degrees
4.41
s +.039s+10.772
Plant
1
P
du/dt
2/26
Degreesto Volts
35
Degrees
1.5
D
y m
Error
Theta2
Theta1
y
MRAC of PendulumMRAC of Pendulum
Simulation results with varying Simulation results with varying gammasgammas
0 500 1000 1500 2000 25000
5
10
15
20
25
30
35
40
45
ym
g=.01
g=.001
g=.0001
707.
sec3
:such that Designed
56.367.2
56.32
s
m
T
ssy
LabVIEW VI Front PanelLabVIEW VI Front Panel
LabVIEW VI Back PanelLabVIEW VI Back Panel
Experimental ResultsExperimental Results
Experimental ResultsExperimental Results
PD feedback necessary to stabilize PD feedback necessary to stabilize systemsystem
Deadzone necessary to prevent Deadzone necessary to prevent updating when plant approached modelupdating when plant approached model
Often went unstable (attributed to Often went unstable (attributed to inherent instability in system i.e. little inherent instability in system i.e. little damping)damping)
Much tuning to get acceptable responseMuch tuning to get acceptable response
ConclusionsConclusions
Given controller does not perform well Given controller does not perform well enough for practical useenough for practical use
More advanced controllers could be More advanced controllers could be formed from other methodsformed from other methods– Modified (normalized) MITModified (normalized) MIT– Lyapunov direct and indirectLyapunov direct and indirect– Discrete modeling using Euler operatorDiscrete modeling using Euler operator
Modified MRAC methodsModified MRAC methods– Fuzzy-MRACFuzzy-MRAC– Variable Structure MRAC (VS-MRAC)Variable Structure MRAC (VS-MRAC)