Vous êtes sur la page 1sur 9

Pergamon

ECONOMIC

Computers ind. Engng Vol. 28, No. 3, pp. 671-679, 1995


Copyright ~ 1995 Elsevier Science Ltd
0360-41352(94)00219-3
Printed in Great Britain. All rights r~crvcd
0360-8352/95 $9.50 + 0.00

DESIGN OF CONTROL
TAGUCHI

CHARTS

USING THE

LOSS FUNCTION

SURAJ M. ALEXANDER, MATTHEW A. DILLMAN, JOHN S. USHER and


BIJU DAMODARAN
Department o f Industrial Engineering, University of Louisville, Louisville, KY 40292, U.S.A.
Abstract--We embellish Duncan's cost model with Taguchi's loss function to incorporate losses that result
from both inherent variability due to assignable causes. Whereas Duncan applies a penalty cost for
operating out of control, he does not show how this cost can be obtained or quantified. We illustrate,
analyze, and evaluate this model utilizing hypothetical cost figures and process parameters. We also
suggest adjustments to control chart design parameters when there are process improvements over time.

I. B A C K G R O U N D

The design of the Shewhart ?? chart involves the determination of the sample size (N), the frequency
or time between sampling (H) and the multiplier that defines the spread of the control limits from
the centerline (K).
In practice, the Shewart ?? charts have utilized a rational subgroup size for N, normally around
4 or 5. The sampling interval is generally selected based on the production rate and familiarity with
the process. For instance, in the early stages of introduction of control charts to the process the
samples may be taken frequently, such as once every 30 min. In the later stages, when the charts
have been established and preventive measures taken against assignable causes, samples may be
taken less frequently such as once every shift. The control limits for the control charts are
traditionally set at _+3ax.
The rational subgroup size is normally small, since larger sample sizes increase the risk of
process shifts or assignable causes occurring while the sample is taken. Such an occurrence is
undesirable, since this would filter the effect of the shift on the statistic used for monitoring and
also exaggerate the perceived inherent variation of the process. The reduction in power of the
statistical test, resulting from the small sample size, is compensated by taking more frequent
samples. The + 3a~ limits have been found to provide an acceptable level of risk of false alarms
in practice.
The problem with the commonly used "rational" approach to control chart design is that it is
used in almost all processes as the standard procedure for implementing control charts, without
regard to the cost consequences of the design. In order to overcome this shortcoming, a number
of researchers have proposed economic models for the design of control charts. Ho and Case [1]
provide a literature review of such models covering the period 1981-1991. Most of this research
has focused on the design of ??-charts, e.g. [2-4]. Even though these models have not been widely
used, their value is obvious. One of the reasons economic models are not widely used is because
the models are quite complex, and difficult to evaluate and optimize [5]. Also, these models are
typically optimized for a particular size of shift, frequency of out of control, and cost of diagnosis.
In practice, however, the mean period the process remains in control is not static, the size of the
process shift is not constant, and the cost of diagnosis changes with time. In fact, with an
assumption of continuous improvement, we would expect the frequency of out-of-control
situations, the size of the shift and the cost of diagnosis to be reduced over time. After all, this
is one of the purposes of statistical process control (SPC). In order to address some of these
concerns we attempt to establish the direction of change of the control chart's design parameters,
when the frequency and the size of process shifts and the cost of diagnosis change. With
this information, the practitioner might be able to adjust the "optimized" design parameters
over time.
671

Suraj M. Alexanderet al.

672

