First Order System:  Ramp Response

Developing Model
Simulating a Ramp Input
Ramp Input with Saturation


The idea behind these tutorials is that you can view them in one window while running Simulink in another window.  Do not confuse the windows, icons, and menus in the tutorials for your actual Simulink windows.  Most images in these tutorials are not live - they simply display what you should see in your own Simulink windows.  All Simulink operations should be done in your Simulink windows.


Developing Model

Recall the free body diagram developed previously for a car traveling on a flat road:

Where:

For our system, we assumed that:

M = 1000 kg  (a Dodge Neon has a mass of about 1100 kg)
b = 40 N*sec/m

With these parameters, the system equation was:

And, the system's basic block diagram looked like:

Simulating a Ramp Input

We now apply a ramp input, F, to the system starting from rest.  This is approximately equivalent to the car's driver steadily depressing the gas pedal as the vehicle accelerates from a stop light.  To model this, insert a Ramp block from the Sources subfolder and connect it so that it produces the system input signal, F.  Also, insert Scope blocks (Sinks subfolder) into the model to monitor the engine force, F, and the car's velocity, v.  These additions make the block diagram look like:

Double-click on the Ramp block to modify it, and set the Slope equal to 80 N/s (you can leave the Start Time and Initial Output as 0).  These settings cause the engine force to steadily increase 80 N every second, starting from F = 0 at t = 0.  Also, set the simulation Stop Time to 100 seconds (click on Simulation, then Parameters), and run the simulation.  Opening the two Scope blocks should produce the following graphs:

              

These plots show us that if the input force of the engine, F, is increased steadily, the velocity of the car, v, will continue to rise, and thus does not approach a specific steady-state VALUE.  Also note that as time passes, the velocity curve eventually settles into a straight line.  So, the steady-state RESPONSE to the ramp input is linear, and it has a positive slope (i.e. the velocity of the system goes to infinity as time goes to infinity).

Let's verify these results by solving the differential equation for the ramp input.  Rewriting the system equation with F = 80t yields:

Taking the Laplace transform of this equation (with initial condition v(0) = 0) and solving for V(s) yields:

Converting back to the time domain gives us the solution for v(t):

In this solution, the exponential term dies out as t increases.  We can estimate how long it takes for this transient part of the solution to be negligible by noting that its time constant is 1/0.04 = 25 seconds.  Thus its settling time, which is about 4 times as large as the time constant, is about 100 seconds.  So, after 100 seconds, the solution is approximately equivalent to the straight line (2t - 50).  The results of our simulation thus agree with the analytic solution to the equation.

Note that in this example, the velocity of the car increases without bound, a result of the steadily-increasing engine force.  Intuition tells us that this type of behavior is unrealistic.  A Dodge Neon is not capable of going 100 m/s (about 225 mph), yet our simulation shows the car reaching velocities well over this value.   In reality, there is a maximum force that the car's engine is capable of producing (and thus a maximum velocity that the vehicle can attain),  so F cannot take a value above this upper limit.  This idea of a saturated input is the topic of the next section of this tutorial.

Ramp Input with Saturation

In this section, we will apply a ramp input to our system (as before), with the following alteration:  The engine force, F, will not be allowed to exceed 2000 N.   Thus, the system's input will appear as a ramp until its value reaches 2000 N.  From that time forward, the saturated input will remain at 2000 N.  This situation can be thought of as being similar to the car's driver, with the vehicle starting from rest, steadily pushing down on the gas pedal until it reaches the floor (i.e. the maximum force that the engine can provide), and then holding the pedal there for an indefinite time.

To model this input in Simulink, we insert a Saturation block (from the Nonlinear subfolder) right after the Ramp block in the model window.  With this addition, our sytem model should now appear as below:

The Saturation block allows us to set an upper and lower limit for its input signal.   If the signal to the block is between the minimum and maximum values we have set, the Saturation block passes it through unaltered.  If the input signal is greater than the maximum, however, it outputs the set maximum value.   Similarly, if the input signal is less than the minimum, the Saturation block simply outputs this user-defined minimum value.  Double-click on the Saturation block to modify its parameters, and change its Upper Limit to 2000 and its Lower Limit to 0.  Now, run the simulation (change the Stop Time to 120 seconds), and view the F and v scope blocks.   They should look like:

              

We notice a number of interesting features of the system by analyzing these graphs.   First of all, note that the engine force plot, F, looks like we predicted it would.   It appears as a ramp input until it reaches 2000 N, and then stays at that maximum as time continues to pass.  Also notice that up to about t = 25 seconds, the velocity response of the car, v, is identical to what it was for the ramp input we analyzed previously.  Beyond that time, the two plots take on very different shapes, and in this example, the velocity appears to level off at 50 m/s (about 110 mph).  This result is of course due to the input, F, reaching its saturation value of 2000 N at t = 25 seconds. 

What would you expect the steady-state velocity of the system to be if a step input of 2000 N were applied at t = 0?  Setting dv/dt equal to 0 in the system equation, you should find the answer to also be 50 m/s. 

Why do this step input and the ramp input with saturation we simulated have the same steady-state velocity?  The two systems are similar in that, after appearing very different at smaller t values, their engine force inputs stay constant at 2000 N as time goes to infinity.  Thus, it is logical that both would have the same steady-state velocity. 

Using which input, the step or the ramp with saturation, would you expect the system to reach its steady-state velocity more quickly?  If the answer to this is not clear to you, think of the physical system we are modeling.  If you were driving a car, would you expect to reach your top speed more quickly by stomping the gas pedal to the floor and holding it there (step input) or by gradually pressing down on it until you reach its maximum position (ramp with saturation)?  Clearly, the step input would give the smaller settling time.

Author:  RDM
Updated: 5/18/00