33
Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University of Pittsburgh, Pittsburgh, PA 15260 Honors Robotics February 8, 2010

Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Embed Size (px)

Citation preview

Page 1: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

1

Control Systems for Application in Robotics

Dara Kusic

Department of Computer Science

University of Pittsburgh, Pittsburgh, PA 15260

Honors RoboticsFebruary 8, 2010

Page 2: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

2

OUTLINEControl problems in robotics

Centralized, single robot control

– Open-loop & closed-loop (feedback) control

– Model predictive control

Decentralized, multiple robot control

Advanced control topcis

– Machine learning and adaptive control

Page 3: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

3

Control problems in robotics

Localization -- how does a mobile robot know where it is?

Navigation – how does a mobile robot reach its destination?

Actuation – how does the robot manuver its end effector to make contact with a target?

Coordination – how to robot swarms cooperate to solve a common task?

Page 4: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

4

Common control objectives

Tracking -- e.g. maintain a specified distance from a moving target

Disturbance rejection – e.g. maintain dead-reckoning mode under windy conditions

Optimization – e.g. deliver the daily mail to cubicles in the shortest path possible

Page 5: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

5

OUTLINEControl problems in robotics

Centralized, single robot control

– Open-loop & closed-loop (feedback) control

– Model predictive control

Decentralized, multiple robot control

Advanced control topcis

– Machine learning and adaptive control

Page 6: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

6

Single robot open-loop control Control input is computed only from current state and a model

of the system– The use of odometry is an example of open loop control, where the

robot position is estimated via data from velocity actuators, integrated over time

Advantage: Simple to use – requires no data from sensors to be integrated in the control scheme

Disadvantage: Error-prone due to inaccuracies in system model and environmental disturbances

– Open-loop control does not have the capacity for error-correction

setpointcontroller system

signal output

noisedisturbance

Page 7: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

7

Closed-loop or feedback control

setpointcontroller system

observed value

error signal output

Control input is computed from current state and measurements of an observable output of the system

– Automobile cruise control is a typical example of feedback control, where acceleration or deceleration is updated using the error from the desired velocity from the actual velocity

Advantage: More accurate than open-loop control particularly in uncertain operating conditions; no model requried

Disadvantage: More costly due to the use of measurement instrumentation and sensors; noisy data

noisedisturbance

Page 8: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

8

Feedback control in discrete systems

Robotic systems will typically operate in the discrete domain

Design choices of sampling time must be carefully considered–At what frequency to sample system output?–At which frequency to deliver control input?

»Which frequency should be smaller?

Page 9: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

9

On-off feedback ontrolFor example, a thermostat, when the heater is either

on or offDepending on the frequency of control, overhead of

on-off, etc, this could cause overshoots and undershoots (ripples)

– Oscillation is a common behavior in control systems– Hysteresis may be unacceptable in the system: e.g. To

maintain a temperature of 20 °C, one might set a thermostat to turn on the furnace when the temperature drops below 18 °C, and turn it off when the temperature exceeds 22 °C. If the temperature is 21 °C, then it is not possible to predict whether the furnace is on or off without knowing the history of the temperature.

Page 10: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

10

Example of control phenomena

Increase the quantity until you get to the setpoint– Temperature, angle, speed, etc

If too much, reduce the quantity, until the setpoint Design tradeoff between the number and magnitude of the osillations, and the rise

time.

setpoint

overshoot Ripple

Page 11: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

11

Control propertiesStability – for any bounded input, the output

of the system is also boundedAccuracy – the proximity of the measured

output of the system to its desired operating point in its steady-state

Overshoot – how far the control input causes the system to overreach its operating point

Rise time – the time to respond to a disturbance or change in setpoint

Settlng time – the time to converge to the desired operating point

Page 12: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

12

PID feedback controlProportional-Integral-Derivative control

–Proportional value reacts to the current error between the desired setpoint and the measured quantity

– Integral value reacts to the cumulative error–Derivative value reacts to the recent change in

