Monte Carlo Simulation: Monalisa Sarma
Monte Carlo Simulation: Monalisa Sarma
Simulation
Monalisa Sarma
Introduction
2
Introduction
The engineer tries to anticipate future patterns of system operation under varying options. Inevitably,
the prediction is done with a model of reality.
All these aspects concur in determining how the components move among their possible states and,
thus, how the system behaves.
3
Introduction
4
Introduction
System reliability analysis aims at the quantification of the probability of failure of a system. This entails addressing the
following questions:
For a given system, the proper answers to these questions require to address different issues like:
5
Introduction
6
A
nume
rical
Introduction soluti
on is
gener
An
ally
analyt
an
ic
There are analytical appro
and numerical solution methods.
soluti
ximat
on is
e
usuall
soluti
y
on
obtai
obtai
ned
ned
direct
as a
ly
result
from
of
its
substi
mathe
tution
matic
of
al
nume
repre
rical
sentat
value
ion in
s for
the
the 7
form
variab
of
Introduction
The reliability analysis of modern complex systems entails an integrated approach in which the hardware, software,
organizational and human elements are treated in a combined frame which accounts for their dynamic
interdependences in the complex related tasks of system production, maintenance, and emergency management.
To cope with such complexity from a quantifiable point-of-view, numerical methodologies like simulation are being advocated
to provide a framework for simulating directly the response of a system to an initial perturbation, as the system hardware
and software components and the operating crew interact with each other and with the environment.
In this view, the Monte Carlo simulation (MCS) method is a powerful modelling tool for the analysis of complex systems, due
to its capability of achieving a closer adherence to reality.
8
MCS - Definition
Monte Carlo simulation may be generally defined as a methodology for obtaining estimates of
the solution of mathematical problems by means of random numbers.
9
Difference between analytical and simulation
approach
Definition
Analytical techniques represent the system by a mathematical model, which is often simplified, and evaluate the
reliability indices from this model using direct mathematical solutions.
Simulation techniques estimate the reliability indices by simulating the actual process and random behaviour of
the system. The method therefore treats the problem as a series of real experiments conducted in simulated time.
• The solution time for analytical techniques is • whereas that for simulation techniques is usually
relatively short extensive
• The analytical model will always give the same • whereas the result from a simulation method is
numerical result for the same system, same model dependent on the random number generator used
and same set of input data, and the number of simulations.
• The model used in the analytical approach is usually • The simulation approach, however, can incorporate
a simplification of the system, sometimes to an and simulate any system characteristic that can be
extent that it becomes totally unrealistic. recognised.
10
Difference between analytical and simulation
approach
• For complex system, analytical methods like markov model can be used
• The advantage of the MCS approach comes from the fact that it allows taking into account, in a realistic
manner, the many phenomena that can occur, without additional complications in the modelling and in the
solution procedure.
Analogously, if the reliability evaluation of a plant is performed using Markov equations, it would easily
incur in the so-called combinatorial explosion, given by an exponential increase of the order of the system
of differential equations.
Having 10 components, each of which can be in three states (working, failed, and standby) is described by 310
equations moreover, realistic aspects of system operation, such as component aging and maintenance,
introduce significant complications in the analytical models whereas they can be treated straightforwardly by
MCS
11
Disadvantage of MCS
Calculation times
diverge with the
required accuracy.
12
Example : Estimation of volume of a complex shape
13
Concepts of simulation
Note: The simulation process is intended to examine and predict the real behaviour patterns in simulated
time, to obtain the frequency/probability distributions of the various reliability parameters and to estimate the
expected or average value of each of the parameters
14
Toss Outcome Probability of
number Head Tail
Concepts of simulation -- Example 1 H 1 0
2 H 1 0
3 T 0.67 0.33
4 H 0.75 0.25
5 T 0.60 0.40
6 H 0.67 0.33
7 T 0.57 0.53
8 T 0.50 0.50
9 H 0.56 0.44
10 T 0.50 0.50
11 H 0.55 0.45
12 H 0.58 0.42
13 H 0.62 0.38
14 T 0.57 0.43
15 H 0.60 0.40
16 T 0.56 0.44
17 T 0.53 0.47
18 T 0.50 0.50
19 H 0.53 0.57
15
20 H 0.55 0.45
System simulation using MCS
When a real system is being examined, the When the system is simulated, the
occurrence of events follows the inherent occurrence of the events depends upon
behavior of the components and variables models and probability distributions used to
contained in the system. represent the components and variables
This is achieved using random numbers and converting these into density functions known to
represent the behavior of the components and variables being considered.
16
Generation of Random Number
Since the numbers generated follow the mathematical rules of the algorithm, they are not true random
numbers and instead are called pseudo-random numbers.
17
Characteristics of random number
• composition method;
19
Inverse Transform Method
The inverse transform method is simply a way to create a random variable that is characterized by a
specially desired distribution.
Inverse Transform method can be applied for converting uniform numbers into exponential distributions.
20
Example
21
Example: Solution
U T ,Year
0.1250 4.16
0.1250 4.16
0.4375 1.65
0.3750 1.96
0.1875 3.35
0.6250 0.94
0.9375 0.13
0.8750 0.27
0.6875 0.75
22
Simulation Output
Each simulation of a process produces an estimate for each of the parameters being assessed.
23
Application of MCS Techniques : Example 1
Tossing a coin
Data for tossing a coin
Throwing a die
25
Application of MCS Techniques : Example 3
26
Application of MCS Techniques : Example 3
27
Application of MCS Techniques : Example 4
28
Application of MCS Techniques : Example 4
Solution steps
29
Simulation Result
30
Application of MCS Techniques : Example 5
31
Application of MCS Techniques : Example 5
Analytical solution
Mission Time (Year) Reliability
0.1 0.991
0.2 0.967
0.3 0.933
0.4 0.891
0.5 0.845
0.6 0.796
0.7 0.747
0.8 0.697
0.9 0.648
1.0 0.600 32
Application of MCS Techniques : Example 5
MCS solution
1. Generate two random numbers, the first for component 1, the second for component 2.
2. Convert these random numbers into two values of time, one for each component.
3. If one of these times is greater than or equal to the mission time, count this event as a success. If
both times are less than the mission time, count the event as a failure.
4. Repeat steps 1-3, cumulating number of successes and number of failures. Continue for desired
number of simulations
5. Evaluate reliability as number of successes divided by number of simulations.
33
Application of MCS Techniques : Example 5
1. The significant merits of MCS are that it can readily produce solutions to complex problems.
2. It can evaluate additional information such as probability distributions that are not realisable
from analytical methods.
3. Merits can outweigh any of its other limitations such as long computer times and imprecise
solutions.
4. Method has become more acceptable because of the greatly enhanced computing power that
modem computers provide.
5. However, sound understanding of the real problems is needed in order to apply the approach
successfully.
6. Finally, the experimentation required is different for different types of problems and it is not
possible to precisely define a general procedure that is applicable in all circumstances.
35
THANKS!
Any questions?
36