1. Mathematical modeling of dynamic systems#

1.1. Introduction#

Dynamic system modeling deals with the mathematical modeling of dynamic systems and response analyses of systems in order to understanding the dynamic nature of each system and improving the system’s performance.

Response analyses are frequently made through computer simulations of dynamic systems. Because many physical systems involve various types of components, a wide variety of different types of dynamic systems have been discussed in the previous courses: “signal and systems” and “control theory”. The analysis and design methods presented in this course can be applied to mechanical, electrical, pneumatic, and hydraulic systems, as well as non-engineering systems, such as economic systems and biological systems.

It is important that the mechanical engineering student should be able to simulate the dynamic responses of such systems. First the basic terms (or language) need to be clarified in order to fully understand the discussion about dynamic system.

1.1.1. What is a system?#

A system is a combination of components acting together to perform a specific objective. A component is a single functioning unit of a system. By no means limited to the domain of the physical phenomena’s, the concept of a system can be extended to abstract dynamic phenomena, such as those encountered in economics, transportation, population growth, and biology.

1.1.2. What is a dynamic system?#

A system is called dynamic if its present output depends on past input; if its current output depends only on current input, the system is known as static. The output of a static system remains constant if the input does not change. The output changes only when the input changes. In a dynamic system, the output changes with time if the system is not in a state of equilibrium. In this course, we are focussing on dynamic systems.

1.1.3. What is a mathematical model?#

Any attempt to design a system must begin with a prediction of its performance before the system itself can be designed in detail or actually built. Such prediction is based on a mathematical description of the system’s dynamic characteristics. This mathematical description is called a mathematical model. For many physical systems, useful mathematical models are described in terms of differential equations.

1.1.4. Linear and non-linear differential equations#

Linear differential equations may be classified as linear, time-invariant differential equations and linear, time-varying differential equations.

A linear, time-invariant differential equation is an equation in which a dependent variable (\(x(t)\)) and its derivatives (\(\frac{dx}{dt}\),\(\frac{d^2x}{dt^2}, \ldots \)) appear as linear combinations.

An example of such an equation is

(1.1)#\[\begin{equation} \frac{d^2x(t)}{dt^2}-2\frac{dx(t)}{dt}+8x(t)=0, \end{equation}\]

where all the coefficients of every term are constant( in this case 1,-2,8). Therefore a linear, time-invariant differential equation is also called a linear, constant-coefficient differential equation.

In the case of a linear, time-varying differential equation, the dependent variable (\(x(t)\)) and its derivatives (\(\frac{dx}{dt}\),\(\frac{d^2x}{dt^2},\ldots \)) appear as linear combinations, but a coefficient or coefficients of terms may involve the independent variable.

An example of a linear time-variant differential equation is

(1.2)#\[\begin{equation} \frac{dx(t)}{dt}-2(1-\cos(5t))\frac{dx(t)}{dt}+8x(t)=0. \end{equation}\]

It is important to remember that, in order to be linear, the equation should not contain any powers or other functions of the dependent variables or its derivatives.

A differential equation is called nonlinear if it is not linear with respect to the time dependent variable (\(x(t)\)).

An example of a nonlinear time-invariant differential equations is:

(1.3)#\[\begin{eqnarray} \left ( \frac{d^2x(t)}{dt^2} \right)^2 -2\frac{dx(t)}{dt}+8x(t)=0 \end{eqnarray}\]

1.1.5. Linear systems and non-linear systems#

For linear systems, the equations that constitute the model are linear. In this course, we shall deal mostly with linear systems that can be represented by linear, time-invariant ordinary differential equations.

The most important property of linear systems is that the principle of superposition is applicable. This principle states that the response produced by simultaneous applications of two different forcing functions or inputs is the sum of two individual responses. Consequently, for linear systems, the response to several inputs can be calculated by dealing with one input at a time and then adding the results.

As a result of superposition, complicated solutions to linear differential equations can be derived as a sum of simple solutions. In an experimental investigation of a dynamic system, if cause and effect are proportional, thereby implying that the principle of superposition holds, the system can be considered linear.

