5: processor-based control systems cet360 microprocessor engineering j. sumey

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

Upload: cleopatra-pierce

Post on 31-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

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

5: Processor-based Control Systems

CET360Microprocessor Engineering

J. Sumey

Page 2: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

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. devicesnow: µP-based with control algorithm in software

Page 3: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

“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_theory

Page 4: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

Block Diagram

text…

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

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)

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

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)

Page 7: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

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

Page 8: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

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

8

Page 9: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

9

Closed-loop Systems

includes feedback/state estimator examples:

temperature control – add heat or not (bang bang), assumes passive heat loss

can add hysteresis with 2 set points: TH, TL

robot arm incremental control – U(t) is incremented, decremented, or left alone

Page 10: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

10

PID Systems

from linear control theory faster, more accurate, better

control

dtdE(t)

k )dE(k E(t)kU(t) D

t

0IP

Page 11: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

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)=kP·E(t) P(n)=kP·E(n)

Page 12: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

PID Implementation

noise-prone, better to use average of 2 derivatives over different time spans

ΔtE(n)K1)-I(n

ΔtE(i)KI(n) )dE(k I(t)

I

t

0

n

1II

Δt

1)-E(n-E(n)KD(n)

dtdE(t)

k D(t) DD

Page 13: 5: Processor-based Control Systems CET360 Microprocessor Engineering J. Sumey

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=081010&tx_ttnews[tt_news]=15561

PID Controller http://en.wikipedia.org/wiki/PID_controller

13