Video 5.1 Vijay Kumar and Ani Hsieh of Penn Engineering, Vijay Kumar and AniHsieh In Summary s-plane Robo3x-1.1 56 Property of Penn Engineering, Vijay Kumar and AniHsieh Video 5.8

Post on 13-Jul-2018

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Robo3x-1.1 1Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.1Vijay Kumar and Ani Hsieh

Robo3x-1.1 2Property of Penn Engineering, Vijay Kumar and Ani Hsieh

The Purpose of Control

• Understand the “Black Box”

• Evaluate the Performance

• Change the Behavior

Output/ Response

Input/Stimulus/ Disturbance

System or Plant

Robo3x-1.1 3Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Anatomy of a Feedback Control System

Sensor

ControllerActuatorGas Pedal

OutputVehicle Speed

InputDesired Speed

Disturbance

+++-

Robo3x-1.1 4Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Twin Objectives of Control

• Performance

• Disturbance Rejection

Robo3x-1.1 5Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Learning Objectives for this Week

• Linear Control

• Modeling in the frequency domain

• Transfer Functions

• Feedback and Feedforward Control

Robo3x-1.1 6Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Frequency Domain Modeling

• Algebraic vs Differential Equations

• Laplace Transforms

• Diagrams

Robo3x-1.1 7Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Laplace Transforms

Integral Transform that maps functions from the time domain to the frequency domain

with

Robo3x-1.1 8Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Example

Let , compute

Robo3x-1.1 9Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Inverse Laplace Transforms

Integral Transform that maps functions from the frequency domain to the time domain

Robo3x-1.1 10Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Example

Let , compute

Robo3x-1.1 11Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Laplace Transform Tables

http://integral-table.com/downloads/LaplaceTable.pdf

Robo3x-1.1 12Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.2Vijay Kumar and Ani Hsieh

Robo3x-1.1 13Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Generalizing

Given

How do we obtain ?

Robo3x-1.1 14Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Partial Fraction Expansion

Case 1: Roots of D(s) are Real & Distinct

Case 2: Roots of D(s) are Real & Repeated

Case 3: Roots of D(s) are Complex or Imaginary

Robo3x-1.1 15Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 1: Roots of D(s) are Real & Distinct

Compute the Inverse Laplace of

Robo3x-1.1 16Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 2: Roots of D(s) are Real & Repeated

Compute the Inverse Laplace of

Robo3x-1.1 17Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 3: Roots of D(s) are Complex

Compute the Inverse Laplace of

Robo3x-1.1 18Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.3Vijay Kumar and Ani Hsieh

Robo3x-1.1 19Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Using Laplace Transforms

Given

➢ Solving for x(t)1. Convert to frequency domain

2. Solve algebraic equation

3. Convert back to time domain

Robo3x-1.1 20Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Properties of Laplace Transforms

Robo3x-1.1 21Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Summary

Laplace Transforms

• time domain <-> frequency domain

• differential equation <-> algebraic equation

• Partial Fraction Expansion factorizes “complicated” expressions to simplify computation of inverse Laplace Transforms

Robo3x-1.1 22Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Example: Solving an ODE (1)

Given with

, and .

Solve for .

Robo3x-1.1 23Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Example: Solving an ODE (2)

Robo3x-1.1 24Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.4Vijay Kumar and Ani Hsieh

Robo3x-1.1 25Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Controller Design

OutputInput

Disturbance

++Input +- Controller

Robo3x-1.1 26Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Controller Design

Output

Disturbance

++Input +-

Controller

Robo3x-1.1 27Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Controller Design

OutputInput

Disturbance

+++- Controller

System

Robo3x-1.1 28Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Controller Design

Controller OutputInput

Disturbance

+++-

System

Robo3x-1.1 29Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Transfer Function

Relate a system’s output to its input1.Easy separation of INPUT, OUTPUT,

SYSTEM (PLANT)

2.Algebraic relationships (vs. differential)

3.Easy interconnection of subsystems in a MATHEMATICAL framework

Robo3x-1.1 30Property of Penn Engineering, Vijay Kumar and Ani Hsieh

In General

A General N-Order Linear, Time Invariant ODE

G(s) =Transfer Function = output/input

Furthermore, if we know G(s), then

output = G(s)*input

Solution given by

Robo3x-1.1 31Property of Penn Engineering, Vijay Kumar and Ani Hsieh

General Procedure

Given and desired performance criteria

1. Convert

2. Analyze

3. Design using

4. Validate using

5. Iterate

Robo3x-1.1 32Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Underlying Assumptions

Linearity1. Superposition

2. Homogeneity

System

System

B/c the Laplace

Transform is Linear!

Robo3x-1.1 33Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.5Vijay Kumar and Ani Hsieh

Robo3x-1.1 34Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Characterizing System Response

Given

How do we characterize the performance of a system?

