The evaluation of statistical process control methods by simulation

The evaluation of statistical process control methods by simulation

0360-8352/88 $3.00+0.00 Computers ind. Engng Voi.15, Nos 1-4, pp.360-363, 1988 Printed in Great Britain. Copyright c 1988 Pergamon Press plc All ri...

233KB Sizes 0 Downloads 41 Views

0360-8352/88 $3.00+0.00

Computers ind. Engng Voi.15, Nos 1-4, pp.360-363, 1988 Printed in Great Britain.

Copyright c 1988 Pergamon Press plc

All rights reserved

THE EVALUATION OF STATISTICAL PROCESS CONTROL METHODS BY SIMULATION G. Allen Pugh, PhD Department of Engineering Indiana University - Purdue University at Fort Wayne 2101 Coliseum Boulevard East Fort Wayne, IN 46805-1499

ABSTRACT A set of functions that provide for Monte Carlo simulation and graphical analysis of various s t a t i s t i c a l process control methods and measures is described. The functions are written to the MathCAD microcomputer environment. INTRODUCTION Statistical process control (SPC) methods are often d i f f i c u l t to evaluate. The t r a d i t i o n a l tools offered to the practitioner for sampling plan evaluation - - such as average outgoing q u a l i t y , average total inspection, operating characteristic, average run length, et cetera, often do not give an accurate picture of shop floor performance. This is due to several factors which include a lack of r e l i a b l e process data, poor s t a t i s t i c a l (distributional) f i t , trivialized control strategies and dubious economic models. A set of t r a d i t i o n a l SPC analysis and simulation tools is described in this paper. Process data used in the analysis may be historical or randomly generated. Various process models may be examined and changed with ease, and output may be graphical or tabular. This allows the user to spend valuable time evaluating proposed solutions prior to actual implementation. The design goals in the development of this set of tools include ease of use, ease of modification or customization and transparency of technique. For these reasons the t r a d i t i o n a l computer programming approach was abandoned and

a f r i e n d l i e r environment chosen. MathCAD [ I ] provides for such an environment. I t transforms the computer screen into a scratch pad upon which the operator may enter text, solve equations (displayed as one would write them) and generate plots. As an example of the capabilities of this environment, consider the evaluation of a sampling plan using traditional methods such as the operating characteristic (OC), average total inspection (ATI) and average outgoing quality (AOQ). These measures were calculated using standard techniques [2, 3], as shown in figure one. The user need only enter sampling plan parameters: sample size (n) and acceptance number (c). A change in any parameter results in immediate recalculation and re-display of all subsequent operations. For reasons of computational expediency, the measures described above, and others l i k e them, are based upon models that greatly simplify r e a l i t y . The most convenient technique to deal with very complex processes and control schemes is Monte Carlo simulation [4]. Unfortunately, simulation software packages are often expensive, d i f f i c u l t to learn, tedious to program, more powerful than a typical SPC practitioner requires and/or not useful for anything but simulation. Three generally-available alternatives to specialized microcomputer simulation languages were considered. These are: 1) procedural programming languages l i k e Pascal or Basic; 2) spreadsheets, and; 3) engineering 360

Pugh : Stat£st£cal process control

N :=12 c::Z

361

