Cyber-Physical Systems Feedback Control IECE 553/453 Fall 2019 - - PowerPoint PPT Presentation

cyber physical systems feedback control
SMART_READER_LITE
LIVE PREVIEW

Cyber-Physical Systems Feedback Control IECE 553/453 Fall 2019 - - PowerPoint PPT Presentation

Cyber-Physical Systems Feedback Control IECE 553/453 Fall 2019 Prof. Dola Saha 1 Control System in Action Honeywell Thermostat, 1953 Chrysler cruise control, 1958 Feedback Systems: An Introduction for Scientists and Engineers 2 Closed


slide-1
SLIDE 1

1

Cyber-Physical Systems Feedback Control

IECE 553/453– Fall 2019

  • Prof. Dola Saha
slide-2
SLIDE 2

2

Control System in Action

Honeywell Thermostat, 1953 Chrysler cruise control, 1958

Feedback Systems: An Introduction for Scientists and Engineers

slide-3
SLIDE 3

3

Closed Loop Control

Plant Sensors Analog Interface Software ADC or input compare Compare Control Software Actuators

Noise Noise

Real state variables Desired state variables –X*(t) Sensor

  • utputs

Driving forces X’(t) Y(t) Control commands U(t) Errors E(t)=X*(t)-X(t) State estimator D(t)

Disturbing forces

X(t) Estimated state variables

slide-4
SLIDE 4

4

Open Loop Control

Ø Control Action is independent of the output of the system Controller Plant Actuators

Desired state variables –X*(t) Control commands U(t) Driving forces D(t)

Noise

Disturbing forces Real state variables X(t)

slide-5
SLIDE 5

5

Open Loop Control

Ø state estimator eliminated § not well suited for a complex plant Ø assumes disturbing forces have little effect on the plant Ø less expensive than closed-loop control § example: electric toaster

slide-6
SLIDE 6

6

Example Problem: Bike in straight Line

ØSteer the bike in a straight line blindfolded ØOpen loop à no sensor feedback ØWhat if you hit a rock? ØWhat if the handle bars aren’t perpendicular to the

wheels?

slide-7
SLIDE 7

7

Control Systems Strategy

Ø Strategy § plant is a system that is intended to be controlled § collect information concerning the plant – data acquisition system (DAS) § compare with desired performance § generate outputs to bring plant closer to desired performance Ø You can’t control what you can’t measure

slide-8
SLIDE 8

8

Control Systems

Ø Microcomputers are widely employed in control systems: § automotive ABS, ignition and fuel systems § household appliances § smart things § industrial robots § pacemakers Ø Why are we interested in Feedback Systems in CPS

course?

slide-9
SLIDE 9

9

Control Systems – Closed loop

Ø Closed-loop control § feedback loop implementation

  • suitable for complex plant

§ sensors and state estimator produce representation/estimation of state variables § these values are compared to desired values § control software generates control commands based upon the differences between estimated and desired values

slide-10
SLIDE 10

10

Closed Loop Control

Ø Control action depends on the output of the system Controller Plant Actuators

Desired state variables –X*(t) Control commands U(t) Driving forces D(t)

Noise

Disturbing forces Real state variables X(t)

Sensors

slide-11
SLIDE 11

11

Example Problem: Bike in straight Line

ØIf you can see the pavement à Closed Loop Approach ØControl based on error: PID ØProportional : Change handle angle proportional to the current

error

ØDerivative : Large handle corrections when error is changing

slowly, and small handle corrections when error is changing quickly

ØIntegral : Handle corrections based on the cumulative error

slide-12
SLIDE 12

12

Problem: Set Motor Velocity

Ø Open Loop Controller § Use trial and error to create relationship between velocity and voltage § Problems

  • Supply voltage change
  • Bumps in carpet
  • Motor Transients

Motor Velocity To Volts

Desired Velocity Actual Velocity

slide-13
SLIDE 13

13

Problem: Set Motor Velocity

Ø Closed Loop Controller § Feedback is used so that the actual velocity equals the desired velocity § Can use an optical encoder to measure actual velocity

