You are on page 1of 17

Mathematical modeling of dynamic

systems:
Chapter 3: • Simplicity versus accuracy: it is possible to improve the
accuracy of mathematical model by increasing its complexity.

Mathematical modeling of • Linear systems: a system is called linear if principle of


superposition applies.
dynamic systems
• Linear time invariant systems and linear time variant
systems: a differential equation is linear if the coefficients are
Instructor: S. Farhadi constants or of the independent variable.

Examples of Nonlinear Systems: Linearization of nonlinear systems:


2
d 2 x ⎛ dx ⎞
+ ⎜ ⎟ + x = A Sin(ω t )
dt 2 ⎝ dt ⎠ • In control engineering a normal operation of the
system may be around an equilibrium point, and the
d 2x
dt 2
(
+ x2 −1 )
dx
dt
+x=0
signals may be considered small signals around
d 2 x dx equilibrium.
2
+ + x + x3 = 0
dt dt
• If the system operates around an equilibrium point
and if signals involved are small signals, then it is
possible to approximate the nonlinear system by a
linear system
Transfer function and impulse- response Example: Consider the satellite attitude control system
shown in the figure, the transfer function is determined
function:
as follows
• In control theory, functions called transfer functions
are commonly used to characterize the input-output d 2θ
relationships of components or systems that can be
J =T
dt
described by linear, time invariant, differential
equations. J s 2 Θ( s ) = T ( s )
Θ( s ) 1
=
• The transfer functions of a linear, time invariant, T (s) J s 2
differential equation is defined as the ratio of the
Laplace transform of the output to the Laplace
transform of the input under the assumption that all
initial conditions are zero.

Convolution Integral: Impulse-response function:


• For a linear, time invariant system Y (s)
G(s) =
• Consider the output of a system to a unite-impulse input when the initial
transfer function is conditions are zero. Since the Laplace transform function of unit impulse
X (s) function is unity, the Laplace transform of the output of the system is:

• Where X(s) is the Laplace transform


of the input and Y(s) is the Laplace
Y (s) = G (s)
Y (s) = G (s) X (s)
• Thus the inverse Laplace transform of the output is given by:
transform of the output, where we
assume that all intial conditions
involved are zero, hence:
• So the inverse Laplace function is
t
y (t ) = L−1[G ( s )]
given by the following convolution y (t ) = ∫ x(τ ) g (t −τ ) dτ
0
integral:
t
= ∫ g (t −τ ) x(τ ) dτ
0
Modelling Example Modelling Example
This diagram shows a pressure • First transform the ODE:
controller. y=0 is the
equilibrium position of the
device.
At t=0 there is a sudden increase
in pressure. The motion is
[ 2
]
m s Y − sy (0) − y ' (0) + c[sY − y (0)] + kY = P
e −0 s P
s
=
s
governed by:
m&y& + c y& + ky = P u (t )
• The system is initially at rest so this simplifies to:
Find y(t).
(P is the force due to the applied P
pressure). s 2 mY + scY + kY =
s
Figure: Kreyzsig, pg 316

Modelling Example Modelling Example


• Now solve for Y: 1 • Determining unknown coefficients we have:
Y =P
s ( s 2 m + sc + k )
⎛ m c ⎞
• Now the hard part ... we must invert this for y(t). ⎜1 − s+ ⎟
Since Y is in the form of one polynomial divided by Y = P⎜ + 2 k k ⎟
⎜ ks s m + sc + k ⎟
another we will expand it using partial fractions. ⎜ ⎟
⎝ ⎠

⎛c c s + c3 ⎞ ... which can at least be inverted term by term.


Y = P⎜ 1 + 2 2 ⎟
⎝ s s m + sc + k ⎠
Modelling Example Modelling Example
• From a table of Laplace transforms we have: • Putting every together we have:

P⎡ −αt ⎛ 1 c ⎞⎤
y (t ) = − ⎜ ω + ω ⎟⎥
k ⎢⎣
1 e cos( t ) sin( t )
⎧ ⎫ ⎝ ω ⎠⎦
( )
s 1 k mk
L−1 ⎨ ⎬ = ae at − bebt
⎩ ( s − a )( s − b) ⎭ (a − b)
⎧ ⎫
( )
1 1 From first partial fraction
L−1 ⎨ ⎬ = e at − ebt From real part of the
⎩ ( s − a )( s − b) ⎭ (a − b) second partial fraction.

Block diagram Block diagram of a close loop system.

• A system may consist of a number of components. To show