N : SN4PLE $ZZI[. C : ACCEPTANCE NUHIER. LT : LOTSIZE (USED FOR AT][ ONLY).

LT :: 150

D : : 1 ..200

FRDEF

o

::

I := 0 ..C

D

FRDEF = FRACTZON DEFECT][VE.

200 Z [-(N.P l . z (W.P)

POZS(N, P) : :

Zl Z

POZS : CUNULAI"ZVE POZSSON DENSZTY, (USED AS PROBABZLZTY OF ACCEPTANCE).

PAD : : Poz$ IN, FRDEFD]

PA

OPERATING CHARACTERISTIC CURVE

D

( PROSABZLZTY OF ACCEPTANCE)

0 I 0

F~EF D

A00

0.2 ~m

: : PA • FRDEF

O

D

D

AVERAGE OUTGOING OJJALZTY

D

DETERHZNE A0~ LZHZT: AO(~ : : MAX(AO0) AOOL : 0.114

o

ATIo :=

PAo'N + [1 -

0

FRDEF D

0

FRDEF D

PAo].LT

AVERAGE TOTAL INSPECTION

ATI D

o

Figure 1.

OC, AOQ and ATI Graphs.

worksheets like MathCAD by MathSoft, Eureka by Borland, Interactive Analysis System by Analysis Technology Company, Gauss by Aptech Systems and TK-Solver by Universal Technical Systems. Programming languages were discounted immediately because of the requirement for considerable user expertise and the lack of compatibility across a wide range of systems. Spreadsheets simulations were slow and d i f f i c u l t to develop. Of the four readily available engineering worksheets, MathCAD appeared to offer an excellent compromise between speed, ease of use, expense and f l e x i b i l i t y . ANALYSIS Among the more important components in a simulation package are the accuracy and speed of the pseudo-random number generators. MathCAD, as with many other packages, only provides for uniform random deviates. Even a minimal process control simulation would most likely require Gaussian (normal), truncated Gaussian or Poisson deviates. Further, i f the

arrival of events over time were important, exponential random deviates would also prove useful. Two methods for the generation of normal random deviates were investigated. The f i r s t was that of Box and Muller [S]. The second was that of Ramberg and Schmeiser [6]. The traditional method of summing twelve uniform deviates was not investigated as i t has been shown to perform poorly in the t a i l s of the distribution. (Note this is the area of most interest in many SPC studies.) The Ramberg-Schmeiser method was chosen for two reasons: i t proved to be about ten percent faster, and; i t may be used to model distributions other than the normal -- thus reducing program complexity. The program used for comparison is illustrated in figure two. Parameter values for the Ramberg-Schmeiser distribution are given in the table below. The a p p l i c a t i o n of simulation methods to SPC problems may be best i l l u s t r a t e d with an example. Consider a process t h a t i s producing normallyd i s t r i b u t e d parts. Each part is

362

Proceedings of t h e

:: 3.0 x

::

I

o :: 4.5

2. LH

N := 30

10th Annual Conference on Computers & Industrial Engineering

I :: 0 ..2499

..N 8.
N'r'V

GENERATE ~ox-MULLER NORMAL RANDOM DEVIATES WITH MEAN F AND STANDARD DEVIATION o.

"cosl2-~r. R R D ( I I ) . ~ +

a :=0

K := 0 . . N - 1 F := HIST(NTV,X)

NI'V ÷ N'Igl K+l

K

MTV : : K

2

COMPARE SIMULATED & EXPECTED VALUES IN A HISTOGRAM.

G

::

E

m~

(F)

K

300

FIND MEAN & STANDARD DEVIATION OF SIMULATED VALUES:

F,G K K

M := MEAN(X) S := STOEV(X) M = 2.936 s = 4.424

-2O NTV K REPEAT ANALYSZS WITH R~S[~-Sr~t~ZS[mNO~WAL RANDON DEVIATES. P3 P4 RN - (1 - RN) RS(RN) := Pl + P2 300

20 pl

.1975

,3 i---- 134,

p2 : = -

P4 : = . 1349 X : : RS(RRD(1)) I

F := HIST(NTV, X)

FIND MEAN ~ STANDARD DEVIATION OF SIMULATED VALUES:

F ,G K K

M:= MEAN(X) S := STOEV(X) M = 2.951 S = 4.59

0 NTV K

40

Figure 2.

Comparison of Gaussian Deviate Generators.

measured (a sample size of one) to determine i f the process is in control: that is, i f the part size is outside a predetermined range. I f the part is found to be outside this range the process is reset to the specification midpoint. Additionally, at random intervals, the process mean will suddenly s h i f t . The objective is to devise a range of acceptable part sizes so that the process is reset i f , and only i f , i t has shifted. Limits that are too narrow will cause

Table 1.

20

excessive resetting, while wide limits may cause many parts to be produced outside specifications. The choice of range limits is clearly an economic one. However, for reasons of simplicity, economic factors have been ommitted. The MathCAD formulation of this problem is shown in figure three. Note that the simulated part sizes and the current process mean are stored as arrays.

Ramberg-Schmeiser distribution parameters.

Let x be a R-S random deviate, then x =~i + [ R n - (1-R)~4 ] /~2 where R is a uniform random deviate in the range 0-1. distribution (parameters) normal (,,a) exponential (~) uniform (a,b)

~i , 0 (a+b)/2

R-S parameter values ~2 ~3 .1975/a -.00058/~ 2/(b-a)

.134g 0 I

~4 .134g -.00058 1

Pugh : Statistical process control

363

MODEL: EACH O¢ 300 PARTS IS MEASURED

STODEV : = 1 TRIP : : 2.0. STDOEY

AND, ZF ZT I S OETERHZNED TO OEVIATE FROM THE ORIGINAL NUN BY MORE THAN THE TILTP LEVELI THE PROCESS I S AD3USTED BEFORE PRODUCTION OF THE NEXT PART. ADOUS174ENT RESETS TO THE ORIGINAL HEAN. BURR RECOIetNDS A TRIP LEVEL OF 20" FOR A SM4PLE SIZE OF ONE.

z : : 0 ..300 0

AVE 1

I

xoO1 .:

• 1349

RETURN A GAUSSXAN (NORMAL) RANDOM NUMBER WITH MEAN ~ AND STANDARD DEVIATION ~'.

RN

.1349 - (1 - RN)

RSN(FeGeRN) • F + .1975

o" PREVIOUS 'rNVESTZGATZON LED TO THE CONCL.USZON THAT. AS MOULO BE EXPECTEDe ANY INTERFERENCE WITH AN UNCHANGING PROCESS WILL ONLY INCREASE VARIABILITY. THIS HODEL ALLOWS THE PROCESS HEAN TO CHAISE RANO(~4LY. LET 3HP = ARRAY INDICATING THE 3UMP AT EACH PART, 3MPFRG = FREGUENCY OF 3UHP AND 3HPVAL = 14AGN~'TUDE OF 3UI4P. 3MPVAL : : 0 . 5

3HPFNG : :

.0S

3HP

:: 0

3MP

0

:= IF(RND(1) ~; ,1HPFRO,3HPVAL,0)

z

EXAMINE 3UI4P FREQUENCY.

::ill

l i}lJlJ

0

Jl Ill

300

1

AVE x

x

z+l~ x+l l sTOEV(x) = 1.116 4

X ,AVE Z I

-4 0

Figure 3.

300

z

SPC Feedback Loop Simulation.

SUMMARY Two notions have been presented in this paper. The f i r s t is that the new generation of engineering worksheets, as exemplified by MathCAD, hold the potential to be very powerful tools for the SPC practioner. The second is that Monte Carlo computer simulation may be a useful modelling tool for SPC problems which are d i f f i c u l t or impossible to analyze by traditional means. In support of these ideas a set of modelling and simulation techniques have been presented. The reader is encouraged to engage them.

3. Burr, I . , Statistical Oualitv Control Methods, Marcel Dekker, New York, 1976. 4. Banks, J. and Carson, J., DiscreteEvent System Simulation, PrenticeHall, Englewood C l i f f s , New Jersey, 1984. 5. Box, G. and Muller, M., "A Note on the Generation of Random Normal Deviates," Annals of Mathemati{Bl Statistics, Vol. 29° 1958, pp 610611. 6. Ramberg, J. and Schmeiser, B. "An Approximate Method for Generating Asymmetric Random Variables," Communications of the ACM, Vol. 17, No. 2, 1974, pp 78-82.

REFERENCES 1. MathCAD User's Manual, MathSoft, Cambridge, MA, 1987. 2. Baeiny, I. and Case, K., "A Variety of AOQ and ATI Performance Measures with and without Inspection Error," Journal of Oualitv Technoloav, Vol. 13, No. 1, 1981, pp I-9.

BIOGRAPHICAL SKETCH Dr. G. Allen Pugh, Associate Professor of Industrial Engineering, Indiana University-Purdue University at Fort Wayne. Dr. Pugh's research interests include manufacturing and computing.