the errorMay implement only P control, I control, D

control, or any combination thereinEach type of control, acting independently,

will exhibit different behaviors and limitations

Page 13: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

13

PID feedback ontrol

The discrete form of PID control can be represented by the following:

)()( :where

)]1()([)()(

)()()()(

0

kyke

kekeKieKkeK

kukukuku

D

k

iIP

DIP

)2()()1()2

()()()1( :fncn. with txfr. keT

Kke

T

KKke

T

KKTKk(u)k-u

s

D

s

DP

s

DIsP

Page 14: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

14

Characterization of P controllersProportional controllers will have short rise and settling

times, but also a steady-state error– As P increases, the rise time and error will decrease, but the

overshoot will increase. To large a value of P will result in instability.Process variable Control variable

Page 15: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

15

Characterization of I controllers Integral controllers will zero steady-state error, but have

longer settlings times.– As P increases, the rise time and error will decrease, but the

overshoot will increase. To large a value of P will result in instability.

Page 16: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

16

Characterization of D controllersDerivative can reduce oscillations but add to the

settling time.– Typically, D controllers are used for gradual control in long-

running processes such as thermal or chemical.

Page 17: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

17

Characterization of PI controllersAdding an integral term to a proportional controller

will reduce the rise-time and steady-state error, but may introduce additional overshoot and oscillations

Page 18: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

18

Characterization of PID controllersAdding a derivative term can damp the oscillations,

and will generally have little effect on the rise time and settling time.

Page 19: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

19

Summary of effects as term increases

Term Rise time Overshoot Settling Time Error

Proportional Decrease Increase Little effect Decrease

Integral Decrease Increase Increase Decrease to zero

Derivative Small decrease

Small decrease

Decrease No effect

Page 20: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

20

PID tuning In a real system, PID tuning can be something of an art

– Overhoot thresholds– Oscillation tolerance– Rise time constraints

There are, however, some ‘rules of thumb’ for initial values (as applied to the ideal parallel form presented herein)

Start with the integral and derivative terms set to zero, then add integral until error is zero, and deriative until oscillations decreasedPD

i

PI

P

TKK

T

KK

ΔP

ΔC

GK

1

Page 21: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

21

Cascading controlCascading control is when one controller, an outer, or primary

controller, controls an inner, or secondary controller. The cascade can continue recursively to the nth inner controller.

– Cascading control is implemented when a process with slow dynamics, such as temperature in a large tank, is influenced by a process with fast dynamics, such as the flow rate of hot water into the tank. The primary controller will determine the setpoint for the secondary controller. For example, if the primary controller wishes to raise the tank temperature to 100 Celcius, it will determine a setpoint for the flow rate of steam into the tank. The secondary controller will regulate the valve position to maintain that setpoint.

– In robotics, a primary controller might wish to maintain a constant velocity by determining a setpoint acceleration for a secondary controller. The secondary controller will track that acceleration by modulating the pulse rate to the motors.

Page 22: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

22

Model predictive or receding horizon control

Advantages– Systematic use of predictions to improve control performance– Inherent compensation for dead times– Multi-objective and non-linear optimization

Disadvantages– Requires an accurate system model, predictive filter– Computationally expensive state-space control

System

Predictivefilter

Systemm odel

System O ptim izer

W orkloadforecast

C ontro linput to

evaluate

Estim atedstate

W orkloadarriva l

O bservedstate

C ontro linput

Page 23: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

23

Model predictive or receding horizon control

],1[

:horizon Prediction

hkk

k+4k+3

Obtain the sequence of control inputs that maximize (or minimize) an objective function

Repeat the process at time k+1

k+2

u0

un

u0…

un

Use a system model to estimate future system states, over a prediction horizon

k+1

u0

un

)1(ˆ kx

)2(ˆ kx )(ˆ hkx )3(ˆ kx

)1(ˆ kx Apply the first control input in the sequence; discard the rest

x(k)

Page 24: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

24

Statistical filteringMeasurement data may be noisy with statistical variations

– Should the robot react to every perceived disturbance?

Statistical filters can smooth noisy data– Exponentially weighted moving averages

– Adjusted averages for weighted standard deviation

– Outlier rejection (low-pass filtering)

)1()1()()( kykyky

)),(()(1

)(~2 HkkystdevWiy

Hky

k

Hki

reject then )),,(( if ,:for HkkystdevWy(i)kHki

Page 25: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

25

OUTLINEControl problems in robotics

Centralized, single robot control

– Open-loop & closed-loop (feedback) control

– Model predictive control

Decentralized, multiple robot control

Advanced control topcis

– Machine learning and adaptive control

Page 26: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

26

Fully decentralized, multi-robot controlMultiple robots may need to cooperate to achieve a common

goal, e.g. Take possession of a soccer ball and attempt to score

– What would happen if all the robots simultaneously sought after the goal?

– Cell phone transmission protocols such as CSMA can provide inspiration for disbursing actions (e.g. via exponentially weighted action timers)

Distributed and decentralized control algorithms are typically used for coordination tasks

– Implicit communication via global data objects– Explicit communication via unicast, multicast, or broadcast in order of

increasing bandwidth. Forwarding of messages can occur by default, or by some more conservative algorithm such as gossip

Page 27: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

27

Hierarchical control Each robot swarm

has one leader, either human or robotic, making global decisions

Each robot in the swarm has a localized controller for autonomous actions

Messaging Bus

Robot swarm

Drone Drone

Off

Global ControlControllable Parameters:

e.g. Active swarm memebrs

Swarm Leader

DecommissionedRobots

Log System

Localcontroller

Robot 1 Robot 2 Robot 3 Robot 4 Robot C

Drones

Messaging Bus

Localcontroller

Localcontroller

Localcontroller

Localcontroller

Page 28: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

28

OUTLINEControl problems in robotics

Centralized, single robot control

– Open-loop & closed-loop (feedback) control

– Model predictive control

Decentralized, multiple robot control

Advanced control topcis

– Machine learning and adaptive control

Page 29: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

29

Machine learningConrtrols with high computational demand or unidentified

systems can benefit from machine learning algorithms– Neural networks

» Require discretiziation as output is continuous– Regression trees

» Compared to NN, large storage requirement, but faster execution– Bayesian networks– Reinforcement learning

The basic approach is to simulate the system under a range of conditions, and collect the data for training the approximation structure

Approximating structures can be applied to as a system model, or as the controller itself

Page 30: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

30

A neural network can be re-trained online to improve the accuracy of the approximation model

Online model refinement

System

System

Neural network

Adaptation algorithm

z-1 z-1z-1

z-1 z-1 z-1

-+

SystemOptimizerSystemSystem

SystemPredictive

filter

The re-training process is computationally expensive can be offloaded

Page 31: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

31

Taxonomy of fault handling

System Reliability

Non-redundant systems

Fault avoidance

Fault detection

Redundant systems

Fault-tolerant systems

Masking redundancy

Dyamic redundancy

Online detection/masking

Reconfig. RepairRetry

Page 32: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

32

Any component of the control system (sensor, actuator, control logic) can be implemented redundantly to provide assurance of correct operation

Fault-masking control

Module 1

Module 2

Module 3

Voter

Spare 1

Input Output

Page 33: Department of Computer Science, University of Pittsburgh 1 Control Systems for Application in Robotics Dara Kusic Department of Computer Science University

Department of Computer Science, University of Pittsburgh

33

Feedback control: – HELLERSTEIN, J. L., DIAO, Y., PAREKH, S., AND TILBURY, D. M.

Feedback Control of Computing Systems. Wiley-IEEE Press, 2004. Neural networks:

– HAYKIN, S. Neural Networks: A Comprehensive Foundation. Prentice-Hall, 1999.

Fault-tolerant systems:– STOREY, N. Safety-critical Computing Systems. Addison-Wesley, 1996.

Additional resources