Simple Adaptive Control and New Results in Stability Analysis
Itzhak Barkana, Ilan Rusnak, Haim Weiss
[email protected],
[email protected],
[email protected] 1
Content • • • • • • •
2
I: II: III. IV: V: VI: VII:
The need for adaptation The role of passivity in adaptive control Review of adaptive control architectures Simple Adaptive Control for Engineers Optimal control based architectures New stability results and their implication for SAC Applications of the SAC algorithm
The objective of this section To presents a simple example which illustrates the general Control problem and the need for signal tuning to get: 1. Fast response 2. Precise response To discuss - Manual tuning - Automatic tuning - Adaptive Control 3
FOR INTRODUCTION: Control before Adaptive Control Simple EXAMPLE: Boat The operator wants to move the boat from 0º to 60º heading, as quickly as possible.
The boat control loop uses DC motor. 4
FOR INTRODUCTION: EXAMPLE: Boat The operator wants to move the boat from 0º to 60º heading. as quickly as possible. Step input: Simplest and “fastest” command. HeadingCommand HeadingCompass 70
Heading [deg.]
HeadingCommand HeadingCompass 60
50
40
30
20
10
0
0
10
20
30
40
50
60
70
80
90
100
time [s] 5
Current 30
Current [Amp]
20
10
0
-10
-20
-30
0
5
10
15
20
25
30
35
40
time [s]
6
My Question: Does it take 20 sec? Then why Step Command? Why the rush? “What do you mean? Step is fastest!!! What-What? You mean Slower Could Faster!?!?!?” Hmmm…considering system limitations…
be
First: Smooth trajectories do not require violating system limitations. Second: ( Must show: ) Smoothness of trajectory (and of derivatives V, A, etc.) allows close to perfect trajectory following. 7
Suggestion: Try SMOOTH COMMANDs First Trial: Just try a smooth “Optimal” command HeadingCommand HeadingCompass 100
Heading [deg.]
HeadingCommand HeadingCompass
90 80 70 60 50 40 30 20 10 0
0
10
20
30
40
50
60
70
80
90
100
time [s]
Hey! What have you done to us??? Big Deal!!! Not only that we see large tracking error, but now, instead of 20 sec, we actually need 30 sec for same motion!?!?! Pure Nonsense, Sir! 8
QUESTION: Why the tracking error? “NATURAL”: The tracking error is the signal that keeps the boat moving! BUT… what if we could guess the tracking error and supply the signal to the motor along with the Input Command?
Could keep moving, even though the tracking error is zero! 9
WATCH: Derivatives of SMOOTH COMMANDS position [m]
velocity [m/sec]
Optimal5th 6
70
60
5
[deg]
[º/s]
50
40
p 6 t t f
30
20
5 15 t t f
4
10 t tf
3 x 0
4
3
2
1
10
0
0
0
5
10
acceleration
15
20
0
5
10
15
20
25
control u
1
0.5
0.8
0.4
0.6
0.3
[º/s2] 0.4
[º/s3]
0.2
0.2 0.1
0 -0.2
0
-0.4
-0.1
-0.6
-0.2
-0.8 -0.3
-1
0
10
5
10
15
20
25
0
5
10
15
20
time [s]
25
Back to Trajectory Tracking Watch the Tracking Error: HeadingCommand-HeadingCompass 18 16
Heading error 14 [deg.] 12 10 8 6 4 2 0
0
10
20
30
40
50
60
70
80
90
100
time [s]
LOOK! But… it looks pretty much like Velocity! OK, so along with the Position Command we supply Velocity Command through appropriate coefficient (kffv=167) 11
Supply Velocity Feedforward for Better Tracking New Tracking Error: HeadingCommand-HeadingCompass 8
Heading error [deg.]
6 4 2 0 -2 -4 -6 -8 0
10
20
30
40
50
60
70
80
90
100
time [s]
Smaller error, but… it looks like Acceleration. OK, so along with the Position and Velocity Command we supply Acceleration Command through appropriate coefficient (kffa=3000) 12
Ultimate Tracking Error after tuning: HeadingCommand-HeadingCompass 8
Heading error [deg.]
6 4 2 0 -2 -4 -6 -8 0
10
20
30
40
Pretty much negligible error.
13
50
60
70
80
90
100
time [s]
SMOTH COMMANDS and FF
14
Now, the desired and actual trajectory coincide: HeadingCommand HeadingCompass 70 HeadingCommand HeadingCompass
60
Heading [deg.]
50
40
30
20
10
0
0
10
20
30
40
50
60
70
80
90
100
time [s]
Now what? All this effort for same Performance (20 sec)? Yes, but… but what about the Current? 15
Surprise: Same Performance (20 sec), yet lower current!!! Current 20
Current [Amp]
15
10
5
0
-5
-10
-15
-20 0
2
4
6
8
10
12
14
16
18
20
time [s] 16
We managed to avoid saturation, yet… could the response be faster than step???? We try to run faster and… surprise! T=10 sec (Half the “fastest” response) HeadingCommand HeadingCompass
HeadingCommand-HeadingCompass
70 8
HeadingCommand HeadingCompass
Heading [deg.]
60
Heading error [deg]
6
50
4 2
40
0
30 -2
20
-4
10
-6 -8
0
0
10
20
30
40
50
60
70
80
90
100
0
10
time [s]
GOOD BEHAVIOR for same coefficients! 17
20
30
40
50
60
70
80
90
100
time [s]
THEN…who needs Adaptive Control?!?!?! “Small” Problem: Life is with uncertainty! AFTER a “perfect” tuning, a 30% drop of the main internal control gain: HeadingCommand HeadingCompass
HeadingCommand-HeadingCompass
70
18
HeadingCommand HeadingCompass
16
60
Heading [deg.]
50
14
Heading error [deg.]
12
40
10 8
30
6
20 4
10
0
2
0
10
20
30
40
50
60
70
80
90
100
0
0
10
20
30
40
50
60
time [s]
Again, large tracking error, late settling. Different plant parameters require different tuning. 18
70
80
90
time [s]
100
Automatic tuning? An ITERATIVE tuning algorithm: 1. Perform standard moves based on some initial Kffv Kvffnew = Kvffold + 1* ev, and repeat until the V-peak-error (the middle) is practically zero. 2. Then, perform standard moves based on some initial Kffa Kaffnew = Kaffold + 2* ea, and repeat until the A-error (peak at ¾ distance) is practically zero. 3. If needed, continue with jerk. Kjffnew = Kjffold + 3* ej All is done Off-Line, in advance of the Operational situation 19
Intermediate Conclusions 1. Even before designing the Controller, think about designing the desired path 2. Smooth trajectories allow supplying the large signals that are needed to move the signals, even as tracking error is small or zero. 3. Properly tuned feedforward signals allow good tracking without requiring high loop-gain and bandwidth from the problematic internal control-loop. 4. For a given machine, tuning can be manual or automatic 20
FIRST Industrial Implementation: Feedforward Tuning used with a fine MotionControl system Bonding machines for integrated circuits: the machine makes a bond at a and then moves to b. Total Command DesiredTrajectory Generator
In
Out
ActualTrajectory
M ACHINE Velocity, Acceleration, Jerk Kv, Ka, Kj
FEEDFORWARD Signal Kv * v + Ka * a + Kj * j
(Kv, Ka, Kj)
Tracking Errors TUNING ALGORITHM
ffsys1
21
Characteristic Prior results (No FF, or even With some FF, “good for all”) Desired vs. Actual trajectory, k1=k2=k3=0 2.5
x traj. 2
1.5
1
0.5
0
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
time [s] 22
‘Everybody knows’ how to tune one machine. However: two “identical” machines are not the same, so each one must be tuned in particular. At 10 machines/month, people can do manual tuning. At 500 machines/month, cannot do it any more, so all machine work with some “nominal” set. 1994: Machines reached their “physical limit” and the technology was “dead.” Big following errors in the middle of trajectory, then wait after the “nominal” end of time for oscillations to vanish. Performance: Speed: 100 mils in 35 msec (NOMINAL) Precision: Distance between bonds >150 µ 23
Automatic Tuning Process: the operator presses a button and sees on the display. x tracking error
time
24
Results with Automatic Iterative Tuning Desired vs. Actual trajectory, k1=k2=k3=0 2.5
x trajectory
2
1.5
1
0.5
0
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
time
Today: Speed: from 35 msec NOMINAL→ 20 → 15 → 12 → 8 msec! Accuracy: From 150 µ → 100 → 75 → 35 → 25 µ
BUT… Do you have a proof of stability? Since 1984: 6000÷8000 machines/year > 100,000 proofs” 25
What if Plant is unknown and changing? ADAPTIVE CONTROL! Advanced tracking control design requires: Define commands (trajectories) that take into account system limitations (avoid saturation, oscillations, etc.) Proper feedforward tuning allows good trajectory tracking without having to “squeeze” the system. Tuning can be done: a) manually (perform motions and change the parameters to reduce errors), b) automatically off-line (motions at various dynamical regimes that end with fixed tuning for a given regime), or… Adaptive Control. Adaptive gains change ONLINE such that they increase when they are needed and decrease afterwards if not needed. 26
Content • • • • • • •
27
I: II: III. IV: V: VI: VII:
The need for adaptation The role of passivity in adaptive control Review of adaptive control architectures Simple Adaptive Control for Engineers Optimal control based architectures New stability results and their implication for SAC Applications of the SAC algorithm
A First “Intuitive” Adaptation idea Use the nominal LTI model of your plant. Do some basic analysis and establish the admissible domain of gain variation. Let the adaptive algorithm change the gains as desired, yet do not allow violating the bounds of admissible gains.
28
Use the nominal LTI model of your plant:
Do some basic analysis and establish the admissible domain of gain variation.
29
Do some basic design and then let the adaptive algorithm change the gains as desired, yet do not allow violating the bounds of admissible gains. The Cautious Engineer may add a gain (K0=1, for example) to make it stable, and impose an upper limit, so the gain always stays within the “admissible” stability boundaries The stabilized plant remains stable for any (constant) gain 0