Modelling and Graphs

This post presents a simplified engineering modelling and design example. I offer this as a motivation to students struggling with graphing topics like linear, quadratic, cubic, etc equations. This is not just busy work. It is the beginning of developing skills you will need to work in technical professions like engineering.

Why Modelling?

Engineers use mathematical models for many reasons. Some of these reasons are:

  1. Easier and cheaper to analyse and design than the physical thing being modelled
  2. Cheaper to tweak to do “what if” analysis
  3. Necessary when the physical object needs to be encoded, eg a control system for an aircraft – the control system needs to know how the aircraft will react to its controls.

The Example

Let’s use a mathematical model in a familiar scenario.

The Spring

Early automobiles used a suspension that just consisted of leaf springs to support the entire carriage. Later, coil springs for each wheel were used. With just springs, what is the reaction of the carriage (the part that people sit in) to a bump in the road? I think you can imagine that it would look like this:

This is a plot of a cosine function which you may have seen already. This is a model of what would happen to a car with just springs. But it’s not a good model since it assumes that the oscillations would go on forever. Of course, in real life, the springs would lose energy and there would be wind resistance as well. But engineers typically start out with a simple model and add complexity as they continue analysing it.

This particular function I just plotted is x = 5cos(3t), where x is the position of the carriage and t is time. The “5” corresponds to the strength of the bump in the road, and the “3” relates to how weak or stiff the spring is.

The letter k is usually used to represent the spring stiffness. The higher k is, the stiffer the spring and the faster the oscillations experienced by the people in the car. Changing the “5” just changes the extreme values of the curve, but changing the “3” has a more interesting effect. Below are three graphs showing the effect of changing k:

Red: k = 1
Blue: k = 3
Green:k = 5

The Damper

As I mentioned before, just using a cosine function to model the spring suspension is not good because there is natural damping that occurs due to energy loss in the spring (heat) and resistance due to the air around the car. The real reaction of the carriage would look something like this:

Spring with damper

But even this would not be comfortable as the car would be frequently bouncing as it goes over bump after bump (but certainly more comfortable than no suspension at all!). So more damping would be desireable.

A function that has a damping shape is the exponential function
x = adt where the “a” and the “d” are some positive constants for a particular equation. As will be seen when you study calculus, a convenient “a” to use is the irrational number e. Don’t worry if you haven’t seen e before. It is just a number approximately equal to 2.71828. I say approximately because e, like 𝜋, is irrational so it has a non-repeating decimal part. The d indicates how strong the damping effect is; the larger d is, the stronger the damping.

So as an example, the plot of x = 5e-0.5t looks like:

x = 5e-0.5t

The “5” in his example is just to provide the initial bump. So it would be nice if we could combine the action of the spring with a damping force that a shock absorber would provide. This can be done by multiplying the shock absorber model
x = 5e-0.5t and the spring model x = 5cos(3t) together:
x = 5e-0.5tcos(3t) where we just need the one “5” for the initial bump. The plot of this looks like:

x = 5e-0.5tcos(3t)

Much better but room for improvement. Depending on the type of car we are designing, we may want a stiff response where the damping is strong (like in a sports car where one wants to “feel the road”) or a softer one for a family car for example.

Below are two plots changing the damping strength and using k = 3:

Blue: d = 0.5
Red: d = 1.0

A carriage following the red curve would be a better ride. The damping can be made stronger for a sports car.

When the car is actually built and testing reveals that the car responds to bumps as was predicted by the engineer’s model, well that’s a very good feeling!

Why Study Maths?

The engineer in this discussion used several skills that you are studying now:

  1. Drawing graphs of equations
  2. How to change the shape of those graphs my changing the values in the equation
  3. Circular (trigonometric) and exponential functions
  4. Calculus
  5. And all of the above is based on algebra.

The calculus skill is not apparent in the discussion so far, but I will explain that further in the next section.

Creating a Model

We can generalise the model for the suspension of a car as x = Aedtcos(kt) where A is the size of the initial bump in the road, d is the stiffness of the shock absorbers, and k is the strength of the springs. How did I know to use the exponential and cosine functions? They are the solution to what are called differential equations which are based on calculus.

When developing a model, especially for dynamic (moving) systems, they start with basic physics. Frequently, Newton’s second law is the starting point:\[F = ma\] where F is the force applied or exerted by a mass m, accelerating (or decelerating) by a. Now, we want a model that predicts x, the position of the car carriage. Many applications of calculus involve the rate of change of something. The rate of change of position is called velocity which you are familiar with. And the rate of change of velocity is called acceleration. Newton’s second law explains why you feel your back press against the seat only when you accelerate (or against the seatbelt when you decelerate). The rate of change of position, that is velocity, is mathematically called the first derivative of position. The rate of change of velocity, that is acceleration, is the first derivative of velocity or the second derivative of position. So Newton’s second law is really an equation about the second derivative of position. Equations that have derivatives in them, are called differential equations and these are very familiar to engineers.

Notation-wise, a single dot is shown above a variable to indicate a first derivative and two dots represent a second derivative. So another way to show Newton’s second law is \[F=m\ddot{x}\] as acceleration is the second derivative of the position, x.

Now without going into the detail, the forces exerted on the carriage by the springs and the shock absorbers are kx and dẋ respectively. So if you replace the F in Newton’s second law with these forces, you get the differential equation\[kx+d\dot{x}=m\ddot{x}\]

An engineer uses calculus to solve this equation for the position x as a function of the time t, that is x(t). Given certain initial conditions like the size of the bump experienced by the car, and the values of k and d, a solution to this equation can be x = Aedtcos(kt). This is where I got the cosine and the exponential function from at the beginning.