43
SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 1 Sensing, Actuation, Control ENES 100 Prof. Bruce Jacob Electrical & Computer Engineering (with enormous thanks to Prof. Bill Levine) OUTLINE: Some example control systems Feedback: Open loop vs. closed loop (PID control) Simple hovercraft circuits Hovercraft control issues

Sensing, Actuation, Control

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 1

Sensing, Actuation, Contr ol

ENES 100

Prof. Bruce Jacob

Electrical & Computer Engineering

(with enormous thanks to Prof. Bill Levine)

OUTLINE:

• Some example contr ol systems• Feedbac k: Open loop vs. closed loop

(PID control)

• Simple ho vercraft cir cuits• Hovercraft contr ol issues

Page 2: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 2

The Toilet

2000 year old contr ol system

System not used f or present purpose until 19th centur y (cholera epidemics)

• Sensor: float• Actuator: valve• Power: water le vel• Failsaf e: overflo w tube

Page 3: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 3

The Toilet

2000 year old contr ol system

System not used f or present purpose until 19th centur y (cholera epidemics)

• Sensor: float• Actuator: valve• Power: water le vel• Failsaf e: overflo w tube

Page 4: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 4

Power Brakes (e.g. disk)

Manual activ ation

Separate h ydraulic netw orks (per brake or per opposite pair)

Additional failsaf e (optional): power needed to hold brake open (fails c losed)

• Sensor: foot pedal• Actuator: brake caliper s• Power: hydraulic• Failsaf e: dual system

Page 5: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 5

Power Brakes (e.g. disk)

Manual activ ation

Separate h ydraulic netw orks (per brake or per opposite pair)

Additional failsaf e (optional): power needed to hold brake open (fails c losed)

• Sensor: foot pedal• Actuator: brake caliper s• Power: hydraulic• Failsaf e: dual system

Page 6: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 6

Antiloc k Brakes

Each wheel monitored separatel y for signifi cant de viation in wheel speed

Each wheel contr olled/pulsed separatel y

Problem: contaminated sensor s

Add’ l sensor s: wheel angle & gyr oscope

• Sensor: wheel speed• Actuator: pulse emitter• Power: hydraulic• Failsaf e: manual, sensor s

Page 7: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 7

Antiloc k Brakes

Each wheel monitored separatel y for signifi cant de viation in wheel speed

Each wheel contr olled/pulsed separatel y

Problem: contaminated sensor s

Add’ l sensor s: wheel angle & gyr oscope

• Sensor: wheel speed• Actuator: pulse emitter• Power: hydraulic• Failsaf e: manual, sensor s

Page 8: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 8

Fletc hed Arr ow

Bare shaft: completel y unstab le

Weighted tip: slightl y more stab le

Fletc hing acts as contr ol mec hanism (correction pr opor tional to de viation)

• Sensor: fletc hing• Actuator: fletc hing• Power: pressure• Failsaf e: n/a

Page 9: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 9

Fletc hed Arr ow

Bare shaft: completel y unstab le

Weighted tip: slightl y more stab le

Fletc hing acts as contr ol mec hanism (correction pr opor tional to de viation)

• Sensor: fletc hing• Actuator: fletc hing• Power: pressure• Failsaf e: n/a

CoM, CoP

CoM

CoM

CoP

CoP

Page 10: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 10

Steam Valve

Plug/spring acts as contr ol mec hanism (correction pr opor tional to de viation: higher pressure => v alve opens more)

• Sensor: spring-loaded piston• Actuator: valve• Power: (steam) pressure• Failsaf e: backup/none

Page 11: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 11

Steam Valve

Plug/spring acts as contr ol mec hanism (correction pr opor tional to de viation: higher pressure => v alve opens more)

• Sensor: spring-loaded piston• Actuator: valve• Power: (steam) pressure• Failsaf e: backup/none

Page 12: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 12

Centrifugal Go vernor

• Sensor: centrifugal pendulum• Actuator: valve• Power: tor que on shaft• Failsaf e: backup/none

Page 13: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 13

Centrifugal Go vernor

Also called the “fl yball” governor

Propor tional contr ol: the faster the rotation, the more the v alve c loses

On nearl y every steam engine made

• Sensor: centrifugal pendulum• Actuator: valve• Power: tor que on shaft• Failsaf e: backup/none

Page 14: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 14

Feedbac k Contr ol

OPEN LOOP

• Power Brakes• Power-Assist Steering• Manual Throttle

CLOSED LOOP

• Anti-Loc k Brakes• Compass-Assisted Steering• Governor -Contr olled Throttle

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

Feedbac k

Page 15: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 15

Power Brakes

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

OPEN LOOP

FootonPedal

Magnify Brake

Car

Slows

Force System

Page 16: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 16

Anti-Loc k Brakes

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

CLOSED LOOP

Feedbac k

FootonPedal

Even Individual

Car

Slows

Feedbac k: Wheel r otation speed

or PulsedForce

Brakesper

Wheel

Are an y wheels slipping?Are an y wheels r otating m uch more slo wly than the other s?If so, slipping brakes are pulsed to tr y to reco ver traction.

Page 17: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 17

Power-Assist Steering

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

OPEN LOOP

TorqueonSteering

Magnify Hydraulic

Car

Turns

Force Steering

Wheel

System

(gain isvariable,rel. to

veh. speed)

Vehic le Speed

