2. 11/21/2021
Introduction
DR. S.A.Shah
Automobiles Robots
Aircrafts
Modeling and Simulation of dynamic systems is a course about characterizing the behaviour of
real life dynamic systems. Such as:
AND
MORE
Dynamic Systems
DR. S.A.Shah
Force
Velocity ?
In order to characterize the behaviour of
these types of systems
We have to learn how to model a system
mathematically
Which basically means deriving the
differential equations that govern the
motion of these types of system
Force
Velocity ?
Math ? V(t) = ?
DR. S.A.Shah
MED, UET, Peshawar.
3. 11/21/2021
Dynamic Systems
We will also learn that for a lot of systems there is an equivalent representation of
those dynamics and is called a Transfer Function
Force
Velocity ?
Transfer
Function
What we will study:
Behaviour of those dynamic systems
Develop tools to perform analysis on those system responses
DR. S.A.Shah
Dynamic Systems
To develop tools for
analysis, means:
We will be able to analytically
compute the output of a system
subject to some known input
U(t)
V(t)
V(t)
U(t)
t
This is what we call
Simulation
DR. S.A.Shah
DR. S.A.Shah
MED, UET, Peshawar.
4. 11/21/2021
Dynamic Systems
Some time we prefer the system to
be represented in the time domain
as a differential equation
Another time it may be more
convenient to analyze the systems
as a transfer function
We express the system in the
S.domain or the Laplace domain
The figure clearly conveys the idea that we can express the dynamics of a real
life system in a number of different ways
Differential Equation
(ODE)
Transfer Function
(TF)
Real System Time Domain
S. Domain or
Laplace Domain
Different representation of the same System
Means
DR. S.A.Shah
Dynamic Systems
What we will try to learn is how to jump
between these different representation of
a particular system
For instance to get from a real life system
to a mathematical model, we use a
process called modeling
Further, to get from a differential
equation to a transfer function
representation, we have to invoke the
Laplace transform
We will try to develop these concepts: but the 1st thing we have to do is to define
exactly what a dynamic system is:
Differential Equation
(ODE)
Transfer Function
(TF)
Real System Time Domain
S. Domain or
Laplace Domain
Different representation of the same System
Modeling
Laplace
Transformation
Dynamic System
??
DR. S.A.Shah
MED, UET, Peshawar.
5. 11/21/2021
DR. S.A.Shah
Dynamic System
A DYNAMIC SYSTEM IS AN INPUT / OUTPUT
RELATIONSHIP WHEREIN THE PRESENT OUTPUT IS A
FUNCTION OF BOTH PRESENT AND PAST INPUTS
DR. S.A.Shah
Systems
System:
A collection of components which are coordinated together to perform a function
Is any set of interrelated components acting together to achieve a common objective
The definition covers systems of different types
Systems vary in size, nature, function, complexity,…
Boundaries of the system is determined by the scope of the study
Common techniques can be used to treat them
DR. S.A.Shah
MED, UET, Peshawar.
6. 11/21/2021
DR. S.A.Shah
Systems (Example)
Battery
Consists of anode, cathode, acid and other components
These components act together to achieve one objective
Car Electrical System
Consists of a battery, a generator, lamps,…
Act together to achieve a common objective
The Boundaries of the system is determined by the scope of the study
DR. S.A.Shah
Inputs (excitations) :
Signals that produce changes in the system variables
Represented by arrows entering the system
Outputs (responses) :
Measured or calculated variables
Represented as arrows leaving the system
Systems (process) :
Define the relationship between the inputs and outputs
Represented by a rectangular box
Systems
S Y S T E M
inputs outputs
DR. S.A.Shah
MED, UET, Peshawar.
7. 11/21/2021
DR. S.A.Shah
Systems
The choice of inputs/outputs/process depends on the purpose of the study
Example:
What inputs and outputs are needed when we want to model the
temperature of the water in the tank?
Some Likely Inputs
Inlet flow rate
Temperature of entering material
Concentration of entering material
Some Likely Outputs
Level in the tank
Temperature of material in tank
Outlet flow rate
Concentration of material in tank
DR. S.A.Shah
Systems
Different assumptions results in different models
Falling Ball Example:
A ball falling from a height of 100 meters
We need to determine a mathematical model that describe the
behavior of the falling ball
Objectives of the model:
1. When does the ball reach ground?
2. What is the impact speed?
Possible Assumptions?
DR. S.A.Shah
MED, UET, Peshawar.
8. 11/21/2021
DR. S.A.Shah
Systems
Assumptions for Model 1
Falling Ball Example:
A ball falling from a height of 100 meters
1. Initial position = 100 x(0) = 100
2. Initial speed = 0 v(0) = 0
3. Location: Near sea level
4. The only force acting on the ball is the gravitational
force (no air resistance)
DR. S.A.Shah
Systems
Assumptions for Model 1 (cont...)
Falling Ball Example:
Basic Concepts
Falling Ball: distance ∞ me2
=
=
= =
: =
=
Kinematic Formulae
= +
∆ = +
= + 2 ∆
∆ =
∆ = − 0
Model:
= −9.8; =
0 = 100; 0 = 0
Solution:
= 100 − 0.5 9.8
= −9.8
DR. S.A.Shah
MED, UET, Peshawar.
9. 11/21/2021
DR. S.A.Shah
Systems
Another Assumption
Falling Ball Example:
Other mathematical models are possible.
One such model includes the effect of air resistance.
Let the drag force is assumed to be proportional to the square of
the velocity i.e.
Air resistance = cv2 , where c is the drag coefficient
Model 2:
= −9.8 + ; =
0 = 100; 0 = 0
DR. S.A.Shah
Dynamical models
A dynamical system is an object (or a set of objects) that evolves
over time, possibly under external excitations.
A system with a memory, i.e., the input value at time t will
influence the output at future instants (i.e. a system that
changes over time)
Examples: a car, a robotic arm, an aircraft, an electrical circuit, a
portfolio of investments, etc.
The way the system evolves is called the dynamics of the system
System
Subsystem
Disturbance Inputs
Control Inputs
System Outputs
Engineering systems
Biological systems
Information systems
DR. S.A.Shah
MED, UET, Peshawar.
10. 11/21/2021
DR. S.A.Shah
Dynamical models
A dynamical model of a system is a set of mathematical laws explaining in a compact form
and in quantitative way how the system evolves over time, usually under the effect of
external excitations
Model: A description of the system. The model should capture the essential information
about the system. (A model provides a prediction of how the system will behave)
Modelling: Development of a mathematical representation for a physical system
Main questions about a dynamical system:
1. Understanding the system (“How X and Y influence each other ?”)
2. Simulation (“What happens if I apply action Z on the system ?”)
3. Design (“How to make the system behave the way I want ?”)
DR. S.A.Shah
Why do we need mathematical models?
Qualitative models only useful in non-technical domains
(examples: politics, advertisement, psychology,...)
Experiments provide an answer, but have limitations:
maybe too expensive (example: launch a space shuttle)
maybe too dangerous (example: a nuclear plant)
maybe impossible (the system doesn’t exist yet!)
In contrast, mathematical models allows us to:
capture the main phenomena that take place in the system
(example: Newton’s law – a force on a mass produces an acceleration)
analyze the system (relations among dynamical variables)
simulate the system (make predictions) about how the system behaves under certain
conditions and excitations (in analytical form, or on a computer)
DR. S.A.Shah
MED, UET, Peshawar.
11. 11/21/2021
DR. S.A.Shah
Why do we need mathematical models?
Working on a model has almost zero cost compared to real experiments (just mathematical
thinking, paper writing, computer coding)
However, a simulation (or any other inference obtained from the model) is as better as the
dynamical model is closer to the real system
Mathematical models allow us to capture the main phenomena that take place in the
system, in order to analyze, simulate, and control it
We focus on dynamical models of physical (mechanical, electrical, thermal, hydraulic)
systems
Remember: A physical model for control design purposes should be
Descriptive: able to capture the main features of the system
Simple: the simpler the model, the simpler will be the synthesized control algorithm
DR. S.A.Shah
Modeling and Simulation
Modeling:
To obtain a set of equations (mathematical model) that describes the
behavior of the system
A model describes the mathematical relationship between inputs and
outputs
Simulation:
To use the mathematical model to determine the response of the system in
different situations
DR. S.A.Shah
MED, UET, Peshawar.
12. 11/21/2021
DR. S.A.Shah
A real life example ...
Water inflow u(t) must be controlled to reach and maintain the
desired temperature r(t)
Sensors on skin measure water temperature y(t)
Water inflow u(t) manipulated so that y(t)≈r(t) …
… in spite of flow and temperature fluctuations d(t)
Some one else may drain
hot water
(=disturbance entering the
process)
DR. S.A.Shah
A real life example ...
Steering wheel must be controlled to reach and maintain the desired
lateral displacement r(t) within the lane
(e.g.: staying in the middle of the lane)
Eyes measure current lateral displacement y(t)
Steering wheel u(t) manipulated so that y(t)≈r(t) …
… in spite of changes of road curvature and of r(t)
DR. S.A.Shah
MED, UET, Peshawar.
13. 11/21/2021
DR. S.A.Shah
A real life example ...
Lane Assist
Adaptive Cruise Control (ACC)
Same Model may represent different Systems.
Same system may be represent by different models (assumptions)
DR. S.A.Shah
MED, UET, Peshawar.