Professional Documents
Culture Documents
Chapter 2
Chapter 2
CHPTER 2
MODELING AND SIMULATION OF PHYSICAL SYSTEMS
Modelling is the obtaining of mathematical equations suitable for computer
simulation. It plays a great role in the design of a mechatronic system.
Dr. M. Atta 1
Mechatronics Systems Design MPE 301
Dr. M. Atta 2
Mechatronics Systems Design MPE 301
Dr. M. Atta 3
Mechatronics Systems Design MPE 301
Signal wire transmit signal or value between its starting and termination points.
The flow direction of the signal is defined by an arrowhead on the signal wire.
Dr. M. Atta 4
Mechatronics Systems Design MPE 301
There are three basic blocks (all block diagram languages possess); which are
the summing junction, the gain, and the integrator.
Dr. M. Atta 5
Mechatronics Systems Design MPE 301
Series manipulation
(series blocks multiply) Parallel manipulation
(parallel blocks add)
Moving Pick-Off Points
Pick-off points can be defined as feed back conjunction. Both the signals and
the picked-off signal are identical.
Pick off points are moved either downstream or upstream in order to create a
parallel block configuration, which can be reduced by using the parallel block
reduction rule.
Dr. M. Atta 6
Mechatronics Systems Design MPE 301
Ex. 2
Dr. M. Atta 7
Mechatronics Systems Design MPE 301
Dr. M. Atta 8
Mechatronics Systems Design MPE 301
For example, the mass (M) spring (K) damper (B) system model
Notes; x is displacement, v (𝑥ሶ ) is speed and a (𝑥ሷ ) is the acceleration
𝐹 =𝑀∗𝑎
Dr. M. Atta 9
Mechatronics Systems Design MPE 301
Dr. M. Atta 10
Mechatronics Systems Design MPE 301
Dr. M. Atta 11
Mechatronics Systems Design MPE 301
2.3 Simulation
Most visual simulation environments perform three basic functions.
• Graphical Editing: creation, editing, storage, and retrieval of models. Create
model inputs, organize the simulation, and present the model results.
• Analysis: obtain transfer functions, compute frequency response, and
evaluate sensitivity to disturbances.
• Simulation: Numerical solution of the block diagram model. It consists of
three steps
1. Initialization; sort the equations for each block in the system model
according to the pattern in which the blocks are connected.
2. Iteration; solve differential equations present in the model using numerical
integration and/or differentiation, with the simulation time is advanced.
3. Termination; present results along with any other processed calculations.
Output may be saved to a file, displayed as a digital reading, or graphically
displayed as a chart, strip chart, meter readout, or even as an animation.
Dr. M. Atta 12
Mechatronics Systems Design MPE 301
Dr. M. Atta 13
Mechatronics Systems Design MPE 301
Example
Step 1: Sliding the numerator part of the transfer function into a new block
located to the right of the denominator part of the transfer function.
State variable
Compute the order of the transfer function as the order of its denominator, ny.
In this case, ny = 4.
Step 2: write the state equation (SE) to relate the input, r(t), to the state, x(t).
Dr. M. Atta 14
Mechatronics Systems Design MPE 301
Step 4: Solve the state equation for the highest derivative of the state variable.
Dr. M. Atta 15
Mechatronics Systems Design MPE 301
Step 5: write the output equation (OE) as the differential equation relating the
output, y(t), to the state, x(t), and its derivatives.
Implement the output equation on the block diagram by combining the existing
state variable and its derivatives through the appropriate gains and a summing
junction to create the output signal, y(t).
Dr. M. Atta 16
Mechatronics Systems Design MPE 301
Step 6: Add the initial conditions to the block diagram by translate the initial
conditions of the output variable, y(t), to the state variable, x(t).
Boundary conditions OE: Y(t) with respect to x(t)
So,
𝑑 4 𝑥(𝑡)
Substitute for
𝑑𝑡 4
Dr. M. Atta 17
Mechatronics Systems Design MPE 301
Dr. M. Atta 18
Mechatronics Systems Design MPE 301
Dr. M. Atta 19
Mechatronics Systems Design MPE 301
Dr. M. Atta 20
Mechatronics Systems Design MPE 301
Resistors transform electrical energy into heat, while capacitor store energy
( ) and indictor restore energy ( )
Potential variable = PV (Potential energy)
Flow variable = FV (kinetic energy)
Dr. M. Atta 21
Mechatronics Systems Design MPE 301
= =
This means that differentiation of a sinusoid of frequency ω is the same as
multiplication of the sinusoid by jω.
Dr. M. Atta 22
Mechatronics Systems Design MPE 301
Exam.
SIMPLIFICATION
Dr. M. Atta 23
Mechatronics Systems Design MPE 301
Dr. M. Atta 24
Mechatronics Systems Design MPE 301
Dr. M. Atta 25
Mechatronics Systems Design MPE 301
The difference between the modified analogy approach and the basic one is
the manner in which nonlinearities are handled.
The basic analogy approach is restricted to linear applications. the nonlinear
system must be linearized prior to incorporating it into the model.
Linearization provides an approximation to the behaviour of the system; the
difference between the linearized and actual behaviour becomes modelling
error.
The modified approach removes this limitation which results in a more
accurate model with better predictive capability with less modelling error.
Dr. M. Atta 26
Mechatronics Systems Design MPE 301
Once the analogies have been established, the following four-step are applied
to obtain the block diagram model.
Step 1. Create and simplify the impedance diagram. This includes parallel and
series branches can be reduced to single equivalent branches.
Step 2. Circle all nodes (FV and PV) in the impedance diagram and label all
signals entering and leaving these nodes.
A FV node is a point where three or more branches intersect.
A PV node occurs when two or more impedance elements exist in series. It
relates the individual PV drops of the elements to a single overall PV drop.
Step 3. Construction of the block diagram is initiated by representing select
nodes (PV and FV) as summing junctions with inputs and outputs labelled
according to signals from the impedance diagram.
In general, it usually is not necessary to implement all PV and FV nodes,
because often they are dependent upon one another.
Dr. M. Atta 27
Mechatronics Systems Design MPE 301
Ex.
Dr. M. Atta 28
Mechatronics Systems Design MPE 301
Dr. M. Atta 29
Arabic Republic of Egypt جمهورية مصر العربية
Zagazig University جامــــعة الزقازيق
Faculty of Engineering كلية الهندســـــــة
Mechatronics Engineering Program برنامج هندسة الميكاترونيات
Mechatronics System Design تصميم منظومات الميكاترونيات
Sheet 2
MODELING AND SIMULATION OF PHYSICAL SYSTEMS
1. Transform the following ODE into D operator notation and construct the
transfer function of the system
𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦 𝑑2 𝑟 𝑑𝑟
a) +8 −9 − 72 𝑦(𝑡) = 2 + − 42 𝑟(𝑡)
𝑑𝑡 3 𝑑𝑡 2 𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑4 𝑦 𝑑3 𝑦 𝑑2 𝑦 𝑑3 𝑟 𝑑2 𝑟
b) 3 +2 + 48 + 32 𝑦(𝑡) = 5 +2 +
𝑑𝑡 4 𝑑𝑡 3 𝑑𝑡 𝑑𝑡 3 𝑑𝑡 2
𝑑𝑟
45 + 18 𝑟(𝑡)
𝑑𝑡
2. Manipulate the following block diagram;
c
Arabic Republic of Egypt جمهورية مصر العربية
Zagazig University جامــــعة الزقازيق
Faculty of Engineering كلية الهندســـــــة
Mechatronics Engineering Program برنامج هندسة الميكاترونيات
Mechatronics System Design تصميم منظومات الميكاترونيات
𝑌(𝑡) 𝐷2 +𝐷−42
a) =
𝑅(𝑡) 𝐷3 +8𝐷2 −9𝐷−72
𝑌(𝑡) 6
c) =
𝑅(𝑡) 3𝐷4 +2𝐷3 +48𝐷+32