(thanks to Gary Fedder)
-
Upload
samuel-davis -
Category
Documents
-
view
222 -
download
1
description
Transcript of (thanks to Gary Fedder)
![Page 1: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/1.jpg)
PID Controls of Motors
Howie Choset(thanks to Gary Fedder)
http://www.library.cmu.edu/ctms/ctms/examples/motor/motor.htm
![Page 2: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/2.jpg)
Controls• Review of Motor Model • Open Loop (controller-free) Response• Proportional Control
– Stable– Faster Response = Bigger Overshoot– Steady State Error
• PI Control– Maintain Stability– Decrease Steady State Error = Bigger Overshoot
• PID Control– Derivative term reduces overshoot, settling time
• Feed Forward– Overcome damping
![Page 3: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/3.jpg)
Mass-Spring-Damper Model(Analogy)
Model of mass spring damper system
z(t) position, z(t) velocityt0 initial time, z(t0), z(t0) initial position & velocity
![Page 4: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/4.jpg)
Review of Motor Model
•electric inductance (L) = [H](VL = L di/dt)
* input (V): Source Voltage* output (theta): position of shaft* The rotor and shaft are assumed to be rigid
• moment of inertia of the rotor (J) [kg.m^2/s^2]* damping ratio of the mechanical system (b) [Nms]* electromotive force constant
•Ke is volt (electromotive force) per radians per second (V/ rad/sec)
• torque constance•Kt is torque amp (Nm/Amp)
* electric resistance (R) = [ohm]
![Page 5: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/5.jpg)
Review of Motor ModelTorque is proportional to current (Lenz’s Law)
Back emf is proportional to motor speed (Faraday’s Law)
Mechanical Equation of Motion
Electrical Equation of Motion KVRidtdiL
KibJ
)(KI )( J ssbss )(KV)(R)I(L ssss
2KRLb JK
V
sss
Assume (K=Ke=Kt)
Solve for sVSpeed, theta dot
![Page 6: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/6.jpg)
Transfer Function of Motor (with Approximations)
=
=
= Open Loop Transfer Function
Can rewrite function in terms of an electrical and mechanical behavior
For small motors, the mechanical behavior dominates (electrical transients die faster).
example motor with equivalent time constants
.
.
.
Electrical time constant on motor is much smaller
![Page 7: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/7.jpg)
Open Loop Response (to a Step)• Apply constant voltage• Slow response time (lag)• Weird Apples-to-Orange relationship between input and output
– If you want to set speed, what voltage do you input?– Weird type of steady state error
• No reaction to perturbations
PlantInputVoltage
OutputSpeed
![Page 8: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/8.jpg)
Closed Loop Controller
Controller EvaluationSteady State ErrorRise Time (to get to ~90%)OvershootSettling Time (Ring) (time to steady state)Stability
Give it a velocity command and get a velocity output
PlantController-
+Ref error voltage
![Page 9: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/9.jpg)
Close the loop analogy
![Page 10: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/10.jpg)
Stability
Asymptotic Stability:
![Page 11: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/11.jpg)
Closed Loop Response (Proportional Feedback)
PlantController-
+R error voltage
Proportional Control
Easy to implementInput/Output units agreeImproved rise time
Steady State Error (true)
P: Rise Time vs. OvershootP: Rise Time vs. Settling time
pK
Voltage = Kp error
![Page 12: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/12.jpg)
Closed Loop Response (PI Feedback)
Plant-
+Ref error voltage
Proportional/Integral Control Ip K
sK 1
No Steady State Error
Bigger Overshoot and SettlingSaturate counters/op-amps
P: Rise Time vs. OvershootP: Rise Time vs. Settling time
I: Steady State Error vs. Overshoot
Voltage = (Kp+1/s Ki) error
Ip Ks
K 1
![Page 13: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/13.jpg)
Closed Loop Response (PID Feedback)
Plant-
+R error voltage
Proportional/Integral/Differential
Quick responseReduced Overshoot
Sensitive to high frequency noiseHard to tune
P: Rise Time vs. OvershootP: Rise Time vs. Settling time
I: Steady State Error vs. Overshoot
D: Overshoot vs. Steady State Error
DIp sKKs
K 1
DIp sKKs
K 1
Voltage = (Kp+1/s Ki + sKd) error
![Page 14: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/14.jpg)
Feed ForwardDecouples Damping from PID
To compute Try different open loop inputs and measure output velocitiesFor each trial i, Tweak from there.
bK
Plant-
+R errorController
++ volt
K
bK
ibb
i
iib KKuK avg ,
.
Volt
![Page 15: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/15.jpg)
Follow a straight line with differential drive
Make both wheels spin the same speedasynchronous – false startwheels can have slight differences (radius, etc)
Make sure both wheels spin the same amount and speedfalse start
More complicated control laws – track orientation m1vref = vref + K1 * thetaerror + K2 * offset error
modeling kinematics of robotdead-reckoning
Error can be difference in wheel velocities or accrued distances
![Page 16: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/16.jpg)
Encoders
![Page 17: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/17.jpg)
Encoders – Incremental
LED Photoemitter
Photodetector
Encoder disk
![Page 18: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/18.jpg)
Encoders - Incremental
![Page 19: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/19.jpg)
Encoders - Incremental
• Quadrature (resolution enhancing)
![Page 20: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/20.jpg)
Where are we?
• If we know our encoder values after the motion, do we know where we are?
![Page 21: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/21.jpg)
Where are we?
• If we know our encoder values after the motion, do we know where we are?
• What about error?
![Page 22: (thanks to Gary Fedder)](https://reader037.fdocuments.in/reader037/viewer/2022103010/5a4d1ad67f8b9ab05997336c/html5/thumbnails/22.jpg)
Encoders - Absolute
4 Bit Example
More expensive
Resolution = 360° / 2N
where N is number of tracks