The first concern, related to model complexity, is not easily addressed, since the presence of
integral evaluations and optimization over three variables makes the process difficult to simplify.
Taguchi et al. [6] have proposed an on-line control model for which they have developed a
closed-form solution for the selection of optimal control parameters. The closed-form solution
makes the evaluation of process control parameters much easier. However, in their model the sample
size (N) is always one; the costs associated with false alarms, and searching for assignable causes are
ignored; also, the probability of not detecting a process shift is ignored. These simplifications are
unrealistic, especially considered the fact that the Type II error increases with smaller sample sizes.
Adams and Woodhall [7] provide a comparison of Taguchi's ideas and Duncan's model. We select
Duncan's [8] cost function for the X chart which we find more realistic and we embellish this cost
function with the Taguchi loss function. We determine the optimal control chart design parameters
using this function and suggest changes in these parameters over time.
The Taguchi loss function provides a means of explicitly considering the loss due to process
variability. Whereas Duncan applies a penalty cost for operating out of control, he does not show
how this cost can be obtained or quantified. In this paper we present, evaluate, optimize and
analyze an economic model of the control chart. In the next section we describe our cost model.
We then illustrate it's application using a hypothetical example. We conclude this paper by studying
the direction of control chart design parameter changes in the presence of changes in the magnitude
and frequency of process shifts and the costs of discovering and correcting the causes of these shifts.
2. EMBELLISHMENTOF DUNCAN'S COST MODEL WITH TAGUCHI'S LOSS FUNCTION
Duncan's model assumes a single out of control state. Research has confirmed that multiple
assignable cause models can be approximated by an appropriately selected single cause model [2].
Hence we assume that we monitor the process to detect the occurrence of a single assignable cause
that causes a fixed shift in the process. Duncan defines the monitoring and related costs over a cycle.
The elements of the cycle are as follows:
(1) The in control state. (The process starts in this state.)
(2) The out of control state. (The process goes to an out-of-control state from an in-control
state. This is assumed to be a Poisson process with 2 occurrences per hour.)
(3) Detection of the out-of-control state.
(4) The assignable cause is detected and fixed.
Duncan also assumes that the process is not stopped while investigating the presence of an
assignable cause.
The expected cycle time (E(T)) with Duncan's assumption is:
1

+
z I-fl

z+gN+D

where
H =
(I - f l ) =
r =
g=
N=
D=

time between samples (h)


probability of detecting a shift
marks the elapsed time within a sampling interval when the process goes out of control
sampling time/unit
sample size
time required to detect and fix an assignable cause.

The expected cost per cycle is:

(a~ + a2N)E(T)
a3~ exp(-2H)
( H
+a3+l-exp(-).H)
+a4 l - - ~ - r
H
where
a~ = fixed cost of sampling
a2 = variable cost of sampling

)
+gN+D

Taguchi loss function

a3 =
a 3=
pa4 =
=

673

cost of finding and fixing an assignable cause


cost o f a false alarm
penalty cost for operating in an out of control state
probability o f a false alarm (Type I error).

The Taguchi loss function for a product is defined below. Consider a product with bilateral
tolerances o f equal value (A). If the cost to society for manufacturing a product out of specification
is A S/unit, then, the Taguchi loss function defines the expected loss to society caused by using a
particular process to produce the product as:
A
Expected loss/unit = ~-~ v 2

(1)

where
v 2 = mean squared deviation of the process.
It can easily be shown that v 2 = a 2 + (p - T) 2, where o 2 = process variance, # = process mean
and T = process target. We assume that when the process is in control its means is centered on
target and its v 2 = v 2 = a 2. We also assume that when the process shifts, its mean shifts off target
and v 2 = v~ = a 2 + (# - T) 2. (Since we are just considering $ charts the consideration of mean shifts
are sufficient.)
Using the definition o f loss given in (I) we can easily embellish D u n c a n ' s model to consider losses
owing to in-control and out-of-control variability. Noting that the expected period in-control is
(1/2) and the expected period out-of-control is

E"

l~--~fl - r x g N + D

and assuming that the production rate is P units/h, the cost per cycle (c) using the embellished
model is shown below:

E(T)
a3aexp(-).H) t -AviP.
- - - f f - z + Av,P[- - - ~ - - k -H
--r
c = (a I + a2N) y
+ a3 -t 1 - e x p ( - ) , H )
I - fl

+gN +O

"

