Engineering Math - Differential Equation

 

 

 

What is Modeling ?

 

Modeling in differential equation refers to a process of finding mathematical equation (differential equation) that explains/describes a specific situation. It is the step that comes before solving. A solver needs an equation, and modeling is where that equation comes from.

Most of the mathematical methods are designed to express a real life problems into a mathematical language. This is called 'modeling', at least in engineering Mathematical Modeling is the most important reason why we have to study math.

In most of classroom in school, most of the focus is placed on how to solve a given differential problem. But as I mentioned in other posts, I think it is more important to understand the meaning of the given equation and it would be the best if you can derive the equation on your own from a given situation.

What is the most important steps for Modeling ?

The most important thing for modeling is to figure out the governing equation for the given situation (problem). The governing equation varies depending the area/field, so you would need to have the basic understandings on theory for the given problem.

You may get the basic idea from Governing Equation page, but you would learn the governing equation (law) for each specific cases in all of the modeling examples.

Let's walk through the steps with a small example. A mass m is attached to a wall by a spring with stiffness k and a damper with coefficient c. An external force F(t) pushes the mass. The question is how the position x(t) of the mass moves.

The first step is to choose the variables. Here the independent variable is time t, and the dependent variable is the position x(t). The second step is to pick the governing equation. For a moving mass it is Newton's second law: mass times acceleration equals the sum of the forces. The third step is to write each force in terms of the variables. The spring pulls back with -kx, the damper resists with -c dx/dt, and the external force is F(t). Together they give m d2x/dt2 = F(t) - kx - c dx/dt, which is usually written as m x'' + c x' + k x = F(t).

The last step is to state the starting condition, the position x(0) and the velocity x'(0). The equation alone allows many different motions, and the starting condition picks the one that actually happens.

  • The governing law does most of the work : once the law is chosen, the rest is writing each term in the chosen variables.
  • The same pattern works in other fields : a series RC circuit follows Kirchhoff's voltage law instead of Newton's law. With the capacitor voltage vC as the dependent variable, it gives RC dvC/dt + vC = vin(t).
  • Every model carries assumptions : the spring force -kx assumes a linear spring, and the damper force assumes a force proportional to speed. When these assumptions fail, the equation changes, and it may no longer be linear.

What kind of mathematical form for a model ?

Basically you can represent a given problem into any form of mathematical model and it is completely up to you to pick up which form you want to use, but following illustration would show you some of commonly used mathematical model.

With Matrix, Differential Equation is one of the most usefull tool for mathematical modeling and following illustration would show you a several different format of Mathematical Models derived from differential equation.

One system described as a differential equation, a transfer function and a state space equation

One system can be written in three equivalent forms, and each form can be converted into the other two.

  • The differential equation form : it relates the output and its derivatives to the input directly. The box writes the output as x(t) with its derivatives up to order n. For the mass and spring above it is m x'' + c x' + k x = F(t).
  • The transfer function form : the Laplace transform turns each derivative into a factor of s. With zero initial conditions, the mass and spring give X(s)/F(s) = 1/(ms2 + cs + k).
  • The state space form : a second-order equation becomes two first-order ones. With x1 = x and x2 = x', the mass and spring give x1' = x2 and x2' = -(k/m) x1 - (c/m) x2 + F/m. The output is y = x1.
  • A transfer function needs a linear time-invariant system : it also assumes zero initial conditions. A nonlinear model can still be written as a differential equation or in a nonlinear state space form, but it has no transfer function.

Usually (at least, in most of University Courses), the first step is to describe a system into a set of differential equations and convert those equations into Transfer Function (by Laplace Transform) and State Space Equations.

So it is very important to know the concept of differential equations, but as you repeat this kind of modeling process or work in a specific field for a long time, you would get the tricks to directly construct Transfer Function or State Space Equation without getting into the steps of building up the differential equation.

There are many engineering softwares out there to solve various engineering problems. Some of the tools requires you to input your problem in the form of differential equation, some others requires the input as Transfer Function and some others requires the input as State Space Equation. To utilize these tools as much as possible, you need to understand the concept of all these mathematical variations.