Page 18: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 18

Compass-Assisted Steering

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

CLOSED LOOP

Feedbac k

Compass

Direction

Appr opriate Steering

Vehic le

Turns

Feedbac k: Current vehic le direction of tra vel

Degree System

(desired)

ofTurning

If direction of vehic le is not equal to the desired compass point,contr ol system adjusts steering appr opriatel y

(note: vehic le can point one wa y and go another)

Page 19: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 19

Manual Throttle

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

OPEN LOOP

Set

Throttle

Open Engine

Engine

Speeds Up

or Close FuelLineValve

(Slows Do wn)

Page 20: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 20

Governor -Contr olled Throttle

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

CLOSED LOOP

Feedbac k

Set

Throttle

Open Engine

Feedbac k: Engine shaft r otation speed

or CloseValve

FuelLine

If load on engine increases, the r otation slo ws,

Engine

Speeds Up(Slows Do wn)

causing the go vernor to open the thr ottle

Page 21: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 21

Hovercraft A

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

OPEN LOOP

Countdo wn

Timer

Turn Steering

Hovercraft

Turns

Right Mechanism

Page 22: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 22

Hovercraft B

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

CLOSED LOOP

Feedbac k

Sensor s

Feedbac k: Orientation c hang es

→→→→

cour se chang es

As ho vercraft c hang es orientation with respect to tape ,light sensor readings c hang e, causing cour se corrections

Light

Contr ol Steering

Hovercraft

Turns

Algorithm Mechanism

Page 23: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 23

PID Contr oller

Proportional, Integral, Derivative

Proportional

term ensures the system reacts as soon as there is a c hang e in the system: chang e in ne w output f ollo ws the err or.

Integral

term pr ovides h ysteresis, trac ks eff ectiveness of contr ol system: measures delta between output and input to date .

Derivative

term anticipates future beha vior: reacts to quic k chang es in plant output vs. input.

InputtoSystem

Contr oller

Software/Har dware

Plant

Thing being Contr olled

System

Output

Feedbac k

u(t)

u t

( )

K

P

e t

( )

K

I

e t

( )

td

0

t

K

D

dedt-------+ +=

e(t)

Page 24: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 24

Example System

Thermostat — A P opular Contr ols Example

Water heater: contr olled b y volta ge

Sensor: temperature (V representing T)

Page 25: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 25

Example System

Thermostat — A P opular Contr ols Example

Response of system to step input

Page 26: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 26

Propor tional Contr oller

while (1)error = desired() – reading();increase_temp( error * pGain );

Page 27: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 27

Integral Contr oller

while (1)cum_E += [desired() – reading()];cum_E = bound_cumulative_error( cum_E );increase_temp( cum_E * iGain );

Page 28: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 28

PI Contr oller

while (1)error = desired() – reading();cum_E += error; // and then bound itincrease_temp( error * pGain +

cum_E * iGain );

Page 29: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 29

PID Contr oller (predictive)

error = desired() – reading();cum_E += error; // and then bound itdelta = prev_reading – this_reading;increase_temp( error * pGain +

cum_E * iGain + delta * dGain );

Page 30: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 30

Circuits: Relays

Two VERY DIFFERENT things:

trip v olta ge (to po wer electr omagnet)

max current (thr ough s witc h)

SPST SPDT DPST

Page 31: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 31

Circuits: Simple F an Contr ol

Downside: onl y on/off contr ol

NXT

Relay

Fan

9.6V

Page 32: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 32

Circuits: Reversing F ans

* thanks to Pr of . Wes Lawson

RCX

OutputM Fan

Battery Pack

DPST Relays

Page 33: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 33

Hovercraft Contr ol Issues

Issues y ou will ha ve to ad dress:

Sensing location

Sensing speed/direction

Changing location/speed/direction

Making inf ormed decisions

Page 34: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 34

Sensing Location

Echolocation (distance fr om walls)?

Dark/light sensor (f ollo wing tape)?

Magnetic sensor (f ollo wing tape)?

GPS (absolute coor dinates)?

Page 35: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 35

Sensing Speed/Direction

Is follo wing tape/walls suffi cient?

What about angular momentum?

Page 36: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 36

Changing Orientation

Turning is ob vious… or is it?

How do y ou

stop

turning?

Forwar d thrust is ob vious… or is it?

Are y our fans perf ect?

Page 37: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 37

NXT vs. RCX: servos

Does not necessaril y

simplify

contr ol …

BUT — reduces n umber of outputs b y 1AND gives a fi ner degree of contr ol

Page 38: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 38

Some Things to Think About

Whic h is likel y to be easiest?

When y ou drive , do y ou look ahead to turn?

Tape sensor

Page 39: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 39

Some Things to Think About

How do y ou tell the diff erence?

And does it matter?

Page 40: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 40

Some Things to Think About

How do y ou tell the diff erence?

And does it matter?

Page 41: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 41

NXT vs. RCX: sensor inputs

4 inputs vs. 3 — RCX has 3 inputs :

Page 42: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 42

NXT vs. RCX: sensor inputs

4 inputs vs. 3 — NXT has 4:

Page 43: Sensing, Actuation, Control

SENSORS &

CONTROL

ENES 100

Bruce Jacob

SLIDE 43

Bottom Line

The contr ol pr oblem will be your big gest headac he

when designing y our ho vercraft.

Give it a lot of thought.