Download presentation
1
(thanks to Gary Fedder)
PID Controls of Motors Howie Choset (thanks to Gary Fedder)
2
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
3
Mass-Spring-Damper Model (Analogy)
Model of mass spring damper system z(t) position, z(t) velocity t0 initial time, z(t0), z(t0) initial position & velocity
4
Review of Motor Model 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] 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
5
Review of Motor Model Mechanical Equation of Motion
Torque 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 Assume (K=Ke=Kt) Solve for sq/V Speed, theta dot
6
Transfer Function of Motor (with Approximations)
. = Open Loop Transfer Function . = Can rewrite function in terms of an electrical and mechanical behavior Electrical time constant on motor is much smaller example motor with equivalent time constants . = For small motors, the mechanical behavior dominates (electrical transients die faster).
7
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 Plant Input Voltage Output Speed
8
Closed Loop Controller
Controller Evaluation Steady State Error Rise Time (to get to ~90%) Overshoot Settling Time (Ring) (time to steady state) Stability Give it a velocity command and get a velocity output Plant Controller - + Ref error voltage
9
Close the loop analogy
10
Asymptotic Stability:
11
Closed Loop Response (Proportional Feedback)
Proportional Control Easy to implement Input/Output units agree Improved rise time Steady State Error (true) P: Rise Time vs. Overshoot P: Rise Time vs. Settling time R + error voltage Controller Plant - Voltage = Kp error
12
Closed Loop Response (PI Feedback)
Proportional/Integral Control No Steady State Error Bigger Overshoot and Settling Saturate counters/op-amps P: Rise Time vs. Overshoot P: Rise Time vs. Settling time I: Steady State Error vs. Overshoot Ref + error voltage Plant - Voltage = (Kp+1/s Ki) error
13
Closed Loop Response (PID Feedback)
Proportional/Integral/Differential Quick response Reduced Overshoot Sensitive to high frequency noise Hard to tune P: Rise Time vs. Overshoot P: Rise Time vs. Settling time I: Steady State Error vs. Overshoot D: Overshoot vs. Steady State Error R + error voltage Plant - Voltage = (Kp+1/s Ki + sKd) error
14
Feed Forward Volt Decouples Damping from PID To compute
Try different open loop inputs and measure output velocities For each trial i, Tweak from there. . + error R + volt Plant Controller + -
15
Follow a straight line with differential drive
Error can be difference in wheel velocities or accrued distances Make both wheels spin the same speed asynchronous – false start wheels can have slight differences (radius, etc) Make sure both wheels spin the same amount and speed false start More complicated control laws – track orientation m1vref = vref + K1 * thetaerror + K2 * offset error modeling kinematics of robot dead-reckoning
16
Encoders
17
Encoders – Incremental
Photodetector Encoder disk LED Photoemitter
18
Encoders - Incremental
19
Encoders - Incremental
Quadrature (resolution enhancing)
20
Where are we? If we know our encoder values after the motion, do we know where we are?
21
Where are we? If we know our encoder values after the motion, do we know where we are? What about error?
22
Encoders - Absolute More expensive Resolution = 360° / 2N
where N is number of tracks 4 Bit Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.