Statistical Process Control Using Control Charts with Variable Parameters

: An extremely important issue in quality management is monitoring and diagnosing processes, and, subsequently, supervising them using so-called control charts. In typical production processes, charts with constant parameters are commonly used, such as x-R, x-s, CUSUM, EWMA and others, which, in most cases, are effective tools for process stability evaluation. Charts considered untypical (in statistical process control) are those with variable sample sizes, variable sampling intervals and/or variable control limits. Such charts are used when process analysis based on standard, well-known charts may lead to serious errors. Modern control charts are a response to the requirements of Industry 4.0 and are an excellent tool for supervising production processes. Their use together with Cp and Cpk indices and other process capability indices is a starting point for process improvement. The methodology of nonstandard charts is inadequately recognized and rarely used in practice. The theory of their design and examples of their use will be presented and characterized in this paper.


Introduction
A very important problem in quality management is to monitor and diagnose processes, that is, to supervise them using so-called control charts.For typical production processes, commonly used control charts of constant parameters are, for example, x-R, x-s, CUSUM, EWMA and others, which in most situations are effective tools for process stability evaluation [1][2][3].
Quality engineering is a science based on a process and system approach, which, apart from being oriented towards the customer, includes basic quality management rules.Every enterprise is a specific system of interconnected areas and activities (processes) creating a compact logical entity.A process is an activity, or a set of activities, defined in an instruction or procedure, transforming the entry state (input factors) into the final state (output factors), including a feedback loop consisting of control variables that allow us to correct the process.Disturbances influence the process negatively.They may be random (so-called natural process variability or "noise") or systematic, which are usually possible to remove by changing the values of process control variables.
A very important aspect in the area of SPC is technological process stability and process capability analysis, as well as process supervision (monitoring, diagnosing and regulation) with control charts and capability indices.These very convenient tools are widely used today; nevertheless, when selecting a particular chart or factor type, many errors are made.Nowadays, it is not enough to use the simplest chart types.Technological process capability and very high process accuracy often demand the use of more sophisticated tools, such as new-generation control charts or dynamic charts (adaptive charts).They take into account variable process conditions and adapt to them by changing collected sample sizes, sampling periods or control limit locations.and asymmetric (so, variable as well) control limits.These three kinds of charts will be described in the next three sections.The architecture of a control chart with a variable number of samples is based on the following rule: Let us assume that in constant time intervals samples of constant quantity n 0 are collected.Two additional quantities n 1 and n 2 are then determined, of which the first one is smaller than n 0 and the second one is greater.On the control chart, two additional lines are then plotted: upper and lower threshold lines, also called warning limits (UWL and LWL-upper warning limit and lower warning limit).If the point is located between the threshold lines, the next sample is collected from quantity n 1 , and in case of a point location beyond the threshold line, but still within the control limits, a sample of quantity n 2 is collected.Such a procedure is the result of process-stability-level analysis.If the process is stable, research may be done with a larger estimation error, that is, with a smaller number of measurements.If the process shows larger changes of mean level in relation to mean target value, then the estimation error should be cut down, which results in the collection of samples of larger quantity.Control limits of the chart change their location according to the quantity of currently collected samples and adapt to their level, which is a function of the current value of diagnosed property, the variability distribution of which does not have to be normal [17].

