1 Introduction

Food safety regulations require the hygienic production of all food. This is to be ensured, among others, by hygiene, quality control and hazard analysis [2]. Cleaning of machinery in the food industry is crucial to meet hygienic requirements [3, 4]. Automated cleaning in place (CIP) systems are used to remove (i) physical, (ii) chemical and (iii) (micro)biological hazards reproducibly from food contact surfaces. To guarantee food safety most cleaning systems are designed according to worst-case scenarios and follow fixed and oversized cleaning protocols [5,6,7,8]. This contrasts with the general aim to reduce cleaning time and the use of resources [9]. Methods and knowledge regarding quantitative prediction of cleaning processes could help to avoid high production costs caused by cleaning [10] Therefore, suitable sensors are required to monitor the soiling status in production lines during cleaning [8, 11].

Different methods are available for monitoring of cleaning processes, including optical methods [12,13,14] ultrasound [15], vibration [15, 16], heat transfer [17] or pressure drop [18,19,20]. In practice, these methods are often either hard to integrate in situ, not sensitive enough, allow only indirect conclusions on the soiling status or influence the product e.g., by generating heat [1, 20, 21].

Quartz crystal microbalances (QCM) were examined for possible monitoring applications of cleaning processes. The use of QCM to analyze thin layers based on the principle of the inverse piezoelectric effect is widely established in various physical, biological, or chemical applications [22,23,24,25]. A shear vibration can be induced into a quartz with a suitable crystallographic orientation (transverse or longitudinal) by applying a high-frequency AC voltage. Any material touching the quartz surface mechanically influences this vibration leading to measurable changes in the oscillation behavior, such as resonance frequency and oscillation amplitude. Depending on the properties of the added layer its mass can be calculated out of the signal deviation with a very high sensitivity [23, 26, 27].

Current publications on the state of the art of QCM include technical solutions for specific laboratory but also industrial use cases, such as controlling deposition processes of thin, rigid layers (sputtering, vapor phase deposition, etc.) [28] or measuring rheological properties of crude oil and lubricants[29]. Olesen et al. [30] used QCM to monitor thin, greasy, and non-swellable soiling layers to characterize different cleaning detergents within a laboratory setup. Jüschke et al. and Koch et al. [31, 32] measured the cavitation intensity in ultrasonic baths by detecting the removal of rigid particles from the QCM surface while submerged in the cleaning fluid. Also in heat exchangers, QCM are used to measure the slow deposition of aluminum trihydroxide scale particles [33].

The cited applications have in common that they are used for rigid or non-swellable soiling layers, which do not change their viscous properties significantly during cleaning. Therefore, they can be detected well by analyzing the resonance frequency.

However, cleaning processes in food industry usually use cleaning agents that promote swelling and thus the weakening and removal of soil layers [34]. Murcek et al. [1] showed the general feasibility of QCM for inline detection and quantification of the removal of swellable layers, using the example of starch. The study revealed an influence of the cleaning fluid and its temperature while the sensor signal remained stable at different flow rates. In contrast to the detection of rigid materials, the viscous soiling layer on the sensor surface does not lead to a clean and repeatable shift of the resonance frequency due to the strong cross-sensitivity to temperature and cleaning agent. Nevertheless, more stable results were found for the impedance.

In the following, an evaluation algorithm is developed by extracting promising signal characteristics in the scattering parameter course and assessing the generated parameters for different food test soilings. Based on these results, an approach for automated differentiation between clean and soiled sensor surface is examined.

2 Materials and methods

2.1 General setup

All tests were conducted with a prototype QCM sensor (Fig. 1), designed to meet the requirements in the pipe system of a food production line during processing and cleaning.

Fig. 1
figure 1

Prototype of the used sensor

The sensor consists of a 10 MHz quartz crystal with an AT-cut (specification of cut angle through the quartz to realize shear oscillation). The quartz is fixed with seals to minimize restrictions on its shear oscillation while preventing soiling intrusion. To induce the AC voltage into the quartz and measure the resulting frequency response a vector network analyzer (VNA) is used.

For the cleaning tests, the sensor was implemented into the rectangular test Sect. (41 mm x 41 mm) of a CIP test rig (Fig. 2). The test rig allows the adjustment of all relevant parameters, such as volume flow rate, temperature, and cleaning fluid. For evaluation of the data from the QCM sensor, all cleaning tests were monitored with a camera sensor mounted opposite the QCM and above a glass window in the channel [1]. A heat exchanger controlled the fluid temperature, which was constantly measured at the inlet section of the rectangular channel.

