You are on page 1of 31

MCT 456 Dynamic Modeling and Simulation

Introduction to Modeling and


Simulation
Dr. Ahmed Asker
Production and Mechanical Design Engineering
Department
Mansoura University
2019/2020
Course Outlines

 Introduction to modeling and simulation,


 Modeling of mechanical systems,
 Response of dynamic systems,
 Modeling of electrical systems,
 Modeling of fluidic and thermal systems,
 Modeling of mechatronic systems,
 Modeling using block diagrams and state spaces.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 2


Assessment Scheme

Attendance = 5
Lab Exam = 10
Assignments (Lab and tutorials) = 10
Mid-term Exam = 25
Quizzes = 10
Final Exam = 40
Total 100
Textbook
 Singiresu S. Rao, “Mechanical Vibrations”, Prentice Hall.
 William J. Palm III, “System Dynamics”, McGraw-Hill
 K. Ogata, “System Dynamics”, Prentice Hall.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 3


Objectives

 Introduce students to the mathematical modeling of physical


systems
 Introduce students to analytical and numerical methods for
obtaining a system’s dynamic response to various initial
conditions and input functions
◦ Analytical: solving ODEs “by hand”
◦ Numerical: MATLAB and Simulink.
◦ Tools for physical component models “Simscape”
 Analyze and design feedback control systems in order to achieve
a desirable system response

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 4


Modeling and Simulation

Why this topic is important?


Why simulation attract more attention recently?
 Development of high performance product
 Complexity of the modern products
 Availability of high performance computational devices

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 5


High-Fidelity Modeling Examples

 Shuttle Vehicle Dynamics (SVD) was a computer simulation for


analyzing the separation dynamics between the Space Shuttle and
its solid rocket boosters
◦ SVD uses mathematical models for aerodynamic forces,
propulsion forces, spring and damper forces at interconnection
points, etc

 Shuttle Avionics Integration Lab (SAIL) at NASA Johnson Space


Center was used to simulate the dynamics of the entire Space
Shuttle mission profile
◦ SAIL was composed of “hardware in the loop” (such as sensors
and cockpit displays) mixed with mathematical models (such as
aerodynamic force models, gravity force models) and flight
software (such as guidance, navigation, and control functions)
◦ SAIL results compared very well with actual measured flight
MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 6
Balance: The Key to Success

Experimental
Modeling and Validation and
Simulation Hardware
implementation

Mechatronic System Design Process

System modelling and Computer Simulation Without Experimental


Verification Is At Best Questionable, And At Worst Useless!

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 7


“Traditional” Product Development approach

HARD BOUNDARIES

MANUFACTURING

COMPUTING

PRODUCT BOUNDARY

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 8


“Mechatronic” Product Design Approach

FUZZY INTERFACES

MANUFACTURING

COMPUTING

PRODUCT
BOUNDARY

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 9


Design Flow Diagram

RECOGNITION OF A NEED

MARKETING

SPECIFICATION

MARKETING FEED BACK


CREATIVE DESIGN SYNTHESIS
SPECIFICATION FEED BACK

ENGINEERING FEED BACK


PRELIMINARY DESIGN AND DEVELOPMENT

DETAIL DESIGN

PROTOTYPE BUILDING AND TESTING

DESIGN FOR PRODUCTION

PRODUCT RELEASE

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 10


Mechatronic Design Process

Modeling/Simulation Prototyping Deployment/Life cycle

Recognition of the need


Software in the loop Deployment of
Conceptual Design and
simulation Embedded systems
Functional Specification

First principle modular Design Optimization Life cycle optimization

Mathematical Modeling

Sensor and Actuator


selection

Detailed modular
Mathematical Modeling

Control system Design

Design optimization

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 11


Ways to Study a System

System

Experiment with actual Experiment with a


System model of the System

Physical Model Mathematical Model

Analytical Solution

Simulation

Frequency Domain Time Domain Hybrid Domain

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 12


