Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... ·...
Transcript of Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... ·...
![Page 1: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/1.jpg)
Basics of Control Systems
Linear Time Invariant Systems (LTI)
Dr. Ron Desmarais
![Page 2: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/2.jpg)
LTI
Process of Building a Control System
Linear Time Invariant Systems
![Page 3: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/3.jpg)
LTI - Control System Construction
1. Identify the plant (i.e. web service)o identify the output will measure (i.e. cpu load)o identify what inputs effect the output (i.e. #requests)
2. Model the plant (you need a model!)o Identify the relationship between inputs and outputs
Find Impulse response g(t), set u(t)=delta [ hint: use laplace here to avoid time domain conv. ]
Determine any arbitrary input to the system (workload model) u(t)
Use convolution of u(t) * g(t) to find output response y(t) ---- oh oh ... this is very hard again, so use laplace!
Hint - Key to Solution - if system is LTI, use Laplace Transforms and avoid the convolution mathematics done in the time domain .. its too hard ... really
![Page 4: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/4.jpg)
LTI - Control System Construction
to iterate again !!!!!!1. Change from time domain to laplace so we can avoid convolution in time domain. We NEED to do convolution to see the output of the system from our selected inputs!2. Using laplace turns the time domain integral into a the S-domain multiplication .... very nice!
Key - Hint: once you have the impulse response of a system, and the system is LTI, then you can get the output of the system from any arbitrary input
![Page 5: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/5.jpg)
LTI - Control System Construction
Once we have the impulse response g(t) [time domain] which is equal to transfer function G(s) [s domain]. Now we have enough information about the plant to build a control system. Or do we? Maybe ... Maybe not!
![Page 6: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/6.jpg)
LTI - Control System Construction
Open Loop - open loop control could suffice! If the plant is stable with no disturbances, then ....
desired cpu load
user requests
throttler web service plantcpu loadrequests
![Page 7: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/7.jpg)
LTI - Control System Construction
Closed Loop - closed loop control is a little more complicated in three ways. The first is the sensor used to measure the plant will have to be modeled, the second is that the feedback (whether negative or positive) changes the overall system, and third is the controller is now in the loop!
controller -advance throttler
requests
requests
sensor
desired cpu load
actual cpu load
![Page 8: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/8.jpg)
LTI
So why use LTI?
http://www.youtube.com/watch?v=3eDDTFcSC_Y
![Page 9: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/9.jpg)
Control SystemsProportional Integral Derivative (PID)
Dr. Ron Desmarais
![Page 10: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/10.jpg)
Cruise Control Example
![Page 11: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/11.jpg)
Understand Your Plant
Plant: CarInput: Gas pedal angleOutput: Vehicle Velocity
Input Model : x(t) = adjusted anglePlant Model: g(t) = 1-e^(-t) : vehicle response LPF
![Page 12: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/12.jpg)
Open Loop Control
If system is perfect, and you modelled your plant and input as LTI, then you can solve for what angle to set accelerator at
Plantg(t) = 1 - e ^ (-t)G(s) = 1 / [ s/w + 1 ]
Inputx(t)= OX(s)= 1/s
solve for x(t)
desired output y(t)velocity
output velocity y(t)anglechangein angle
![Page 13: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/13.jpg)
Closed Loop Control
Plantg(t) = 1 = e ^ (-t)G(s) = 1 / [ s/w + 1]
X(s)=1/s
Controller:
P
I
D
desired velocity
actualvelocity
error
![Page 14: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/14.jpg)
The PID Controller
why choose the PID Controller rather than making a perfectly optimized controller?the PID controller is very easy to design, build and maintain ... it is often used for industrial control systems
P: Proportional Control - Kp * error
I: Integral Control - Ki * SUM error
D: Derivative Control - Kd * Change error
![Page 15: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/15.jpg)
Effects of Proportional Control
-large error means larger input signal
![Page 16: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/16.jpg)
Effects of Derivative Control
-quickly changing error means larger input signal
![Page 17: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/17.jpg)
Effects of Integral Control
- small error over long perods of time cause larger input sigal
![Page 18: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/18.jpg)
Analysis Tools to find Kp, Ki and KdWe want system stability!Three Important Measures of PID1. overshoot2. risetime3. settling timeTools to analyze PID'sBode Plots - frequency response of system - tells me which frequecies give me a high gain which may cause system instability - 1930's Bell labsRoot Locus - relates to finding overshoot,risetime and settling time to determine conditions of dampning ratio and natural frequency of transfer function-these can be difficult to understand for a control novice ... so lets do something else for now!
![Page 19: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/19.jpg)
Rules of thumb to finding Kp, Ki and Kd (Ziegle-Nichols (ZN) tuning rules)
1. find ultimate gain Ku - to do this you need to evaluate your system and record responses
P control : Kc = 0:5Ku
PI control : Kc = 0:45Ku; I = Pu/1.2
PID control (cascade) : Kc = 0:6Ku; I = Pu/2; D = Pu/8
![Page 20: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/20.jpg)
Laplace in Matlab
http://en.wikipedia.org/wiki/PID_controller
![Page 21: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/21.jpg)
Matlab - Laplace
desired
output
![Page 22: Basics of Control Systems - UVic.cawebhome.cs.uvic.ca/~hausi/2015-480a/L08-480B-K15... · 2015-06-02 · LTI -Control System Construction 1. Identify the plant (i.e. web service)](https://reader034.fdocuments.us/reader034/viewer/2022042311/5ed929ed6714ca7f476943d0/html5/thumbnails/22.jpg)
ProcedureStep 1:
- Generate Step Response of Plant from its transfer function, where b=m=1
Step 2:- Create a simple controller P, PI, PID … and determine its transfer function, start with transfer
function of a proportional controller:: Kp
Step 3:- Determine transfer function when used in a feedback loop with no delay
- determine the step response and compare to response from step 1 … how does it compare?Step 4:
- repeat for PI and PID controllers, experiment with different gains of Ki,Kd and Kp- use the Ziegle-Nichols methods to create a PID