Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Mechatronics Systems Design MPE 301

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.

Simulation is the evaluation of performance of components (such as sensors,


actuators, and mechanical geometry) and their effect on system performance.

1. Operator Notation and Transfer Functions

D operator is used to write (coding) the linear differential equations to convert


it to operator form.

Dr. M. Atta 1
Mechatronics Systems Design MPE 301

The Laplace transform (S operator) is an integral transform to convert a


function of a real variable (often time) to a function of a complex variable
(complex frequency). The transform is a tool for solving differential equations.

In particular, it transforms differential equations into algebraic equations and


turn into multiplication.
S operator is identical to the D operator, except that in s-operator the equation
is no longer in the time domain but rather in the frequency (complex variable)
domain (S = a + b j where a and b are two real numbers and a is real part
while b is an imaginary part).
For example, consider a 2nd order dynamic system with one input, r(t), and
one output y(t). This system is called single input single output system (SISO)

It can be converted into operator notation;

Dr. M. Atta 2
Mechatronics Systems Design MPE 301

Single input single output


The transfer function is another way of writing a SISO system. The transfer
function is the ratio of the output variable over the input variable represented
in the D or s operator.
After getting the operator notation collect and factor the terms in the output
and input.
Numerator polynomial
Then get the transfer function
Denominator polynomial

To minimize the number of coefficients in a transfer function, highest D or S


power coefficient are usually set to 1 (monic polynomial) with any gain
factored out.

Dr. M. Atta 3
Mechatronics Systems Design MPE 301

2. Block Diagrams, Manipulations, and Simulation


Simulation is the process of solving a block diagram model (generally model)
on a computer.

Block diagrams are usually part of a larger visual programming environment.


Which may also include integration numerical algorithms, real-time interfacing,
code generation, and hardware interfacing for high-speed applications.

2.1 Block Diagrams—Introduction


Block diagram models consist of two objects: signal wires and blocks.

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.

Block is a processing element which operates on input signals and parameters


to produce output signals. Because block functions may be linear or nonlinear,
the collection of function blocks is unlimited and almost differ between different
block diagram languages.

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.

Y0 is the initial value of the integration. If it


is omitted the initial is set to be zero. It can
be represented in other form.

2.2 Block Diagrams—Manipulations


Block diagrams are rarely constructed in a standard form, and it is often
necessary to reduce them to more efficient or understandable forms.
The ability to simplify a block diagram is often a critical step in understanding
its function and behaviour.

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.

Pick-off point shifted downstream

Dr. M. Atta 6
Mechatronics Systems Design MPE 301

Ex. 2

Pick-off point shifted upstream


Moving Blocks Through Summing Junctions
Moving blocks through summing junctions based on the distributive property,

Take care to ensure the correct sign conventions.

