# Statistical Process Monitoring Using On-Machine Sensing

One possible aim of an on-machine monitoring tool consists of signalling a change in the process that is not caused by its natural variability and its natural underlying dynamics. This entails the need for an automated alarm rule to identify the onset of a defect, an unstable process condition or any departure from the in-control pattern of measured variables. The simplest, but also less robust and effective, approach consists of setting heuristic thresholds for each monitored variable in order to signal an alarm whenever a threshold violation is recorded. This is commonly carried out in industrial practice, where the operator is asked to set one, or more, thresholds depending on his/her knowledge of the process. The use of heuristic thresholds can be a cumbersome activity and can produce detrimental effects (increases in the false positive and false negatives rates), especially when moving to multivariate settings, where hundreds of features have to be monitored with time. The detrimental effect of false positives (false alarms) is especially evident when in-process monitoring is assumed.

Statistical process monitoring (SPM), also known in the literature as *statistical process control* (SPC), is a consolidated framework for the design for process monitoring solutions that rely on the characterisation of the natural variability of the (multiple) variables of interest. Section 13.6.1 first introduces the basic principles of SPM. Section 13.6.2 then presents some examples of SPM methods applied to on-machine gathered data in PBF processes. For a more exhaustive and general introduction to SPM and SPC, see Montgomery (2009).

## Basic Principles of SPM

### False Alarms and False Negatives: Type I and Type II Errors

Any type of process, including an AM process, can be labelled as *in statistical control* or simply *in-control* when it is operating with only random causes of variation present, where random causes are inherently part of the process itself (Montgomery 2009). Sources of variability that are not part of the random causes are referred to as *assignable* causes of variation, which include onsets of defects, process errors and process unstable conditions. A process that is operating is the presence of assignable causes is labelled as *out-of-control.*

An SPM problem can be regarded as a statistical hypothesis testing problem that is sequentially repeated over time as new observations become available. In the SPM framework, a null hypothesis and an alternative hypothesis are defined as follows:

*H _{0}:* process is in-control (null hypothesis);

*Hp* process is out-of-control (alternative hypothesis).

The aim of an SPM method is to properly identify whether the null hypothesis *H _{0}* should be rejected or not, based on available data. Therefore, two errors need to be defined: Type I error a, also called

*false alarm or false positive*rate; and Type II error (.), also called

*false negative*rate. These two errors are defined as follows:

*
*

Type I error is the probability of signalling an alarm, i.e. rejecting the in-control hypothesis, when the process is actually in-control. Type II error is the probability of signalling no alarm, i.e. failing to reject the in-control hypothesis when the process is out-of-control.

As in traditional hypothesis testing, Type I error is a design parameter, whereas a Type II error curve is drawn by computing the Type II error as a function of the 'magnitude' of the shift from the in-control state, to determine the performance of the monitoring procedure.

The statistical instruments used to detect process shifts are called *control charts* (see Section 13.6.1.2). Although control charts are used in traditional quality control applications (Montgomery 2009), where the quality characteristics of interest are usually measured on the product rather than on the process features, they represent general-purpose tools that can also be applied to on-machine monitoring applications (Colosimo 2018, Colosimo et al. 2018).