You are on page 1of 39

Lecture Slides

on
Modeling and Simulation

Lecture One: Introduction to Modeling

Dr. Nasir M. Mirza


Email: nmm@pieas.edu.pk
Recommended Text:
1. B. S. Bennett, Simulation Fundamentals, Prentice Hall.
2. Notes by Dr. Nasir M Mirza.
3. User Guide for MATLAB-SIMULINK.

The Marks distribution:


1. Quizzes 5%
2. Tests 40%
3. Home works 15%
4. Final Exam. 40%
What is a Model?

It is a simplified, abstracted constructs of a system used to predict the


behavior of the system.
It can be a small (finite) description of a very complex reality
It is typically constructed to answer particular questions.
If question changes, does the model change?
Typically modeling involves two tasks:
model building,
model analysis
What is Model-based Reasoning?
It is Methodology for analyzing, understanding, and predicting
behavior of a system, process, or phenomena using a model.

For what kind of Systems:

engineering process (continuous) chemical plants, aircraft,


traffic system,

information process (computer-based or digital) computer


network, telephone system,

economic process countrys economy, world economy,


software industry etc.

Social systems suburban culture, welfare system

Sometimes hard to categorize systems notion of hybrid systems.


Mathematical Modeling
We Create a mathematical representation of some
phenomenon to better understand it.
We use it to matches observation with symbolic
representation.
It informs theory and explanation.
The success of a mathematical model depends on
how easily it can be used, and how accurately it
predicts and how well it explains the phenomenon
being studied.

5
Modeling Paradigms
Use of computer science helps us to understand the science through
the use/analysis of models on high performance computers.
It further complements the process of theory formation and
experimentation in scientific investigation, without replacing them.
Modeling of systems there are three different modeling paradigms:
Discrete-event modeling
Continuous system modeling quantitative and qualitative
Hybrid Modeling multiple paradigms in an integrated fashion
(continuous + discrete)
Mathematical Models
Mathematical models have been successful in various application
areas, including

Seismology Economics
Physics & Chemistry Materials & Chemical
Global ocean/ climate research
modeling Medical imaging
Environmental studies Biology & Bio-sciences
Ecology Manufacturing
Space Sciences Engineering Disciplines
Mathematical Modeling

In general a mathematical model has a central role in


most of the computational scientific research.
Other terms often used in connection with
mathematical modeling are
Computer modeling
Computer simulation
Computational mathematics
Review of Scientific Methods

Before we start actual modeling, let us first review the


scientific method. It provides individuals and teams a
way to solve problems and improve processes.

Observation -- Notice what's going on in the world


and raise questions about it.
Hypothesis -- Pose a tentative answer to the
question raised in observation.
Prediction -- Use deductive reasoning to formulate a
test of the hypothesis.
Experiment -- Perform experiment to see if predicted
results are obtained.
Mathematical Modeling & Scientific Method

How do we incorporate mathematical


modeling/computational science in the scientific
method as applied to various disciplines?

We do this by Computational Methods.


Then what are computational methods??
Computational Methods

These methods cut across the disciplines of


mathematics, sciences/technology, and computer
science.
It is now accepted as a third methodology in
scientific research, complementing, not replacing,
the traditional loop of observation, theory, and
experiment
It provides insights into phenomena that are too
complex to be dealt with by analytical methods or too
expensive or dangerous to study by experiments.
Steps for Developing a Model

Identify problem area


Conduct background research
State project goal
Define relationships
Develop a model
Steps after developing a Model

Then develop a computational algorithm


Perform tests
Visualize results
Interpret results and compare with experiments
Communicate results and associated issues.
Modeling of Systems

System
In general, all system models
will be mathematical functions
At times, we will introduce
topological information (e.g., for
Subsystems
diagnosis)

Components --- primitives

Interface with other Mathematical or


components Logical function
Modeling Project Flowchart

Define System Background Math Model


Research
Goals
Visualization Computer Model
Algorithm

Analyze and Interpret Results Test

Communicate Results

Paper Presentation Display


What is a System !
What exactly is a system? ??
Ambiguous word, but it has Entities that are separable from
the rest of the universe (we call this the environment) by
a physical or conceptual boundaries, for example:
a human body is a system; a coffee maker is a system; an air
traffic control is a system, a university is a system.
It satisfies the concept of reticulation, i.e., a system can be looked
upon as being made up of interacting parts. For example,
a human body made up of various organs and the nervous
system;
a coffee maker has container for water, a boiler (evaporator), a
passages, a filter among other parts.
The air traffic control system has people, machines, schedules,
etc.
Identification of a System
A system is a set of elements that are united by some interactions or
inter-dependences to perform at least one specified function. A
system is generally described in two types:

Static representation
dynamic representation

In first type, we identify all possible sub-systems to be included in the


model without bringing about any change to the system. Here we
eliminate the effect of time.
Then, in second type changes in the state of the system are allowed.
Identification of a System

These changes are possible through system elements and


their environment as the time progresses.

A system element is a component, a part and/or a sub-


system that performs one particular function or a process. All
elements are linked through relationship.

You can obtain the overall behavior of the system by


studying the manner in which they interact with each other.
Therefore, the first conceptual step in the creation of a model
of a system is to identify its purpose.
Identification of a System

If we look at the system from viewpoints of its purpose, then it can


be classified it in the following four main types:

State Maintaining Systems,


Goal Seeking Systems,
Purposeful Systems,
Reactive Systems.
State Maintaining Systems
The state maintaining systems try to react to
changing conditions in such a manner that they
maintain some predetermined state.
For instance, heating and cooling systems of a house
are made to maintain room temperatures within a given
range.
Therefore, pre-determined states for such systems are
room temperatures.
The Goal Seeking Systems
The goal seeking systems are devised to find possible
new states or goals.
For example, an antiaircraft missile with automatic pilot
is a goal seeking system.
As the goals position coordinates keep on changing with
time, the system keeps on updating its goal states.
The Purposeful Systems
The purposeful systems have their pre-defined goals
and they can device methods to seek their goals under
changing conditions.

Here it is important to note that conditions are the


changing part of the system.
Human beings are most familiar example of such
systems.
The Reactive Systems
The reactive systems are those in which reaction of
an event or events in terms of a response are set.
For instance, a system of automatic door opening at a
departmental store. It is a reactive system.
Similarly a coin operated soft drink machine switches
on its advertising lights when someone approaches it
within two meters distance. Such machines are reactive
systems.
Model of a System
A model is a representation of the system or a process in a
manner other than the entity itself. It is used to explain,
understand, improve and predict the behavior of the
system. Models are also considered for simulation of a real
process or a system and are used to predict system
behavior in a given situation. Parts of Model are :
Elements of a System,
Variables,
Parameters,
Functional Relationships,
Constraints,
Criterion Functions.
Elements of a System
The elements of a system are components that taken
together with interactions will produce a basic structure of
the system.
Elements can be very simple units or complex sub-
systems. Some systems may have small sub-systems as
elements in them.
For example, a model of a missile may have a propulsion
sub-system, a guidance sub-system, a control sub-
system and a structural sub-system and these sub-
systems can be termed as main elements of the total
system.
Parameters of a System
Similarly, parameters of a system are quantities that are
assigned by the properties of system components or
elements. For instance, in a system based on a
mathematical equation

F(x, y) a x y b xy c,
2 2

the a, b, and c are the parameters and x & y are


variables.
For fixed parameter values the model of the system will
produce one type of a response.
Constraints/System Limits
The constraints can be termed as the system limits, on
the variable values or on source and sink of the system
or on physical laws related to the variables.
These help us in defining the boundaries of the system
and initial conditions under which a system is given to us
for the analysis.
In creating a model, its purpose is generally reflected by
functional relationships among elements. These relations
can be algebraic functions, differential operators or
differ-integral operators in an abstract model.
Once these relationship have been figured out, the
model of system is more or less fixed.
Purpose of a Model
A good model is simple, goal oriented, robust, easy to
communicate with, comprehensive, adaptive and
evolutionary. One may ask then where the model will be
used? Although it is very difficult to sum up all the possible
uses of a model, at least five common applications have been
identified by system analysts as following:
Aid to thought process.
Support in communication.
Aid in train and educate people.
Tool to predict behavior of the system.
Support to experimentation.
Hierarchy of the model structure
Models are classified in number of ways and none of the way is
completely satisfactory.
Mostly in engineering and sciences models are Mathematical
Models. However, a typical hierarchy of the model structure and
above classes of models has been developed in detail. In the
broadest sense, models can take any of the following two forms:

physical (iconic or replica) models,


or abstract (notional or mathematical) models.

It is the abstract model that is more relevant to the idea of general-