Dividing (2) by E(T) and applying the following a p p r o x i m a t i o n s and definitions [2]
T~

2H 2

12

I
B=

1
(I-fl)

1 2H]H
+D+gU

2+-i2..]

exp( - ;tH)
(i - e x p ( - 2 H )

u
).H

L, = ~ " v~
A
L2 =-~- i v~.
We obtain the expected cost per hour as

E ( c ) - al +a2N-- -t )~a3+a3~/H + L~P + L'PAB


H

I +2B

The optimal values for N, H, and K can be obtained by minimizing the above cost function.

(2)

Suraj

674

M. A l e x a n d e r et aL

3. A P P L I C A T I O N O F E M B E L L I S H E D

MODEL

We apply our model to the following hypothetical example:


A manufacturer produces a part that has a length specification of 2.5 in. with a tolerance of
+ 0.003 in. From previous runs the process standard deviation was estimated as 0.001. The process
has required an average of ten adjustments during 40 h of production time. Therefore, the mean
time between assignable causes entering the system is estimated to be 4 h.
Based on an analysis of operator and quality control technician wages; it is determined that the
fixed cost of sampling per subgroup is $1. While, the variable cost is $0.10 per part with a sample
and interpret time of 0.01 h per part.
The average time to investigate a false alarm or to find and eliminate an assignable cause is
estimated to be two hours at a cost of $25/h. The process is assumed to continue producing parts
at a rate of 100/h during investigation and elimination of out-of-control signals.
The cost to rework or scrap a part that is found to be outside the specification limits is $5, while
the shift in the process average to be detected is 0.001 in. From the above information we infer
the following information relevant to our model.
al=$1

a2=$0.10

a 3 = $50

a~ = $50

P = 100 parts/h

v~ =(0.001) 2

A = $5/part

A = 0.003

-=4h
2

D=2

g=0.01h
v~ = tr 2 + 62 = (0.001) 2 + (0.001) 2 = 0.000002.

= (u - T) = 0.001

Table 1 lists the results of a computer search for the optimum design parameters. For these
conditions the optimal parameters are seen to be N* = 13, K* = 2.5, and H* = 1.0 at a cost of
$88.48/h. The most common values used in the U.S. industry are N = 5, K = 3, and H = 0.5 which
results in a cost of $92.88/h or a penalty of $4.40/h. The computer program used to search for an
optimum computes the optimal control limit width K and sampling frequency H for several values
of N and displays the value of the cost function with the associated alpha risk and power as shown
on Table I. This is the same approach used by Montgomery [2] and Jaraiedi and Zhuang [9]. The
program is found in the Appendix. The program is easy to run on any IBM compatible computer
with BASIC. It uses a simple grid search. The range and the step size of the search on any of the
parameters can be changed by changing the " F O R " statements in the program.

Table I. Variables and parameter selection for a chart


N

Power (I - / / )

2
3
4
5
6
7
8
9
10
11
12
13
14
15

1.8
1.9
2. I
2. I
2.2
2.2
2.2
2.3
2.4
2.4
2.4
2.5
2.5
2.6

0.7
0.7
0.7
0.8
0.8
0.8
0.9
0.9
0.9
1.0
1.0
1.0
I. I
I. 1

0.07
0.06
0.04
0.04
0.03
0.03
0.03
0.02
0.02
0.02
0.02
0.01
0.01
0.01

0.35
0.43
0.46
0.55
0.60
0.67
0.74
0.76
0.78
0.82
0.86
0.87
0.89
0.90

N, subgroup size. K. coefficient to determine control limits; H. sampling interval (H).

Cost
93.07
91.64
90.69
90.02
89.54
89.20
89.95
88.76
88.64
88.55
88.50
88.48~
88.49
88.50

T a g u c h i loss function
20 --

2.0

\\%

15

675

=100

....

N
1.5

\ ........
..........

),:

1.0

10

II/I a31/50
II=- ii a 3 = 100

0.5

