Professional Documents
Culture Documents
Modeling and Simulation (OEC-II)
Modeling and Simulation (OEC-II)
(OEC-II)
UNIT 1: Introduction
• Programming environment,
• input and output variables,
• State variables, basic syntax;
• Deterministic linear model,
• Array mathematics in Matlab, Plotting
• Static and Dynamic systems;
• Hierarchy of knowledge about a system and Modeling Strategy
WHAT IS MODELING?
• Modeling is the process of producing a model
• a model is a representation of the construction and working of some system of interest.
• A model is similar to but simpler than the system it represents.
• purpose of a model -is to enable the analyst to predict the effect of changes to the
system.
• On the one hand, a model should be a close approximation to the real system and
incorporate most of its salient features. On the other hand, it should not be so complex
that it is impossible to understand and experiment with it.
• A good model is a judicious tradeoff between realism and simplicity.
What is the best design for a new telecommunications network? What are
the associated resource requirements?
How will a telecommunication network perform when the traffic load
increases by 50%?
How will a new routing algorithm affect its performance?
Which network protocol optimizes network performance?
What will be the impact of a link failure?
SCHEMATIC OF SIMULATION STUDY
STEPS
• steps involved in developing a simulation model, designing a
simulation experiment, and performing simulation analysis are:
• Step 2 − Choose input variables and create entities for the simulation process. There are two types of
variables - decision variables and uncontrollable variables. Decision variables are controlled by the
• Step 3 − Create constraints on the decision variables by assigning it to the simulation process.
• Step 5 − Collect data from the real-life system to input into the simulation.
• Step 6 − Develop a flowchart showing the progress of the simulation process.
• Step 8 − Verify the simulation model by comparing its result with the real-time system.
• Step 9 − Perform an experiment on the model by changing the variable values to find the best solution.
• Step 10 − Finally, apply these results into the real-time system.
Modelling & Simulation ─ Advantages
• Easy to understand − Allows to understand how the system really operates
without working on real-time systems.
• Easy to test − Allows to make changes into the system and their effect on
the output without working on real-time systems.
• Easy to upgrade − Allows to determine the system requirements by
applying different configurations.
• Easy to identifying constraints − Allows to perform bottleneck analysis
that causes delay in the work process, information, etc.
• Easy to diagnose problems − Certain systems are so complex that it is not
easy to understand their interaction at a time. However, Modelling &
Simulation allows to understand all the interactions and analyze their effect.
Additionally, new policies, operations, and procedures can be explored
without affecting the real system.
Modelling & Simulation ─ Disadvantages
• Used to study the internal structure of a complex system such as the biological system.
• It is used while optimizing the system design such as routing algorithm, assembly line,
etc.
Modeling Environments
provides a software-technical abstraction layer, which separates the
thermodynamical or physical model from the software engineering details of
the process simulation environment.
e.g. MATLAB
Input and output variables
In simulation analysis-
• The behavior of a system is studied by generating an artificial history
of the system through the use of random numbers.
• A state variable is defined as a measurable physical property that depends on the present state
of the system
• A state variable is one of the set of variables that describe the current “state” of a dynamical system.
• The state of a system describes about the system in the current instant of time and helps to determine
its future behavior.
“ state variable is one of the variables used to describe the state of a dynamical system.”
• The deterministic linear model serves as the basis for evaluating theoretical models.
• It is expressed as: Yi=α+βXi
• A deterministic model is systematic and contains no error, therefore Y is perfectly predicted
by X.
• The error term is the difference between the expected value of Yi and
the observed value of Yi; i.e Yi−μ.
array operations
matrix operations.
• If the operands have the same size, then each element in the
first operand gets matched up with the element in the same
location in the second operand.
Example: adding two vectors with the same size.
Operations in MATLAB
Matrix Operations
Plotting in MATLAB
Static and Dynamic systems
Static Simulation
• Knowledge: Knowledge is information that has been refined by analysis such that
it has been assimilated, tested, and/or validated. Most importantly, knowledge is
actionable with a high degree of accuracy because proof of concept exists.
• Coursera – Introduction to Programming with MATLAB
Basic matlab codes
Task 1:
Plot the simple function y = x for the range of values for x from 0 to 100, with an increment of 5.
Task 2
• to plot the function y = x2
Task 3: To make previous curve smoother
Task: Adding Title, Labels, Grid Lines and Scaling on the Graph
subplot(1,2,1)
Array creation in MATLAB
Concatenation of Arrays in MATLAB