Although physical relationships are often represented by linear equations, in many instances the actual relationships may not be quite linear. In fact, a careful study of physical systems reveals that so-called linear systems are actually linear only within limited operating ranges. For instance, many hydraulic systems and pneumatic systems involve non-linear relationships among their variables, but they are frequently represented by linear equations within limited operating ranges.

For non-linear systems, the most important characteristic is that the principle of superposition is not applicable. In general, procedures for finding the solutions of problems involving such systems are extremely complicated. Because of the mathematical difficulty involved, it is frequently necessary to linearize a non-linear system near the operating condition. Once a non-linear system is approximated by a linear mathematical model, a number of linear techniques may be used for analysis and design purposes.

1.1.6. Continuous-time systems and discrete-time systems#

Continuous-time systems are systems in which the signals involved are continuous in time. These systems may be described by differential equations. Discrete-time systems are systems in which one or more variables can change only at discrete instants of time. (These instants may specify the times at which some physical measurement is performed or the times at which the memory of a digital computer is read out.) Discrete-time systems that involve digital signals and, possibly, continuous-time signals as well may be described by difference equations after the appropriate discretization of the continuous-time signals. This topic will not be discussed in this course.

1.2. Mathematical modeling#

1.2.1. What is mathematical modelling?#

Mathematical modeling involves describing important system characteristics by sets of mathematical equations. By applying physical laws to a specific system, it may be possible to develop a mathematical model that describes the dynamics of the system. Such a model may include unknown parameters, which must then be evaluated through actual tests. Sometimes, however, the physical laws governing the behavior of a system are not completely defined, and formulating a mathematical model may be impossible. If so, an experimental modeling identification process can be used. In this process, the system is subjected to a set of known inputs, and its outputs are measured. Then a mathematical model is derived from the input-output relationships obtained.

1.2.2. Simplicity of mathematical model versus accuracy#

In attempting to build a mathematical model, a compromise must be made between the simplicity of the model and the accuracy of the results of the analysis. It is important to note that the results obtained from the analysis are valid only to the extent that the model approximates a given physical system. In determining a reasonably simplified model, we must decide which physical variables and relationships are negligible and which are crucial to the accuracy of the model. To obtain a model in the form of linear differential equations, any distributed parameters and non-linearities that may be present in the physical system must be ignored. If the effects that these ignored properties have on the response are small, then the results of the analysis of a mathematical model and the results of the experimental study of the physical system will be in good agreement. Whether any particular features are important may be obvious in some cases, but may, in other instances, require physical insight and intuition.

Experience is an important factor in this connection. Usually, in solving a new problem, it is desirable first to build a simplified model to obtain a general idea about the solution. Afterward, a more detailed mathematical model can be built and used for a more complete analysis.

1.2.3. Remarks on mathematical models#

An engineer must always keep in mind that the model he or she is analyzing is an approximate mathematical description of the physical system; it is not the physical system itself!

In reality, no mathematical model can represent any physical component or system completely. Approximations and assumptions are always involved. Such approximations and assumptions restrict the range of validity of the mathematical model. (The degree of approximation can be determined only by experiments.)

So, in making a prediction about a system’s performance, any approximations and assumptions involved in the model must be kept in mind.

1.2.4. Mathematical modeling procedure#

The procedure for obtaining a mathematical model for a system can be summarized as follows:

  1. Draw a schematic diagram of the system, and define the different variables.

  2. Using physical laws, write equations for each component, combine them according to the system diagram, and obtain a mathematical model.

  3. To verify the validity of the model, its predicted performance, obtained by solving the equations of the model, is compared with experimental results.

The question of the validity of any mathematical model can be answered only by experiments. If the experimental results deviate from the prediction to a great extent, the model must be modified. A new model is then derived and a new prediction compared with experimental results. The process is repeated until satisfactory agreement is obtained between the predictions and the experimental results.

1.3. Analysis and design of dynamic systems#

This section briefly explains what is involved in the analysis and design of dynamic systems.

