Chapter 1
Chapter 1
ME405
Lectures by
Dr. Magdy Roman
Topics to be covered…
Chapter 1 Mathematical Modeling of Dynamic Systems
Chapter 2 Modeling of Mechanical Systems
Chapter 3 Modeling of Electrical Systems
Chapter 4 Modeling of Fluid and Thermal Systems
Chapter 5 Simulation of Dynamic Systems
Chapter 1
Mathematical Modeling of Dynamic
Systems
This chapter provides the student with an overview of different types of mathematical
modeling of dynamic systems.
2.1 Introduction
A mathematical model of a dynamic system is defined as a set of equations that
represents the dynamics of the system accurately, or at least fairly well.
Note that:
• A mathematical model is not unique to a given system. A system may be
represented in many different ways and, therefore, may have many mathematical
models, depending on one’s perspective.
• The dynamics of many systems, whether they are mechanical, electrical, thermal,
economic, biological, and so on, may be described in terms of differential
equations. Such differential equations may be obtained by using physical laws
governing a particular system—for example, Newton’s laws for mechanical systems
and Kirchhoff’s laws for electrical systems.
In general, consider a linear system whose output is y(t) and input is x(t) and contains
coefficients of values a, b, c, ….,z. If the dynamics of the system produce a first-order
differential equation, it would be represented as
System
variables
dy
a + b y( t ) = c x ( t )
System dt
coefficients
If the dynamics of the system produce a second-order differential equation, it would
be represented as 2
d y dy
a 2
+ b + c y( t ) = e x ( t )
dt dt
If the dynamics of the system produce a third-order differential equation, its
representation would be
d3y d2y dy
a 3 +b 2 +c + e y( t ) = f x ( t )
dt dt dt
2.1.1 Linear versus nonlinear system
The systems described by the above equations are called linear systems because they
have a linear relationship between the input and the output. Nonlinear equation
those which contain nonlinear function in their differential equations such as,
d2y dy
a 2 + b + c y( t ) 2 = e x ( t )
dt dt
or
d2y dy
a 2 + b + c y( t ) = e cos(x ( t ))
dt dt
or
d2y dy
a 2 + b x ( t ) + c y( t ) = e x ( t )
dt dt
A system is called linear if it obeys the principle of superposition. The principle of
superposition states that,
“the response produced by the simultaneous application of two different inputs is
the sum of the two individual responses”.
Hence, for the linear system, the response to several inputs can be calculated by
treating one input at a time and adding the results.
where y is the output of the system and x is the input. Note that for all causal systems
(proper transfer function) n>=m. A causal system is the system that its output
depends on the present and past values of the input (not future values). Classically,
nature or physical reality has been considered to be a causal system.
The transfer function of this system is
Find the transfer function of a PID controller that has the following control law,
Solution
Taking the Laplace transform for both sides of the equation,
Kp 1
U(s) = K p E (s) + E (s) + K p Td s E (s)
Ti s
U (s) 1
= K p (1 + + Td s)
E (s) Ti s
2.2.2 Block diagram
A block diagram of a system is a pictorial representation of the functions performed
by each component and of the flow of signals.
In a block diagram each system component
is represented by a block which has input
signal and output signal. The transfer Input X(s) Transfer Output Y(s)
functions of the components are usually Function
entered in the corresponding blocks, G(s)
which are connected by arrows to indicate
the direction of the flow of signals. Every Figure 2-2 Block representation
block output is equal to the block transfer
function multiplied by the input signal,
that is Y(s) = G(s) . X(s)
The block diagram model has the following advantages:
• it depicts the interrelationships that exist among the various components.
• it is easy to form the overall block diagram for the entire system by merely
connecting the blocks of the components according to the signal flow.
• it is possible to evaluate the contribution of each component to the overall
performance of the system.
• the functional operation of the system can be visualized more readily by examining
the block diagram than by examining the physical system itself.
▪ Summing Point is a circle with a cross indicating a
summing or subtraction operation. It is important that
the quantities being added or subtracted have the same
dimensions and the same units.
≡
(a)
(b)
Figure 2-4 (a) Cascaded (b) Parallel systems
Solution
2.2.2.3 Block diagram of multi-input system
When two inputs are present
in a linear time-invariant
system the superposition
principle is used. Each input
can be treated independently
of the other, and the outputs
corresponding to each input
alone can be added to give the
complete output. Figure 2-6 Multi-input system
Consider the system shown in Figure 2-6. First we consider the disturbance D(s) only
and assume that the reference input R(s) is zero. We then calculate the response CD(s)
to the disturbance only. This response can be found from
Now we consider the reference input R(s) and assume that the disturbance is zero.
Then the response CR(s) to the reference input R(s) can be obtained from
The response to the simultaneous application of the reference input and disturbance
can be obtained by adding the two individual responses.
2.2.3 State-space representation
A state-space representation is a mathematical model of a physical system as a set of
input, output and state variables related by first-order differential equations.
The state-space representation can be used in modeling linear or nonlinear, time
invariant or time varying, single or multi input/output systems.
State variables: The state variables of a dynamic system are the smallest set of
variables such that knowledge of these variables at t=t0 , together with knowledge of
the input variable for t ≥ t0 , completely determines the behavior of the system for any
time t ≥ t0.
The minimum number of state variables of a system is equal to the system order
u1(t) y1(t)
x1(t)
u2(t) y2(t)
x1(t)
. .
. . .
. . .
. Figure 2-7 MIMO system
ur(t) ym(t)
xn(t)
State equations
State variables Input variables
Output equations
The above form is the general form. For linear multi-input, multi-output, time-invariant
system the state-space representation becomes in the form
where,
, ,
we write the three first-order time derivatives of the three state variables
Because we want all three right-hand sides of the above equations to be functions of
the states xi , and input u, we substitute , , and .
Example 2.5
where, θ is the rotation angle, I is the current, ein is the input voltage, TL is the load
torque, L , R, Kb, Km, and J are the motor constants. Consider the input variables are ein
and TL. Consider also the output to be the rotation angle θ.
Solution
The first equation is a first-order linear ODE, and the second is a second-order linear
ODE. Consequently, the system is third order 3 and the system requires three state
variables.
We select
and inputs
Next, we write the three first-order state equations by taking a time derivative of each
state variable,
we get
or
A B
C D
Example 2.6
Consider a SISO mechanical system that has the following differential equation
Where m, b, and k are the system coefficients, u is the input and y is the output. Find
the state-space representation of the system in the matrix form, then sketch the
system block diagram.
Solution
The system is of the second order, so we choose two state variables.
By differentiating we get
or
state equations
output equation
If , then the previous equations can be written in the matrix form as,
The system can be written in the standard form as,
To draw the block diagram we bring back the state and output equations
2.3 Linearization
Most real-world dynamic systems are nonlinear; that is, they are modeled by
nonlinear differential equations. There is no general, unifying theory for obtaining the
solution of a nonlinear system, and in most cases we must rely on numerical
integration schemes to obtain the system response. On the other hand, a wealth of
analysis tools exists for obtaining the solution of a linear system, design techniques
that can be applied only to linear system dynamics. Therefore, it is desirable to have a
linear system model for analysis and design purposes.
Linearization is a method for converting a nonlinear equation (or model) into a linear
model. Linearization relies on a Taylor series expansion about a nominal (or
reference) operating point, where only the first-order terms are retained. Because
second- and higher-order terms are neglected in the Taylor-series expansion for small
deviation from the nominal point. The resulting linear model is accurate only if the
system's state does not deviate too far from the nominal operating point.
Linearization relies on the Taylor series expansion as described below. Suppose we
have a nonlinear system with one state variable x, and one input variable u,
The nominal input u* (which is likely given in the problem) results in the nominal state
variables x*, which is the nominal operating point.
x* = f (x*, u* )
If x* has changed to δx+ x* and u* has changed to δu + u* system becomes,
The first term in the right-hand side f(x*, u*) equals x , which cancel out with x on the
* *
The above equation is the linearized model of the nonlinear system. It should be
noted that all partial derivatives are evaluated at the nominal state and input, x* and
u*, respectively.
It is important to note that the linear model is in terms of the perturbation variables
δx and δu. Therefore, the solution of the linearized model yields δx(t), which is the
time history of the state deviation from the operating point x*. If we want to estimate
the state history from the linear solution, we use x(t) = δx(t) + x*.
Example 2.7
Derive the linear model of the following nonlinear state-variable equation. Perform
the linearization about the static equilibrium state x* that results from the nominal
input u* = 2.
Solution
The first step is to obtain the nominal state x* given the nominal input u* = 2. Here
the nominal point is at static equilibrium. At static equilibrium,
The three roots include one real root (x = 0.2949), and two complex conjugate roots (x
= -0.1474 ±j2.2506; Because the equilibrium state must be a real number, the nominal
state is x* = 0.2949.
Then we write the linearized equation
Second we evaluate the partial derivatives at the nominal state x* and nominal input u*,
Finally, substituting the numerical values of the two partial derivatives into the
linearized model
This equation is the linearized version of the original nonlinear equation, where the
linearization has been performed about the nominal state x* = 0.2949. This value is
the equilibrium state for the nominal input u* = 2. Note that the linearized equation is
written in terms of the perturbation variables δx and δu. After getting the solution for
δx(t) if we wish to estimate x, we must add the perturbation variable to the nominal
state. x(t) = x* + δx(t).