implementation of adaptive control algorithm based on spoc form winter 2011 supervisor: dr. ilan...
TRANSCRIPT
![Page 1: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/1.jpg)
1
Implementation of adaptive control algorithm based on SPOC form
Winter 2011Supervisor: Dr. Ilan RusnakSubmitted by: Ofer Rosenberg
Roy Mainer
![Page 2: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/2.jpg)
2
Project Background
•Why do we need adaptive control?•What is an SPOC form?•What was accomplished in previous
projects?▫Implementations of linear systems
identification algorithms – in simulations and based on recorded data – not real time
▫Different algorithms returned different results when applied on the same system. Which is correct?
![Page 3: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/3.jpg)
3
Project Goals
•Implementation of SPOC form adaptive control algorithm – in REAL TIME
•Observation and measurement•Conclusions
![Page 4: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/4.jpg)
4
System Hierarchy
Matlab + Simulink
Dspace interfac
e
Linear motion system
![Page 5: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/5.jpg)
5
Project Development Steps:
•Introduction to the linear motion system and the Dspace interface.
•Understanding and repeating the results of previous related projects.
•Implementation of the SPOC algorithm in Simulink.
•Test the algorithm on both simulation and real time.
•Gathering results and conclusions.
![Page 6: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/6.jpg)
6
The SPOC Simulink blocks implementation
Ke
y
Ke
P0
Aed
1 Out1
z
1
X0
1.2e-9
Re
-C-
Qe
MatrixMultiply
Product9Matrix
Multiply
Product8
MatrixMultiply
Product7Matrix
Multiply
Product5
MatrixMultiply
Product4
MatrixMultiply
Product3
MatrixMultiply
Product2
MatrixMultiply
Product10
Product1
Product
z
1
P0
1
MatrixConcatenation3
1
MatrixConcatenation2
1
MatrixConcatenation1
2
MatrixConcatenation
uT
MathFunction1
uT
MathFunction
Inv
Ke
-K-
Gain2
-K-
Gain1
-K-
Gain
eye(9)
Constant5
eye(3)
Constant4
eye(3)
Constant3
zeros(3)
Constant2
diag(ones(1,2),1)
Constant1
eye(3)
Constant
[1x9]
Ce
Add6Add5
Add4
Add3
Add2
Add1
2
In2
1 In1
X0
![Page 7: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/7.jpg)
7
The SPOC Simulink blocks implementation - continued• Using matrix building blocks and algebra
we implement the SPOC algorithm.• Process noise estimation vector (Qe block)
is constant.
![Page 8: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/8.jpg)
8
Simulation and Real Time• Once the SPOC block was complete, our work
was divided to two parts – simulation and real time.
• Simulation:▫Mainly based on simulated inputs and transfer
functions. • Real Time:
▫Linear systems transfer function estimated in real time and recorded.
• Both methods estimate the transfer function during run time!
![Page 9: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/9.jpg)
9
Main System Simulink Diagram (simulation)
KcWhen openloop
gain=0
states
numerator
denominator
YY
To Workspace4
UU
To Workspace3
denum
To Workspace2
num
To Workspace1
In1Out1
State SpacePlant
Sine Wave2
Sine Wave1
Sine Wave
Scope
In1
In2
Out1
SPOC Subsystem
Kdc SW
In1
In2
In3
Out1
KDCSubsystem
Divide4
1Constant8
Add
0AckerGain In1
In2
In3
Out1
Out2
ACKERSubsystem
YY
UU
UU
X states
denom
denom
denom
KX
num
num
X0
KcKdc
![Page 10: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/10.jpg)
10
Main System Simulink Diagram (simulation) - continued• A 3rd order linear system requires an input
comprised of at least 3 non dependent signals.• Input is fed to both the transfer function (also 3rd
order) and the SPOC block.• Transfer function output is recorded and fed to the
SPOC block.• The SPOC block outputs are the state space vector,
the numerators and denominators vectors.• Other blocks: Acker and KDC are used to gain
stability by moving the poles to pre determined locations and normalizing the system’s gain respectively.
![Page 11: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/11.jpg)
11
Simulation ResultsNumerator Coefficients Denominator Coefficient
0 10 20 30 40 50 60 70 80 90 1000
0.5
1
1.5
2
2.5Numerator Coefficients
time [sec]
b1
b2
b3
0 10 20 30 40 50 60 70 80 90 100-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0Denominator Coefficients
time [sec]
a1
a2a3
![Page 12: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/12.jpg)
12
Simulation Results – continued
•Simulated transfer function:
•Estimated transfer function:
•Success!
![Page 13: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/13.jpg)
13
Main System Simulink Diagram (real time)
X0
shut downat simulation
end
start simulationwith 0 inputsfor 10 sec.
10
Kc_out
9
inv_gain_out
8
states_out
7
denum_out
6
num_out
5
UU_norm
4
UU
3
error
2
YY
1
Kcx_out
DAC
to motor
states
numerator
limit
1
input gain
0.012
enc_scale_factor
denominator
0
Zero
Switch2Switch1
Switch
Sine Wave3
Sine Wave2
Sine Wave1
Sine Wave
In1
In2
Out1
SPOC Subsystem
RTI Data
PulseGenerator
1
One
MultiportSwitch
Mult
20
Kp
0
Kcx_gain0/0.1/0.5/1
In1
In2
In3
Out1
KDCSubsystem
Inv_GainManual Switch
Divide4
ENCODERMASTER SETUP
DS1104ENC_SETUP
Enc position
Enc delta position
DS1104ENC_POS_C1
1
Constant2
0
Constant1
1
Constant
0
Clock1
0
Clock
Chirp Signal
Add5
In1
In2
In3
Out1
Out2
ACKERSubsystem
v el_error
pos_error
YY
YY
YY
UU
error
error
xo
states
num
num
denum
denum
Kcx
kc
kc
![Page 14: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/14.jpg)
14
Main System Simulink Diagram (real time) - continued• Based on the simulation schematic.• Input switching to allow multiple choices
and stop the motor from reaching the rail end.
• Gain blocks based on previous empiric results.
• Dspace designated blocks:• Inputs are fed to motor through Dspace
D/A.• Outputs (motor position on rail) is fed
through position feedback.
![Page 15: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/15.jpg)
15
Process noise estimation vector
• The ratio Qe/Re affects the estimated coefficients convergence speed.
• Re – Measurement noise• Qe – Process noise
• Results show that high ratio improves estimation speed while low ratio reduces noise.
• In simulation we have no measurement noise so no need to switch.
• Convergence time is approximately 20 [sec] in real time.
• After 20 [sec] the Qe vector is switched to lower the ratio and reduce the noise.
Switch1e-6*diag([1 1 1 0 0 0 0 0 0 ]) + 1e-4*diag([ 0 0 0 1 1 0 0 1 1])
Qe1
1e-6*diag([1 1 1 0 0 0 0 0 0 ]) + 1e-8*diag([ 0 0 0 1 1 0 0 1 1])
New Qe1
0
Clock
![Page 16: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/16.jpg)
16
Real Time ResultsNumerator Coefficients Denominator Coefficient
0 10 20 30 40 50 60-150
-100
-50
0
50
100
150
200
250Numerator Coefficients
time [sec]
b1
b2b3
0 10 20 30 40 50 60-300
-250
-200
-150
-100
-50
0
50
100
150Denominator Coefficients
time [sec]
a1
a2
a3
![Page 17: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/17.jpg)
17
Numerator Coefficients convergence – zoomed
5 10 15 20 25 30-150
-100
-50
0
50
100
150
200
250Numerator Coefficients
time [sec]
b1
b2b3
![Page 18: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/18.jpg)
18
Real Time Results – continued
•Estimated transfer function:
•Success?▫We have no reference to compare with…
![Page 19: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/19.jpg)
19
ConclusionsResults table Conclusions summary
Comparison Parameter
Simulation Real Time
Accuracy Perfect Transfer function converged
successfully .system might be of higher order.
Convergence time Very fast, 23 [sec] without Qe switching.
Also fast, 30 [sec] with proper Qe.
Noise Noiseless Dramatic decrease in noise after Qe switching.
Influence of closed loop
None Influences the estimation result
• Linear system was expected to be of 3rd order. Results show it is probably of higher order.
• High ratio of Qe/Re improves convergence speed, while lower ratio reduces noise.
![Page 20: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/20.jpg)
20
Articles Links • The links will be opened from technion computers or any
computer who is registered to IEEE Xplore Digital Library.
• Real-Time Simultaneous State Estimation and Parameters Identification of Linear Drive System with the SPOC based Algorithm
• http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=00532255
• http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=721052• http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4793065
![Page 21: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/21.jpg)
21
Tubes
SPOC OPEN ZOOM• http://www.youtube.com/watch?v=aFKcut
mu7Jg&feature=g-upl SPOC OPEN LOOP
• http://www.youtube.com/watch?v=KeURm9FxpgA&feature=g-upl
SPOC ACKER GAIN 0.5 ZOOM• http://www.youtube.com/watch?v=nv7Uw
oHDDZI&feature=g-upl SPOC ACKER GAIN 0.5
• http://www.youtube.com/watch?v=He0nM6c7g14&feature=g-upl
![Page 22: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/22.jpg)
22
Bibliography• “Real-Time Simultaneous State Estimation and Parameters Identification of Linear Drive System with the SPOC based Algorithm” \ Dr. Ilan Rusnak (article)• "Feedback Control of Dynamic Systems 6th Ed." \ Gene F. Franklin, J
David Powell, Abbas Emami-Naeini (681.516)• "Linear Control System Analysis and Design with Matlab 5th. Ed" \
John j. D'azzo, Stuart N. Sheldon (681.511)• “Control for Unstable Nonminimum Phase Uncertain Dynamic
Vehicle” \ Dr. Ilan Rusnak (article)• “State Observability and Parameters Identifiability of Stochastic
Linear Systems” \ Dr. Ilan Rusnak (article)• “Simultaneous State Observability and Parameters Identifiability of
Discrete Stochastic Linear Systems” \ Dr. Ilan Rusnak • Internet and especially Wikipedia• Project book by Gil Kanashty:
•." מעבדתית" מערכת על ליניאריות מערכות של זיהוי אלגוריתמי יישום
![Page 23: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/23.jpg)
23
Special thanksDr. Ilan RusnakKoby KochaiOrly VigderzonGil Kanashty
![Page 24: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/24.jpg)
24
Thanks for watchingOfer RosnebergRoy Mainer
![Page 25: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/25.jpg)
25
Adaptive Control (Wikipedia)
•“Adaptive Control is the control method used by a controller which must adapt to a controlled system with parameters which vary, or are initially uncertain”.
•For example, as an aircraft flies, its mass will slowly decrease as a result of fuel consumption; a control law is needed that adapts itself to such changing conditions.
![Page 26: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/26.jpg)
26
SPOC Algorithm
•SPOC – States and Parameters Observability Canonical Form.
•SPOC algorithm is another method of estimating the transfer function of a system.
•By representing the observer canonical form of a 3rd order linear system, we can isolate the condition for stability.
•That condition can be solved using Kalman filter.
![Page 27: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/27.jpg)
27
Linear Motion System
• Our linear motion system is based on a DC motor, traveling back and forth across the rail.
• The DC system has speed and even acceleration feedback.
• The motor is controlled by the computer via the Simulink implemented controller.
• This system was believed to be of 3rd order.
![Page 28: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/28.jpg)
28
Acker Block
We changed the coefficientsof the polynom.
The algorithem didn'twork for fast poles!
2 Out2
1Out1
[ 1 1.2 0.47 0.06]
pvv -required closedloop polynomial
plv
2
controlability matrix
(0 1 0)
col 2
(1 0 0)
col 1
kx
To Workspace2
kxx
To Workspace1
Terminator
Scope1
Product6
MatrixMultiply
Product18
MatrixMultiply
Product17
MatrixMultiply
Product16
MatrixMultiply
Product15
Product14
MatrixMultiply
Product13
MatrixMultiply
Product12
Product11
2
MatrixConcatenation4
Inv
Divide1
eye(3)
Constant6
[0 0 1]
Ce1
3
In3
2
In2
1
In1
KX
KXnum
num
num
num
![Page 29: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/29.jpg)
29
Real-Time Simultaneous State Estimation and Parameters Identification of Linear Drive System with the SPOC based Algorithm
![Page 30: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/30.jpg)
30
Real-Time Simultaneous State Estimation and Parameters Identification of Linear Drive System with the SPOC based Algorithm - continued
![Page 31: Implementation of adaptive control algorithm based on SPOC form Winter 2011 Supervisor: Dr. Ilan Rusnak Submitted by: Ofer Rosenberg Roy Mainer 1](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e205503460f94b0b0c9/html5/thumbnails/31.jpg)
31
Real-Time Simultaneous State Estimation and Parameters Identification of Linear Drive System with the SPOC based Algorithm - continued