Concepts in Modelling and Simulation

From Physical System to Physical Model


 A physical system is a portion of the physical universe
chosen for analysis
 A physical model is an imaginary physical system which
resembles an actual system in its salient features, but which
is simpler, more ideal, and is thereby more amenable to
analytical studies. It is not oversimplified, not overly
complicated – a slice of reality.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 13


Concepts in Modelling and Simulation

 Mathematical model of a real world system is derived using a


combination of physical laws and/or experimental means
◦ Physical laws are used to determine the model structure (linear
or nonlinear) and order.
◦ The parameters of the model are often estimated and/or
validated experimentally.
◦ Mathematical model of a dynamic system can often be
expressed as a system of differential (difference in the case of
discrete-time systems) equations

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 14


Concepts in Modelling and Simulation

 What is the difference between modeling and simulation?


◦ The term modeling refers to the development of a
mathematical representation of a physical situation.
◦ Simulation refers to the procedure of solving the equations that
resulted from model development.
◦ Simulation embodies the principle of “learning by doing'' to
learn about the system we must first build a model of some sort
and then operate the model.
 What is a model?
◦ A model is a systematic description of a real system, object or
phenomenon using the physical laws and it predicts the
behavior under conditions which need to be studied.
◦ A model is a simplified representation or abstraction of reality.
◦ Reality is generally too complex to model exactly.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 15


Distributed vs. Lumped Parameter models

 Distributed parameter systems (A distributed system is one in which


all dependent variables are functions of time and one or more spatial
variables. In this case, we will be solving partial differential
equations (PDEs))
◦ physically better descriptions
◦ more accurate results when done correctly
 Lumped parameter systems (A lumped system is one in which the
dependent variables of interest are a function of time alone. In general,
this will mean solving a set of ordinary differential equations
(ODEs))
◦ simpler
◦ quicker results
 Both can be used in building controls
 Lumped parameter descriptions are appropriate when the property
being examined is of much greater magnitude than the added accuracy
that would be gained using a distributed parameter model
MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 16
Distributed vs. Lumped Parameters

 Distributed parameter
◦ Analysis is at the material element level
◦ Partial differential equations describe the transfer of force from
the constitutive equations
◦ FEM (Finite Element Method)/BEM (Boundary Element
Method) often used
 Lumped parameter
◦ Analysis is at the component level
◦ Component properties are self contained and complete
◦ ODE/Diff E based on linking
◦ component parameters
◦ Equations solved analytically or numerically

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 17


Major System Classifications

Systems

Static Dynamic

stationary
Time-varying Time-invariant

Linear Nonlinear

Continuous-State Discrete-State

sampled Time-Driven Event-Driven DES

Deterministic Stochastic

Discrete-Time Continuous
-Time

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 18


Static Systems

 Static System: If a system does not change with time, it is called


a static system.
 A system is said to be static if its output 𝑦(𝑡) depends only on the
input 𝑢(𝑡) at the present time 𝑡, mathematically described as

𝒖 𝑡 𝒚 𝑡
System
𝒚 𝑡 =𝒉 𝒖 𝑡
𝒚 𝑡 = 𝒉 𝒖1 𝑡 , 𝒖2 𝑡 , … , 𝒖𝑚 𝑡
 A resistive circuit excited by an input voltage 𝑢(𝑡).
 non-electrical static system examples are systems with no
acceleration; E.g. Furniture, Bridges, Buildings, etc. (ignoring
vibration)
MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 19
Dynamic Systems

 A system is said to be dynamic if its current output may depend


on the past history as well as the present values of the input
variables.
 Mathematically,
𝑦 𝑡 = 𝜙 𝑢 𝜏 ,0 ≤ 𝜏 ≤ 𝑡
𝑢: 𝐼𝑛𝑝𝑢𝑡, 𝑡: 𝑇𝑖𝑚𝑒
 Example: A moving mass
 Model: Force=Mass x Acceleration

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 20