the functions performed by each component, we commonly
use a diagram called the block diagram.
Open loop transfer function and feedforward
Closed-loop transfer function:
transfer function:
C ( s) = G ( s) E ( S )
Feedback signal = B( s ) = H ( s ) C ( S )
E ( s) = R( s) − B( s) = R( s) − H ( s) C ( s)
B( s)
Open loop transfer function = = G ( s) H ( s)
E ( s) Eliminating E(s) from the above equation yields:
C ( s)
FeedForward transfer function = = G ( s) C ( s) = G ( s) [ R( s) − H ( s) C ( s) ]
E ( s)
Thus close loop transfer function is obtained as:

C (s) G (s)
=
R( s) 1 + G ( s) H ( s)

Example: consider the RC circuit shown in the figure, using the


Closed-loop system subjected to a disturbance: system dynamic equations, the overall block diagram of the
system can be obtained as it is drown:
By superposition the input and the disturbance effects, the
output transfer function is determined :

C ( s) = CR ( s) + CD ( s) =
G2 ( s )
[G1 ( s) R( s) + D( s)]
1 + G1 ( s ) G2 ( s ) H ( s )
Rules of Block Diagram Algebra
Example: the block diagram shown in figure (a) can be
simplified step by step as it is shown in figures (b) through (e)

Example: simplify the block diagram shown.


Classical or Frequency-Domain Technique: Modeling in the Time Domain - State-Space:

• State-Space or Modern or Time-Domain technique


• Advantages • Disadvantages
– Converts differential – Applicable only to Linear,
equation into algebraic Time-Invariant (LTI) • Advantages • Disadvantages
equation via transfer systems or their close – Provides a unified – Not as intuitive as
functions. approximations. method for modeling, classical method.
– Rapidly provides stability analyzing, and designing – Calculations required
& transient response a wide range of systems before physical
info. LTI
LTIlimitation
limitationbecame
becameaa using matrix algebra. interpretation is apparent
problem
problemcirca
circa1960
1960when
when
space
spaceapplications
applicationsbecame
became
– Nonlinear, Time-Varying,
important.
important. Multivariable systems

State-Space Representation Definitions

An LTI system is represented in state-space format by the • System variables: Any variable that responds to an
vector-matrix differential equation (DE) as: input or initial conditions.

x&(t ) = Ax (t ) + Bu(t ) Dynamic equation(s)


• State variables: The smallest set of linearly
y (t ) = Cx (t ) + Du(t ) Measurement equations independent system variables such that the initial
with t ≥ t 0 and initial conditions x ( t 0 ). condition set and applied inputs completely
determine the future behavior of the set.
The vectors x, y, and u are the state, output and input vectors.
The matrices A, B, C, and D are the system, input, output, and Linear
LinearIndependence:
Independence:AAsetsetof
ofvariables
variablesis
islinearly
linearly
feedforward matrices. independent
independent if none of the variables can bewritten
if none of the variables can be writtenas
asaa
linear combination of the others.
linear combination of the others.
Definitions The minimum number of state variables is equal to:

• State vector: An (n x 1) column vector whose • the order of the DE’s describing the system.
elements are the state variables. • the order of the denominator polynomial of its
transfer function model.
• State space: The n-dimensional space whose axes • the number of independent energy storage elements
are the state variables. in the system.

Remember
Rememberthethestate
statevariables
variablesmust
mustbebelinearly
linearly
independent!
independent! If not, you may not be ableto
If not, you may not be able tosolve
solvefor
forall
allthe
the
other system variables, or even write the state equations.
other system variables, or even write the state equations.

In General:
Linearization
Example: Converting a Transfer Function to State Space

• State variables are not unique. A system can be


accurately modeled by several different sets of state
variables.
• Sometimes the state variables are selected because
they are physically meaningful.
• Sometimes because they yield mathematically
tractable state equations.
• Sometimes by convention.

Phase-variable Format Converting from State Space to a Transfer


Function
1. Consider the DE
dny d n −1 y d y x&(t ) = Ax (t ) + Bu(t )
n + a n −1 n −1 +L+ + a 0 y = b0 u
dt dt dt y (t ) = C x (t ) + Du(t )
where y is the measure variable and u is the input.
2. The minimum number of state variables is n since the DE is with t ≥ t 0 and zero initial conditions.
of nth order. Taking the Laplace transform,
3. Choose the output and its derivatives as state variables.
x1 = y s X ( s ) = A X ( s ) + BU ( s ) → X ( s ) = [sI − A] BU ( s )
−1

x 2 = y& ⇒ x&1 = x 2
Y ( s ) = C X ( s ) + DU ( s ) = C [sI − A] BU ( s ) + DU ( s )
First row of state equations −1

M
n −1
d y
[ ]
= C [sI − A] B + D U ( s )
−1

x n = n −1 ⇒ x& n −1 = x n In the case of SISO (Single - Input, Single - Output) systems :


