Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design...
Transcript of Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design...
![Page 1: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/1.jpg)
1
Sources: 3400 lecture from Justin Selig and Adarsh Jayakumar, 2017
ECE 3400: Intelligent Physical Systems
• Introduction• EE-version• Robot-version• Servos!• …and a little EE again
Feedback ControlBased on ECE 2100/2200 knowledgeMAE 4780/5780: Feedback Control SystemsECE 4530: Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design
![Page 2: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/2.jpg)
2
Feedback ControlOptimizing a system’s performance by feeding its output back into its input.
A(s)
B(s)
u e y
f
+-
Why should you care now?• Reason about circuit design• Used for speed control in the servos• Better line following• etc…
…amplifier, motor, robot, etc
![Page 3: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/3.jpg)
3
Feedback ControlOptimizing a system’s performance by feeding its output back into its input.
A(s)
B(s)
u e y
f
+-
• y = eA(s)
• f = yB(s)
• e = u - f
y =
H(s) = yu
A(s)1+A(s)B(s)=
eA(s) = A(s) [u - f] = A(s) [u – yB(s)] = uA(s) – yA(s)B(s)
![Page 4: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/4.jpg)
4
Feedback in a Non-Inverting OpAmp
u = Viny = Vout
A(s) = Av B(s) = R1
R1+ Rf
A(s)1+A(s)B(s)H(s) =
For Av →∞VoutVin
=R1
R1+ Rf
= 1+ Rf
R1
Av(R1 + Rf)(R1+ Rf + AvR1)
=VoutVin
=
Circuit Analysis
H(s) = yu
A(s)1+A(s)B(s)=
![Page 5: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/5.jpg)
Feedback in a Schmitt Trigger
output
Circuit Analysis
H(s) = yu
A(s)1+A(s)B(s)=
Upper thresholdLower threshold
input
time
Ampl
itude
time
Vout = 0V
(R2||R3)Vref
R1+ R2||R3
Va =Positive feedback!
+
Va = 1.66V
Vout = 5VR2Vref
R2+ R1||R3
Va =
Va = 3.3V
(1)
Vref
R1
R3 R2
0V
(1)
Vref
R1
R3
Vin
R2+-
Vout
Vref
R1
R3
R2
5V(2)
(2)
R1 = R2 = R3 = 10K
![Page 6: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/6.jpg)
6
Feedback Control and Line Following
Left Servo Speed : 50Right Servo Speed : 50
Left Servo Speed : Right Servo Speed :
50 + error50 - error
![Page 7: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/7.jpg)
7
Feedback Control and Line FollowingDisturbances
ROBOT SERVOS
Output
IR SENSORS
Measured output
PID
Controlleroutput
Setpoint
• Set-point: Distance from line we want• Controller Output: Motor speeds we want• Measured Output: Deviation from the line
![Page 8: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/8.jpg)
8
Feedback Control and Line FollowingDisturbances
ROBOT SERVOS
Output
IR SENSORS
Measured output
PID
Controlleroutput
Setpoint
• Proportional: Looks at the instantaneous error• Integral: Sum of errors over time• Derivative: Rate of change of error over time
www.Polulu.com
![Page 9: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/9.jpg)
9
Feedback Control and Line FollowingDisturbances
ROBOT SERVOS
Output
IR SENSORS
Measured output
PID
Controlleroutput
Setpoint
A - Rise TimeB - Percent OvershootC - Settling TimeD - Steady State Error
![Page 10: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/10.jpg)
10
Feedback Control and Line Following
Disturbances
ROBOT SERVOS
Output
IR SENSORS
Measured output
Kp
Setpoint
Controlleroutput+
-
eKI ∫(e)dt
KD d/dt(e)
+
U(t) = KPe(t) + KI ∫e(t)dt + KD d/dt(e(t))
![Page 11: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/11.jpg)
11
Feedback Control and Line Following
• What’s the disadvantage of PI control? • Steady state error
//P-controller:
void PControl(){error = IRmeasurements(); motorSpeed = Kp*error + originalSpeed;
}
![Page 12: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/12.jpg)
12
Feedback Control and Line Following
• What’s the disadvantage of PI control? • Long settling time• More overshoot
//PI-controller:void PIControl(){
errorSum = errorSum + IRmeasurements()*dT; motorSpeed =
Kp*error + Ki*errorSum + originalSpeed;}
![Page 13: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/13.jpg)
13
Rise time, settling time, and overshoot
• Where would you want your system to be?
![Page 14: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/14.jpg)
14
Feedback Control and Line Following
//PID-controller:void PIDControl(){
errorSum = errorSum + IRmeasurements()*dT; errorDiff = (error – lastError)/dT;motorSpeed =
Kp*error + Ki*errorSum + Kd*errorDiff + originalSpeed;
}
![Page 15: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/15.jpg)
15
Feedback Control and Line FollowingPointers for adjusting your control:• You can decrease trise and ess by
increasing KP, at the expense of increased overshoot
• You can decrease trise and eliminate ess by increasing KI at the expense of increased overshoot and settling time
• You can decrease the overshoot and the settling time by increasing Kd
![Page 16: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/16.jpg)
16
Feedback Control and Line FollowingPointers for adjusting your control:
• Set all coefficients to zero• Increase Kp until system oscillates• Increase Ki until steady state error corrected• Increase Kd until overshoot decreased
![Page 17: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/17.jpg)
17
Feedback Control and Line FollowingDisturbances
ROBOT SERVOS
Output
IR SENSORS
Measured output
PID
Controlleroutput
Setpoint
• Proportional: Looks at the instantaneous error• Integral: Sum of errors over time• Derivative: Rate of change of error over time
www.Polulu.com
![Page 18: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/18.jpg)
ContinuousPositional |
Have you ever wondered what is inside your servo?
![Page 19: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/19.jpg)
Have you ever wondered what’s inside your servo?• What are the two standard types of servos?
• Continuous• Positional
• How do we get positional control?• Potentiometer
• How can you change a positional control to a speed control?• Cut the feedback loop!
• How do we get speed control?• Back EMF
![Page 20: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/20.jpg)
H-Bridge
BAL6688: Servo Control
Linear Pulse Generator
Pulse Width Comparator
Input Pulse
2.5V Reference
M
Feedback
Trigger
Pulse Stretcher(Gain)
Pulse Width Error
Direction
5V
Counter-ClkClockwise Pulse
5V
Back EMF
Something along these lines…
![Page 21: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/21.jpg)
Z1Z2
VoutVin
= -Z2
Z1
Analog Feedback Control
21
Function Z1 Z2 H(s)
Gain (P) R1 R2 -R2/R1
Integration (I) R C -(RC)-1/s
Differentiation (D) C R -RCs
PD control C||R1 R2 -R2C (s+ (R1C)-1)
PID control C1||R1 R2C2
PI control R1 R2C -R2(s+(R2C)-1)R1s
![Page 22: Based on ECE 2100/2200 knowledge MAE 4780/5780: Feedback ... · Analog Integrated Circuit Design → ECE 5540: Advanced Analog Integrated VLSI Circuit Design. 2. Feedback Control.](https://reader031.fdocuments.net/reader031/viewer/2022040923/5e9e52968ddb422f260778aa/html5/thumbnails/22.jpg)
22
Go Build Robots!