GOALS: To provide advanced students

80

Transcript of GOALS: To provide advanced students

Page 1: GOALS: To provide advanced students
Page 2: GOALS: To provide advanced students

GOALS: To provide advanced students in mechanical engineering with a solid background in dynamic system modeling and analysis and to enable them to analyze and design linear control systems.

Page 3: GOALS: To provide advanced students

FORMAT:

Lecture: 3 credits

Lab: 1 credit

You must enroll in both MEG 421 and MEG 421L

Page 4: GOALS: To provide advanced students

MEG 421:

Prerequisites by Topic:

1. Electrical Circuits

2. Mathematics for Engineers.

3. Analysis of Dynamic Systems

Page 5: GOALS: To provide advanced students

–Most General Definition:

To Produce a Desired Result

Page 6: GOALS: To provide advanced students

“Trust is good, control is better.”

Page 7: GOALS: To provide advanced students

Definition of Automation

• “Having the capability of starting, operating, moving, etc., independently.” 1

• “The use of machines to perform tasks that require decision making.” 2

Page 8: GOALS: To provide advanced students

• Technical Control Systems

Open Loop Control Systems

Page 9: GOALS: To provide advanced students

Open Loop Control SystemsExample: Batch Filling

Page 10: GOALS: To provide advanced students

Block Diagram for Feedback

(or Closed Loop) Control

Page 11: GOALS: To provide advanced students

England - Eighteenth Century ADWatt Steam Engine

Page 12: GOALS: To provide advanced students

England - Eighteenth Century AD

Page 13: GOALS: To provide advanced students

The accelerating technological change of the 19th century was reflected in literature and art.

In Jacques Offenbach’s opera ‘Les contesd’Hoffmann’ the hero falls in love with Olympia, a mechanical doll. Olympia can sing and dance. She needs rewinding every 5 minutes or so.

Page 14: GOALS: To provide advanced students

Another famous example is Mary Shelley’s ever popular Frankenstein (1831).

Page 15: GOALS: To provide advanced students

Automation Today

The world

around us

Page 16: GOALS: To provide advanced students

Rapid Growth of Machine Intelligence

Page 17: GOALS: To provide advanced students

Robots for Hazardous Areas

Page 18: GOALS: To provide advanced students

Around the House

Page 19: GOALS: To provide advanced students

Warm AndCuddly …

Page 20: GOALS: To provide advanced students

…orCyborg

Page 21: GOALS: To provide advanced students

Control SystemsClosed-loop control.Benefits: • System corrects “errors” (e.g. your fridgecorrects for temperature variations due todoor openings and other events.)•Labor savingDrawbacks:• More expensive and complex. • Need for sensors • System can become unstable

Page 22: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

The Problem: The cart with an inverted pendulum is "bumped" with an impulse force, F. Determine the dynamic equations of motion for the system, and find a controller to stabilize the system.

Page 23: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

Force analysis and system equations

At right are the two Free Body Diagrams of the system.

Page 24: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

Equation of motion for the cart:

Equation of motion for the pendulum:

Page 25: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

Without control we get the velocity response shown below, i.e. the pendulum falls to one side and the system is unstable.

Page 26: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

The equation at right describes the four “States” of the system:Cart Pos. xCart Vel x-dtAngle PhiAng. Vel. Phi-dt

Page 27: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

Control Loop Schematic:R = ‘reference’ = desired stateK = ‘state controller’

Page 28: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

After some mathematical analysis, the controller stabilizes the inverted pendulum:

Page 29: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

We can make the system respond faster, but it will oscillate more:

If we drive the controller gain too high, the system will become unstable.

Page 30: GOALS: To provide advanced students

Control System Example: Inverted Pendulum

There is still a small problem:The cart has wandered off too far. So we add a requirement to return to (almost) where it started:

Page 31: GOALS: To provide advanced students

The Airplane as Computer Peripheral

Page 32: GOALS: To provide advanced students

The Future of Aviation

Page 33: GOALS: To provide advanced students

The Future: More Automation. Manufacturing

“More Automation”

Page 34: GOALS: To provide advanced students