Cleaning tests were conducted with deionized water. The fluid temperature was varied between 25 and 55 °C. The flow rate was set to a constant 0,5 m/s. Due to the speed limitation of the VNA, the signal from the QCM sensor could only be captured every 15 s during cleaning. For the camera sensor, a resolution of 10 s was selected to monitor the cleaning process and to validate the signals from the QCM sensor. Cleaning was stopped after the sensor surface appeared visually clean on the camera images.

Fig. 2
figure 2

Schematic figure of the test setup with the two sensors integrated into a flow channel test rig

2.2 Soiling method

Before applying soiling to the sensor surface it was carefully cleaned in three steps. First, wash bottles were used to rinse with ethanol followed by rinsing with deionized water. Finally, it was blow-dried to avoid residues. To reduce variance in cleaning time between the different cleaning tests, all model soiling types were prepared and applied to the sensor surface as reproducible and homogeneous as possible. As the uneven sensor surface impedes a uniform soiling application, only a minimum soiling thickness of at least 1 mm was always ensured. The soiling recipes were tailored to a consistency best suited for even application. For the milk soiling, 1 kg of powdered milk (1% fat by weight) was mixed with 500 g of water and 45 g of stabilized strontium aluminate crystals as an optical UV-tracer for the camera sensor. After mixing the viscosity of the milk soiling continuously dropped, allowing the proper application to the sensor surface only for a limited time frame. For the tomato paste soiling, 1 kg of triple-concentrated tomato paste was mixed with 200 g of deionized water and 60 g of the UV-tracer. The low viscosity of the tomato paste and milk soiling enforced the application with a brush.

Fig. 3
figure 3

Sensor surface soiled with (a) vanilla pudding, (b) tomato paste, and (c) milk

The vanilla pudding soiling was prepared by mixing 1 kg of store-bought vanilla pudding with 25 g of water and 30 g of tracer. It was sprayed onto the sensor surface.

After application, all soiling types were dried at 58 °C for 15 min. Figure 3. shows the sensor coated with the three test model soilings.

2.3 Reference signal

The reference values for the evaluation of the QCM sensor were generated with a camera sensor. Figure 4 shows exemplary images, which were taken with the camera during cleaning of tomato paste soiling. Due to the fluorescence of the soiling, which is further enhanced by the added UV tracer, the soiled areas appear bright in comparison to the dark clean areas. This way, the mean brightness in the marked region of interest (ROI) could be used as a reference for the residual soiling.

Fig. 4
figure 4

Exemplary images taken by the camera sensor at different moments during the cleaning process for tomato paste

As Fig. 4 shows that soiling often remains at the edge of the sensor surface due to the sensor geometry. Because of this, a target value for the reference signal to achieve a clean sensor is the removal of 95% of the soiling. The brightness values are extracted from the ROI in the image by a MATLAB script and then also normalized between 0% and 100% [1] as shown in Fig. 5.

Fig. 5
figure 5

Exemplary signal course during a cleaning test with tomato paste. Soiled area in % of the ROI. Analysis based on camera images

2.4 QCM data processing

To acquire data from the QCM sensor, the VNA scans a pre-set frequency range and measures the scattering parameter. In preliminary measurements, the range is determined by scanning a wide frequency range at a low resolution and determining the frequency with the greatest signal change. This also determines the characteristic of the reference function for the following parameter determination. To specify the reference function, the position and width of the resonance area are key for avoiding the signal changes caused by temperature and cleaning fluid. To improve the signal-to-noise ratio (SNR), a digital moving mean filter is applied to the raw signal.

The common evaluation method for detecting the changes on the surface of a QCM sensor is to determine the frequency of the turning point [35]. This method did not yield stable results as the signal course was influenced by temperature, cleaning fluid as well as the soiling types. Therefore, the following alternative signal characteristics were evaluated for reliable representation of the sensor contamination status: (a) Distance between the extreme value and the baseline (peak height) (b) Width of the frequency band defined by a parallel to the baseline at 2/3 of the peak height (attenuation) (c) Integral area beneath the curve and the attenuation line (b) (d) Incline of the tangent to the turning point (e) Frequency of the turning point.

Fig. 6
figure 6

