Mechatronic Systems Design
MEC301
Asst. Prof. [Link].
Mohammed Nour A. Ahmed
mnahmed@[Link]
[Link]
Lecture 3: Modeling and Simulation
Copyright ©2016 [Link]. Mohammed Nour Abdelgwad Ahmed as part of the course
work and learning material. All Rights Reserved.
Where otherwise noted, this work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.
Zagazig University | Faculty of Engineering | Computer and Systems Engineering Department | Zagazig, Egypt
Modeling
Modeling is the process of representing the behavior of a
real system by a collection of mathematical equations
and logic.
Models are cause-and-effect structures—they accept
external information and process it with their logic and
equations to produce one or more outputs.
Parameter is a fixed-value unit of information
Signal is a changing-unit of information
Models can be text-based programming or block
diagrams
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 2 / 85
Math Modelling Categories
Static vs. dynamic
Linear vs. nonlinear
Time-invariant vs. time-variant
SISO vs. MIMO
Continuous vs. discrete
Deterministic vs. stochastic
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 3 / 85
Static vs. Dynamic
Models can be static or dynamic
Static models produce no motion, fluid flow, or any other
changes.
Example: Battery connected to resistor v = 𝒊𝑹
Dynamic models have energy transfer which results in
power flow. This causes motion, or other phenomena that
change in time.
Example: Battery connected to resistor, inductor, and
capacitor
di 1
v Ri L idt
dt C
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 4 / 85
Linear vs. Nonlinear
Linear models follow the superposition principle
The summation outputs from individual inputs will be equal to the
output of the combined inputs
Most systems are nonlinear in nature, but linear models
can be used to approximate the nonlinear models at
certain point.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 5 / 85
Linear vs. Nonlinear Models
Linear Systems Nonlinear Systems
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 6 / 85
Time-invariant vs. Time-variant
The model parameters do not change in time-invariant
models
The model parameters change in time-variant models
Example: Mass in rockets vary with time as the fuel is
consumed.
If the system parameters change with time,
the system is time varying.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 7 / 85
Time-invariant vs. variant
Time-invariant Time-variant
F(t) = ma(t) – g F = m(t) a(t) – g
Where m is the mass, a is Here, the mass varies
the acceleration, and g is with time. Therefore the
the gravity model is time-varying
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 8 / 85
Linear Time-Invariant (LTI)
LTI models are of great use in representing systems
in many engineering applications.
The appeal is its simplicity and mathematical
structure.
Although most actual systems are nonlinear and
time varying
Linear models are used to approximate around an operating
point the nonlinear behavior
Time-invariant models are used to approximate in short
segments the system’s time-varying behavior.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 9 / 85
SISO vs. MIMO
Single-Input Single-Output (SISO) models are
somewhat easy to use. Transfer functions can be
used to relate input to output.
Multiple-Input Multiple-Output (MIMO)
models involve combinations of inputs and outputs
and are difficult to represent using transfer
functions. MIMO models use State-Space
equations
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 10 / 85
System States
Transfer functions
Concentrates on the input-output relationship only.
Relates output-input to one-output only SISO
It hides the details of the inner workings.
State-Space Models
States are introduced to get better insight into the systems’
behavior. These states are a collection of variables that
summarize the present and past of a system
Models can be used for MIMO models
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 11 / 85
SISO vs. MIMO Systems
U(t) Transfer Function Y(t)
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 12 / 85
Continuous vs. discrete
Continuous models have continuous-time as the
dependent variable and therefore inputs-outputs
take all possible values in a range
Discrete models have discrete-time as the
dependent variable and therefore inputs-outputs
take on values at specified times only in a range
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 13 / 85
Continuous vs. discrete
Continuous Models Discrete Models
Differential equations Difference equations
Integration Summation
Laplace transforms Z-transforms
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 14 / 85
Deterministic vs. Stochastic
Deterministic models are uniquely described by
mathematical equations. Therefore, all past,
present, and future values of the outputs are known
precisely
Stochastic models cannot be described
mathematically with a high degree of accuracy. These
models are based on the theory of probability
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 15 / 85
Block Diagrams
Block diagram models consist of two fundamental
objects: signal blocks and wires.
A block is a processing element which operates on input
signals and parameters to produce output signals
A wire is to transmits a signal from its origination point
(usually a block) to its termination point (usually another
block).
Block diagrams are suitable to represent multi-
disciplinary models that represent a physical
phenomenon.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 16 / 85
Block Diagram Example
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 17 / 85
Block Diagrams Manipulation
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 18 / 85
Block Diagrams Manipulation
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 19 / 85
Block Diagrams: Direct Method Example
Consider the transfer function:
We can introduce s state variable, x(t), in order to separate the polynomials
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 20 / 85
State Equation
The differential equation is:
Put the needed integrator blocks:
Add the required multipliers to obtain the state equation:
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 21 / 85
Output Equation
Repeat the same procedure for the output equation:
Connect the two sub-blocks
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 22 / 85
Block Diagram Modeling: Analogy Approach
Physical laws are used to predict the behavior (both static and
dynamic) of systems.
Electrical engineering relies on Ohm’s and Kirchoff’s laws
Mechanical engineering on Newton’s law
Electromagnetics on Faradays and Lenz’s laws
Fluids on continuity and Bernoulli’s law
Based on electrical analogies, we can derive the fundamental
equations of systems in five disciplines of engineering:
Electrical, Mechanical, Electromagnetic, Fluid, and Thermal.
By using this 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 modeling large coupled
systems using block diagrams.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 23 / 85
Power and Energy Variables: Effort & Flow
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 24 / 85
Thanks for your attention.
Questions?
Asst. Prof. [Link].
Mohammed Nour A. Ahmed
mnahmed@[Link]
[Link] Robotics Research Interest Group (zuR2 IG)
Zagazig University | Faculty of Engineering | Computer
and Systems Engineering Department | Zagazig, Egypt
Copyright ©2016 [Link]. Mohammed Nour Abdelgwad Ahmed as part of the course work and learning material. All Rights Reserved.
Where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Mohammed Ahmed (Asst. Prof. [Link].) Mechatronic Systems Design 25 / 85