lecture 6: time response 1.time response determination review of differential equation approach...

19
Lecture 6: Time Response 1. Time response determination Review of differential equation approach Introduce transfer function approach 2. MATLAB commands 3. Simulation 4. Simulink commands ME 431, Lecture 6 1

Upload: august-hudson

Post on 21-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Lecture 6: Time Response

1. Time response determination• Review of differential equation approach• Introduce transfer function approach

2. MATLAB commands

3. Simulation

4. Simulink commands

ME 4

31

, L

ect

ure

6

1

Page 2: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Time Response

• Consider the following simplified model of a car suspension

• Would like to determine the time response of the car body (x(t)) for different road inputs (u(t))

ME 4

31

, L

ect

ure

6

2

quarter mass of the car

the suspension

tire stiffness and dampingof the tires are neglected

Page 3: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Time Response

• Differential equation model can be solved for different forcing inputs

• Example: Driving over a bumpy road u(t) = sin(t)

• Example: Driving over a curb u(t) = 1(t)

ME 4

31

, L

ect

ure

6

3( ) ( ) ( ) ( ) 1( )mx t bx t kx t b t k t

( ) ( ) ( ) cos( ) sin( )mx t bx t kx t b t k t

( ) ( ) ( ) ( ) ( )mx t bx t kx t bu t ku t

(use property of superposition to solve)

Page 4: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example

• Can also model with a transfer function

Page 5: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Time Response

• The transfer function for this example is

• The time response x(t) can be determined for different inputs u(t) (and zero initial conditions) using the transfer function

• In general,

ME 4

31

, L

ect

ure

6

5

2

m

m

( )( )

( )

X s bs kG s

U s ms bs k

( ) [ ( )] [ ( ) ( )]y t X s G s U s -1 -1L L

Page 6: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example (step response)

Let 1, 4, 40 and ( ) 1( ), find ( )m b k u t t x t

Page 7: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example (continued)

Page 8: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example (continued)

• Determine final value:

• Determine frequency of oscillation:

• Estimate how long it takes before response stays within 2% of its final value:

Page 9: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

MATLAB Notes

ME 4

31

, L

ect

ure

6

9

Page 10: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• The models we have developed so far are linear and may be solved analytically

• Many real systems include nonlinear elements such that their equations of motion are difficult if not impossible to solve

• These systems can be approximated by linearized equations, or the solution to the nonlinear equations can be approximated numerically

ME 4

31

, L

ect

ure

6

10

Page 11: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation• Example nonlinearities include:• Wind drag, nonlinear springs, Coulomb friction

ME 4

31

, L

ect

ure

6saturation dead zone backlash

11

Page 12: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• A simple numerical approximation employs Euler’s method

( ) ( )( )

x t t x tx t

t

( ) ( ) ( )x t t x t x t t

t0 t1 t2 t3 t4 …

x1

x0

x2

Page 13: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• Example:

• Therefore, for x(0)=1

and Δt=0.5

( ) 3 ( ) 0x t x t

0 1x

t0 t1 t2 t3 t4 …

x1

x0

x21 0 03 (0.5) 0.5x x x

2 1 13 (0.5) 0.25x x x

( ) 3 ( )x t x t

1 3i i ix x x t

Page 14: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• Accuracy can be improved by:• Reducing the

time step Δt• Using a higher-

order solver• Tradeoff between

accuracy and speed

t0 t1 t2 t3 t4 …

x1

x0

x2

Page 15: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• Tradeoff between accuracy and run time• Time step and solver order• Complexity of models• Some dynamics may be neglected (treated as

static)• Some complex components may be represented

by look-up tables and maps based on steady-state performance or cycle-averaged efficiencies

• Most simulations will use some combination of physics-based dynamic models and empirical maps

• Form determined by purpose and requirements

ME 4

31

, L

ect

ure

6

15

Page 16: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Numerical Simulation

• We will use Simulink to perform our simulation

• Simulink represents models as block diagrams and an underlying solver, like Euler’s method, is used to approximate the values of variables

• Can choose solution method and time step

• Simulink library includes many types of nonlinearities

ME 4

31

, L

ect

ure

6

16

Page 17: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example

• Initial conditions can be set in the integrators• Can include nonlinearities

ME 4

31

, L

ect

ure

6

1 2( ) ( ) ( ) ( )y t a y t a y t bu t

17

Page 18: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Example

• Can also represent as a transfer function• Preferred for combining subsystems• Cannot set initial conditions• Cannot represent nonlinearities

ME 4

31

, L

ect

ure

6

1 2( ) ( ) ( ) ( )y t a y t a y t bu t

18

Page 19: Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands

Simulink Notes

ME 4

31

, L

ect

ure

6

19