a I = $1.0
a 2 -- $0.10

0.5

1/~. (h)
Fig. I. S a m p l e size (N) and s a m p l i n g interval ( H ) vs I / L

4. S E N S I T I V I T Y A N A L Y S I S

We study the sensitivity to the magnitude and frequency of process shifts in order to determine
the appropriate adjustment of control chart parameters in the presence of process improvements,
and process deterioration. The frequency of process shifts is changed in the model by adjusting
the value of (2), the expected arrival rate of process shifts. The magnitude of process shift is varied
by changing the value of ~ = (/~ - T). Note that the cost of investigating and fixing an assignable
cause (a3) is not changed as a function of the magnitude of shift, since we assume that the cost
of investigating small shifts plus the cost of repair of these shifts is equal to the cost of investigating
large shifts plus the cost of repair of the causes of these shifts. However, over time we expect the
average cost a3 to decrease as the teams become more adept at discovering and correcting causes
of process shifts. We therefore also study the change in optimal control chart parameters when a3
changes.
Figures 1, 2, and 3 indicate changes in the "optimum" control chart design parameters, i.e. the
sample size (N) and the sampling interval (H) under conditions of process improvement and
deterioration. The design (K) was found to be relatively robust under the different conditions.
Process improvement is denoted by a reduction in the frequency and magnitude of process
shifts.
a3= 100,~h

,~

a3 = 5 0

a3 =25 ~ %

2.0

1.5

sss

a3 -- 2 5 /

1.0

//

/
.

//

// a 3 = 50

/
d

II

/
/

//

SSS

/
. . . . . .

....

I00

a3

0.5
a I = $10.0

a2 --- $1.0

I/~. (h)

Fig. 2. Sample size (N) and sampling interval (H) vs I/2.

Suraj M. Alexander et al.

676

--

20

15

L0

a3 = 25

Ilk : 2

2.0

1.5

1.0

~
I

\ x

0.1)005

0.0007

0.0009

0.0010

0.0030

0.0050

015