Controller Motor

Desired Velocity Actual Velocity Adjusted Voltage err

slide-14
SLIDE 14

14

Step Response with No Controller

Ø Naive velocity to volts Ø Model motor with several

differential equations

Ø Slow rise time Ø Stead-state offset

Motor Velocity To Volts

Desired Velocity Actual Velocity

Time (sec) Velocity

slide-15
SLIDE 15

15

Step Response with Proportional Controller

Ø Big error big = big adj Ø Faster rise time Ø Overshoot Ø Stead-state offset (there is still an

error but it is not changing!)

Controller

Desired Velocity (Vdes) Adjusted Volts (X) err

( )

act des P des

V V K V X

  • ×

+ =

Time (sec) Velocity Motor

Actual Velocity (Vact)

slide-16
SLIDE 16

16

Step Response with PD Controller

Ø When approaching desired velocity

quickly, de/dt term counteracts proportional term slowing adjustment

Ø Faster rise time Ø Reduces overshoot

Controller

Desired Velocity (Vdes) Adjusted Volts (X) err

Time (sec) Velocity Motor

Actual Velocity (Vact)

dt t de K t e K V X

D P des

) ( ) (

  • +

=

slide-17
SLIDE 17

17

Step Response with PI Controller

Ø Integral term eliminates

accumulated error

Ø Increases overshoot

Controller

Desired Velocity (Vdes) Adjusted Volts (X) err

Time (sec) Velocity Motor

Actual Velocity (Vact)

ò

  • +

= dt t e K t e K V X

I P des

) ( ) (

slide-18
SLIDE 18

18

Step Response with PID Controller

Ø Combined

benefits of PI and PD

Controller

Desired Velocity (Vdes) Adjusted Volts (X) err

Time (sec) Velocity Motor

Actual Velocity (Vact)

dt t de K dt t e K t e K V X

D I P des

) ( ) ( ) (

  • +

+ =

ò

slide-19
SLIDE 19

19

Control Systems – Performance

Ø Performance metrics § steady-state controller error

  • an average value of the difference between desired and actual

performance § transient response

  • how quickly the system responds to change

§ stability

  • system output changes smoothly – without oscillation or unlimited

excursions

slide-20
SLIDE 20

20

General Approach to PID

Ø Proportional

Up = KpE

Ø Integral

Ui = Ui-1 + Ki E ∆t

Ø Derivative

Ud = Kd(E(n)-E(n-1))/ ∆t

Ø PID

U = Up + Ui + Ud

dt t dE K d E K t E K t U

d t i p

) ( ) ( ) ( ) ( + + =

ò

t t

slide-21
SLIDE 21

21

PID – Performance Measure

Ø Accuracy

§ Magnitude of the Error = Desired– Actual

Ø Stability

§ No oscillations

Ø Overshoot (underdamped, overdamped)

§ Ringing, slow

Ø Response Time to new steady state after

§ Change in desired setpoint § Change in load

tresponse

underdamped

slide-22
SLIDE 22

22

Comparison

Controller Response time Overshoot Error Open-Loop Smallest Highest Large Proportional Small Large Small Integral Decreases Increases Zero Derivative Increases Decreases Small change

slide-23
SLIDE 23

23

Parameter Tuning

Ø Manual Tuning Ø Ziegler–Nichols’ Tuning § Time Domain Method § Frequency Domain Method Ø Relay Feedback Ø Integrator Windup

slide-24
SLIDE 24

24

PID Controller in Software

Ø Wait for clock interrupt Ø Read input from sensor Ø Compute control signal Ø Send output to the actuator Ø Update controller variables Ø Repeat

slide-25
SLIDE 25

25

PID Controller Pseudocode

slide-26
SLIDE 26

26

Proportional Controller to Helicopter Problem

desired angular velocity error signal net torque

slide-27
SLIDE 27

27

Controller Summary

Ø Controller only as good as its sensor Ø Observe everything “What was it thinking?” Ø Change one parameter at a time Ø Choose stability over responsiveness