Moving blocks downstream (for summing junction

Dr. M. Atta 7
Mechatronics Systems Design MPE 301

Moving blocks downstream (for summing junction


Basic Feedback System Form
It provides the mechanism for reducing the effect of parameter variations and
disturbances and enhancing dynamic tracking ability.

The basic feedback system (BFS) block diagram

Dr. M. Atta 8
Mechatronics Systems Design MPE 301

The closed loop transfer function (CLTF or T) can be written directly as

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

EX. 2 High-Performance Control

Dr. M. Atta 10
Mechatronics Systems Design MPE 301

EX.3 Feedback Plus Parallel Forward-Loop Diagram Reduction

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

Some of the most commonly used environments are MATRIXX/System Build


(National Instruments), MATLAB/Simulink (Mathworks), LabVIEW (National
Instruments), VisSim (Visual Solutions), and Easy5 (Boeing).
3 Block Diagram Modeling - Direct Method
It is suitable for the modelling of simple, single discipline models or of
multidiscipline models with minimal coupling between disciplines.
The starting point in these applications is either a set of linear ordinary
differential equations, a transfer function, or an illustration of the system itself.

3.1 Transfer Function (or ODE) Conversion to Block Diagram Model

Converting a transfer function or ordinary differential equation (ODE) to a block


diagram model is a six-step process.
ODE is a differential equation with all derivatives taken with respect to time.
It is assumed that the transfer function is in proper form (the order of the
numerator polynomial is less than or equal to the order of the denominator
polynomial).

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 3: constructing the block diagram with ny integrator blocks, connected


them from left to right in series.

Step 4: Solve the state equation for the highest derivative of the state variable.

Using a summing junction to represent the equality condition, to implement the


state equation onto the block diagram also add a new external signal, r(t).

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,

But, from step 4

𝑑 4 𝑥(𝑡)
Substitute for
𝑑𝑡 4

Dr. M. Atta 17
Mechatronics Systems Design MPE 301

Dr. M. Atta 18
Mechatronics Systems Design MPE 301

4 Block Diagram Modelling—Analogy Approach


All filed of engineering are based on sets of fundamental laws or relationships.
Systems may exist completely in one engineering field (such as an electric
circuit, a gear system, or a water distribution system), or they may be coupled
between several fields (such as electromechanical, electromagnetic, etc).
Although analytic solutions are appropriate for single discipline static
equations it is more often the case that computer based solution methods are
required, especially when dynamics are present in the equations.
This section presents a method based on electrical analogies for deriving the
fundamental equations of systems (single or coupled) in five disciplines of
engineering: electrical, mechanical, electromagnetic, fluid, and thermal.
Although the method was originally used for use on linear it may be applied to
some nonlinear systems as well. The analogy method becomes more powerful
when combined with block diagram modelling.

Dr. M. Atta 19
Mechatronics Systems Design MPE 301

By using the analogy method to first derive the fundamental relationships in a


system, the equations then can be represented in block diagram form,
allowing secondary and nonlinear effects to be added.
This two-step approach is especially useful when modelling large coupled
systems using block diagrams.

4.1 Potential and Flow Variables, PV and FV


Systems consist of components such as springs and dampers (mechanical
systems), tanks and limitations (fluid systems), and insulators and thermal
capacitances (thermal systems).
The energy in a system can be increased by an outside source, redistributed
between system’s components, or decreased by energy loss.
A coupled system becomes equivalent with energy transfer between systems.
This approach is described from a basic electrical viewpoint, which based on
three fundamental components (resistor, capacitor and inductor)

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)

4.2 Impedance Diagrams


In an electrical circuit the impedance of a component is defined as the ratio of
the voltage (v), over the current(i).
Since voltage and current are complex numbers (consists of a real part and an
imaginary part), the impedance is also a complex number.

A positive imaginary component indicates voltage leading current, and a


negative imaginary component indicates voltage lagging current. The capacitor
voltage lags its current by 90° while, the inductor voltage leads its current by
90°.

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

FUNDAMENTAL IMPEDANCE RELATIONSHIPS

Dr. M. Atta 24
Mechatronics Systems Design MPE 301

COMPLEX IMPEDANCE SYSTEM


1. Combine the Z5 and Z6 into (Z56).
2. Combine the Z3 and Z4 into (Z34).
3. Combine the Z2, Z34, and Z56 into (Z23456).
4. Combine the Z1 and Z23456 into (Ztotal).

Dr. M. Atta 25
Mechatronics Systems Design MPE 301

4.3 Modified Analogy Approach


The modified analogy approach is a process that allows to convert a physical
system to a block diagram model based on the electrical notion of impedance.
four-step for this conversion process will be explained.

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

Step 4. The block diagram is completed by placing each component


impedance from the impedance diagram onto the block diagram and
connecting them with signals from either summing junctions or other
impedances.
Other intermediate, input, and output signals necessary to complete the block
diagram are also added during this step.

Ex.

Step 1: Create/simplify the


impedance diagram (add
D operator)

Dr. M. Atta 28
Mechatronics Systems Design MPE 301

Step 2. Identify all independent nodes (FV and PV)

Step 3. Represent select nodes as a summing junction,


Step 4. Add the impedance blocks;

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 ‫تصميم منظومات الميكاترونيات‬

3. Construct the block diagram for the following transfer functions

𝑌(𝑡) 𝐷2 +𝐷−42
a) =
𝑅(𝑡) 𝐷3 +8𝐷2 −9𝐷−72

𝑌(𝑡) 5𝐷3 +2𝐷2 +45𝐷+18


b) =
𝑅(𝑡) 3𝐷4 +2𝐷3 +48𝐷+32

𝑌(𝑡) 6
c) =
𝑅(𝑡) 3𝐷4 +2𝐷3 +48𝐷+32

You might also like