/
Introduction to  Control Introduction to  Control

Introduction to Control - PowerPoint Presentation

cheryl-pisano
cheryl-pisano . @cheryl-pisano
Follow
366 views
Uploaded On 2018-03-22

Introduction to Control - PPT Presentation

ECE383 ME 442 Fall 2015 Kris Hauser Motors Industrial robot motors are typically servos highgain positioncontrolled sometimes velocitycontrolled motors Control vector is a setpoint ID: 660835

time control model system control time system model pid motion controller feedforward torque queue robot feedback errors systems trajectory

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Introduction to Control" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Introduction to Control

ECE383 / ME 442 Fall 2015

Kris HauserSlide2

Motors

Industrial robot motors are typically

servos

: high-gain, position-controlled (sometimes velocity-controlled) motorsControl vector is a setpoint (or )Stiff system => dynamics function treated as “nearly an identity function”Caveats: torque, acceleration, velocity limits, centrifugal forces, friction, backlash in gears…

 Slide3

Motors

Industrial robot motors are typically

servos

: high-gain, position-controlled (sometimes velocity-controlled) motorsControl vector is a setpoint (or

)

Stiff system => dynamics function treated as “nearly an identity

fn

”Caveats: torque, acceleration, velocity limits, centrifugal forces, friction, backlash in gears…Baxter, Robonaut, Valkyrie, several other robots have Series Elastic Actuators (Pratt and Williamson 1995, Williamson 1995)Safer for humans, force control possible, but cannot attain high frequency motion. Rethink Robotics wraps a black box control loop to control SEA setpoint, and provides four control modes:Position: seek to desired joint positions, with self-collision avoidanceVelocity: move at desired joint velocities, with self-collision avoidanceTorque: apply “raw” desired torques (w/o collision avoidance)Raw position: same as position, but w/o collision avoidance

 

Note: not actually the Baxter’s SEASlide4

Underactuation

Roughly, when number of controls are fewer than degrees of freedom

More precisely, effects of controls do not span a full rank subset of the state space

Examples: car-like vehicles, legged robots, hands, Segways, UAVsIs it even possible to perform a task?Sometimes!Requires carefully designing reactions to sensor dataSlide5
Slide6

Control Theory

The use of

feedback

to regulate a signalControllerPlant

Desired signal x

d

Signal x

Control input u

Error e = x-x

d

(By convention, x

d

= 0)

x’ = f(x,u)Slide7

What might we be interested in?

Controller engineering

Produce a policy u(

x,t), given a description of the plant, that achieves “good” performanceVerifying theoretical propertiesConvergence, stability, optimality of a given policy u(x,t)System identification (system ID)Describe the plant using a computational model, e.g., for simulation, policy optimization, etcSlide8

Agenda

Basic feedback control

PID

controlClassic linear control theoryTrajectory-following controlNote: this course uses a state space model, but traditional controls courses heavily use frequency domain model (specifically, Laplace transform)State space is usually more appropriate for non-linear systemsSlide9

Dynamic systems

The time-evolution of a (deterministic, time-invariant) dynamic system is given by

a function

x is the state (typically )u is the control (aka the input). Typically

We may wish to move the state to a desired location, but

are not able to do so instantaneously or in a trivial manner

(e.g. a straight line) due to:Differential constraint f Control bounds UPossible other constraints on x, e.g., bounds, obstacles Slide10

Terminology

A

single-input, single

-output (SISO) system has n=m=1A multi-input, multi-output (MIMO) system is everything elseA linear, time-invariant (LTI) dynamic system is given by the dynamics function

A

is an

n

xn matrixB is an nxm matrixc is an nx1 vectorNote: can drop c by increasing state or control dimension by 1 (exercise) Slide11

Second order systems, phase space

Usually, robot dynamics is assumed to be a

second order

dynamic systemOften, we have either motor torque inputs or setpoint inputs

We can convert this to a first-order dynamic system by operating

in

phase space

Dynamic equation is of the form

 Slide12

Example: 1D Point Mass

Mass M

2D configuration space (state space)

