identification - RPIcats-fs.rpi.edu/~wenj/ECSE4962S04/identification.pdfGoal of identification: find...
Transcript of identification - RPIcats-fs.rpi.edu/~wenj/ECSE4962S04/identification.pdfGoal of identification: find...
ECSE 4962 Control Systems Design
Instructor: Professor John T. Wen
TA: Ben Potsaid
February 10, 2004
http://www.cat.rpi.edu/~wen/ECSE4962S04/
Parameter Identification
Today
• Friction identification
• Parameter identification
• Frequency domain identification
• Input excitation selection
Project proposal and presentation next Wed!
Single Joint Model
θL denotes pan or tilt angle (with coupling between the two axes ignored).
Goal of identification: find a1 , a2 , a3 , a4 by using the experimental data (choose V(t) and measure θL(t)).
{ {1 2 3 4
inputconstant
sgn( ) sin
Note that the equation has already been divided by the inertia.
L L L L
viscous Coulomb gravityfriction friction load
a a a V aθ θ θ θ+ + = +&& & &14243 14243
Coulomb Friction (dry)
Viscous Friction (oil)
force
mg
N
NFcoulomb µ=
ks µµµ == Assume
Combined Frictionviscouscoulombfriction FFF +=
Friction is constant while the object is moving
velocityBvFviscous =
Friction is proportionalvelocity
Friction Overview
Friction comes from:
•Motor Bearings
•Motor commutator
•Gearhead gears and bearings
•Belts and pulleys
•Joint Bearings
We will lump all of the friction sources together and represent their behavior with a combination of Coulomb and viscous friction models.
To identify friction, we will command a constant torque and then monitor the steady state joint velocity.
Sources of Friction
Model of Friction
1-DOF model (mount system to avoid gravity):
ID strategy: If V = constant = A, then à steady state value:Lθ&
1 2 3sgnssa a A a Aθ + =&
1
3
slope = aa
A
ssθ&
- cF
Stiction
Stribeck friction
1 2 3sgn( )L L La a a Vθ θ θ+ + =&& & &
1 2
3 3
sgnssa a
A Aa a
θ + =&or
2
3
aa
2
3
aa
−
1
3
slope = aa
Input = Constant Torque
Each line shows the velocity response for that torque.
System reaches a steady state velocity
No movement for given torque (T?0)
Friction Identification
Coulomb_pos = 0.075 NmCoulomb_neg = -0.07 NmViscous_pos = 1.46e-3 NmS/radViscous_neg = 1.56e-3 NmS/rad
Coulomb friction Slope of line is viscous friction
These are the results for the demo pantiltunit for joint 1
Friction Identification Result
Why identify friction?
You can cancel it!
1 21
3 3
( sgn( ))L L
a aV V
a aθ θ= − −& &
3 1L a Vθ =&&
If the friction model and id were exact, you can design controller V1 for a simple double integrator system!
Friction Cancellation
Caution:
• Cancellation is subject to zero-order hold
• Friction model is not exact (position dependence, load dependence, more complex function shape)
• Velocity is not perfect (velocity estimation is very important!)
Whatever leftover is considered as disturbance and must be dealt with by the controller.
Implementation
• You can construct a simple Simulink diagram with constant voltage output (you set the voltage) and measures the encoder signal.
• Set voltage to a constant, record the encoder signal, estimate the joint velocity, repeat.
• You may want to do several identical runs and average the result (record mean and std dev).
• You can use a MATLAB script to automate the whole thing too.
Identification of the Full Model
( 1) ( 1) ( 1) ( 1) ( 1)2
1 2 3 4
Multiply by and integrate over 1 sampling period:
sins s s s s
s s s s s
k t k t k t k t k t
kt kt kt kt kt
dt a dt a dt a Vdt a dt
θ
θθ θ θ θ θ θ+ + + + +
+ + = +∫ ∫ ∫ ∫ ∫
&
&&& & & & &
Do this for k=0,1,…,N-1, the length of the recorded data, and estimate a1 , a2 , a3 , a4 .
1 2 3 4sgn( ) sina a a V aθ θ θ θ+ + = +&& & &
2 2 2 21 21 1 1
3 1 4 1
1( ) ( ) ( )
2 2 2( ) (cos cos )
k k k k s k k s
k k k k k
a at t
a V a
θ θ θ θ θ θ
θ θ θ θ
+ + +
+ +
− + + + +
= − − −
& & & & & &
Identification of the Full Model (Cont.)
0 1 0 1 0 1 0 1 0
1 2 1 2 1 2 1 2 1
1 1 1 1 1
( ) ( ) 2 ( ) 2(cos cos )
( ) ( ) 2 ( ) 2(cos cos )
( ) ( ) 2 ( ) 2(cos cos )N N N N N N N N N
V
VA
V
θ θ θ θ θ θ θ θ
θ θ θ θ θ θ θ θ
θ θ θ θ θ θ θ θ− − − − −
− + − + − − − − + − + − − −
= − + − + − − −
& & & && & & &M M
& & & &
Put all the equations together and write it as A x = b
The minimum norm solution (recall IEA!) is x = (ATA)-1ATb
Note that ATA is a 4 x 4 matrix. MATLAB : x=pinv(A)*b;
1
2
3
4
aa
xaa
=
2 21 02 22 1
2 21N N
b
θ θθ θ
θ θ −
− − =
−
& && &
M& &
Model Validation
• Evaluate ||Ax-b||
• Apply a different V(t) and compare simulated response vs. actual response
Choice of Input
Choice of V(t) is very important – it has to be “sufficiently exciting”, i.e., A should be a well conditioned matrix (cond(A) should not be too large).
Try multiple sinusoids with different frequencies – randomly generate phase to avoid input peaking.
1 1 1 2 2 2( ) sin( ) sin( ) ...V t A t A tω φ ω φ= + + + +
Implementation
• You can construct a simple Simulink diagram with a multiple-sinusoid voltage output (adjust the amplitude to avoid saturation) and measures the encoder signal.
• You may want to do several identical runs and average the result (record mean and std dev).
• Write a MATLAB script to post-process data (with velocity estimation!) to generate the parameter estimate. Compare to friction ID.
• You can use a MATLAB script to automate the whole thing too.
Next Week
• Controller design and tuning
• Project proposal + presentation
Tomorrow at 6pm
• Bring lab notebook
• Groups 1-4: 6:00-7:00
• Groups 5-7: 7:00-8:00
Proposal
• Objective– Quantitative performance spec
• Design strategy– Model development– Performance spec vs. available components– Model identification– Simulation– Controller design and tuning– Design alternatives– Additional subsystem development (e.g.,
sensors)
Proposal
• Plan of action– Division of design into tasks– Assignment of responsibility– Partition into phases
• Verification procedure– Model identification and validation (std dev in
parameter estimation)– Test procedure (to check if spec if met!)– Robustness (tolerance of error, noise,
disturbance)• Bibliography
– Number references and use them in text!