dt
C adj[sI − A] B + det[sI − A]D
= C [sI − A] B + D =
dny Y (s) −1
x& n = n = − a 0 x1 − a1 x 2 L− a n −1 x n + b0 u
dt
Last row of state equations U ( s) det[sI − A]
Phase-variable Format Example:

4. Arrange in vector-matrix format

⎡ x1 ⎤ ⎡ 0 1 0 K 0 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤
⎢x ⎥ ⎢ 0 0 1 K 0 ⎥⎥ ⎢⎢ x2 ⎥⎥ ⎢⎢ 0 ⎥⎥
d ⎢
2 ⎥ ⎢
⎢ M ⎥=⎢ M M M L M ⎥⎢ M ⎥ + ⎢ M ⎥
dt ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ xn −1 ⎥ ⎢ 0 0 0 L 1 ⎥ ⎢ xn −1 ⎥ ⎢ 0 ⎥
⎢⎣ xn ⎥⎦ ⎢⎣− a0 − a1 − a2 L − an −1 ⎥⎦ ⎢⎣ xn ⎥⎦ ⎢⎣b0 ⎥⎦ equivalent
⎡ x1 ⎤ block diagram showing
⎢x ⎥ phase-variables.
⎢ 2 ⎥ Note
Notethe
thetransfer
transferfunction
functionformat
format
y = [1 0 0 L 0]⎢ M ⎥
Note: y(t) = c(t)
⎢ ⎥ Y ( s) b0
⎢ xn −1 ⎥ = n n −1
U ( s ) s + a n − 1 s +L + a 1 s 1 + a 0
⎢⎣ xn ⎥⎦

Transfer Function with Numerator Polynomial


Transfer Function with Numerator Polynomial
(continued)

1. From the first block: X 1 ( s) 1 / a3


=
R ( s) a 2 2 a1 a0
s3 + s + s+
a3 a3 a3

2. Therefore,
⎡ ⎤ ⎡ ⎤
⎡ x1 ⎤ ⎢ 0 1 0 ⎥ ⎡ x1 ⎤ ⎢ 0 ⎥
d ⎢ ⎥ ⎢ ⎥⎢ ⎥
x = 0 0 1 ⎥ ⎢ x 2 ⎥ + ⎢⎢ 0 ⎥⎥u
dt ⎢ 2 ⎥ ⎢ a 0 a a 1
⎢⎣ x 3 ⎥⎦ ⎢− − 1 − 2 ⎥ ⎢⎣ x 3 ⎥⎦ ⎢ ⎥
⎢⎣ a 3 a3 a 3 ⎥⎦ ⎢⎣ a 3 ⎥⎦
Transfer Function with Numerator Polynomial Example:
(continued)

3. The measurement (observation) equation is obtained from


the second transfer function.

C ( s) = Y ( s) = (b2 s 2 + b1 s + b0 ) X 1 ( s) = b2 s 2 X 1 + b1 sX 1 + b0 X 1
But, sX 1 = X 2 and sX 2 = X 3
So, Y ( s) = b2 X 3 + b1 X 2 + b0 X 1
⎡ x1 ⎤
⎢ ⎥
[
y = b0 b1 ]
b2 ⎢ x 2 ⎥
⎢⎣ x 3 ⎥⎦

If forcing function involve derivative terms:


Mechanical systems
The fundamental law governing mechanical systems is
Newton’s second law

Example

Transfer Function State-space model

Comparing with standard form:

gives
Example

Electrical Systems
Basic laws governing electrical circuits are Kirchhoff’s current
law and voltage law.

Kirchhoff’s current law: The algebraic sum of all currents


entering and leaving a node is zero

Kirchhoff’s voltage law: The algebraic sum of the voltages


around any loop in an electrical circuit is zero
Example: RLC circuit Complex impedances:

• In driving transfer functions for electrical circuits, we frequently find it


convenient to write Laplace transformed equations directly, without
writing differential equations.

• The complex Impedance Z(s) of a two terminal circuit is the ratio of E(s),
the Laplace transform of the voltage across the elements to I(s), the
Laplace transform of the current through the element.

• If the two terminal element is a resistance R, capacitance C, or


inductance L, then the complex impedance is given by R, 1/Cs, or Ls
respectively.

• If the complex impedances are connected in series, the total impedance


is the sum of individual complex impedances.

Example Example
For turbulent flow
Liquid level systems

V
C =
H

For laminar flow

Example Example
Thermal systems

• Thermal systems are those that involve the transfer of heat


from one substance to another.

• To simplify the analysis we assume that a thermal system can


be represented by a lamped parameter model, that
substances that are characterized by resistance to heat flow
have negligible heat capacitance and that substances that are
characterized by heat capacitance have negligible resistance
to heat flow .

• Here we only consider conduction and convection.


Example
Thermal resistance and thermal capacitance

Linearized servo hydraulic system

Around normal operating point ( ):

You might also like