Sensing, Actuation, Control

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 1 Sensing, Actuation, Control ENES 100 Prof. Bruce Jacob Electrical & Computer Engineering (with enormou...
Author: Primrose Parker
48 downloads 3 Views 702KB Size
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

SENSORS & CONTROL ENES 100

The Toilet

Bruce Jacob SLIDE 2

• Sensor: float • Actuator: valve • Power: water level • Failsafe: overflow tube •

2000 year old control system



System not used for present purpose until 19th century (cholera epidemics)

SENSORS & CONTROL ENES 100

The Toilet

Bruce Jacob SLIDE 3

• Sensor: float • Actuator: valve • Power: water level • Failsafe: overflow tube •

2000 year old control system



System not used for present purpose until 19th century (cholera epidemics)

SENSORS & CONTROL ENES 100

Power Brakes (e.g. disk)

Bruce Jacob SLIDE 4

• Sensor: foot pedal • Actuator: brake calipers • Power: hydraulic • Failsafe: dual system •

Manual activation



Separate hydraulic networks (per brake or per opposite pair)



Additional failsafe (optional): power needed to hold brake open (fails closed)

SENSORS & CONTROL ENES 100

Power Brakes (e.g. disk)

Bruce Jacob SLIDE 5

• Sensor: foot pedal • Actuator: brake calipers • Power: hydraulic • Failsafe: dual system •

Manual activation



Separate hydraulic networks (per brake or per opposite pair)



Additional failsafe (optional): power needed to hold brake open (fails closed)

SENSORS & CONTROL ENES 100

Antilock Brakes

Bruce Jacob SLIDE 6

• Sensor: wheel speed • Actuator: pulse emitter • Power: hydraulic • Failsafe: manual, sensors



Each wheel monitored separately for significant deviation in wheel speed



Each wheel controlled/pulsed separately



Problem: contaminated sensors



Add’l sensors: wheel angle & gyroscope

SENSORS & CONTROL ENES 100

Antilock Brakes

Bruce Jacob SLIDE 7

• Sensor: wheel speed • Actuator: pulse emitter • Power: hydraulic • Failsafe: manual, sensors



Each wheel monitored separately for significant deviation in wheel speed



Each wheel controlled/pulsed separately



Problem: contaminated sensors



Add’l sensors: wheel angle & gyroscope

SENSORS & CONTROL ENES 100

Fletched Arrow

Bruce Jacob SLIDE 8

• Sensor: fletching • Actuator: fletching • Power: pressure • Failsafe: n/a •

Bare shaft: completely unstable



Weighted tip: slightly more stable



Fletching acts as control mechanism (correction proportional to deviation)

SENSORS & CONTROL ENES 100

Fletched Arrow

Bruce Jacob

CoM, CoP

SLIDE 9

CoM

CoP

CoM

CoP • Sensor: fletching • Actuator: fletching • Power: pressure • Failsafe: n/a



Bare shaft: completely unstable



Weighted tip: slightly more stable



Fletching acts as control mechanism (correction proportional to deviation)

SENSORS & CONTROL ENES 100

Steam Valve

Bruce Jacob SLIDE 10

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



Plug/spring acts as control mechanism (correction proportional to deviation: higher pressure => valve opens more)

SENSORS & CONTROL ENES 100

Steam Valve

Bruce Jacob SLIDE 11

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



Plug/spring acts as control mechanism (correction proportional to deviation: higher pressure => valve opens more)

SENSORS & CONTROL ENES 100

Centrifugal Governor

Bruce Jacob SLIDE 12

• Sensor: centrifugal pendulum • Actuator: valve • Power: torque on shaft • Failsafe: backup/none

SENSORS & CONTROL ENES 100

Centrifugal Governor

Bruce Jacob SLIDE 13

• Sensor: centrifugal pendulum • Actuator: valve • Power: torque on shaft • Failsafe: backup/none



Also called the “flyball” governor



Proportional control: the faster the rotation, the more the valve closes



On nearly every steam engine made

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 14

Feedback Control OPEN LOOP Input to System

• • •

Controller

Plant

Software/Hardware

Thing being Controlled

System Output

Power Brakes Power-Assist Steering Manual Throttle

CLOSED LOOP Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

Feedback

• • •

Anti-Lock Brakes Compass-Assisted Steering Governor-Controlled Throttle

System Output

SENSORS & CONTROL ENES 100 Bruce Jacob

Power Brakes OPEN LOOP

SLIDE 15

Input to System

Foot on Pedal

Controller

Plant

Software/Hardware

Thing being Controlled

Magnify Force

Brake System

System Output

Car Slows

SENSORS & CONTROL ENES 100 Bruce Jacob

Anti-Lock Brakes CLOSED LOOP

SLIDE 16

Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

System Output

Feedback

Foot on Pedal

Even or Pulsed Force

Individual Brakes per Wheel

Car Slows

Feedback: Wheel rotation speed Are any wheels slipping? Are any wheels rotating much more slowly than the others? If so, slipping brakes are pulsed to try to recover traction.

SENSORS & CONTROL ENES 100 Bruce Jacob

Power-Assist Steering OPEN LOOP

SLIDE 17

Input to System

Torque on Steering Wheel

Controller

Plant

Software/Hardware

Thing being Controlled

Magnify Force (gain is variable, rel. to veh. speed)

Vehicle Speed

Hydraulic Steering System

System Output

Car Turns

SENSORS & CONTROL ENES 100 Bruce Jacob

Compass-Assisted Steering CLOSED LOOP

SLIDE 18

Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

System Output

Feedback

Compass Direction (desired)

Appropriate Degree of Turning

Steering System

Vehicle Turns

Feedback: Current vehicle direction of travel If direction of vehicle is not equal to the desired compass point, control system adjusts steering appropriately (note: vehicle can point one way and go another)

SENSORS & CONTROL ENES 100 Bruce Jacob

Manual Throttle OPEN LOOP

SLIDE 19

Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

Set Throttle

System

Open or Close Valve

Engine Fuel Line

Output

Engine Speeds Up (Slows Down)

SENSORS & CONTROL ENES 100 Bruce Jacob

Governor-Controlled Throttle CLOSED LOOP

SLIDE 20

Input to System

System

Controller

Plant

Software/Hardware

Thing being Controlled

Output

Feedback

Set Throttle

Open or Close Valve

Engine Fuel Line

Engine Speeds Up (Slows Down)

Feedback: Engine shaft rotation speed If load on engine increases, the rotation slows, causing the governor to open the throttle

SENSORS & CONTROL ENES 100 Bruce Jacob

Hovercraft A OPEN LOOP

SLIDE 21

Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

Countdown Timer

Turn Right

Steering Mechanism

System Output

Hovercraft Turns

SENSORS & CONTROL ENES 100 Bruce Jacob

Hovercraft B CLOSED LOOP

SLIDE 22

Input to System

Controller

Plant

Software/Hardware

Thing being Controlled

System Output

Feedback

Light Sensors

Control Algorithm

Steering Mechanism

Hovercraft Turns

Feedback: Orientation changes → course changes As hovercraft changes orientation with respect to tape, light sensor readings change, causing course corrections

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 23

PID Controller Proportional, Integral, Derivative Input to System

e(t)

u(t)

Controller Software/Hardware

Plant

System Output

Thing being Controlled

Feedback

t

de u ( t ) = K P e ( t ) + K I ∫ e ( t ) dt + K D ------dt 0 •





Proportional term ensures the system reacts as soon as there is a change in the system: change in new output follows the error. Integral term provides hysteresis, tracks effectiveness of control system: measures delta between output and input to date. Derivative term anticipates future behavior: reacts to quick changes in plant output vs. input.

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 24

Example System Thermostat — A Popular Controls Example



Water heater: controlled by voltage



Sensor: temperature (V representing T)

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 25

Example System Thermostat — A Popular Controls Example



Response of system to step input

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 26

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

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 27

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

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 28

PI Controller while (1) error = desired() – reading(); cum_E += error; // and then bound it increase_temp( error * pGain + cum_E * iGain );

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 29

PID Controller (predictive) error = desired() – reading(); cum_E += error; // and then bound it delta = prev_reading – this_reading; increase_temp( error * pGain + cum_E * iGain + delta * dGain );

SENSORS & CONTROL ENES 100

Circuits: Relays

Bruce Jacob SLIDE 30

SPST

SPDT

DPST

Two VERY DIFFERENT things: •

trip voltage (to power electromagnet)



max current (through switch)

SENSORS & CONTROL ENES 100

Circuits: Simple Fan Control

Bruce Jacob SLIDE 31

NXT

Fan 9.6V

Relay Downside: only on/off control

SENSORS & CONTROL ENES 100

Circuits: Reversing Fans

Bruce Jacob

DPST Relays

SLIDE 32

Battery Pack

RCX Output

M

* thanks to Prof. Wes Lawson

Fan

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 33

Hovercraft Control Issues Issues you will have to address: •

Sensing location



Sensing speed/direction



Changing location/speed/direction



Making informed decisions

SENSORS & CONTROL ENES 100

Sensing Location

Bruce Jacob SLIDE 34



Echolocation (distance from walls)?



Dark/light sensor (following tape)?



Magnetic sensor (following tape)?



GPS (absolute coordinates)?

SENSORS & CONTROL ENES 100

Sensing Speed/Direction

Bruce Jacob SLIDE 35



Is following tape/walls sufficient?



What about angular momentum?

SENSORS & CONTROL ENES 100

Changing Orientation

Bruce Jacob SLIDE 36

Turning is obvious … or is it?

Forward thrust is obvious … or is it?

How do you stop turning?

Are your fans perfect?

SENSORS & CONTROL ENES 100

NXT vs. RCX: servos

Bruce Jacob SLIDE 37

Does not necessarily simplify control … BUT — reduces number of outputs by 1 AND gives a finer degree of control

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 38

Some Things to Think About Which is likely to be easiest?

Tape sensor

When you drive, do you look ahead to turn?

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 39

Some Things to Think About How do you tell the difference?

And does it matter?

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 40

Some Things to Think About How do you tell the difference?

And does it matter?

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 41

NXT vs. RCX: sensor inputs 4 inputs vs. 3 — RCX has 3 inputs:

SENSORS & CONTROL ENES 100 Bruce Jacob SLIDE 42

NXT vs. RCX: sensor inputs 4 inputs vs. 3 — NXT has 4:

SENSORS & CONTROL ENES 100

Bottom Line

Bruce Jacob SLIDE 43

The control problem will be your biggest headache when designing your hovercraft.

Give it a lot of thought.

Suggest Documents