Presentation is loading. Please wait.

Presentation is loading. Please wait.

6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey.

Similar presentations


Presentation on theme: "6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey."— Presentation transcript:

1 6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

2 2 Control Systems def: collection of mechanical and electrical devices that controls the operation of a physical plant requires ≥1 output devices (open loop) and ≥1 input devices (closed loop) originally: elec. circuits & mech. devices now: µP-based with control algorithm in software

3 “Control Theory”† various models finite state machines fuzzy logic / neural networks linear systems PID (classical) our main interest here is with PID † http://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Control_theory 3

4 Block Diagram text… 4

5 5 Components - 1 1.Real state variables, X(t) – properties of the physical plant being controlled requires sensor(s) and state estimator to produce estimated state variables, X’(t) 2.Desired state variables, X*(t) – what the system seeks for X(t)

6 6 Components - 2 3.Control outputs, U(t) – output commands to devices that affect the physical plant typically control actuators which produce driving forces, V(t) 4.Control algorithm – generates U(t) based on error: E(t) = X*(t) – X’(t) goal of a control system: minimize E(t) 6

7 7 Control System Effectiveness determined by 3 properties: 1.steady-state error: average value of E(t) 2.transient response: how long it takes system to reach 99% of final output after X’ or X* is changed 3.stability: if a steady state is reached after a change in X’ or X* i.e., no oscillations

8 Open-loop Systems no feedback,  no state estimator examples: toaster – fixed amount of time traffic light – ditto. Must be closed-loop if goal is to maximize traffic flow! OL stepper motor controller – no encoder 88

9 9 Closed-loop Systems includes feedback/state estimator examples: robot arm incremental control – U(t) is incremented, decremented, or left alone temperature control – add heat or not (bang bang), assumes passive heat loss can add hysteresis with 2 set points: T H, T L 9

10 10 Example Closed-loop System † : a "bang-bang" temperature controller † from "Embedded Microcomputer Systems", J. Valvano, 2007 Interface: Flowchart: Algorithm/response:

11 11 PID Systems from linear control theory faster, more accurate, better control the k's are design parameters, aka gains determined using control theory and Laplace transforms the I term addresses steady state error, the D term addresses transient error 11

12 ideal / parallel form: PID Controller Block Diagram 12 P (present) I (past) D ("future") + + + + - "SP" E(t) "the Plant" U(t) "MV" Y(t) "PV" (feedback) PID controller SP = Set Point MV = Manipulated Value PV = Present Value E(t) = SP – PV (desired – current)

13 Types of PID Controllers TypeKpKp KiKi KdKd P PI PID PD 13 consider values of the gains:

14 Digital PID Implementation break U(t) into separate terms & convert to discrete time discrete time: fixed period, like DSP (Δt) U(t)=P(t) + I(t) + D(t) P(t)=k P ·E(t)  P(n)=k P ·E(n) 14

15 Digital PID Implementation noise-prone, better to use average of 2 derivatives over different time spans 15

16 Digital PID Implementation combining, we now have: ∆t can be factored into k i & k d, so: 16

17 Digital PID Implementation this can easily be implemented in code based on the 3 gains & 2 "history" (state) variables: 1.accumulated error ("istate"): I(n)=I(n-1)+E(n) 2.previous error ("dstate"): E(n-1) however: this requires precision in acquiring y(t) and processing u(n) at exact ∆t intervals hence: our task scheduler! 17

18 References PID process control, a “Cruise Control” example http://www.codeproject.com/Articles/36459/PID-process- control-a-Cruise-Control-example PID Theory http://pcbheaven.com/wikipages/PID_Theory Understanding PID Control (toilet ex.) http://www.controleng.com/index.php?id=483&cHash=0810 10&tx_ttnews[tt_news]=15561 PID Controller http://en.wikipedia.org/wiki/PID_controller 18


Download ppt "6: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey."

Similar presentations


Ads by Google