Control Charts with Variable Sampling Periods
Nowadays, the following names of control charts based on sampling periods are accepted: FSI-fixed sampling intervals; VSI-variable sampling intervals.
In the traditional approach, a control chart is created based on samples collected in constant, predetermined time periods.For today's production processes, such a type of control is not sufficient.Therefore, the use of a variable sample collection period is reasonable.If points on the control chart are approaching intervention limits, it might be that subsequent points will step out beyond control limits, displaying the range of natural process variability.It is important to quickly detect changes in the process and take another sample instead of waiting for another sample from the normal round.If points move close to the central line, the use of a longer sample collection period than the standard one may be favorable.
Summarizing, the proposed control process is based on the determination of the time period for the next sample collection depending on current sample values.The time period will be shorter if the process is supposed to be out of control, and longer if such supposition is absent.Issues around the determination of a sampling schedule with variable intervals were considered by researchers whose works are grouped in the literature [11][12][13].The problem discussed in this article relates to a complex and multi-step technological process [18][19][20][21][22][23].
Let us assume that the control chart with a variable sampling interval uses a finite number of time intervals d 1 , d 2 , . .., d n (Figure 1 Figure 1 presents the principle and architecture of a variable sampling interval control chart.On the chart, two frequency ranges are marked: I1 (Equation (1)) and I2 (Equation (2)), for two used time intervals between sample collecting d1 and d2.Time intervals are determined as follows (Figure 1): (1) Figure 1 presents the principle and architecture of a variable sampling interval control chart.On the chart, two frequency ranges are marked: I 1 (Equation (1)) and I 2 (Equation ( 2)), for two used time intervals between sample collecting d 1 and d 2 .Time intervals are determined as follows (Figure 1): where: µ-process mean (average of all measurement results), µ 0 -process expected value (e.g., the middle of the dimension tolerance range), σ-process standard deviation, n-sample size, γ, γ -standard deviation multiplications.Let us assume that for the chart, γ = 3 and γ' = 1.Then µ = µ 0 , P(x ∈ I 1 ) = 0.3146 and P(x∈ I 2 ) = 0.6827, which imply that the longer interval was used about two times more often than the shorter one.If we assume that µ moves to µ 1 = µ 0 + 2σ/ √ n, and that in such a case P(x ∈ I 1 ) = 0.6840 and P(x ∈ I 2 ) = 0.1573, then the shorter interval will be used more often than the longer one.When the shorter interval is used during changes, the frequency of sampling is increased and the time required to obtain samples beyond limit values (to determine through the signal that the process is out of control) is significantly shorter.
In Figure 1, mean sample values are presented in relation to sample number.In practice, it would be necessary to note sample collection times, because constant distances between points on the chart hide the fact that time intervals between points are not equal.For example, the interval between points 1 and 2 is d 2 , and between points 2 and 3 is d 1 .The alternative way to build the charts would be to present time on the horizontal axis.However, this would be disadvantageous in the case of significant time differences between subsequent sample collections, because wide empty areas would appear on the control chart that would spoil plot readability and its interpretation possibilities.

Properties of Variable Sampling Interval Charts
The property of a control chart is the time required for the occurrence of the signal indicating that the process is out of control.If the process is stable (it runs within warning limits), then the time between the collection of subsequent samples should be longer, which at the same time implies a smaller number of false alerts; however, if changes to the process mean values are significant, then the time interval between sample collections should be shortened to increase the probability of quick detection of process destabilization.
The number of samples collected until signal occurrence is known as the average run length (ARL).For a constant sampling interval, the ARL may be easily changed to signal occurrence expected time by multiplication of the currently collected number of samples and the determined interval.Moreover, sampling speed will be constant independently of the process mean.But for a chart with a variable sampling interval, time to signal occurrence is not a simple product of sample numbers and the time interval between them, and sampling speed depends on the dynamics of alternation.Therefore, on variable sampling interval charts, there should be traces of both the number of samples until signal occurrence and the time between them.
Below is a comparative analysis of a constant sampling interval control chart and a variable sampling interval control chart.To achieve this, a program in the MatLab environment (which operates both chart types) was elaborated [14].The program plots control chart x and R. Calculations performed by using charts are based on the algorithm presented in [12] and on the authors' experiences.Because of the large complexity of the calculations, they will not be presented in this paper.The program allows the user to set parameters manually on his own.Their variability will be used in the comparative analysis of these two charts.The values of control limits and mean sample values are calculated automatically based on historical data.
The main comparative criterion in the program is the number of samples and time spent till occurrence of the signal that the process is out of control.To increase effectiveness of the charts' work, rules describing specific configurations of point locations regarded as the signal that the process is out of control on charts were implemented in the program.Detailed rule descriptions are presented in the author's work [24].The user can select rules to control the process.

Process Analysis
The main criterion for the effectiveness assessment of a certain chart is the number of samples and time that passed until the occurrence of the signal that the process is out of control.For FSI charts, samples are collected from the production process (for example) every 15 produced units (workpieces), and for VSI charts, the following numbers of time intervals were used: Traditionally accepted definitions of areas between control limits of the control chart are presented in Figure 2 [15,24].
Below is a comparative analysis of a constant sampling interval control chart and a variable sampling interval control chart.To achieve this, a program in the MatLab environment (which operates both chart types) was elaborated [14].The program plots control chart x and R. Calculations performed by using charts are based on the algorithm presented in [12] and on the authors' experiences.Because of the large complexity of the calculations, they will not be presented in this paper.The program allows the user to set parameters manually on his own.Their variability will be used in the comparative analysis of these two charts.The values of control limits and mean sample values are calculated automatically based on historical data.
The main comparative criterion in the program is the number of samples and time spent till occurrence of the signal that the process is out of control.To increase effectiveness of the charts' work, rules describing specific configurations of point locations regarded as the signal that the process is out of control on charts were implemented in the program.Detailed rule descriptions are presented in the author's work [24].The user can select rules to control the process.

Process Analysis
The main criterion for the effectiveness assessment of a certain chart is the number of samples and time that passed until the occurrence of the signal that the process is out of control.For FSI charts, samples are collected from the production process (for example) every 15 produced units (workpieces), and for VSI charts, the following numbers of time intervals were used: Traditionally accepted definitions of areas between control limits of the control chart are presented in Figure 2 [15,24].A production process has been analyzed and its first 60 measurement results are presented in Table 1.The particular production process is not defined, because this is not the essence of the chart effectiveness comparison.Process capability in relation to tolerance limits is also not analyzed.The analyzed subject is process stability in relation to chart control limits, because this is the focus of this paper.Sample size was n = 5.The moment when the process gets out of control was simulated in the program, and it was tested how effectively this will be detected by both types of charts, that is, after how much time and after what number of samples.The analysis results are presented in Table 2, and mean value control charts for the different number of time intervals are presented in Figures 3-5.As can be seen from Table 2, the VSI chart is more effective with two and three time intervals in terms of the number of collected samples when compared with the FSI chart.
The next stage of analysis was devoted to testing the influence of the different sizes of the VSI chart time intervals on detection of the moment when the process gets out of control.Two time intervals, d1 and d2, were used.The calculation results are presented in Table 3, and examples of control charts for certain time intervals are presented in Figures 6 and 7.As can be seen from Table 2, the VSI chart is more effective with two and three time intervals in terms of the number of collected samples when compared with the FSI chart.
The next stage of analysis was devoted to testing the influence of the different sizes of the VSI chart time intervals on detection of the moment when the process gets out of control.Two time intervals, d 1 and d 2 , were used.The calculation results are presented in Table 3, and examples of control charts for certain time intervals are presented in Figures 6 and 7.As can be seen in Table 3, the VSI chart proved to be the most effective for time intervals d1= 5 and d2 = 15.
In the subsequent step, the influence of different sizes of time intervals on chart effectiveness was tested.The best results for x charts were obtained for time interval  As can be seen in Table 3, the VSI chart proved to be the most effective for time intervals d1= 5 and d2 = 15.
In the subsequent step, the influence of different sizes of time intervals on chart effectiveness was tested.The best results for x charts were obtained for time interval As can be seen in Table 3, the VSI chart proved to be the most effective for time intervals d 1 = 5 and d 2 = 15.
In the subsequent step, the influence of different sizes of time intervals on chart effectiveness was tested.The best results for x charts were obtained for time interval relations 1:3 (Figure 6).It may be noticed that too large a difference caused aggravation of the results.It is presented in            From the presented research, it may be concluded that the VSI chart is more effective than the FSI chart.In the first step, the influence of the number of intervals on chart effectiveness was tested.It can be noticed that too large a number of intervals causes an increase of time till signal occurrence.The study also showed that the most effective results may be obtained using two time intervals with a significant difference between sampling intervals.Too large a number of time intervals did not improve chart effectiveness, but only increased the number of collected samples, which is unfavorable because of the cost of the measurements taken.Before using variable sampling intervals, precise process analysis should be performed to select parameters properly.Results show how important precise adjustment of time intervals is.
During the research, rules for the process getting out of control were used.This increases the effectiveness of both types of charts.In the case of an absence of rules, variable interval charts are less effective than constant interval charts.This part of the research is not presented due to the limited length of the paper.

Control charts with variable control limits
During process control, the risk of two types of error should be considered:  Error of the first type α, which means that a false alert occurs although the process was not out of control,  Error of the second type β, which means that an alert does not occur although the process was out of control.
The control charts with asymmetrical control limits are used to increase the probability of detection if the process is out of control under the condition that the first error coefficient α has a constant value.
In traditional control charts, it is assumed that the probability of shifts of means from process samples is the same towards positive as towards negative values, which causes acceptance of symmetrical control limits.This assumption is not always correct.In production practice, there are often situations where the process runs closer to one of the control limits, although no systematic process shift influence was detected.In such cases, the use of symmetrical limits may cause a lack of detection of the signal that the process is out of control or an increase in the number of false alerts.From the presented research, it may be concluded that the VSI chart is more effective than the FSI chart.In the first step, the influence of the number of intervals on chart effectiveness was tested.It can be noticed that too large a number of intervals causes an increase of time till signal occurrence.The study also showed that the most effective results may be obtained using two time intervals with a significant difference between sampling intervals.Too large a number of time intervals did not improve chart effectiveness, but only increased the number of collected samples, which is unfavorable because of the cost of the measurements taken.Before using variable sampling intervals, precise process analysis should be performed to select parameters properly.Results show how important precise adjustment of time intervals is.
During the research, rules for the process getting out of control were used.This increases the effectiveness of both types of charts.In the case of an absence of rules, variable interval charts are less effective than constant interval charts.This part of the research is not presented due to the limited length of the paper.

Control charts with variable control limits
During process control, the risk of two types of error should be considered: • Error of the first type α, which means that a false alert occurs although the process was not out of control,

•
Error of the second type β, which means that an alert does not occur although the process was out of control.
The control charts with asymmetrical control limits are used to increase the probability of detection if the process is out of control under the condition that the first error coefficient α has a constant value.
In traditional control charts, it is assumed that the probability of shifts of means from process samples is the same towards positive as towards negative values, which causes acceptance of symmetrical control limits.This assumption is not always correct.In production practice, there are often situations where the process runs closer to one of the control limits, although no systematic process shift influence was detected.In such cases, the use of symmetrical limits may cause a lack of detection the signal that the process is out of control or an increase in the number of false alerts.
The essence of control charts with asymmetrical limits is adaptation of the control line location to characteristic process asymmetry.For example, if the frequency of the mean shift towards the lower line is bigger than towards the upper line (Figure 12), then we should expect more false alerts below the lower line.In such a case, the upper control limit is "tightened", that is, moved closer to the central line.As a result, the ability to detect false alerts is the same for both control limits, with the constant value of the first type error, α, maintained.

Example of optimization of control limits for the process of shaft grinding.
The process of shaft grinding with the specification of 25 ± 0.02 monitored using the x -s control chart was analyzed.
Shaft measurement results are grouped in Table 4.For the test, 10 samples were collected (k = 10) with the quantity of 10 (n = 10).Table 5 presents the values of means and standard deviations.
The x control chart is presented in Figure 12 and the standard deviation chart in Example of optimization of control limits for the process of shaft grinding.
The process of shaft grinding with the specification of 25 ± 0.02 monitored using the x-s control chart was analyzed.
Shaft measurement results are grouped in Table 4.For the test, 10 samples were collected (k = 10) with the quantity of 10 (n = 10).Table 5 presents the values of means and standard deviations.The mean value of means was: The x control chart is presented in Figure 12 and the standard deviation chart in Figure 13.As shown in Figures 12 and 13, points are located close to the central line between the accepted control limits, as well as on the mean chart and on the standard deviation chart.In the case of the mean chart, the number of points located below the central line is bigger than the number of points above the central line, and in the case of the standard deviation chart, this relationship is opposite-the number of points above the central line is bigger than below.In such situations, to control the process properly, optimization of limit locations should be performed.To do this, the algorithm for mean chart optimization described in [21] was used.Its main criterion is to detect false alerts with equal probability for both control limits, while maintaining the constant value of the first type error α.
In Figure 14, a chart after setting a new limit location is presented, which takes into account process specificity.According to [16,[25][26][27][28][29][30][31][32], charts with a modified limit location are almost three times more effective in the detection of the signal that the process is getting out of control than traditional Shewhart charts.

Conclusions
The presented research proved that the use of nonstandard control charts is necessary in many production processes.The use of standard tools such as Shewhart control charts is effective in cases when the process is not influenced by undetectable and unrecognized factors.Process complexity and dynamic process flow circumstances require a reflection of the variability of their parameters such as sample size, collection time intervals and location of control limits on charts.In cases when processes do not flow in a typical way, more sophisticated techniques and tools should be used to protect from false and misleading result interpretations.Nowadays, various types of control charts are used in production practice.They are often chosen improperly and misinterpreted, and so, the aim of further work of the authors will be to design one versatile control chart of a dynamic type that takes process specificity into account, and to facilitate its supervision.As shown in Figures 12 and 13, all points are located close to the central line between the accepted control limits, as well as on the mean chart and on the standard deviation chart.In the case of the mean chart, the number of points located below the central line is bigger than the number of points above the central line, and in the case of the standard deviation chart, this relationship is opposite-the number of points above the central line is bigger than below.In such situations, to control the process properly, optimization of limit locations should be performed.To do this, the algorithm for mean chart optimization described in [21] was used.Its main criterion is to detect false alerts with equal probability for both control limits, while maintaining the constant value of the first type error α.
In Figure 14, a chart after setting a new limit location is presented, which takes into account process specificity.According to [16,[25][26][27][28][29][30][31][32], charts with a modified limit location are almost three times more effective in the detection of the signal that the process is getting out of control than traditional Shewhart charts.As shown in Figures 12 and 13, all points are located close to the central line between the accepted control limits, as well as on the mean chart and on the standard deviation chart.In the case of the mean chart, the number of points located below the central line is bigger than the number of points above the central line, and in the case of the standard deviation chart, this relationship is opposite-the number of points above the central line is bigger than below.In such situations, to control the process properly, optimization of limit locations should be performed.To do this, the algorithm for mean chart optimization described in [21] was used.Its main criterion is to detect false alerts with equal probability for both control limits, while maintaining the constant value of the first type error α.
In Figure 14, a chart after setting a new limit location is presented, which takes into account process specificity.According to [16,[25][26][27][28][29][30][31][32], charts with a modified limit location are almost three times more effective in the detection of the signal that the process is getting out of control than traditional Shewhart charts.

Conclusions
The presented research proved that the use of nonstandard control charts is necessary in many production processes.The use of standard tools such as Shewhart control charts is effective in cases when the process is not influenced by undetectable and unrecognized factors.Process complexity and dynamic process flow circumstances require a reflection of the variability of their parameters such as sample size, collection time intervals and location of control limits on charts.In cases when processes do not flow in a typical way, more sophisticated techniques and tools should be used to protect from false and misleading result interpretations.Nowadays, various types of control charts are used in production practice.They are often chosen improperly and misinterpreted, and so, the aim of further work of the authors will be to design one versatile control chart of a dynamic type that takes process specificity into account, and to facilitate its supervision.

Conclusions
The presented research proved that the use of nonstandard control charts is necessary in many production processes.The use of standard tools such as Shewhart control charts is effective in cases when the process is not influenced by undetectable and unrecognized factors.Process complexity and dynamic process flow circumstances require a reflection of the variability of their parameters such as sample size, collection time intervals and location of control limits on charts.In cases when processes do not flow in a typical way, more sophisticated techniques and tools should be used to protect from false and misleading result interpretations.Nowadays, various types of control charts are used in production practice.They are often chosen improperly and misinterpreted, and so, the aim of further work of the authors will be to design one versatile control chart of a dynamic type that takes process specificity into account, and to facilitate its supervision.

13 Figure 1 .
Figure 1.x control chart scheme with variable sampling intervals (source: based on [12]); N- sample number, ordinate axis-mean values of the samples, x -mean value of the sample.
Figure 1.x control chart scheme with variable sampling intervals (source: based on [12]); N-sample number, ordinate axis-mean values of the samples, x-mean value of the sample.
when points plotted on the chart are close to UCL or LCL, • d 2 = 5, when points are in the A area of the chart, • d 3 = 10, when points are in the B area of the chart, • d 4 = 15, when points are in the C area of the chart.
when points plotted on the chart are close to UCL or LCL,  d2 = 5, when points are in the A area of the chart,  d3 = 10, when points are in the B area of the chart,  d4 = 15, when points are in the C area of the chart.

Figure 2 .Figure 2 .
Figure 2. Definitions of areas between control limits of the chart.

Figure 4 .
Figure 4. x control chart with variable sampling interval for two time intervals (VSI).

Figure 4 .
Figure 4. x control chart with variable sampling interval for two time intervals (VSI).Figure 4. x control chart with variable sampling interval for two time intervals (VSI).

Figure 4 . 13 Figure 5 .
Figure 4. x control chart with variable sampling interval for two time intervals (VSI).Figure 4. x control chart with variable sampling interval for two time intervals (VSI).2023, 11, x FOR PEER REVIEW 7 of 13

al
Size for Chart VSI in.] d2 [min.]Number of Samples Till Signal Occurrence Time Passed Till Signal Occurrence [min.]

Figure 5 .
Figure 5. x control chart with variable sampling interval for four time intervals (VSI).
how chart effectiveness changed depending on the difference of time intervals.Processes 2023, 11, x FOR PEER REVIEW 8 of 13 relations 1:3 (Figure 6).It may be noticed that too large a difference caused aggravation of the results.It is presented in Figures 8-11 how chart effectiveness changed depending on the difference of time intervals.

Figure 8 .
Figure 8. Plot of the number of samples till the moment of signal occurrence as a function of the accepted number of time intervals.

Figure 9 .
Figure 9. Plot of time elapsed till the moment of signal detection in the function of the number of time intervals.

Figure 8 .
Figure 8. Plot of the number of samples till the moment of signal occurrence as a function of the accepted number of time intervals.

Figure 8 .
Figure 8. Plot of the number of samples till the moment of signal occurrence as a function of the accepted number of time intervals.

Figure 9 .
Figure 9. Plot of time elapsed till the moment of signal detection in the function of the number of time intervals.

Figure 9 .
Figure 9. Plot of time elapsed till the moment of signal detection in the function of the number of time intervals.

Figure 9 .
Figure 9. Plot of time elapsed till the moment of signal detection in the function of the number of time intervals.

Figure 10 .
Figure 10.Plot of the relation between the number of collected samples till signal occurrence and the size of time intervals.

Figure 10 . 13 Figure 11 .
Figure 10.Plot of the relation between the number of collected samples till signal occurrence and the size of time intervals.Processes 2023, 11, x FOR PEER REVIEW 9 of 13

Figure 11 .
Figure 11.Plot of the relation between time till signal occurrence and the difference in sizes of time intervals.

Processes 2023 , 13 Figure 12 .
Figure 12.Plot of mean values x for the process of shaft grinding.

Figure 12 .
Figure 12.Plot of mean values x for the process of shaft grinding.

Processes 2023 , 13 Figure 13 .
Figure 13.Chart of standard deviations in the process of shaft grinding.

Figure 14 .
Figure 14.Plot of mean sample values x in the shaft grinding process after setting new control limits.

Figure 13 .
Figure 13.Chart of standard deviations in the process of shaft grinding.

Processes 2023 , 13 Figure 13 .
Figure 13.Chart of standard deviations in the process of shaft grinding.

Figure 14 .
Figure 14.Plot of mean sample values x in the shaft grinding process after setting new control limits.

Figure 14 .
Figure 14.Plot of mean sample values x in the shaft grinding process after setting new control limits.

Table 1 .
First 60 measurement results used for process assessment (in millimeters).

Table 2 .
Measurement results for x chart for a different number of time intervals.

Table 2 .
Measurement results for X chart for a different number of time intervals.

Table 2 .
Measurement results for X chart for a different number of time intervals.

Table 3 .
Measurement results for x control chart for different sizes of time intervals.

Table 3 .
Measurement results for x control chart for different sizes of time intervals.

Table 5 .
Mean value x and standard deviation s in the shaft machining process.

Table 4 .
Measurement results for a series of 100 ground shafts.

Table 5 .
Mean value x and standard deviation s in the shaft machining process.