8
Fig. 3. Sample size (N) and sampling interval (H) vs ft.
The curves in Fig. 1 indicate that when the frequency of process shifts decreases or the mean
utime interval between process shifts increases, the sample size (N) increases and the sampling
interval (H) decreases to a steady state value. This, at first, seems counter-intuitive, i.e. when the
process improves the monitoring effort seems to have increased, albeit to a steady state value.
However, this can be explained when we observe the rate of convergence to the steady state values
of the design parameters. The rate of convergence to the steady state values depends on the cost
of searching for an assignable cause (a3), i.e. the higher this cost the slower the rate of convergence.
This signifies that if there is a high cost related to investigating out-of-control signals owing to the
high cost of search and frequency of occurrence, then the control chart design parameters are set
to keep this cost low. That is when N is kept low and H is set high, (1 - [3) is reduced and H / ( I - [3),
the time required to detect an out of control state increases. Hence the number of out of control
states detected and investigated per unit time is reduced. Figure 2 illustrates the same curves
(optimal N and H vs I/2) as that of Fig. 1. In Fig. 2, however, we investigate the senario where
the sampling costs have increased by a factor of 10, i.e. a~ = $10 and a2 = $1. Under these conditions
the behavior of N is unchanged, while the sampling interval H remains at a relatively high value.
The latter can be explained by the high sampling costs.
Figure 3 indicates that increases in the size of the shift from 0.5 a to 5 tr warrants a decrease
in the sample size and an increase in the sampling frequency. The smaller sample size, recommended
for larger process shifts, results in a lower cost of sampling, with the probability of detecting the
shift (1 - f l ) , at an acceptable level. The sampliing frequency increase can be explained by the
objective of limiting the period of operating out of control and its associated losses.
5. C O N C L U S I O N S A N D R E C O M M E N D A T I O N S

In this paper we have embellished Duncan's cost model with the Taguchi loss function. This
embellishment provides a framework for using the Taguchi loss function, which defines losses
owing to the variabilty caused by both chance and assignable causes, for the economic design of
control charts. We have also investigated the behavior of this embellished model through sensitivity
analysis. Our analysis has indicated that the design parameters for the ~-chart are fairly robust
when the cost of finding assignable cause and the frequency of occurrence of an assignable cause
are not too high. The parameters (N and H) do have to be adjusted based on the size of the process
shift that is investigated. Small process shifts require larger values of N and H, while for large shifts
a small N and H are recommended.
REFERENCES
I. C. Ho and K. E. Case. Economic design of control charts: a literature review for 1981-1991. J. Quality Technol. 26,
1-78 (1994).
2. D. C. Montgomery. Economic design of an ~ control chart. J. Quality Technol. 14, 40~,3 (1982).

Taguchi loss function

677

3. J. J. Pignatiello. Optimal economic design of g-control charts when cost model parameters are not precisely known.
HE Trans. 20, 103-1 I0 (1988).
4. G. Tagaras. Economic 'f-charts with asymmetric control limits. J. Quality Technol. 21, 147-154 (1989).
5. E. M. Saniga. Economic statistical control chart designs with an application to "f and R charts. Technometrics 31,
313--320.
6. G. Taguchi, E. A. Elsayed and T. Hsiang. Quality Engineering in Production Systems. McGraw.Hill, New York.
7. B. M. A d a m s and W. H. Woodall. An analysis of Taguchi's on-line process control procedure under a random walk
model. Technometrics. 31,401-413 (1989).
8. A. J. Duncan. The economic design of 'f-charts used to maintain current control of a process. J. Am. statist. Ass. 51,
228 242 (1956).
9. M. Jaraiedi and Z. Zhuana. Determination of optimal design parameters of .f-charts when there is a multiplicity of
assignable causes. J. Quality Technol. 23, 253-258 (1991).
10. T. J. Lorenzen and L. Vance. The economic design ofcontrol charts: a unified approach. Technometrics 28, 3-10 (1986).
11. T. P. McWilliams. Economic control chart designs and the in-control time distribution: a sensitivity study. J. Quality
Technol. 21, 103 110 (1989).
12. D. C. Montgomery. Statistical Quality Control. Wiley, New York (1991).

APPENDIX

Economic Design of Control Charts Using the Taguchi Loss Function


10 R E M P A R A M E T E R SELECTION F O R XBAR C H A R T S
20 CLS
30 I N P U T " F I X E D S A M P L I N G COST PER S U B G R O U P = ";AI
40 I N P U T "'VARIABLE SAMPLE COST PER S A M P L E = ";A2
50 I N P U T "'COST O F F I N D I N G AN A S S I G N A B L E C A U S E = ";A3
60 I N P U T " C O S T O F I N V E S T I G A T I N G A FALSE A L A R M = ";A3P
70 I N P U T " P R O D U C T I O N RATE ( P C S / H R ) = ";P
80 I N P U T " C O S T (SCRAP O R R E W O R K ) F O R A P A R T O U T S I D E S P E C I F I C A T I O N LIMITS = "':A
90 I N P U T " V A R I A N C E O F T H E P R O D U C T = ";VI
100 I N P U T " T O L E R A N C E OF T H E P R O D U C T ( + / - ) = ";TOL
l l0 I N P U T "'MEAN T I M E PROCESS R E M A I N S IN C O N T R O L ( H O U R S ) = " ; L A M D A
120 I N P U T "'TIME TO T A K E A S A M P L E A N D I N T E R P R E T RESULTS (HOURS) = ";G
130 I N P U T " T I M E TO F I N D A N A S S I G N A B L E C A U S E ( H O U R S = ";D
140 I N P U T "SIZE O F T H E SHIFT Y O U WISH TO D E T E C T (ABOVE/BELOW N O M I N A L ) = " ; D E L T A
150 REM LIST O F INPUTS
160 C L S : P R I N T "
P A R A M E T E R SELECTION I N P U T S " : P R I N T : P R I N T
170 P R I N T " I ) F I X E D S A M P L I N G COST PER S U B G R O U P = ";TAB(70):A1
180 P R I N T "2)VARIABLE S A M P L E COST PER SAMPLE = ";TAB(70);A2
190 P R I N T "3)COST O F F I N D I N G AN A S S I G N A B L E C A U S E = ";TAB(70);A3
200 P R I N T "'4)COST O F I N V E S T I G A T I N G A FALSE A L A R M = ";TAB(70);A3P
210 P R I N T "'5)PRODUCTION R A T E ( P C S / H R ) = ";TAB(70);P
220 P R I N T "'6)COST (SCRAP OR R E W O R K ) FOR A P A R T O U T S I D E S P E C I F I C A T I O N
LIMITS = ";TAB(70);A
230 P R I N T " 7 ) V A R I A N C E O F T H E P R O D U C T = ";TAB(70);VI
240 P R I N T "'8)TOLERANCE O F T H E P R O D U C T ( + / - ) = ";TAB(70);TOL
250 P R I N T " 9 ) M E A N T I M E PROCESS R E M A I N S IN C O N T R O L ( H O U R S ) = "';TAB(70);LAMDA
260 P R I N T " I 0 ) T I M E TO T A K E A SAMPLE A N D I N T E R P R E T RESULTS (HOURS) = ";TAB(70);G
270 P R I N T " I I ) T I M E TO F I N D AN A S S I G N A B L E C A U S E ( H O U R S ) = "TAB(70);D
280 P R I N T "I2)SIZE O F T H E S H I F T Y O U WISH TO D E T E C T (ABOVE/BELOW NOMINAL) = "TAB(70);DELTA
290 REM R O U T I N E TO M A K E C H A N G E S
300 P R I N T : P R I N T : P R I N T
310 "'INPUT
IF Y O U WISH TO C H A N G E A V A L U E E N T E R T H E N U M B E R OR E N T E R 99 IF ALL T H E
VALUES ARE CORRECT";E
320 IF E = I G O T O 450
330 IF E = 2 G O T O 470
340 IF E = 3 G O T O 490
350 1F E = 4 G O T O 510
360 IF E = 5 G O T O 530
370 IF E = 6 G O T O 550
380 IF E = 7 G O T O 570
390 IF E = 8 G O T O 590
400 IF E = 9 G O T O 610
410 IF E = l0 G O T O 630
420 IF E = I I G O T O 650
430 1F E = 12 G O T O 670
440 G O T O 690
450 I N P U T "'FIXED S A M P L I N G COST PER S U B G R O U P = ";AI
460 G O T O 160
470 I N P U T " V A R I A B L E SAMPLE COST PER SAMPLE = ";A2
480 G O T O 160
490 I N P U T " C O S T OF F I N D I N G AN A S S I G N A B L E C A U S E = ";A3

678

Suraj M. Alexander et al.

500 GOTO 160


510 INPUT "COST OF INVESTIGATING A FALSE ALARM = ";A3P
520 GOTO 160
530 INPUT "PRODUCTION RATE (PCS/HR)= ";P
540 GOTO 160
550 INPUT "COST (SCRAP OR REWORK) FOR A PART OUTSIDE SPECIFICATION LIMITS = "';A
560 GOTO 160
570 INPUT "VARIANCE OF THE PRODUCT = ";V1
580 GOTO 160
590 INPUT "TOLERANCE OF THE PRODUCT ( + / - ) = ";TOL
600 GOTO 160
610 INPUT "MEAN TIME PROCESS REMAINS IN CONTROL = ";LAMDA
620 GOTO 160
630 INPUT "TIME TO TAKE A SAMPLE AND INTERPRET RESULTS = "';G
640 GOTO 160
650 INPUT "TIME TO FIND AN ASSIGNABLE CAUSE ( H O U R S ) = ";D
660 GOTO 160
670 INPUT "'SIZE OF THE SHIFT YOU WISH TO DETECT (ABOVE/BELOW NOMINAL) = ";DELTA
680 GOTO 160
690 LPRINT:LPRINT:LPRINT
700 LPRINT:LPRINT:LPRINT TAB(15): "VARIABLES AND PARAMETER SELECTION FOR XBAR CHART"
710 LPRINT:LPRINT
720 LPRINT TAB(14); "I)FIXED SAMPLING COST PER SUBGROUP = "';:LPRINT TAB(67)
USING"# # # . # #";AI
730 LPRINT TAB(14); "'2)VARIABLE SAMPLE COST PER SAMPLE";:LPRINT
TAB(67)USING" # # # - # # " ; A 2
740 LPRINT TAB(14); "3)COST OF FINDING AN ASSIGNABLE CAUSE";:LPRINT
TAB(67)USING" # # # # # " ; A 3
750 LPRINT TAB(14); "4)COST OF INVESTIGATING A FALSE ALARM";:LPRINT TAB(67)USING
"46 46 46 # # ";A3P
760 LPRINT TAB(14); "5)PRODUCTION RATE (PCS/HR) ";:LPRINT
TAB(67)USING"# # # # # # " ; P
770 LPRINT TAB(14): "6)COST (SCRAP/REWORK) FOR A PART OUTSIDE SPEC LIMITS = ";:LPRINT
TAB(67) USING " # # # . # # " ; A
780 LPRINT TAB(14); "7)VARIANCE OF THE PRODUCT";:LPRINT
TAB(64)USING " # # # # # # # # " ; V I
790 LPRINT TAB(14); "'8)TOLERANCE OF THE PRODUCT ( + / - ) " ; : L P R I N T TAB(67)USING
"# # # # #";TOL
800 LPRINT TAB(14); "9)MEAN TIME PROCESS REMAINS 1N CONTROL (HOURS) ";:LPRINT
TAB(67)USING " # # # # # ";LAMDA
810 LPRINT TAB(14); "10)TIME TO TAKE A SAMPLE AND INTERPRET RESULTS (HRS) ";:LPRINT
TAB(68)USING '" # 46 46 46";G
820 LPRINT TAB(14); "I I)TIME TO FIND AN ASSIGNABLE CAUSE (HOURS) ";:LPRINT
TAB(69)USING" # # # ";D
830 LPRINT TAB(14); "12)SIZE OF THE SHIFT YOU WISH TO DETECT ( + / - ) ";:LPRINT TAB(67)USING
"# # # # #";DELTA
840 LPRINT:LPRINT
850 LPRINT TAB(19); "N - - SUBGROUP SIZE"
860 LPR1NT TAB(19); "K - - COEFFICIENT TO DETERMINE CONTROL LIMITS"
870 LPRINT TAB(19); "H - - SAMPLING INTERVAL (HOURS)"
880 LPRINT:LPRINT
890 LPR1NT TAB(13); "N"; TAB(24); "K"; TAB(32);"H"; TAB(42);"ALPHA"; TAB(54);"POWER";
TAB(67);"COST"
900 LPRINT T A B ( 1 3 ) ; " - - " ; TAB(23);"---"; T A B ( 3 1 ) ; " - - " ; TAB(42);"- - - " ; TAB(54);"-. - - " ; TAB(67);"-- - '"
910 F O R N = 2 T O
12
920 ECMIN = 9999999!
930 FOR H = .1 to 2 S T E P . I
940 FOR K = 1! to 4! STEP.I
950 REM DETERMINE ALPHA
960 X = - K
970 Y = 2*(K)
980 C = Y/8
99O
S = C/(3"SQR(2"3.14159))*(EXP( - . 5 X ^ 2) + 4*EXP( - . 5 * ( X + Y/8 ^ )2) + 2*EXP( - .5*(X + Y/4) ^ 2) + 4*EXP( -.5*(X
+ 3"Y/8) ^ 2 ) + 2 * E X P ( - . 5 * ( X + Y/2) ^ 2)+ 4*EXP( - . 5 * ( X + 5"Y/8) ^ 2)+ 2*EXP( -.5*(X + 6"Y/8) ^ 2) + 4*EXP(
- .5*(X + 7"Y/8) ^ 2)+ EXP( - .5*(X + Y) ^ 2))
1000 ALPHA = 1 - S
1010 IF ALPHA < 0 THEN ALPHA = 0
1020 LI = A/TOL A 2*V1
1030 V2 = VI + DELTA ^ 2)
1040 L2 = A/TOL A 2"V2
1050 REM DETERMINE (I - BETA)

Taguchi loss function

679

1060 N D E L T A = DELTA/SQR(V I )
1070 TI = N D E L T A * S Q R ( N ) - K
1080 T2 = - N D E L T A * S Q R ( N ) - K
1090 X = - 3 . 5
II00 YI = T I - X
IIIOC=YI/8
1120
SI = C/(3*SQR(2*3.14159))*(EXP( - . 5 X A 2 ) + 4 * E X P ( - . 5 * ( X + YI/8) A 2 ) + 2*EXP( - . 5 * ( X + YI/4) A 2) +4*EXP~
.5*(X + 3"Y1/8) ^ 2 ) + 2 EXP( - . 5 * ( X + YI/2) A 2) + 4 * E X P ( - . 5 * ( X + 5"YI/8) ^ 2)+ 2*EXP( - . 5 * ( X + 6*Y1 ,'8) ^
+ 4*EXP( - . 5 * ( X + 7"Y1/8) A 2 ) + EXP( - . 5 * ( X + Y I ) A 2))
1130 X = - 5
1140 Y 2 = T 2 - X
1150 C2 = Y2,:8
1160
S2 = C2/(3"SQR(2"3.14159))*(EXP(- .5*X A 2) + 4*EXP( - . 5 * ( X + Y2/8) A 2 ) + 2 * E X P ( - .5*(X + Y2/4) ^ 2) +4*EXP(
- .5*(X + 3'Y2/8) A 2) + 2*EXP( - . 5 * ( X + Y2/2) A 2 ) + 4 * E X P ( - . 5 * ( X + 5*Y2/8J 2) + 2*EXP( - . 5 * ( X + 6"Y2.~8) A 2)
+ 4*EXP( - .5*(X + 7"Y2/8) A 2 ) + EXP( - .5*(X + Y2) ^ 2))
1170 RE M BETA IS I-BETA
1180 BETA = S1 + $2
1190

EC = (AI + A2*N)/H + (A3 + A 3 P * A L P H A * L A M D A / H + A*VI*P/TOL A 2 * L A M D A + A*V2*P/TOL ^ 2*(H/BETA


- (H*(.5 - I/L AMDA*H/12)) + G*N + D))/(LAMDA + H/BETA - H*(.5 - H / 1 2 / L A M D A ) + G*N + D)
1200 IF EC > E C M I N T H E N G O T O 1260
1210 E C M I N = EC
1220 HBEST = H
1230 KBEST = K
1240 A L P H A B = A L P H A
1250 BETABEST = BETA
1260 N E X T K
1270 NE XT H
1280 L P R I N T TAB(14) U S I N G " # # " ; N ; : L P R I N T TAB(23) U S I N G "' # # " ; K B ES T; : LP R IN T TAB(31) USING
" # # "';HBEST;:LPRINT TAB(41) USING '" # # # # # ";ALPHAB;:LPR1NT TAB(54) U S IN G
'" # # # # # ";BETABEST;:LPRINT TAB(65) USING " # # # # # # ';ECMIN
1290 N E X T N
1300 L P R I N T C H R $ 0 2 )
1310 I N P U T "make a change and run again (Y/N)?";N$
1320 IF N$ = " Y " GOTO 160

Vous aimerez peut-être aussi