2. Time domain model#
2.1. Introduction#
This section explains how to perform a time domain simulation starting from a mathematical model consisting of Ordinary Differential Equations (ODE’s) over a transfer function to a state space model
2.2. ODE model#
Large group of mathematical model described by a set of differential equation can be rewritten as a system of Ordinary Differential Equations (ODEs). These ODE’s are well-known in literature and can be solved in various software packages. To be able to apply an ODE the mathematical model should not contain partial derivatives and the model equations should be explicit meaning that you should be able to isolate the highest derivative in every equation.
An ordinary differential equation or ODE is an equation containing a function of one or multiple independent variable and its first order derivatives. The term “ordinary” is used in contrast with the term partial differential equation which may be with respect to more than one independent variable.
In general an ODE is specified as:
where \(\mathbf{y}=\left [ \begin{array}{c} y_1(t) \\ \vdots \\ y_n((t) \end{array} \right]\) is a n dimensional vector of variables and \(\mathbf{F}=\left [ \begin{array}{c} F_1(t, \mathbf{y}) \\ \vdots \\ F_n(t, \mathbf{y}) \end{array} \right]\) a vector of n functions.
The vector of initital values for the variables of the ODE model is specified as \(y_0\).
We can identify 4 different types of ODE’s:
2.2.1. Linear one-dimensional ODE#
An examples of a linear one-dimensional ODE is :
where \(x(t)\) is a time dependent function.
2.2.2. Non-linear multi-dimensional ODE#
An examples of a non-linear multi-dimensional ODE is :
where \(x(t)\) is a time dependent function.
2.2.3. Linear multi-dimensional ODE#
An examples of a non-linear one dimensional ODE is :
where \(x_1(t)\) and \(x_2(t)\) are time dependent functions.
2.2.4. Non-linear multi-dimensional ODE#
An examples of a non-linear multivariant ODE is :
where \(x_1(t)\) and \(x_2(t)\) are time dependent functions.
2.2.5. Non-ODE systems#
An example of a mathematical model differential equation that cannot be converted to an ODE is:
this type a equation can be solved by a Differential Algebraic Equation (DAE).
This is however outside the scope of this course.
2.3. What to do with higher order differential equations?#
Consider the Euler differential equation:
that is not of the ODE type because of the second order differential.
We can convert equation eq:euler to an ODE by introducing a new variable \(v(t) = \frac{dy(t)}{dt}\) that reduces the second order equation to a set of first order equations:
The ODE model of (2.1) then becomes \(\mathbf{y}(t)=\left [ \begin{array}{c} y(t) \\ v(t) \end{array} \right]\) and \( \mathbf{F}(t, \mathbf{y}) = \left [ \begin{array}{c} v(t) \\ \frac{1}{t^2}\left ( -a t v(t)- b y(t) \right ) \end{array} \right]\).
2.4. Block diagram#
A block diagram of a dynamic system is a pictorial representation of the functions performed by each component of the system and of the flow of signals within the system. Such a diagram depicts the interrelationships that exist among the various components. Differing from a purely abstract mathematical representation, a block diagram has the advantage of indicating the signal flows of the actual system more realistically.
In a block diagram, all system variables are linked to each other through functional blocks. The functional block, or simply block, is a symbol for the mathematical operation on the input signal to the block that produces the output. The transfer functions of the components are usually entered in the corresponding blocks, which are connected by arrows to indicate the direction of the flow of signals. Note that a signal can pass only in the direction of the arrows. Thus, a block diagram of a dynamic system explicitly shows a unilateral property.
In general, the functional operation of a system can be visualized more readily by examining a block diagram of the system than by examining the physical system itself. A block diagram contains information concerning dynamic behavior, but it does not include any information about the physical construction of the system. Consequently, many dissimilar and unrelated systems can be represented by the same block diagram. Note that in a block diagram the main source of energy is not explicitly shown and that the block diagram of a given system is not unique. A number of different block diagrams can be drawn for a system, depending on the point of view of the analysis. (See Example Fig. 2.1)
Fig. 2.1 In the figure (a), (b), and © are block diagrams for the same system. (Many different block diagrams are possible for any given system.)#
The advantages of the block diagram representation of a system lie
in the fact that it is easy to form the overall block diagram for
the entire system merely by connecting the blocks of the components
according to the signal flow and that it is possible to evaluate the
contribution of each component to the overall performance of the
system.
In general, the functional operation of a system can be visualized
more readily by examining a block diagram of the system than by
examining the physical system itself. A block diagram contains
information concerning dynamic behavior, but it does not include any
information about the physical construction of the system.
Consequently, many dissimilar and unrelated systems can be represented
by the same block diagram. Note that in a block diagram the main source
of energy is not explicitly shown and that the block diagram of a given
system is not unique. A number of different block diagrams can be drawn
for a system, depending on the point of view of the analysis.
Fig. 2.2 A summation point.#
Summation point. Fig. 2.2 shows a circle with a cross, the symbol that stands for a summing operation. The plus or minus sign at each arrowhead indicates whether the associated signal is to be added or subtracted. It is important that the quantities being added or subtracted have the same dimensions and the same units.
Branch point. A branch point is a point from which the signal from a block goes concurrently to other blocks or summing points.
Block diagram of a closed-loop system. Figure 3 is a block diagram of a closed-loop system. The output C(s) is fed back to the summing point, where it is compared with the input R(s). The closed-loop nature of the system is indicated clearly by the figure. The output X(s) of the block is obtained by multiplying the transfer function (s) by the input to the block, E(s).
Fig. 2.3 Block diagram of a closed loop system.#
Most linear and non-linear systems can be represented by a block diagram consisting of blocks, summing points, and branch points. When the output is fed back to the summing point for comparison with the input, it is necessary to convert the form of the output signal to that of the input signal. This conversion is accomplished by the feedback element whose transfer function is \(H(s)\), as shown in Figure 3.
2.4.1. Block diagram example#
Consider a mass-spring-damper system with mass \(m\), spring constant \(k\) and damping factor \(b\). The transfer function of this system is
A block diagram representation of the system is shown in Fig. 2.1(a).
Notice that Equation (2.10) can be written as
Rewriting the latter equation as
we can obtain a different block diagram for the same system, as shown in Fig. 2.1(b).
Equation (2.10) can also be rewritten as
or
we can obtain a different block diagram for the same system, as shown in Fig. 2.1(\(c\)).