Comparing Nonlinear and Linearized Responses
Step
Input Applied from Rest
Step
Input Applied from Operating Point
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.
In our previous development of the system equation for a car, we assumed that the total damping force on the mass (wind resistance, wheel friction, etc.) was proportional to its velocity, which is a reasonable approximation for low speeds. When we are interested in the performance of the vehicle over a broad range of velocities, however, the wind resistance encountered by the car is more accurately modeled as being proportional to the square of its velocity. Thus, we must modify our original model in order to better analyze the car's motion at different speeds. If we neglect all damping forces other than wind resistance (wheel friction, etc.), the car's horizontal forces can be represented as:
In this diagram:
For this example, we will set:
M = 1000 kg
c = 0.40 N*sec2/m2
*** These values are reasonable approximations for a vehicle about the size and shape of a Dodge Neon. ***
Writing Newton's Second Law in the horizontal direction using these parameters gives:
Although this system equation approximates the dynamics of the car more accurately than the linear model developed previously, it is much more difficult to determine a closed-form solution for the velocity using this equation. This is because the equation is nonlinear (the nonlinearity comes from the velocity-squared term), which means we are unable to apply simple, straightforward techniques for determining an analytic solution.
A common way of dealing with a nonlinear system equation, such as we have here, is to linearize it about an operating point. This approach gives us a reasonably accurate solution for v if the car's velocity stays near the operating point (vo), but this predicted response becomes less accurate the further v strays from vo. This happens because linearizing the system equation requires that we approximate the square-law wind resistance force, which is done by using the first two terms of its Taylor series representation taken about the operating point. The result is a linearized approximation for the wind resistance force, which only does a good job of estimating the actual force when the velocity is near the operating point.
The figure that follows demonstrates this idea. The green curve represents the wind resistance force experienced by the car as a function of velocity, based on the square-law rule used to derive our system equation (Force = cv2). The operating point is labeled as vo, and the black line shows the linearized wind resistance force found using the operating point as a reference. Notice that the linearized function approximates the resistance force well near vo, but becomes less accurate the further the velocity strays from the operating point. Also note the blue line that appears in the figure. This shows the type of approximation we had originally used for the wind resistance force. As the graph indicates, assuming the resistance force to be proportional to the velocity (Force = bv) provides reasonable results only at small velocities.
Let's assume that we are interested in the dynamics of the car as it travels along a highway. In this type of analysis, we are mainly concerned with how the vehicle performs at highway speeds, so we will choose 25 m/s (55 mph) as the operating point (vo). Let us find Fo, the constant engine force that corresponds to a steady-state velocity of vo. To do this, set dv/dt = 0 and vo = 25 m/s in the system equation:
![]()
When we linearize the system equation, we will use two new variables (delta-v and delta-F), which are defined below:
Let's substitute these into the system equation and linearize it:
Comparing this to the steady-state equation for vo found earlier allows us to cancel terms, leaving:
Substituting in vo = 25 m/s gives our linearized differential equation:
To see how linearizing the system equation affects the accuracy of its predicted response, let us take a look at two different situations. In the first case, we will accelerate the car from rest to 25 m/s by applying a step input to the system, and then compare the responses predicted by the nonlinear and linearized system equations. In the second situation, we will look at the differences between the predicted outputs if we apply a step input that is somewhat larger than Fo to the system after it is already traveling at its operating point velocity (vo).
First, let's look at applying a step input to the car from rest so that its steady-state velocity is 25 m/s. Above, we determined that an input of F = Fo = 250 N (thus, delta-F = 0) gives this desired result. If the car starts from rest, its initial delta-v is equal to -25 m/s. Thus, the linearized equation we must solve is:
We obtain a closed-form solution to this equation by converting to the Laplace domain:
Now, we put this solution in terms of the car's velocity, v(t):
We will use Simulink to plot the velocity response for both the nonlinear and linearized system models. The block diagram for the nonlinear equation is very similar to the model we constructed earlier when we assumed the damping force to be proportional to the car's velocity. For the nonlinear problem, this model looks like (the Step block has parameters: Step Time = 0, Initial Value = 0, Final Value = 250, and Sample Time = 0) :
Note that this model uses a type of block that we haven't seen up to this point. The block labeled "Square the velocity" is a Math Function block (Math subfolder). This kind of block is capable of carrying out various mathematical operations on its input (including logarithmic, power, and exponential functions) by changing the "Function" setting in its "Parameters" dialog box (opened by double-clicking on the block). To get this block to square its input signal (the velocity), we changed the "Function" to "square." Note that Simulink denotes the input to a block as "u". Thus, the "u2" on the block in the model tells us that its input, the car's velocity (v), is squared, and this value is what is outputted from the block.
Because we were able to arrive at a closed-form solution for the linearized model, we have an explicit equation for velocity as a function of time. Creating a Simulink model to represent this can be done in a variety of ways. One method is to group the entire time-dependent velocity function into a single block, called a Fcn (function) block (Functions and Tables subfolder). This block performs the user-specified operations on its input (denoted as "u" in the block), and outputs the result. Taking this approach gives the much simpler looking model shown below (note that this model also uses a Clock block (Sources subfolder), which outputs the current simulation time):
Set the simulation time for both the nonlinear and linearized Simulink models to 200 seconds, and run both simulations. Now, view and compare the v(t) plots on the scopes of both models. How similar is the linearized model's velocity prediction to that of the nonlinear model? The following figure shows both the nonlinear and linearized responses plotted on the same graph for convenience (this can be done using MATLAB):
This graph indicates that the response predicted by the linearized model is noticably different from the nonlinear response as the car accelerates to its operating point. Thus, for this type of situation (i.e. the car's velocity starts out at a value far away from the operating point we linearized the equation about), the linearized model is not a very good approximation.
Now, let's examine a different situation using the same nonlinear and linearized system models. Suppose the car is traveling at its operating point (v = 25 m/s), when a step input is applied at t = 0. If this step brings the total engine force to F = 360 N, then the linearized equation for this situation looks like:
We convert to the Laplace domain and solve the equation:
Next, we put this solution in terms of the car's velocity, v(t):
Finally, we construct Simulink models of both the nonlinear and linearized situations. To make the nonlinear block diagram, we can simply modify a couple of the parameters in the blocks of the nonlinear Simulink model from the previous example. Change the Step block's "Final Value" to 360 (sets F = 360 N as the step input), and change the "Initial Condition" of the Integrator block to 25 (sets v = 25 m/s as the initial velocity). Now, run the simulation and verify that the velocity scope shows the car accelerating from 25 m/s (55 mph) to a steady-state velocity of 30 m/s (67 mph).
The linearized velocity response could be plotted using Simulink by constructing the same types of models of the closed-form solution we developed for the previous example, or we could just model the original linearized differential equation. The Simulink block diagram shown below is of the linearized differential equation. It should give the same output as either of the other two methods.
Notice that we included a Constant block in this model (labeled "v-not"). This is because the linearized differential equation is in terms of delta-v, and so to put our response in terms of v, we had to add vo to the equation's output. If we take the nonlinear and linearized v(t) responses shown by the scopes and graph them on the same plot (using MATLAB), we get:
Notice that the velocity response predicted by the linearized system equation is nearly identical to that for the nonlinear model in this example. Since the velocity of the car stays near 25 m/s (the operating point of the model) in this particular example, the linearized approximation for the wind resistance force is reasonable throughout the course of the simulation. Thus, the linearized model predicts an accurate velocity response. Note that although the two responses are very similar, their steady-state velocities differ by 0.5 m/s (1 mph). Can you verify that this should be the case by looking at the original system equations?
The previous two examples have shown us that linearizing a nonlinear differential equation in order to develop a closed-form solution for the output provides more accurate results when the system stays near its operating point. These examples have also given us a taste of the usefulness of Simulink. Even though we were not able to determine a closed-form solution for the nonlinear system equation, we were able to model this system and examine its velocity response in graphical form using Simulink. Thus, Simulink is a good tool for modeling complicated, nonlinear systems that might not be accurately portrayed over a broad range of operating conditions by a linearized model.
Author: RDM
Updated: 5/29/00