This document describes using Monte Carlo simulation to analyze variations in manufacturing processes and electrical circuits. It discusses generating random input variables based on their distributions, calculating output results using equations, and analyzing the output distribution to determine process capability and variation. An example simulates variations in five stacked metal parts and calculates the total dimension distribution. Another simulates variations in resistor values in an electrical circuit and calculates the distribution of the output voltage.
Javier Garcia - Verdugo Sanchez - Six Sigma Training - W4 Monte Carlo Simulation
1. Page 1/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Monte Carlo Simulation
Week 4
Page 2/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
How we can predict the distribution of the results?
How robust is the system?
– Goal: Estimation of a mean and a standard deviation for
comparison with requirements and for further optimization
– Monte Carlo – Assessment of the current variation
– DOE - Analysis and optimization
How we can predict the distribution of the results?
How robust is the system?
– Goal: Estimation of a mean and a standard deviation for
comparison with requirements and for further optimization
– Monte Carlo – Assessment of the current variation
– DOE - Analysis and optimization
Output
ResponsesSimulation
Input factors
controllable
Input factors
Not controllable
Statistical Analysis by Simulation
2. Page 3/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
How does it work?
In the project phase “analysis” you have determined the effect of
input factors on results. A model can be described by regression
or by DOE.
It exists an equation for physical or chemical relations.
With Minitab we are able to simulate the known or expected data
distribution in order to predict the their importance on the results.
Based on this we can find out which changes of the input factors
are necessary to improve the result. We receive a good foundation
to decide at an early stage that redesigns are necessary. At this
stage they can be performed at an acceptable cost level.
Statistical Analysis by Simulation
Page 4/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
5 stacked metal parts should not exceed a total dimension of
250,4 mm. The actual dimension for the mean of each sheet
metal piece is 50 mm with a tolerance of +/- 0,1 mm.
The goal is to find out if the current capability is sufficient. This
can be done by statistical tolerancing method but also by
simulation.
We generate in Minitab 5 columns with normal distributed data
with a mean = 50 and a StDev. = 0,033. In the second step we
add the 5 columns and store the sum in the column c6. Now we
check the process capability for 250, 4 mm max of the data in
column c6.
Based on this results we decide if the specification for the metal
parts is adequate in order to get a sufficient process capability.
An Example from Tolerancing
4. Page 7/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Step 3: Capability Analysis
Stat
>Quality Tools
>Capability Analysis normal…
Stat
>Quality Tools
>Capability Analysis normal…
Is the long term capability = 1,75 as a prediction sufficient?Is the long term capability = 1,75 as a prediction sufficient?
250,4250,3250,2250,1250,0249,9249,8
USL
LSL *
Target *
USL 250,4
Sample Mean 250
Sample N 1000
StDev (Within) 0,0766033
StDev (O v erall) 0,0759855
Process Data
C p *
C PL *
C PU 1,74
C pk 1,74
Pp *
PPL *
PPU 1,75
Ppk 1,75
C pm *
O v erall C apability
Potential (Within) C apability
PPM < LSL *
PPM > USL 0,00
PPM Total 0,00
O bserv ed Performance
PPM < LSL *
PPM > USL 0,09
PPM Total 0,09
Exp. Within Performance
PPM < LSL *
PPM > USL 0,07
PPM Total 0,07
Exp. O v erall Performance
Within
Overall
Process Capability of Summ
Page 8/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
R2
R1
R3
R4
U1
UoU2
-
+
-
+
R5
Part 1: Summing unit Part 2: inverting amplifier
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
+=
2
2
1
1
34
R
U
R
U
RU
4
5
0
R
R
UU a=
An Electrical Circuit
5. Page 9/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
The voltage drop results from the following equation:
How does the voltage drop looks like?
(Addition of each single distribution)
Assumption:
R3 = R4 = R5 be 10 K ± 10%
R1 = R2 be 1K ± 10%
U1 be 50 mV ± 5 mv
U2 be 100 mV ± 10 mv
R5 R3U1 + R3U2
R4 R1 R2
Uo=
Establish the Equation
Page 10/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Distribution of the Initial Data
11001000900
40
30
20
10
0
R2
Frequency
11010090
40
30
20
10
0
U2
Frequency
11001000900
40
30
20
10
0
R1
Frequency
555045
40
30
20
10
0
U1
Frequency
6. Page 11/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Distribution of the Initial Data
11000100009000
40
30
20
10
0
R3
Frequency
11000100009000
40
30
20
10
0
R4
Frequency
11000100009000
30
20
10
0
R5
Frequency
Page 12/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
The mean value of U0 = 1,51 with a standard deviation of 0,18 Sigma;
6 sigma limits : 0.43 <= V0 <= 2.59
What values we get if the resistors have a +/- 5% tolerance?
The mean value of U0 = 1,51 with a standard deviation of 0,18 Sigma;
6 sigma limits : 0.43 <= V0 <= 2.59
What values we get if the resistors have a +/- 5% tolerance?
The Result
2160198018001620144012601080
Median
Mean
15151510150515001495
1st Q uartile 1381,3
Median 1498,8
3rd Q uartile 1626,6
Maximum 2194,4
1506,1 1513,2
1494,5 1503,9
177,2 182,1
A -Squared 13,76
P-V alue < 0,005
Mean 1509,6
StDev 179,6
V ariance 32263,5
Skewness 0,308720
Kurtosis -0,107116
N 10000
Minimum 1007,9
A nderson-Darling Normality Test
95% C onfidence Interv al for Mean
95% C onfidence Interv al for Median
95% C onfidence Interv al for StDev
95% Confidence Intervals
Summary for Uo
7. Page 13/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
U0 for resistor with 5% tolerance
Mean = 1.49
Standard deviation = 0.10
6 sigma limits:
0.89 <= V0 <= 2.09
U0 for resistor with 10 % tolerance
Mean = 1.51
Standard deviation = 0.18
6 sigma limits:
0.43 <= V0 <= 2.59
The Result, with a 5% Resistor Tolerance
Page 14/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
R2
R1
R4
R3
What value has RTotal ?
Define the 6 sigma limits
RTotal = 1/(1/ (R1 + R3) + 1/ (R2 + R4) )
R1, R2 Normal distribution: Mean = 100, Stdev = 5
R3, R4 Uniform distribution: lower limit = 90, upper limit = 110
A Similar Problem
8. Page 15/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
The Data Sheet
R1 n (100;5) R2 n (100;5) R3 U 90-110 R4 U 90-110 R total
105,3533548 100,3022008 102,4032289 93,05186376 100,1483757
102,4196231 109,1777291 106,4016145 92,97866104 102,7173859
99,20740871 102,2156768 91,33668526 96,20693558 97,20178174
100,2706008 96,68913464 98,49202587 99,96066105 98,8502832
109,4715529 98,68895419 105,7885608 102,8158035 104,0777187
93,18341572 102,2955652 92,72075957 90,92933067 94,74692828
* * * * *
* * * * *
* * * * *
* * * * *
Page 16/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
The 6 sigma limits are 83,85 <= RTotal <= 116,97The 6 sigma limits are 83,85 <= RTotal <= 116,97
The Result
109,2106,4103,6100,898,095,292,489,6
Median
Mean
99,9599,9099,85
1st Q uartile 98,090
Median 99,895
3rd Q uartile 101,746
Maximum 109,751
99,855 99,960
99,823 99,946
2,641 2,715
A -Squared 0,87
P-V alue 0,025
Mean 99,908
StDev 2,677
V ariance 7,167
Skewness 0,016691
Kurtosis -0,125713
N 10000
Minimum 89,416
A nderson-Darling Normality Test
95% C onfidence Interv al for Mean
95% C onfidence Interv al for Median
95% C onfidence Interv al for StDev
95% Confidence Intervals
Summary for R total
9. Page 17/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Example: “Distance between screw holes”
0,0044 mm0,4 mmM4
0,0044 mm0,4 mmM2
VarianceToleranceMeasure
What are the tolerances for M0 with the given tolerances
(µ, σ) for M2 and M4?
?? Theorem of PythagorasTheorem of Pythagoras
Page 18/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Approach 1: Statistical solution for
“Distance between screw holes”
Calculate solution by using Gauss´ error propagation formula:
M0 = 18,03 ± 0,20 mm
assuming that the measurements
G1, ..Gn are all uncorrelated.
10. Page 19/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
Approach 2: Get the solution
with the Monte Carlo Simulation
1. Generate random data for M2 and M4 with σ = 0,0663325
Calc
>Random Data
>Normal…
Calc
>Random Data
>Normal…
Calc
>Calculator…
Calc
>Calculator…
2. Calculate M0 with
Pythagoras:
Page 20/2008 BB W4 Monte Carlo Simulation 07, D. Szemkus/H. Winkler
18,30018,22518,15018,07518,00017,92517,85017,775
Median
Mean
18,0287518,0285018,0282518,0280018,0277518,02750
1st Q uartile 17,983
Median 18,028
3rd Q uartile 18,073
Maximum 18,307
18,028 18,029
18,028 18,029
0,066 0,067
A -Squared 0,28
P-V alue 0,637
Mean 18,028
StDev 0,066
V ariance 0,004
Skewness -0,0041889
Kurtosis 0,0011327
N 100000
Minimum 17,748
A nderson-Darling Normality Test
95% C onfidence Interv al for Mean
95% C onfidence Interv al for Median
95% C onfidence Interv al for StDev
95% Confidence Intervals
Summary for M0
Approach 2: Solve the problem
with the Monte Carlo Method
3. Analyze M0 with Descriptive Statistics
Stat
>Basic Statistics
>Display Descriptive Statistics…
Stat
>Basic Statistics
>Display Descriptive Statistics…
The 3 sigma limits are 18,03 ± 0,20 mm = 17,83 <= M0 <= 18,23The 3 sigma limits are 18,03 ± 0,20 mm = 17,83 <= M0 <= 18,23
Simulation or calculation:
The results are the same!