Controlled force u=fEquations of motion:

p

v

dp

/

dt = v

dv/dt =

f / MSlide13

Example: 1D Point Mass

Mass M

2D configuration space (state space)

Controlled force u=fEquations of motion:

p

v

dp

/

dt = v

dv/dt =

f / M

Note: a linear system with

and

 Slide14

Example: 1D Point Mass

p

v

dp

/

dt

= dv

dv/

dt = f / M

Solution:

v(t) = v(0)+t f /M

p(t

) =

p(0

)+t v(0) + ½ t

2

f / M

p

v

f

=0Slide15

Example: 1D Point Mass

p

v

p

v

f

>0

dp

/

dt

= dv

d

v

/

d

t

=

f

/

M

Solution:

v(t) = v(0)+t f /M

p(t

) =

p(0

)+t v(0) + ½ t

2

f / MSlide16

Example: 1D Point Mass

p

v

p

v

f<0

dp

/

dt

= dv

d

v

/

d

t

=

f

/

M

Solution:

v(t) = v(0)+t f /M

p(t

) =

p(0

)+t v(0) + ½ t

2

f / MSlide17

Example: 1D Point Mass

p

v

p

v

|f|<=f

max

dp

/

dt

= dv

d

v

/

d

t

=

f

/

M

Solution:

v(t) = v(0)+t f /M

p(t

) =

p(0

)+t v(0) + ½ t

2

f / MSlide18

Toy Nonlinear Systems

Cart-pole

Acrobot

Mountain carSlide19

“Error”

A fact of life

Sensing error

Motor control noise / peculiaritiesDisturbancesBreakagesUnobservablesOther intelligent agents (e.g., human operators, humans in environment)Slide20

“Error”

A fact of life

Sensing error

Motor control noise / peculiaritiesDisturbancesBreakagesUnobservablesOther intelligent agents (e.g., human operators, humans in environment)The goal of feedback control is to choose controls that sense and respond to errors in order to achieve the desired taskSlide21

Model-free vs

model-based

Two general philosophies:

Model-free: do not require a dynamics model to be provided Model-based: do use a dynamics model during computationModel-free methods:SimplerTend to require much more manual tuning to perform wellModel-based methods:Can achieve good performance (optimal w.r.t. some cost function)Are more complicated to implementRequire reasonably good models (system-specific knowledge)Calibration: build a model using measurements before behaving Adaptive control: “learn” parameters of the model online from sensorsSlide22

P

I

D

controlProportional-Integral-Derivative controllerA workhorse of 1D control systemsModel-free, myopicSlide23

Proportional term

u(t) = -

K

p x(t)Negative sign assumes control acts in the same direction as x

x

t

GainSlide24

Integral term

u(t) = -

K

p x(t) - Ki I(t)I(t) = (accumulation of errors)

 

x

t

Residual steady-state errors driven asymptotically to 0

Integral gainSlide25

Instability

For a 2

nd

order system (momentum), P control

x

t

DivergenceSlide26

Derivative term

u(t) = -

K

p x(t) – Kd x’(t)

x

Derivative gainSlide27

Putting it all together

u(t) = -

K

p x(t) - Ki I(t) - Kd x’(t)I(t) =

 Slide28

Controller Tuning Workflow

Hypothesize a control policy

Analyze performance:

Assume a modelAssume disturbances to be handledTest performance either through mathematical analysis, or through simulationGo back and redesign control policyMathematical techniques give you more insight to improve redesign, but require more thoughtSlide29

Parameter tuningSlide30

Example: Damped Harmonic Oscillator

Second order time invariant linear system, PID controller

x’’(t) = A x(t) + B x’(t) + C + D u(x,x’,t)

For what starting conditions, gains is this stable and convergent?Slide31

Stability and Convergence

System is

stable

if errors stay boundedSystem is convergent if errors -> 0Slide32

Example: Damped Harmonic Oscillator

x’’ = A x + B x’ + C + D u(x,x’)

PID controller u = -K