1.3.1. Design procedure#

  1. The engineer begins the design procedure knowing the specifications to be met and the dynamics of the components, the latter of which involve design parameters. The specification may be given in terms of both precise numerical values and vague qualitative descriptions. (Engineering specifications normally include statements on such factors as cost, reliability, space, weight, and ease of maintenance.) It is important to note that the specifications may be changed as the design progresses, for detailed analysis may reveal that certain requirements are impossible to meet.

  2. Next, the engineer will apply any applicable synthesis techniques, as well as other methods, to build a mathematical model of the system. Once the design problem is formulated in terms of a model, the engineer carries out a mathematical design that yields a solution to the mathematical version of the design problem.

  3. With the mathematical design completed, the engineer simulates the model on a computer to test the effects of various inputs and disturbances on the behavior of the resulting system. If the initial system configuration is not satisfactory, the system must be redesigned and the corresponding analysis completed. This process of design and analysis is repeated until a satisfactory system is found. To perform a simulation and resulting analysis of a mathematical model software packages like Matlab, Octave or Python are used. These software packages are optimized for certain mathematical model descriptions (transfer functions, Ordinary Differential Equation (ODE), block diagrams, state space models). All these representations are discussed in the next chapters.

  4. Then a prototype physical system can be constructed. Note that the process of constructing a prototype is the reverse of mathematical modeling. The prototype is a physical system that represents the mathematical model with reasonable accuracy. Once the prototype has been built, the engineer tests it to see whether it is satisfactory. If it is, the design of the prototype is complete. If not, the prototype must be modified and retested. The process continues until a satisfactory prototype is obtained. The construction of a prototype is not included in this course but is a topic included in some master thesis’s or post-graduate programs.

1.4. Mathematical model representation used in software#

Two main groups of physical model representation can be identified: non-linear and linear physical model equations.

fishy

Fig. 1.1 The different mathematical model representations discussed in this course.#

Both types are widely used in software and have different properties. In general the non-linear models are used to perform more accurate simulations whereas the linear models are more adequate to design a controller. Fig. 1.1 shows the different model representations used in this course.

1.4.1. Non-linear representation#

The large group of differential equations is composed out of following big subsets:

  1. Ordinary Differential Equations (ODEs) describe the evolution of a system subject to internal and external dynamics. Specifically, an ODE links a quantity depending on a single independent variable (time, for example) to its derivatives. In addition, the system can be under the influence of external factors.

    A first-order ODE can typically be written as:

    (1.4)#\[\begin{equation} \dot x(t) = f(t,x(t),u,p) \end{equation}\]

    where t is time, x is the variable, u is an exogenous input variable and p is a constant parameter. More generally, an n-th order ODE involves successive derivatives of x until the order n. The ODE is said to be linear or nonlinear depending on whether f is linear in x or not.

  2. Partial Differential Equations (PDEs) describe the evolution of dynamical systems involving both time and space. Examples in physics include sound, heat, electromagnetism, fluid flow, and elasticity, among others. Examples in biology include tumor growth, population dynamics, and epidemic propagations.

    For example a heat equation is given by:

    (1.5)#\[\begin{equation} \frac{\partial T}{dt}(x,t) = \alpha \frac{d^2 T} {dx^2}(x,t) + \sigma (x,t). \end{equation}\]

    PDEs are hard to solve analytically. Therefore, PDEs are often studied via numerical simulations.

  3. A Differential algebraic Equation (DAE) explicitly defines differential equations making it impossible to isolate every derivative.

    A first-order DAE can typically be written as:

    (1.6)#\[\begin{equation} f(\dot x (t),x(t),t, u,p)=0 \end{equation}\]

    where t is time, x is the variable, u is an exogenous input variable and p is a constant parameter. More generally, an n-th order DAE involves successive derivatives of x until the order n. The ODE is said to be

This course only considers ODE’s because this is the most widely used method of non-linear simulation.

1.4.2. Linear model representation#

Linear model representation have been used a lot more in past research because of interesting features like superposition that makes it possible to specify a model of a subsystems and combining all subsystems to one big system by a simple operation like an addition or multiplication or the application of a Laplace transform to get a transfer function. More information regarding continues transfer functions and state space models is given in the next chapters.