0% found this document useful (0 votes)
9 views36 pages

Monte Carlo Simulation: Monalisa Sarma

Uploaded by

karanreso4842
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views36 pages

Monte Carlo Simulation: Monalisa Sarma

Uploaded by

karanreso4842
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Monte Carlo

Simulation

Monalisa Sarma
Introduction

When designing a new system or attempting to


improve an existing one,

what are some of the essential tasks?????

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.

The model is based on the available information on


▰ The interactions among components of the system,
▰ The interaction of the system with the environment, and
▰ Data related to the properties of the system components.

All these aspects concur in determining how the components move among their possible states and,
thus, how the system behaves.

3
Introduction

Suppose our objectives are precisely defined

• We want to analyze the system reliability

4
Introduction

System reliability analysis aims at the quantification of the probability of failure of a system. This entails addressing the
following questions:

Why systems fail


How to develop reliable systems
How to measure and test reliability in design, operation, and management
How to maintain systems reliability,

For a given system, the proper answers to these questions require to address different issues like:

▪ The representation and modelling of the system;


▪ The representation, propagation, and quantification of the uncertainty in system behaviour.

5
Introduction

System reliability analysis is confronted by several challenges, possibly sharpened


For increased
by the complex systems
complexity of the systems.
made up of several
components, it is
important to analyse the
possible mechanisms of Therefore, a
failure and to evaluate statistical failure
their probabilities. Often,
each such system is analysis is not
unique in the sense that possible.
there are no other
identical systems for
which failure data have
Note: Itbeen collected
is not only the probability of system failure which is of interest but also the initiating causes and the
combination of events which can lead to it.

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.

Although simulation is often viewed as a “method of last


Simulation makes it possible to resort” to be employed when everything else has failed,
study and experiment with the recent advances in simulation methodologies, availability of
complex internal interactions of a software, and technical developments have made simulation
given system. one of the most widely used and accepted tools in system
analysis.

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.

• This disadvantage is decreasing thanks to the rapid development of


computing power and to the availability of a number of techniques for
efficient simulation
• Parallel computers are particularly useful for MCS because the various
histories that contribute to the estimate of the solution are independent of
each other and can thus be processed in parallel.

12
Example : Estimation of volume of a complex shape

Consider the estimation of an n-dimensional Euclidean volume V of complex shape.

The problem is formally equivalent to the evaluation of a definite integral

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

Random numbers are created by a digital


computer using deterministic algorithms known as
random number generators.

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

• The random numbers should possess the following characteristics


• Randomness and uniform distribution;
• A large period before the sequence repeats;

• Reproducibility so that the same sequence can be repeated;

• Computational efficiency in their creation.

Example: 0.1250, 0.4375, 0.3750, 0.1875, 0.6250, 0.9375,


0.8750, 0.6875, 0.1250, etc.
18
Conversion of uniform random number

• The main procedures used for the conversion are:


• inverse transform method;

• composition method;

• acceptance rejection 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.

• The different ways these estimates can be processed includes


• Plots of the distributions such as
• Frequency histograms
• Density functions

• Point estimates such as


• Means
• Modes
• Minima
• Maxima
• Percentiles

23
Application of MCS Techniques : Example 1

Tossing a coin
Data for tossing a coin

Variation of P(H) with number of tosses


24
Application of MCS Techniques : Example 2

Throwing a die

25
Application of MCS Techniques : Example 3

Simulating a two component system

26
Application of MCS Techniques : Example 3

Simulation result for two parallel Component

Data for two parallel


Component

27
Application of MCS Techniques : Example 4

Consider a single component system having times-to-failure that are


exponentially distributed and a failure rate of 0.5 f/yr. Evaluate analytically
and by simulation the probability of surviving a mission time of one year
without failure, i.e., its reliability for a time of one year.

28
Application of MCS Techniques : Example 4

Solution steps

1. Generate a uniform random number.


2. Convert this random number into a value of time using a conversion method, e.g., the inverse
transform method
3. If this time is greater than or equal to the mission time (1 year), count this event as a success. If
the time is 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.

29
Simulation Result

30
Application of MCS Techniques : Example 5

Consider a two component non-repairable system in which both components


have times-to-failure that are exponentially distributed and a failure rate of 1
f/yr. Evaluate analytically and by simulation the probability of the system
surviving for mission times of 0.1, 0.2, 0.3, 0.4, 0.5,0.6,0.7,0.8,0.9 and 1.0
years without failure if only one component is required to operate for system
success.

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

Simulation results for two component system


System reliability for
Mission
time 100 trials 1000 trials 10000
(yr) trials
Run 1 Run 2 Run 3 Run 1 Run 2 Run 3
0.1 0.99 1.0 0.96 0.991 0.994 0.993 0.992
0.2 0.97 0.96 0.95 0.96 0.967 0.964 0.969
0.3 0.94 0.94 0.92 0.923 0.93 0.938 0.934
0.4 0.92 0.91 0.89 0.893 0.88 0.901 0.893
0.5 0.87 0.88 0.88 0.854 0.825 0.849 0.849
0.6 0.79 0.82 0.81 0.805 0.779 0.798 0.799
0.7 0.74 0.75 0.76 0.752 0.725 0.753 0.749
0.8 0.70 0.65 0.70 0.711 0.678 0.707 0.699
0.9 0.67 0.61 0.67 0.672 0.626 0.665 0.653
1.0 0.62 0.58 0.61 0.618 0.576 0.614 0.603
34
Conclusion

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

You might also like