• Special Case 1: 1st Order Systems

• Special Case 2: 2nd Order Systems

Robo3x-1.1 35Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Poles and Zeros

Given

Poles

Zeros

Example:

Robo3x-1.1 36Property of Penn Engineering, Vijay Kumar and Ani Hsieh

First Order Systems

In general

Let U(s) = 1/s, then

As such,

Therefore,

Robo3x-1.1 37Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Characterizing First Order Systems

Given with U(s) = 1/s

Robo3x-1.1 38Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Characterizing First Order Systems

Time Constant –

Rise Time –

Settling Time –

Robo3x-1.1 39Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Second Order Systems

Given, and U(s) = 1/s

Possible Cases1. r1 & r2 are real & distinct2. r1 & r2 are real & repeated3. r1 & r2 are both imaginary4. r1 & r2 are complex conjugates

Robo3x-1.1 40Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 1: Real & Distinct Roots

Overdamped response

Robo3x-1.1 41Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.6Vijay Kumar and Ani Hsieh

Robo3x-1.1 42Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 2: Real & Repeated Roots

Critically damped response

Robo3x-1.1 43Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 3: All Imaginary Roots

Undamped response

Robo3x-1.1 44Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Case 4: Roots Are Complex

Underdamped response

Robo3x-1.1 45Property of Penn Engineering, Vijay Kumar and Ani Hsieh

A Closer Look at Case 4

Exponential Decay(Real Part)

Sinusoidal Oscillations(Imaginary Part)

Robo3x-1.1 46Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Summary of 2nd Order Systems

Given, and U(s) = 1/s

Solution is one of the following:

1. Overdamped: r1 & r2 are real & distinct

2. Critically Damped: r1 & r2 are real & repeated

3. Undamped: r1 & r2 are both imaginary

4. Underdamped: r1 & r2 are complex conjugates

Robo3x-1.1 47Property of Penn Engineering, Vijay Kumar and Ani Hsieh

2nd Order System Parameters

Given and U(s) = 1/s

• Natural Frequency – n

System’s frequency of oscillation with no damping

• Damping Ratio –

Robo3x-1.1 48Property of Penn Engineering, Vijay Kumar and Ani Hsieh

General 2nd Order System

Given and U(s) = 1/s

• When b = 0

• For an underdamped system

Robo3x-1.1 49Property of Penn Engineering, Vijay Kumar and Ani Hsieh

General 2nd Order Systems

Second-order system transfer functions have the form

with poles of the form

Example: For

Compute , n, and s1,2?

Robo3x-1.1 50Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.7Vijay Kumar and Ani Hsieh

Robo3x-1.1 51Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Characterizing Underdamped Systems

Robo3x-1.1 52Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Peak Time

123

321

Same Envelope

32

1

Motion of

poles

Robo3x-1.1 53Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Settling Time

2 1Same Frequency

Motion of

poles

1

2

2 1

Robo3x-1.1 54Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Overshoot

Motion of

poles

1

12

23

3

Same Overshoot

12

3

Robo3x-1.1 55Property of Penn Engineering, Vijay Kumar and Ani Hsieh

In Summary

s-plane

Robo3x-1.1 56Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.8Vijay Kumar and Ani Hsieh

Robo3x-1.1 57Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Independent Joint Control

In general,

n-Link Robot Arm generally has ≥ nactuators

Single Input Single Output (SISO)

Single joint control

Robo3x-1.1 58Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Permanent Magnet DC Motor

• Picture Here

Basic Principle

Source: Wikimedia Commons

Robo3x-1.1 59Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Electrical Part

Armature Current

Back EMF

Motor Torque

Torque Constant

Robo3x-1.1 60Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Mechanical Part

Actuator DynamicsGear ratio

Robo3x-1.1 61Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Combining the Two

Correction: the Kb terms should be Km

Robo3x-1.1 62Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Two SISO Outcomes

Input Voltage – Motor Shaft Position

Load Torque – Motor Shaft Position

Robo3x-1.1 63Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.9Vijay Kumar and Ani Hsieh

Robo3x-1.1 64Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Two SISO Outcomes

Input Voltage – Motor Shaft Position

Load Torque – Motor Shaft Position

Assumption: L/R << Jm/Bm

Robo3x-1.1 65Property of Penn Engineering, Vijay Kumar and Ani Hsieh

2nd Order Approximation

Divide by R and set L/R = 0

In the time domain

Robo3x-1.1 66Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Open-Loop System

Actuator Dynamics

• Set-point tracking (feedback)• Trajectory tracking (feedforward)

Robo3x-1.1 67Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Our Control Objectives

• Motion sequence of end-effector positions and orientations (EE poses)

• EE poses Joint Angles Motor Commands

• Transfer function

• Three primary linear controller designs:• P (proportional)• PD (proportional-derivative)• PID (proportional-integral-derivative)

