Time response

advertisement
1. Time response determination
• Review of differential equation approach
• Introduce transfer function approach
2. MATLAB commands
ME 431, Lecture 6
Lecture 6: Time Response
3. Simulation
4. Simulink commands
1
Time Response
quarter mass of the car
the suspension
tire stiffness and damping
of the tires are neglected
• Would like to determine the time response of
the car body (x(t)) for different road inputs
(u(t))
ME 431, Lecture 6
• Consider the following simplified model of a
car suspension
2
Time Response
• Example: Driving over a bumpy road u(t) = sin(t)
mx(t )  bx(t )  kx(t )  b cos(t )  k sin(t )
(use property of superposition to solve)
ME 431, Lecture 6
• Differential equation model can be solved for
different forcing inputs
mx(t )  bx(t )  kx(t )  bu (t )  ku (t )
• Example: Driving over a curb u(t) = 1(t)
mx(t )  bx(t )  kx(t )  b (t )  k1(t )
3
Example
• Can also model with a transfer function
Time Response
• The transfer function for this example is
m
m
• The time response x(t) can be determined for
different inputs u(t) (and zero initial
conditions) using the transfer function
ME 431, Lecture 6
X (s)
bs  k
G (s) 

U ( s ) ms 2  bs  k
• In general,
-1
-1
y (t )  L [ X ( s )]  L [G ( s )U ( s )]
5
Example (step response)
Let m  1, b  4, k  40 and u (t )  1(t ), find x(t )
Example (continued)
Example (continued)
• Determine final value:
• Determine frequency of oscillation:
• Estimate how long it takes before response stays within 2% of
its final value:
ME 431, Lecture 6
MATLAB Notes
9
Numerical Simulation
• Many real systems include nonlinear elements such
that their equations of motion are difficult if not
impossible to solve
ME 431, Lecture 6
• The models we have developed so far are linear and
may be solved analytically
• These systems can be approximated by linearized
equations, or the solution to the nonlinear
equations can be approximated numerically
10
Numerical Simulation
• Example nonlinearities include:
saturation
dead zone
backlash
ME 431, Lecture 6
• Wind drag, nonlinear springs, Coulomb friction
11
Numerical Simulation
• A simple numerical
approximation employs
Euler’s method
x0
x(t  t )  x(t )
x(t ) 
t
x1
 x(t  t )  x(t )  x(t )t
x2
t0 t1 t2 t3 t4 …
Numerical Simulation
• Example:
x(t )  3 x(t )  0  x(t )  3x(t )
 xi 1  xi  3xi t
• Therefore, for x(0)=1
and Δt=0.5
x0
x1
x0  1
x1  x0  3x0 (0.5)  0.5 x
2
x2  x1  3x1 (0.5)  0.25
t0 t1 t2 t3 t4 …
Numerical Simulation
• Accuracy can be
improved by:
• Reducing the
time step Δt
• Using a higherorder solver
• Tradeoff between
accuracy and speed
x0
x1
x2
t0 t1 t2 t3 t4 …
Numerical Simulation
• Tradeoff between accuracy and run time
• 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 431, Lecture 6
• Time step and solver order
• Complexity of models
15
Numerical 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 431, Lecture 6
• We will use Simulink to perform our simulation
16
Example
ME 431, Lecture 6
y(t )  a1 y(t )  a2 y(t )  bu (t )
• Initial conditions can be set in the integrators
• Can include nonlinearities
17
Example
ME 431, Lecture 6
y(t )  a1 y(t )  a2 y(t )  bu (t )
• Can also represent as a transfer function
• Preferred for combining subsystems
• Cannot set initial conditions
• Cannot represent nonlinearities
18
ME 431, Lecture 6
Simulink Notes
19
Download