Households and Service Industries:Repetitive Jobs will be automated.

Robotic mower forGolf courses.(Carnegie-Mellon)

Page 35: GOALS: To provide advanced students

Medicine:Robodoc (Surgical Robot for hip

replacement)

Page 36: GOALS: To provide advanced students

MedicineProsthetics

Mobility Assistance

Page 37: GOALS: To provide advanced students

Artificial IntelligenceWith better brains and sensors, robots will interact better with

humans, and perform more functions.

Sony’s‘Aibo’

Page 38: GOALS: To provide advanced students

…Remember the poor poet who fell in love with the robot doll?

‘Love’ is reality for many Aiboowners who seem to think that

their robot loves them.

Page 39: GOALS: To provide advanced students

Quoted from: NY Times, May2, 2002

DIANE wasn't well. Her owner, Harry Brattin, placed a white muffler around her neck. She sat quietly on a metal desk in the meeting room while the others scampered around the floor playing."I get very sad when one of my dogs gets ill," said Mr. Brattin, 63, a motorcycle dealer from San Diego. "When Diane's head stopped moving I felt bad. I truly felt grief."Diane is an Aibo, a computer-controlled robot made by Sony, and D.H.S. is Droopy Head Syndrome, which is caused when a clutch wears out (it's repairable by replacing the head). Weird, perhaps, but not unusual.

Page 40: GOALS: To provide advanced students

Exploration

Page 41: GOALS: To provide advanced students

Control Systems in Entertainment

Page 42: GOALS: To provide advanced students

Control Systems in

Entertainment

Page 43: GOALS: To provide advanced students

Control Systems in Entertainment

Page 44: GOALS: To provide advanced students

Control Systems in Entertainment

Page 45: GOALS: To provide advanced students

Control

Open-Loop,Benefit:

• Simple, always stable• Widely used in well-

defined situations, e.g. Batch filling

Closed-Loop• Maintains desired

output in the presence of disturbances

• Can become unstable

Page 46: GOALS: To provide advanced students

Feedback Control

Page 47: GOALS: To provide advanced students

Feedback Control

Page 48: GOALS: To provide advanced students

Feedback Control

Page 49: GOALS: To provide advanced students

Each element or ‘Block’ has one input and one output variable

Page 50: GOALS: To provide advanced students

For instance, the plant in the preceding block diagram can be modeled as:

Gplant(s) = Y(s) /U(s)

Page 51: GOALS: To provide advanced students

Transfer Function

Page 52: GOALS: To provide advanced students

Transfer Function

Page 53: GOALS: To provide advanced students
Page 54: GOALS: To provide advanced students

Chapter 2: Chapter 2: Dynamic ModelsDynamic Models

Differential Equations in State-Variable Form

Page 55: GOALS: To provide advanced students

State-Variables: Example

• x is the variable that describes any arbitrary position of the system (also called system variable)

• are the state-variables of the system.

• Since , the state-variables can be defined as

⎩⎨⎧

==++

vxukxbvvm

&

&

vx =&

xandx &

andx v

Page 56: GOALS: To provide advanced students

State-Variable FormDeriving differential equations in state-

variable form consists of writing them as a vector equation as follows:

uJXHyuGXFX

+=+=&

where is the output

and u is the input

Page 57: GOALS: To provide advanced students

Definitions

• is called state of the system.

• X is the state vector.It contains n elements for an nth-order system, which are the n state-variables of the system.

X&

⎥⎥⎥⎥

⎢⎢⎢⎢

=

nx

xx

X

&

M

&

&

& 2

1

• The constant J is called direct transmission term

⎥⎥⎥⎥

⎢⎢⎢⎢

=

nx

xx

XM2

1

ImportantYou can

forget that

Page 58: GOALS: To provide advanced students

Deriving the State Variable Form requires to specify F, G, H, J for a

given X and u