Dynamic Systems

 Examples: RC circuit, Bicycle, Car, Pendulum (in motion)

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 21


Superposition (Linear vs. Nonlinear)

 Linear systems obey the superposition property :

1. If u1 is an input, and y1 = f(u1) is the corresponding output, then


ay1 = f(au1) , where a = any constant
2. If y1 = f(u1) and y2 = f(u2) , then y1 + y2 = f(u1+u2)

◦ Nonlinear systems do not obey these properties


◦ All physical systems are nonlinear. However, if we confine
the input/output variables to a restricted (nominal) range,
then we can replace a nonlinear system with a linear model.
◦ Linear dynamic systems are governed by linear differential
equations

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 22


Linear and Nonlinear ODEs

 Examples of linear ODEs:

x  4 x  9 x  2u Linear time-invariant (LTI) ODE

x  4 x  (9  cos 3t ) x  2u Linear time varying ODE

 Examples of nonlinear ODEs:


x  4 xx  9 x  2u

x  6 x  3x 2  2u

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 23


Common Nonlinearities

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 24


Advantages to Simulation

 Can be used to study existing systems without disrupting the


ongoing operations.
 Proposed systems can be “tested” before committing resources.
 Allows us to control time.
 Allows us to gain insight into which variables are most
important to system performance.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 25


Disadvantages to Simulation

 Model building is an art as well as a science. The quality of the


analysis depends on the quality of the model and the skill of the
modeler.
 Simulation results are sometimes hard to interpret.
 Simulation analysis can be time consuming and expensive.
 Should not be used when an analytical method would provide for
quicker results.

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 26


Engineering Modeling Procedure

Six Step Approach to Dynamic System Problems


1. Define the system and its components
2. Formulate the mathematical model and list the necessary
assumptions
3. Write the differential equations describing the model
4. Solve the equations for the desired output variables
5. Examine the solutions and the assumptions
6. If necessary, reanalyze or redesign the system

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 27


Engineering Modeling Procedure

 Understand the problem


◦ What are the factors and relevant relationships?
◦ What assumptions can be made?
◦ What equilibrium conditions exist?
◦ What should the result look like?
 Draw and label an engineering sketch
◦ Free body diagram
◦ Hydraulic schematic
◦ Electrical schematic
 Write the equilibrium equations (usually differential or difference)
◦ Newton 2nd Law
◦ Kirchoff Laws for current and voltages
◦ Flow continuity laws
 Solve the equations for the desired result
 Check the validity of the results

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 28


Modeling Dynamic Systems

 Mathematical models are obtained by applying the appropriate


laws of physics to each element of a system
◦ Some system parameters (such as damping) may be unknown,
or these parameters are often determined through experiments
which lead to empirical relations
 Engineering judgment must be used to trade model complexity
with accuracy of the analysis
◦ Nonlinearities (such as gear backlash) are often ignored in
preliminary design studies in order to derive linear models
◦ Sometimes, low-order linear models can be solved analytically
◦ Furthermore, simulations (e.g., MATLAB/Simulink) are easier
to construct with low-order linear models and therefore system-
analysis time is reduced

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 29


Modeling Dynamic Systems

 Engineers must remember that the results from a model and/or


simulation are only approximate and are valid only to the extent
of the assumptions used to derive the model
 The model must be sufficiently sophisticated to demonstrate the
significant features of the dynamic response without becoming
too cumbersome for available analysis tools
◦ Higher-order, complex nonlinear models typically require
smaller integration time steps to accurately solve the governing
differential equations, which increases computer run time
◦ Consequently, there is usually a trade-off between model
complexity and analysis time
◦ The validity of a mathematical model can often be verified by
comparing the model solution (i.e., simulation results) with
experimental results

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 30


Questions

MCT 456 Dynamic Modeling and Simulation Dr. Ahmed Asker 31

You might also like