Visualization of the different methods for characterizing the scatter response signal course of QCM with soft soiling (a) height of the peak, (b) width of the peak at a height of 2/3 (attenuation), (c) integral below the curve, (d) incline of the turning tangent, (e) frequency of the turning point

Figure 6 illustrates how these signal characteristics are defined, which are also referred to as target parameters in the following. The evaluation software calculates and records all parameter values parallel to the measurement enabling comparison with the data from the camera sensor.

3 Results and discussion

3.1 Clean state reference

As the sensor signal characteristics (Fig. 6) are dependent on a multitude of operating parameters, the comparison of the is-state to the clean state (e.g., the end of a prolonged cleaning process) deemed to be the most robust approach toward a decision on whether its sensor surface is clean or soiled.

To determine the clean state reference value range, the described target parameters were measured subsequent to a cleaning test in the flow channel with a clean sensor surface under regular flow conditions. 23 signals were recorded over a period of 5 min. A confidence interval of two sigma around the mean value \(\stackrel{-}{x}\) of each measured target parameter was then defined as the target area \({x}_{u, l}\) in Eq. 1.

$${x}_{u, l = \stackrel{-}{x} \pm 2\sigma }$$
(1)

When the target parameter value lies within this target area during a cleaning procedure, it is considered that the clean state is reached. The measurements were done at three different temperatures (25 °C, 40 °C, and 55 °C, ± 3 K). To validate if the sizes of the determined target areas are suitable for practical use, measurements were also performed with a soiled surface. To simulate a worst-case scenario, undried vanilla pudding was applied to the sensor surface and submerged in the cleaning fluid. Then, the calibration procedure was conducted under this condition.

In Fig. 7 the determined values in the soiled state are compared to the values for the clean state. It shows, that also with a very soft and viscous soiling layer the signals can be clearly separated from each other.

Fig. 7
figure 7

Calibration values extracted from the QCM sensor with a clean surface (green), and soiled surface (red) at the example of the integral parameter a) from Fig. 6. For every temperature, 23 consecutive measurements were recorded, and the clean reference area (green), as well as the soiled reference area (red), were calculated

3.2 Cleaning tests

During cleaning, an algorithm determines the difference between the current value of each target parameter and the target area (\({x}_{u, l}\)in Eq. 1) of the clean state. The resulting differences are normalized between 0% and 100%, where 0% is referring to the calibrated mean values of the target parameters for the clean sensor and 100% refers to their maximum deviation during cleaning. This way, these normalized target values work as a reference for the residual soiling. Figure 8 shows the course of values over a cleaning process of tomato paste at 25 °C.

Observing the cleaning progress with the camera sensor shows that the fluorescence of the dried soiling increases at the beginning of the cleaning process. This effect caused by swelling for some soiling types is already known and described e.g., by Joppa et al. [13]. Nevertheless, the camera sensor can detect the end of the cleaning process precisely. In comparison, for the QCM, sensor the swelling of the soiling layer leads to a decrease of the signal right from the start. This can be explained by the shifting viscosity of the soiling during swelling. Both mass and viscosity, have a significant influence on the sensor signal. Therefore, one of the challenges with the QCM sensor is to differentiate whether the soiling has been just swollen or removed from the surface. Especially for vanilla pudding, the effect of swelling is at least as distinct as soiling removal.

Fig. 8
figure 8

Removal of tomato paste at 25 °C. The blue lines show the cleaning process as captured by the camera. The yellow lines show the measured values of the QCM sensor for (a) height of the peak, (b) attenuation, and d) tangent incline. The green lines indicate the clean reference

The parameters calculated from the measurements react differently to the cleaning phases. The attenuation and integral values strongly react to the swelling process, reaching the values expected by a clean sensor often before the soiling is completely removed from the surface. The tangent ascent value as well as the peak height react less to the swelling, reaching the target value only when the middle section of the sensor surface has been cleaned of soiling.

The otherwise often used turning point frequency [35] shows the cleaning tendency but has been proved to show unstable results in this experiment setup. Especially with viscous soiling types, the measurements don’t show the required reliability.

3.3 Automatic soiling detection

Based on the calculated reference values and the cleaning tests an algorithm for automatic detection of the end of the cleaning process was developed. To increase the reliability of the detected cleaning state the three most promising signal characteristics (i) peak height, (ii) tangent incline, and (iii) attenuation were combined.