p x –Kd x’ – Ki Ix’’ = (A-DKp) x + (B-DKd) x’ + C - D Ki ISlide33

Homogenous solution

Instable if A-DK

p

> 0Natural frequency w0 = sqrt(DKp-A)Damping ratio z=(DKd-B)/2w0If z > 1, overdampedIf z < 1, underdamped (oscillates)Slide34

Example: Trajectory following

Say a trajectory

x

des(t) has been designedE.g., a rocket’s ascent, a steering path for a car, a plane’s landingApply PID controlu(t) = Kp (xdes(t)- x(t)) - Ki I(t) + Kd (x’des(t)-x’(t))I(t) =

The designer of

x

des

needs to be knowledgeable about the controller’s behavior! 

x

des

(t)

x(t)

x(t)Slide35

Motion queue controllers

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

 Slide36

Motion queue controllers

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

 Slide37

Motion queue controllers

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

 Slide38

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

Append trajectory

Parameters

: Trajectory suffix

y

(

t

):[0,

T

]->

RSlide39

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

 Slide40

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

Insert trajectory

Parameters

:

Insertion time

t

insert

Trajectory suffix

y

(

t

):[0,

T

]->

RSlide41

time

Current time

PID Controller

Motion Queue

Robot

Torque

 

 Slide42

Multivariate Systems

x’ = f(x,u)

x

X  Rn u U  RmBecause m  n, and variables are coupled, this is not as easy as setting n PID controllers Slide43

Linear Time-Invariant Systems

Linear: x’ = f(x,u,t) = A(t)x + B(t)u

LTI: x’ = f(x,u) = Ax + Bu

Nonlinear systems can sometimes be approximated by linearizationSlide44

Convergence of LTI systems

x’ = A x + B u

Let u = - K x

Then x’ = (A-BK) xThe eigenvalues li of (A-BK) determine convergenceEach li may be complexMust have real component between (-∞,0]Slide45

Feedforward control

If we

know

a model for a system and know how it should move, why don’t we just compute the correct control?Ex: damped harmonic oscillatorx’’ = A x + B x’ + C + D uCalculate a trajectory x(t) leading to x(T)=0 at some point TCompute its 1st and 2nd derivatives x’(t), x’’(t)Solve for u(t) = 1/D*(x’’(t) - A x(t) + B x’(t) + C)Would be perfect!Slide46

Feedforward control

If we

know

a model for a system and know how it should move, why don’t we just compute the correct control?Ex: damped harmonic oscillatorx’’ = A x + B x’ + C + D uCalculate a trajectory x(t) leading to x(T)=0 at some point TCompute its 1st and 2nd derivatives x’(t), x’’(t)Solve for u(t) = 1/D*(x’’(t) - A x(t) + B x’(t) + C)ProblemsControl limits: trajectory must be planned with knowledge of control constraintsDisturbances and modeling errors: open loop control leads to errors not converging to 0Slide47

Handling errors: feedforward + feedback

Idea: combine

feedforward

control uff with feedback control ufbe.g., ufb computed with PID controlFeedback term doesn’t have to “work” as hard (= 0 ideally)Plantuff

Feedforward calculation

x

(0)

+ufb

Feedback controller

u

x

(t)

x

desSlide48

Application: Feedforward control

Feedback control

: let torques be a function of the current error between actual and desired configuration

Problem: heavy arms require strong torques, requiring a stiff systemStiff systems become unstable relatively quicklySlide49

Application: Feedforward control

Solution: include

feedforward

torques to reduce reliance on feedbackEstimate the torques that would compensate for gravity and achieve desired accelerations (inverse dynamics), send those torques to the motorsSlide50

Handling errors: feedforward + feedback

Idea: combine

feedforward

control uff with feedback control ufbe.g., ufb computed with PID controlFeedback term doesn’t have to “work” as hard (= 0 ideally)Plantuff

Feedforward calculation

x

(0)

+ufb

Feedback controller

u

x

(t)

x

des

Model based

Model freeSlide51

Next class: Klamp’t simulation and control

Reading:

Klamp’t simulation tutorial