Mathematical Modelling
Transcript of Mathematical Modelling
MEC 522: Mathematical Modelling of Dynamic Systems
MATHEMATICAL MODELLING OF DYNAMIC SYSTEMS Dynamic systems, whether they are mechanical, electrical, thermal, hydraulic, economic, biological, etc can be characterized by differential equations. The response of a dynamic system to an input (or forcing function) may be obtained if these differential equations are solved. The equations can be obtained by utilizing physical laws governing a particular system, for example, Newton’s law of motion mechanical systems. The mathematical description of the dynamic characteristics of a system is called a mathematical model. The first step in the analysis of a dynamic system is to derive its model. We must always keep in mind that deriving a reasonable mathematical model is the most important part of the entire analysis. Models may assume many different forms. Depending on the particular system and circumstances, one mathematical representation may be better suited than other representations. Once the mathematical model of a system is obtained, various analytical and computer tools can be used for analysis and synthesis purposes. In obtaining a model, we must make a compromise between the simplicity of the model and the accuracy of the results of the analysis. Note that the results obtained from the analysis are valid only to the extent that the model approximates a given physical system. In deriving such a simplified model, we frequently find it necessary to ignore certain inherent physical properties of the system. In particular, if a linear lumped-parameter mathematical model (i.e. one employing ordinary differential equations) is desired, it is always necessary to ignore certain nonlinearities and distributed parameters (i.e, ones giving rise to partial differential equations) which may be present in the physical system. In general, in solving a new problem, we find it desirable first to build a simplified model so that we can get a general feeling for the solution. A more complete mathematical model may then be built and used for a more complete analysis.
1
MEC 522: Mathematical Modelling of Dynamic Systems
Linear Systems Linear systems are ones in which the equations of the model are linear. A differential equations is linear if the coefficients are constants or functions of the independent variable. The most important property of linear systems is that the principle of superposition is applicable. The principle of superposition states that the response produced by the simultaneous application of two different forcing forces is the sum of the two individual responses.
2
MEC 522: Mathematical Modelling of Dynamic Systems
Transfer Function Transfer functions are commonly used to characterise the input-output relationships of components and systems that can be described by linear, time-invariant, differential equations. The transfer function of a linear time-invariant, differential equation system is defined as the ratio of the Laplace transform of the output (response function) to the input (driving function) under the assumption that all initial responses are zero.
Transfer function=||||
)()(
inputoutput
sXsY
=
By using the concept of the transfer function, it is possible to represent system dynamics by algebraic equations in s. If the highest power of s in the denominator of the transfer function is equal to n, the system is called an nth-order system. 1. The transfer function of a system is a mathematical model in that it is an
operational method of expressing the differential equation that relates the output variable to the input variable.
2. The transfer function is the property of a system itself, independent of the magnitude and nature of the input or driving function.
3. The transfer function includes the units necessary to relate the input to the output: however it does not provide any information concerning the physical structure of the system.
4. If the transfer function of a system is known, the output or response can be studied for various forms of inputs.
5. If the transfer function of a system is known, it may be established experimentally by introducing known inputs and studying the output of the system
For a general equation nth-order, linear, time-invariant differential equation.
)()()()()()(01
1
101
1
1 trbdt
trdbdt
trdbtcadt
tcdadt
tcda m
m
mm
m
mn
n
nn
n
n +⋅⋅⋅++=+⋅⋅⋅++ −
−
−−
−
−
3
MEC 522: Mathematical Modelling of Dynamic Systems
where c(t) is the output, r(t) is the input, and ai’s and bi ’s are constants. Taking Laplace transform of both sides and assuming all initial conditions are zero. ( ) ( ) )()( 0
110
11 sRbsbsbsCasasa m
mm
mn
nn
n +⋅⋅⋅++=+⋅⋅⋅++ −−
−−
Block diagram of a transfer function
MathematicalModelling
Mechanical system
M
K
C
Figure 1: Mass, spring, and damper system;
Using Newton’s law:
)()()()(2
2
tftKxdt
tdxCdt
txdM =++
Taking Laplace transform, assuming zero initial conditions
)()()()(2 sFsKXsCsXsXMs =++ or ( ) )()(2 sFsXKCsMs =++
Transfer function : KCsMssF
sXsG++
== 2
1)()()(
4
MEC 522: Mathematical Modelling of Dynamic Systems
Mechanical system Table 1: Force-velocity, force-displacement, and impedance translational
relationships for springs, viscous dampers, and mass
5
MEC 522: Mathematical Modelling of Dynamic Systems
Table 2:Torque-angular velocity, torque-angular displacement, and
impedance rotational relationships for springs, viscous dampers, and inertia
An Inverted Pendulum
6
MEC 522: Mathematical Modelling of Dynamic Systems
M
x
m
θ
u
l
M
xmg
θ
H
Vu
Figure 2: Schematic diagram of an inverted pendulum Rotational motion of pendulum rod about its center of gravity
θθθ cossin HlVlI −=&& Horizontal motion of pendulum rod about its center of gravity
( ) Hlxdtdm =+ θsin2
2
Horizontal motion of pendulum rod about its center of gravity
mgVldtdm −=)cos(2
2
θ
Cart motion
Hudt
xdM −=2
2
1
For small movement of pendulum, the equation can be linearised
( )mgV
Hlxm
HlVlI
−==+
−=
0θ
θθ&&&&
&&
432
7
MEC 522: Mathematical Modelling of Dynamic Systems
From equation 1 and 3, we have
umlxmM =++ θ&&&&)( a and, equation 2, 3 and 4, we have
HlmglI −= θθ&& ( )θθ &&&& mlxmlmgl +−
or ( ) θθ mglxmlmlI =++ &&&&2 b Laplace transform of equation a and b
)()()()( 2 sUsmlssXsmM s =++ θ and )()()()( 222 smglsXmlsssmlI θθ =++
( ) )()( 2
22
smls
mglsmlIsX θ−+−=
and therefore
( ) )()()()( 22
22
sUsmlssmls
mglsmlIsmM s =+⎟⎟⎠
⎞⎜⎜⎝
⎛ −+−+ θθ
( ) )()(
1)()(
222
sUmls
mlmglsmlImM
sUs
+⎟⎟⎠
⎞⎜⎜⎝
⎛ −+−+
=θ
Electrical System Table 3:Voltage-current, voltage-charge, and impedance relationships for
capacitors, resistors, and inductors
8
MEC 522: Mathematical Modelling of Dynamic Systems
Figure 3: RLC network
L R
C V
Using Kirchoff’s voltage law:
)()(1)()(
0
tvdttiC
tRidt
tdiLt
=++ ∫
changing variables from current to charge using dttdqti /)()( = yields
)()(1)()(2
2
tvtqCdt
tdiRdt
tdqL =++ and )()( tCvtq c= yields
)()()()(
2
2
tvtvdt
tdvRC
dttdv
LC ccc =++
Taking Laplace transform assuming zero initial conditions yields
9
MEC 522: Mathematical Modelling of Dynamic Systems
( ) )()(2 sVsVsRCsLCs c =++ therefore the transfer function is:
LCs
LRs
LCsVsVc
1
1
)()(
2 ++=
Figure 4: Block diagram of series RLC electrical network
10
MEC 522: Mathematical Modelling of Dynamic Systems
Example: 1. Find the transfer function, , for the system below. )(/)( 22 sFsX
2. Find the transfer function, )(/)(2 sTsθ , for the rotational system shown in figure. The rod is supported by bearings at either end and is undergoing torsion. A torque is applied at the left and the displacement is measured at the right.
11
MEC 522: Mathematical Modelling of Dynamic Systems
12
MEC 522: Mathematical Modelling of Dynamic Systems
Example 1. Given the network shown in figure, find the transfer function, . )(/)(2 sVsI
2. Given the network shown in figure, find the transfer function, )(/)( sVsV oi
13
MEC 522: Mathematical Modelling of Dynamic Systems
Electromechanical system A motor is an example of electromechanical component that yields a displacement output for a voltage input, i.e. a mechanical output generated by an electrical input.
Figure 5 : DC motor: a. schematic; b. block diagram
a. A magnetic field is developed by permanent magnets or a electromagnet called fixed field. A rotating circuit called the armature (which current ia(t) flows), passes through this magnetic fields and feels a force, )(tBliF a= , where B is the magnetic flux, l is the length of conductor. The resulting torque turns the rotor.
b. A conductor moving at right angles to a magnetic field generates a voltage, Blve = , where e is the voltage and v is the velocity. Since the armature is rotating is a magnetic field, its voltage is proportional to speed. i.e.
dttd
Kv mbb
)(θ=
where vb(t) back emf, Kb is a constant and )(/)( tdttd mm ωθ =
14
MEC 522: Mathematical Modelling of Dynamic Systems
takingLaplace transform yields
)()( ssKsV mbb θ= a.
c. The relationship for the electrical circuit is given by:
)()()(
)( tetvdt
tdiLtiR ab
aaaa =++
and taking the Laplace transform, we get
)()()()( sEsVssILsIR abaaaa =++ b.
d. The torque developed by the motor is proportional to the armature current.
where K)()( tiKtt atm = t is motor torque constant. taking Laplace transform
or )()( sIKsT atm = )(1)( sTK
sI mt
a = c.
e. Substituting (a) and (c) into (b) yields ( )
)()()(
sEssKK
sTsLRamb
t
maa =++
θ d
f. Figure 6 shows the equivalent loading of motor. Figure 6: Typical equivalent mechanical loading on a motor.
dtdD
dtd
Jtt mm
mmθθ
+= 2
2
)(
15
MEC 522: Mathematical Modelling of Dynamic Systems
taking Laplace transform
( ) )()( 2 ssDsJsT mmmm θ+= e Substituting (e) into (d) yields ( )( )
)()()(2
sEssKK
ssDsJsLRamb
t
mmmaa =+++
θθ f
assume that La is small compared to the armature resistance Ra equation (f) becomes
( ) )()(2 sEssKsDsJKR
ambmmt
a =⎥⎦
⎤⎢⎣
⎡++ θ
After simplification, the transfer function, )(/)( sEs amθ , is found to be
⎥⎦
⎤⎢⎣
⎡⎟⎟⎠
⎞⎜⎜⎝
⎛++
=
a
btm
m
mat
a
m
RKK
DJ
ss
JRKsEs
1
)/()()(θ g
or simply
)()()(
αθ
+=
ssK
sEs
a
m h
g. Jm and Dm is evaluated base on the schematic diagram below
16
MEC 522: Mathematical Modelling of Dynamic Systems
Figure 7: Rotational mechanical load
2
2
1⎟⎟⎠
⎞⎜⎜⎝
⎛+=
NN
JJJ lam ; and 2
2
1⎟⎟⎠
⎞⎜⎜⎝
⎛+=
NN
DDD lam i
h. Dynamometer test will give us the figure shown below.
Figure 8: Torque-speed curves with an armature voltage as parameter From (d) and neglecting La,
)()()(
sEssKK
sTRamb
t
ma =+ θ
inverse Laplace transform we get
)()()( tetKtTKR
ambmt
a =+ ω
at steady state:
ambmt
a eKTKR
=+ ω or aa
tm
a
tbm e
RK
RKK
T
which is a straight line as shown in figure. At zero velocity, the torque value is called the stall torque, T
+−= ω
stall.
17
MEC 522: Mathematical Modelling of Dynamic Systems
aa
tstall e
RK
T = j
When the angular velocity is zero it is called no-load speed, loadno−ω . Thus,
b
aloadno K
e=−ω k
therefore, the electrical constants of the motor can be found from
a
stall
a
t
eT
RK
= and loadno
ab
eK
−
=ω
l
Example: 1. Given the system and torque-speed curve below, find the transfer function.
18
MEC 522: Mathematical Modelling of Dynamic Systems
2. Find the transfer function, )(/)()( sEssG alθ= , for the motor and load show. The torque-speed curve is given by 2008 +−= mmT ω when the input voltage is 100 V.
Gear system
19
MEC 522: Mathematical Modelling of Dynamic Systems
Figure 8: A gear system
Figure 9: Transfer functions for
a. angular displacement in lossless gears and b. torque in lossless gears
20
MEC 522: Mathematical Modelling of Dynamic Systems
Figure 10: Gear train
Figure : Velocity control system Block Diagrams A control system may consist of a number of components. In order to show the functions performed by each component, in control engineering, we commonly use a diagram called the “block diagram.” Block diagrams. A block diagram of a system is a pictorial representation of the functions performs by each component and of the flow of signals. Such a diagram depicts the interrelationships which exist between the various components. Different from a purely abstract, mathematical representation, a block diagram has advantage of indicating more realistically the signal flows of the actual system.
21
MEC 522: Mathematical Modelling of Dynamic Systems
In 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 which 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 arrows. Thus, a block diagram of a control system explicitly shows a unilateral property. igure 1 shows an element of the block diagram. The arrowhead pointing toward the block indicates the input and the arrowhead leading away from the block represents the output. Such arrows are referred to as signals.
X(s) TRANFERFUNCTION
G(s)
Y(s)
Figure 1: Element of a block Diagram. Note that the dimensions of the output signal from the block are the dimensions of the signal multiplied by the dimensions of the transfer function in the block. BLOCK DIAGRAMS: FUNDAMENTAL A block diagram is shorthand, pictorial representation of the cause and effect relationship between the input and output of a physical system. It provides a convenient and useful method for characterising the functional relationships among the various components of a control system. System components are alternatively called elements of the system. This simplest form of the block diagram is the single block, with one input and one output.
Block output input
22
MEC 522: Mathematical Modelling of Dynamic Systems
The interior of the rectangle representing the block usually contains a description of or the name of the element, or the symbol for the mathematical operation to be performed on the input to yield the output. The arrows represent the direction of unilateral information or signal flow. (a)
output Control element
input The operations of addition and subtraction have a special representation. The block becomes a small circle, called a summing point, with the appropriate plus or minus sign associated with the arrows entering the circle. The output is the algebraic sum of the inputs. Any number of inputs may enter a summing point.
X
Y
+ -
X-Y In order to employ the same signal or variable as an input to more than one block or summing point, a takeoff/ branch point is used. This permits the signal to proceed unaltered along several different paths to several destinations.
23
Takeoff point
MEC 522: Mathematical Modelling of Dynamic Systems
Block diagram reduction method Blocks can be connected in series if the output of one block is not affected by the next following block. It is therefore important to rearrange the block to simplify the reduction of the block to a single transfer function. In simplifying the block diagram, the following rules should be adhered.
1. The product of the transfer functions in the feedforward direction must remain the same.
2. The product of the transfer functions around the loop must remain the same.
24
MEC 522: Mathematical Modelling of Dynamic Systems
Tutorial 1. Consider the system shown in Figure below. Obtain the closed-loop transfer function )(/)( SRsC
25
MEC 522: Mathematical Modelling of Dynamic Systems
2. Consider the system shown in Figure below. Obtain the closed-loop transfer function )(/)(2 SQsQ
3. Consider the system shown in Figure below. Obtain the closed-loop
transfer function )(/)( SRsC 4. Consider the system shown in Figure below. Obtain the closed-loop transfer function )(/)( SRsC
26
MEC 522: Mathematical Modelling of Dynamic Systems
Signal Flow Graphs A signal flow graph is a diagram which represents a set of simultaneous linear algebraic equations. When applying the signal flow graph method to control systems, we must first transform linear differential equations into algebraic equations in s. A signal flow graph consists of a network in which nodes are connected by direct branches. Each node represents a system variable, and each branch connected between two nodes acts as a signal multiplier. Note that the signal flows in only one direction. The direction of signal flow is indicated by an arrow placed on the branch, and the multiplication factor is indicated along the branch. The signal flow graph depicts the flow of signals from one point of a system to another and gives the relationship among the signals. As might be expected, a signal flow graph contains essentially the same information as a block diagram. The advantage of using a signal flow graph to represent a control system is that a gain formula, called Mason’s gain formula is available which gives the relationships among system variables without requiring a reduction of the graph. definitions Node: A point representing a variable or signal Transmittance: A real gain or complex gain between two nodes. Branch: A directed line joining two nodes. Input node or source: A node that has outgoing branches. Output node or sink: A node that has incoming branches. Mixed node: A node that has both incoming and outgoing branches. Path: A traversal of connected branches in direction of the branch arrow. Loop: A close path Loop gain: The product of the branch transmittances of a loop Nontouching loops: Loops that do not possess any common nodes Forward path: A path from input node to output node that does not
cross any node more than once. Forward path gain. The product of the branch transmittances
27
MEC 522: Mathematical Modelling of Dynamic Systems
Input node (source)
output node (sink)
a b 1
c
Mixed node
d
x4
x3x3x1
Figure : Signal flow graph Properties of signal flow graphs 1. A branch indicates the functional dependence of one signal upon another.
A signal passes through only in the direction specified by the arrow of the branch.
2. A node adds the signals of all incoming branches and transmits this sum to all outgoing branches
3. A mixed node, which has both incoming and outgoing branches, may be treated as an output node (sink) by adding an outgoing branch of unity transmittance.
4. For a given system, a signal graph flow is not unique. Many different signal flow graphs can be drawn for a given system by writing the system equations differently.
Signal flow graph algebra A signal flow graph of a linear system can be drawn using the foregoing definitions. In doing so, we usually bring the input nodes (sources) to the left
28
MEC 522: Mathematical Modelling of Dynamic Systems
and the output nodes (sinks) to the right. The independent and dependent variables of the equations become the input nodes (sources) and output nodes (sinks), respectively. The branch transmittances can be obtained from the coefficients. To determine the input-output relationship, we may use Mason’s formula. 1. The value of a node with one incoming branch, as shown in figure (a) is
12 axx =2. The total transmittance of cascaded branches is equal to the product of
the branch transmittances. Cascaded branches can thus be combined into a single branch by multiplying the transmittances as shown in figure b.
3. Parallel branches may be combined by adding the transmittances, as shown in figure c
4. A mixed node may be eliminated, as shown in figure d. 5. A loop may be eliminated as shown in figure e.
23 bxx = , 312 cxaxx +=
Hence 313 bcxabxx +=
Or
13 1x
bcabx−
=
29
MEC 522: Mathematical Modelling of Dynamic Systems
30
MEC 522: Mathematical Modelling of Dynamic Systems
Mason’s Gain Formula for Signal Flow Graphs Mason’s gain formula for the overall gain is given by:
∑ ΔΔ
=k
kkPP 1
where, = path gain of kth forward path kP = determinant of graph. Δ
= 1- (sum of all individual loop gain) + (sum of gain products of all combinations of two non touching loops) – (sum of gain of all possible combinations of three non touching loops) + ……
= .......1,,,
+−+− ∑∑∑fed
fedcb
cba
a LLLLLL
= sum of all individual loop gains ∑
aaL
∑ = sum of gain products of all possible combinations of two non
touching loops cb
cb LL,
∑fed
fed LLL,,
= sum of gain products of all possible combination of three non
touching loops = cofactor of the k th forward path of the graph with the loops touching the k th forward path removed, that is, the cofactor is obtained from Δby removing the loops that touch path .
kΔ
kΔ
kP Example A signal flow graph for the system above is shown in Figure . Let us obtain the closed-loop transfer function C(s)/R(s) by use of Mason's gain formula.
31
MEC 522: Mathematical Modelling of Dynamic Systems
32