Fig. 9
figure 9

Flow chart of the implemented evaluation process to determine the sensor soiling state

As shown in Fig. 9 all parameter values are determined separately from the signal course. The following evaluation process for each parameter encompasses the parameter development over time as well as the is-state values. The target parameter development over time can either (i) rise, (ii) fall, or (iii) remain stable during a cleaning procedure. To differentiate actual change from signal variation and noise the target value range gained through the calibration was used as a measure of variation (confidence interval), Fig. 10.

Fig. 10
figure 10

Value development is determined using the target value range from the sensor calibration

Consecutive values within the clean reference area were handled as equal. The target parameter status (p in Eq. 2) is set to 1 after the value reaches the calibrated target value range and remains equal for at least three out of five consecutive measurements. Figure 11 shows an exemplary result of this process.

Fig. 11
figure 11

Exemplary signal course of the parameter peak height and the reference values with tomato paste at 25 °C showing correlating signals

After evaluating the status for each of the three parameters the system clean state is evaluated with Eq. 2, where p is the Boolean value of the target parameter status and w describes the weighting of each target parameter.

$$Clean value= {\sum }_{i}{w}_{i}*{p}_{i}$$
(2)

The value of the target parameter status is null unless the sensor values have reached the target value area xu,l. With the weighting factor w (from Table 1) for each parameter, the sum clean value for the sensor is calculated.

Table 1 Values of the weighting parameters used for the calculation of the clean state detection

This reasoning was implemented to accommodate both the often-premature cleaning detection behavior of the attenuation parameter as well as the slower-acting parameters that do not react as strongly. With a clean value of at least 1.5, the sensor is declared clean. Therefore, once at least two out of the three parameters detect a clean sensor surface, the reconciled cleaning status is deemed clean.

4 Validation

To validate the algorithm for automatic detection of soiling, further cleaning tests were performed with tomato paste and milk. The determined cleaning time was compared for both sensors. For the QCM sensor, the time when the software considers the cleaning process as finished is considered as cleaning time. For the camera sensor, the cleaning time is defined as the time when 95% of the initial soiling is removed. Table 2 shows the deviation in cleaning time between the sensors.

Table 2 Cleaning time determined within various cleaning tests by the optical reference sensor and the QCM sensor for tomato paste and milk soiling at different temperatures
Table 3 Resulting average deviation of the calculated cleaning time, *without trail 7

Table 3 shows an average difference between the cleaning times of over 20%. Between the two soiling types the end of the milk cleaning process was 15.5% closer to the reference sensor, indicating that the sensitivity of this measurement system varies depending on the soiling. However, a lot of the difference between the reference system and the sensor detecting “clean” comes from the 7th trail, which can be considered a statistical outlier. Disregarding this measurement, the margin to the reference system comes for tomato paste is 18.1%. This way both the relative and absolute (43.8 s milk and 47.6 s tomato paste) difference in detection time for tomato paste and milk are close to each other.

Assessing the absolute margin between the two sensor systems needs to be done in the perspective of an industrial cleaning process. As cleaning processes often can last from several minutes to few hours, the deviation of about 1 min between the sensors seems to be a good approximation. Especially since a certain amount of overcleaning is unavoidable to secure food safety. As such, even a reasonably delayed detection holds significant potential to reduce cleaning time in an industrial environment. The influencing parameters that cause the sensor deviations must be investigated in more detail in further studies.

5 Conclusion

It could be shown that with the presented quartz crystal sensor it is possible to monitor the cleaning progress also for swellable industrial soilings, such as vanilla pudding, tomato paste and milk. Thereby, the swelling has a big influence on the sensor signal, but with the presented evaluation algorithm it is possible to detect the end of the cleaning process.

To get a sufficient signal quality with regard to soiling detection, it is important to define suitable parameters for the signal characteristics. Peak height, tangent incline, and attenuation were determined as most promising within this work.

The validation of the developed automated monitoring system showed an average total deviation less than 1 min for the measured cleaning time in comparison to the time determined with the established camera sensor. For industrial applications where the average cleaning time exceeds the time of our cleaning tests, the sensor proved to be a viable alternative to existing solutions.

NOMENCLATURE

X limit value

\(\stackrel{-}{x}:\) mean value

\(\sigma :\) standard deviation

w parameter weight

p parameter status

Subscript

U: upper.

L: lower.