{ {

[ ]

inputtheisuand

outputtheisuJ

x

xx

hhhywhere

u

g

gg

x

xx

ff

ffff

x

xx

n

H

n

G

n

X

n

F

nnn

n

n

+

⎥⎥⎥⎥

⎢⎢⎢⎢

=

⎥⎥⎥⎥

⎢⎢⎢⎢

+

⎥⎥⎥⎥

⎢⎢⎢⎢

⎥⎥⎥⎥

⎢⎢⎢⎢

=

⎥⎥⎥⎥

⎢⎢⎢⎢

=

===

M44 344 21L

MM

444 3444 21LL

MOM

MO

K

&

M

&

&

2

1

21

2

1

2

1

1

21

11211

2

1

Page 59: GOALS: To provide advanced students

Satellite Altitude Control Example

Assumptions:• ω is the angular velocity• The desired system

output is θQ: Dynamic model

in state-variable form?

Page 60: GOALS: To provide advanced students

Strategy (recommended but not required)

1. Derive the dynamic model.2. Identify the input control variable, denoted by u.

3. Identify the output variable, denoted by y.

4. Define a state vector, X , having for elements the system variables and their first derivative.

5. Determine 6. Determine F and G, in manner that

7. Determine H and J, in manner that

X&GuFXX +=&

JuHXy +=

Page 61: GOALS: To provide advanced students

Ex 1: Dynamic Model

• Applying Newton’s law for 1-D rotational motion leads to:

=> (1)

θ&&IMdF Dc =+

IMdF DC +

=θ&&

Page 62: GOALS: To provide advanced students

Example 1 (cont’d)Given:• The control input,

denoted by u, is given by:

• The output, denoted by y, is the displacement angle: y = θ

Assumption:• The state vector,

denoted by X, is defined as:

Known: The dynamic model

(1)

Required: Rewrite (1) as:

DC MdFu +=

IMdF DC +

=θ&&

{ { {

[ ] {

=

×+⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

==

====

uand

uywhere

u

JH

GXFX

ωθ

ωθ

ωθ

321

321&

&

&

θωωθ &=⎥⎦

⎤⎢⎣

⎡= withX

Page 63: GOALS: To provide advanced students

Example 1 (cont’d)

• By definition: . Thus,

• Expressing the dynamic model:

as a function of ω and u (with ) yields:

ωθ =&

Iu

=ω&

IMdF DC +

=θ&&

ωθ &&& =

Dc MdFu +=

(1)

Page 64: GOALS: To provide advanced students

Example 1 (cont’d) Equivalent form of

available eq:

where

Available equations:

• From the dynamic model:

• The output y is defined as: y = θ

• The input u is given by:

⎩⎨⎧

×+×+×=×+×+×=

u)I(u

100010

ωθωωθθ

&

&

uy ×+×+×= 001 ωθ

DC MdFu +=

{ { {

[ ] {

DC

JH

GXFX

MdFuand

uywhere

uI

+=

×+⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

==

====

001

10

0010

ωθ

ωθ

ωθ

321

321&

&

&

DC MdFu +=

⎩⎨⎧

==

Iuωωθ

&

&

Page 65: GOALS: To provide advanced students

Example 1: Dynamic Model in State-Variable Form

By defining X and u as: The state-variable form is given by:

[ ] 001

10

0010

==

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡=

JH

IGF

DC MdFu

X

+=

⎥⎦

⎤⎢⎣

⎡=

ωθ

inputstate-variables

Page 66: GOALS: To provide advanced students

Ex 1½: Recall the Satellite Altitude Control Example

Assumptions:• ω is the angular velocity• The system output is

Q: Dynamic model in state-variable

form?

ω

Page 67: GOALS: To provide advanced students

Example 1½: Dynamic Model in

State-Variable FormBy defining X and u as: The state-variable form is given by:

DC MdFu

X

+=

⎥⎦

⎤⎢⎣

⎡=

ωθ

[ ] 010

10

0010

==

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡=

JH

IGF

Only change

Page 68: GOALS: To provide advanced students

Analysis in Control Systems

• Step 1: Derive a dynamic model

• Step 2: Specify the dynamic model for software by writing it

in STATE-VARIABLE form

in terms of its TRANSFER FUNCTION (see chapter 3)

either

or

Page 69: GOALS: To provide advanced students

Example 2: Cruise Control Step Response

• Q1: Rewrite the equation of motion in state-variable formwhere the output is the car velocity v ?

• Q2: Use MATLAB to find the step response of the velocity of the car ?Assume that the input jumps from being u(t) = 0 N at time t = 0 sec to a constant u(t) = 500 N thereafter.

Page 70: GOALS: To provide advanced students

Reminder: Strategy

1. Derive the dynamic model.2. Identify the input control variable, denoted by u.

3. Identify the output variable, denoted by y.

4. Define a state vector, X , having for elements the system variables and their first derivative.

5. Determine 6. Determine F and G, in manner that

7. Determine H and J, in manner that

X&

GuFXX +=&JuHXy +=

Page 71: GOALS: To provide advanced students

Ex 2, Q1:Dynamic Model

• Applying Newton’s law for translational motion yields:

(2)mux

mbx +−= &&&

xmuxb &&& =+−

=>

Page 72: GOALS: To provide advanced students

Example 2, Question 1 (cont’d)Given:• The input ( = external

force applied to the system) is denoted by u

• The output, denoted by y, is the car’s velocity:

y = vAssumption:• The state-vector is

defined as:

Known: The dynamic model

(2)

Required: Rewrite (2) as:mux

mbx +−= &&&

{ { {

[ ] {

=

×+⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

==

====

uand

uvx

ywhere

uvx

vx

JH

GXFX

321

321&

&

&

xvwithvx

X &=⎥⎦

⎤⎢⎣

⎡=

Page 73: GOALS: To provide advanced students

Example 1 (cont’d)

• By definition: . As a result,

• Expressing the dynamic model:

as a function of v and u leads to:

vx =& yx &&& =

(2)

mmuvbv +−=&

mux

mbx +−= &&&

Page 74: GOALS: To provide advanced students

Ex 2, Q1 (cont’d)

Equivalent form of available eq:

where

Therefore:

⎪⎩

⎪⎨

×⎟⎠⎞

⎜⎝⎛+×⎟

⎠⎞

⎜⎝⎛ −+×=

×+×+×=

um

vmbxv

uvxx10

010

&

&

uvxy ×+×+×= 010

{ {

[ ] { uvx

ywhere

umv

xmbv

x

JH

GXFX

×+⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡−

=⎥⎦

⎤⎢⎣

==

====

010

10

010

321

32143421&

&

&

Available equations:

• From the dynamic model:

• The output y is defined as:

y = v

• The input is the step function u

⎪⎩

⎪⎨⎧

+−=

=

muv

mbv

vx

&

&

Page 75: GOALS: To provide advanced students

Example 2, Question 1: Dynamic Model

in State-Variable FormBy defining X as: The state-variable form results as:

⎥⎦

⎤⎢⎣

⎡=

vx

X

[ ] 010

10

010

==

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡−

=

JH

mG

mbF

Page 76: GOALS: To provide advanced students

Example 2, Question2: Step Response using MATLAB?

Assumptions: m = 1000 kg and b = 50 N.sec/m.

[ ] 010

00100

050010

==

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡−

=

JH

.G

.F

Page 77: GOALS: To provide advanced students

Ex 2, Q2: Step Response with MATLAB?

• The step function in MATLAB calculates the time response of a linear system to a unit step input.

• In the problem at hand, the input u is a step function of amplitude 500 N:

u = 500 * unity step function.

• Because the system is linear ( ):G * u = (500 * G) * unity step function

GuFXX +=&

G * Step 0 to 500 N 500*G * Step 0 to 1 N

Page 78: GOALS: To provide advanced students

MATLAB StatementsF = [0 1;0 -0.05];G = [0;0.001];H = [0 1];J = 0;sys = ss(F, 500*G, H, J);

t = 0:0.2:100;y = step(sys,t);plot (t,y)

% defines state variable matrices

% defines system by its state-space matrices

% setup time vector ( dt = 0.2 sec)

% computes the response to a unity step response

% plots output (i.e., step response)

Page 79: GOALS: To provide advanced students

Response of the car velocity to a step input u of amplitude 500 N

Page 80: GOALS: To provide advanced students