2.5.1. Work of Error and Integrated Squared Error

The controller of the injection-molding machine records the injection speed and the pressure time resolved transient data during the process for every consecutive cycle. In theory, the controller and the responses of an optimized process should be the same; however, in real world conditions, the machine's controller, the components of the machine, and the material can have different behavior. For example, all operations include a level of uncertainty and interference from external conditions. As such, the recorded signals in every consequent cycle of the process can deviate from the reference cycle. This deviation describes the alignment error from each consequent cycle signal to the reference signal by Equation (6).

$$\boldsymbol{\varepsilon}(\mathbf{t}) = \mathbf{y}\_0(\mathbf{t}) - \mathbf{y}\_i(\mathbf{t}) \tag{6}$$

$$\text{Er}\_{\text{work}} = \int \varepsilon(\mathbf{t})d\mathbf{t} \tag{7}$$

$$\text{ISE} = \int \varepsilon(\mathbf{t})^2 \mathbf{d}\mathbf{t} \tag{8}$$

where: ε(t) the alignment error for time instance t, y0 the reference signal, yi any cycle signal, and i = 1, 2, . . . , N cycles.

The alignment error, though computed by Equation (6), is still a time series that consists of the amplitude difference of two signals for the time instances t, where t = 0, 1, 2, ... , 11 s. However, although the ε(t) time resolved data contain valuable information, it is challenging to use. As such, the work of error (Erwork) and the integrated squared error (ISE) [22] as described in Equations (7) and (8), respectively, are used to extract the information as one single value for every signal associated with the deviation of each processing cycle with respect to the reference cycle. The performance of the alignment error and the ISE as a quality indicator in consequence will be discussed in a following section of the paper.

## 2.5.2. Shift Error

Another quality indicator is the "Shift error" or "Shift" that originates from the cross correlation of the input signals to the reference signal in every DOE run in the conducted experiment. Cross correlation in discrete time series/signals y0(t) and yi(t) is described by Equation (9) [23].

$$\text{Shift}\_{\mathbf{y}\_0, \mathbf{y}\_i}(\mathbf{l}) = \sum\_{\mathbf{t} = -\infty}^{\infty} \mathbf{y}\_0(\mathbf{t}) \mathbf{y}\_i(\mathbf{t} - \mathbf{l}) \tag{9}$$

where l is the lag of signal yi (i = 1, 2, ... , N) in association to the reference signal y0. Cross-correlation measures the similarity between a reference y0 and shifted (lagged) copies of y as a function of the lag as illustrated in Figure 8. The "Shift" error can be used as a QI and will be discussed further in Section 3.3.1. An example of cross correlation alignment from experimental Run 1 is provided in Figure 9.

**Figure 9.** Signals of injection speed and pressure from part cycles 1, 5, and 10 of Run-1 before (**top**) and after cross correlation alignment (**bottom**).

#### 2.5.3. Work Deviation

The work deviation of any consequent signal to the reference one as described in Equation (10), is an alternative QI that is used to describe similarity of any signal to the reference. A graphical representation of "WorkDev" is provided in Figure 10.

$$\text{WorkDev} = \text{W}\_0 - \text{W}\_i = \int \mathbf{y}\_0(\mathbf{t}) \mathbf{dt} - \int \mathbf{y}\_i(\mathbf{t}) \mathbf{dt} \tag{10}$$

where: i = 1, 2, 3, . . . , N cycles.

**Figure 10.** Representation of work deviation, given by the non-intersecting area of signals y0(t) and yi(t).

The compatibility of the "WorkDev" QI will be discussed in Section 3.3.1 and compared with the previously introduced QIs and the dynamic time warping (see next section).

#### 2.5.4. Dynamic Time Warping

Dynamic time warping (DTW) is an algorithm that has found use in applications such as acoustics and seismic motion fields, where the alignment of a pair of time series or sequences is required [24]. The algorithm considers time series data of unequal size and it is used to compute the warping distance between two different time series or signals. The warping distance of vectors yi to the reference vector y0 is defined as the minimum distance from the beginning of the DTW table to the current position (k, j). Based on the dynamic programming (DP) algorithm [25] the DTW table can be calculated as follows [26] in Equation (11):

$$\text{WarpDis}:\ \mathcal{D}(\mathbf{k},\mathbf{j}) = \mathbf{d}(\mathbf{k},\mathbf{j}) + \min \begin{cases} \ \mathcal{D}(\mathbf{k}-1,\mathbf{j})\\ \ \mathcal{D}(\mathbf{k},\mathbf{j}-1)\\ \ \mathcal{D}(\mathbf{k}-1,\mathbf{j}-1) \end{cases} \tag{11}$$

where D(i, j) is the node cost connected to points yi(k) and y0(j) of the input and reference signals y0 and yi and is calculated with the use of L2-norm in Equation (12).

$$\mathbf{d}(\mathbf{k}, \mathbf{j}) = \sqrt{\left(\mathbf{y}\_i(\mathbf{k}) - \mathbf{y}\_0(\mathbf{j})\right)^2} \tag{12}$$

The warping distance ("WarpDis") is the minimum Euclidean distance in the warping DTW table. For the purposes of this work, the single dimension DTW algorithm was used to align each consecutive signal to a reference signal. The algorithm stretches the two vectors y0 and yi, onto a common set of instances such that the warping distance "WarpDis", the sum of Euclidean distances between corresponding points yi(k) and y0(j), is minimized. To properly match the input and reference signals, the algorithm repeats each element of vectors yi and y0 as many times as necessary resulting in two signals yi\* and y0\* of equal size, as illustrated in Figure 11. As such, the warping distance "WarpDis" can be used as a QI.

**Figure 11.** Alignment of original (**top**) and cross-correlated (**bottom**) signals of injection speed and pressure of Run 1 and part c ycles 1, 5, and 10 using dynamic time warping (DTW).

To ensure the validity of the previously introduced QIs, the QI values were not directly comparable to the dimensional measurements of the micro-feature on the collected samples, and the data were standardized using Equation (12).

$$\text{Zscore} = \frac{\mathbf{x} - \mu}{\sigma} \tag{13}$$

where, "x" is the xth observation, "μ" the mean value of all observations, and "σ" the standard deviation of all observations per treatment.

Apart from the "process fingerprint" candidates originated from the deviation of both the transient injection pressure and injection speed signals to the respective reference signals, two more "process fingerprint" candidates were calculated from each signal. Those candidates belong to the second type of quality indicators and were the signal integrals and signal powers as described below.