Robo3x-1.1 68Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Set-Point Tracking

The Basic PID Controller

Robo3x-1.1 69Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Proportional (P) Control

• Control input proportional to error

• KP – controller gain

• Error is amplified by KP to obtain the desired output signal

Robo3x-1.1 70Property of Penn Engineering, Vijay Kumar and Ani Hsieh

P Control of Vehicle Speed

Example: Cruise Control

Desired linear speed

Control input proportional to error

X

Y

q

v

vehicle wheel speed

Robo3x-1.1 71Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Performance of P Controller

KP = 10 KP = 50

• Increases the controller gain decreases rise time

• Excessive gain can result in overshoot

KP = 100

Robo3x-1.1 72Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.10Vijay Kumar and Ani Hsieh

Robo3x-1.1 73Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Proportional-Derivative (PD) Control

• Control input proportional to error AND 1st

derivative of error

• Including rate of change of error helps mitigates oscillations

Robo3x-1.1 74Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Performance of PD Controller

KP = 10KD = 1

KP = 10KD = 3

Decreases rise time

KP = 500KD = 10

KP = 500KD = 50

Reduces overshoot & Settling

Time

Robo3x-1.1 75Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PD Control of a Joint

Closed loop system given by

w/

Robo3x-1.1 76Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PD Compensated Closed Loop Response (1)

Robo3x-1.1 77Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PD Compensated Closed Loop Response (2)

Robo3x-1.1 78Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Picking KP and KD

Closed loop system

w/

Design Guidelines

• Critically damped w/

• Pick and

Robo3x-1.1 79Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Performance of the PD Controller

Assuming and

Tracking error is given by

At steady-state

Robo3x-1.1 80Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.11Vijay Kumar and Ani Hsieh

Robo3x-1.1 81Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Proportional-Integral-Derivative (PID) Controller

• Control input proportional to error, 1st

derivative AND an integral of the error

• The integral term offsets any steady-state errors in the system

Robo3x-1.1 82Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Performance of PID Controller

KP = 10KD = 3

KP = 10KD = 3KI = 1

KP = 10KD = 3KI = 50

• Eliminates SS-Error• Increases overshoot &

settling time

Robo3x-1.1 83Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PID Control of a Joint

Closed-loop system is given by

w/

Robo3x-1.1 84Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PID Compensated Closed Loop Response (1)

Robo3x-1.1 85Property of Penn Engineering, Vijay Kumar and Ani Hsieh

PID Compensated Closed Loop Response (2)

Robo3x-1.1 86Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Picking KP, KD, and KI

Closed loop system

w/

Design Guidelines

• System stable if KP, KD, and KI >0

• Set KI = 0 and pick KP, KD, then go back to pick KI w/ in mind

Robo3x-1.1 87Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Summary of PID Characteristics

CLResponse

RiseTime

%Overshoot

SettlingTime

S-SError

KP Decrease Increase Small Change Decrease

KDSmall

Change Decrease Decrease Small Change

KI Decrease Increase Increase Eliminate

Robo3x-1.1 88Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Tuning Gains

• Appropriate gain selection is crucial for optimal controller performance

• Analytically (R-Locus, Frequency Design, Ziegler Nichols, etc)

• Empirically

• The case for experimental validation• Model fidelity

• Optimize for specific hardware

• Saturation and flexibility

Robo3x-1.1 89Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Feedforward Control

• Motion sequence of end-effector positions and orientations (EE poses)

• What if instead of , we want ?

Robo3x-1.1 90Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Video 5.12Vijay Kumar and Ani Hsieh

Robo3x-1.1 91Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Closed Loop Transfer Function (1)

Robo3x-1.1 92Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Closed Loop Transfer Function (2)

Robo3x-1.1 93Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Closed Loop Transfer Function (3)

Robo3x-1.1 94Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Picking F(s)

Closed loop transfer function given by

Behavior of closed loop response, given by roots of

H(s) and F(s) be chosen so that

Robo3x-1.1 95Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Will This Work?

Let F(s) = 1/G(s), i.e., a(s) = p(s) and b(s) = q(s), then

System will track any reference trajectory!

Robo3x-1.1 96Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Caveats – Minimum Phase Systems

Picking F(s) = 1/G(s), leads to

• Assume system w/o FF loop is stable

• By picking F(s) = 1/G(s), we require numerator of G(s) to be Hurwitz (or

)• Systems whose numerators have roots with

negative real parts are called Minimum Phase

Robo3x-1.1 97Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Feedforward Control w/ Disturbance

Assume: D(s) = constant w/

Pick F(s) = 1/G(s) =

Note the following:

Robo3x-1.1 98Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Tracking Error

Control law in time domain

System dynamics w/ control + disturbance

Robo3x-1.1 99Property of Penn Engineering, Vijay Kumar and Ani Hsieh

Overall Performance

top related