purpose simulation (that is, simulation from which it is expected to
obtain much more than a narrow range of information about the
system).
However, it is useful in the wider context for us to consider and
contrast both basic forms to see why this should be so.
Hierarchy of the model structure
Figure shows a simple tree structure displaying a hierarchy of model
structure. The heavier branch lines connecting model attributes
indicate the degree of importance attached to them.
Physical or Replica Models
In the course of development work, many industries require the
construction & testing of replica models for specific purposes.
For many years, engineers have been making full-scale mockups and
scaled models to test the actual system.
The chemical, mechanical, civil, environmental, space, and airline
engineers have been employing full-scale mockups for training and
research purposes.
It used to be the case that aircraft were subjected to wind tunnel
testing during the course of design. This was to try to achieve an
aerodynamic optimum in terms of low drag coefficients. Reducing drag
reduced fuel consumption, which gave a better payload, and also
reduced the required engine thrust needed to achieve a given
airspeed.
In other words, the economics of flight necessitated wind tunnel
testing of replica models as part of the airframe design process.
Physical or Replica Models
In recent years, with motoring costs rising (fuel prices is a major
contributor), the motor manufacturing industries have found it
economical to use replicas of their car body frame designs to wind
tunnel testing, again to try to minimize drag factors. That this has been
reported in the trade literature. The negative side is the tendency for
car shapes to become very similar!
Chemical process industries may need to construct so-called pilot
plant in order to carry out design testing for a new process. The data
obtained from the small-scale version is then be scaled up to use in
the design as required.
In our world of simulation, physical modeling plays no part at all. One
good reason is the narrow range of interest served by physical
modeling. Even in the pilot plant testing, the aims of the exercise will
seldom extend over the whole process.
Replica model studies carried out would give information designed to
provide a quite limited range of answers. General-purpose simulation
should be able to do more than that, and that is where the abstract
model comes in.
Static and Dynamic Physical Models
Static physical models such as plant layout model is being used to
visualize space relationship.
For example, Many such studies are being done to find out the real
state value of an electronic device on micro-chips of a computer
where space optimization is of very high value. Static physical
scaled up models of microchips are there to study the electronic
component population structures.

However, in a dynamic physical models, time behavior of the


scale model is studied for given inputs to the system.
It provides time dependent pictures before going to a full-scale
system.
Abstract or Mathematical Models
A mathematical model of a system is an abstraction of the
reality it is meant to portray.
Or we can say when system variables, parameters,
constraints and functional relations are described by
symbols rather that physical devices, a mathematical
model evolves.
In a mathematical model, we use symbols such as x and
y to represent variables instead of measured scale or
some physical entities.
If the systems behavior could be studied continuously
with the help of a model, then it is a Continuous
Mathematical Model. If the changes in states are
observed at regular intervals of time, then it is called a
Discrete Mathematical Model.
Model Characteristics: Analog Models
During early of development of simulation models, people used
analog computers to solve engineering system design equations.
The analogue computers required models in the block-oriented forms;
so analog modeling was developed.
When a property of the real system is represented by a substituted
property that often behaves in a similar manner, the process is called
Analog Modeling. The state of the problem is converted into a new
substituted state and the answers are eventually translated back to
the original state.
When you use an analog computer to solve the equations, the model
is in a Block-Oriented Form. Such models use functional blocks with
inter-connections to represent a typical mathematical relation.
Such an Analog Model has disadvantage of having very large
number of blocks for repeated calculations even for a single line
equation.
Model Characteristics: Deterministic Models
Generally, there are uncertainties in various aspects of the model of
the system. When these uncertainties in the data and model are
ignorable than it is treated as a Deterministic Model.
If the uncertainties of the model do not effect results of simulation
and remain than such a decision is valid.
However, if they are going to large enough to distort the model
outputs, than they can not be ignored and we will need some other
approach to model the system.
Model Characteristics: Deterministic Mathematical Models

Deterministic Model can have mathematical form of


following types:
Ordinary Differential equations + Algebraic
relations (Quantitative models)
Partial Differential equations + Algebraic relations
(Quantitative models)
These models can also give Qualitative Descriptions,
especially if our knowledge of domain and situation is
incomplete.
Other issues starting point for model building, causal
versus acausal models, and static versus dynamic.
Model Characteristics: Deterministic Mathematical Models

Dynamic Systems:
State of Systems -- For dynamic systems, our goal is to start with
physical component of systems. Then using understanding of
component behavior we create deterministic mathematical models
of the system.

Mathematical model of system are defined by set of ordinary


differential equations on the so-called state variables. Algebraic
relations also define values of other system variables to state
variables.

Dynamic behavior of the system is given by


(i) values of state variables at some initial time, and

(ii) future time history of input quantities to system.


Model Characteristics: Stochastic Models

For a system having inherent randomness in it, or where random


processes are important and uncertainties can not be ignored;
we have to apply Stochastic or Probabilistic Mathematical
Modeling.
In such cases, random variables and random probability density
functions are used to model the system.
The outputs are the average values over many times repeated runs
with known statistical errors.
Monte Carlo methods and Genetic Algorithms are based on
probabilistic or stochastic models.

You might also like