SYSTEM FOR AUTOMATED MONITORING OF LOCAL SOIL REMOVAL DURING CLEANING IN CLOSED FOOD PROCESSING LINES WITH A QUARTZ CRYSTAL SENSOR

Using quartz crystal microbalances (QCM) to monitor cleaning processes creates new opportunities towards efficient and need-based cleaning processes. A first study with starch as food model soil showed the suitability of a QCM-based sensor concept to detect swellable substances and monitor the cleaning process [1]. The results of a follow-up study will be presented in this manuscript. Cleaning tests were conducted at 40 °C and 55 °C while monitoring a range of characteristics (peak height, attenuation, integral, tangent incline, turning point) in the sensor signal course. An optical sensor, monitoring the cleaning process was used as a reference. Based on this, the most promising parameters (peak height, attenuation, tangent incline) were selected to develop a calibration procedure counteracting the sensor cross-sensitivity towards process parameters such as temperature and influences of the cleaning fluid. The calibrated sensor can determine whether its sensor surface is clean or soiled. Cleaning tests with tomato paste and milk proved the sensor’s ability to detect industrial food products with an average deviation of 55,9 s from the reference sensor.


INTRODUCTION
Cleaning of machinery in the food and pharma industry is crucial to meet hygienic requirements [2]. 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 worstcase scenarios and follow fixed and oversized cleaning protocols (Goode 2013, Tsai et al 2021, Yang 2019, Fryer 2009). This is in contrast to the general aim to reduce cleaning time and the use of resources [3]. Methods and knowledge regarding quantitative prediction of cleaning processes could help to avoid high production costs caused by cleaning. Therefore, suitable sensors are required to monitor the soil status in production lines during cleaning [4], [5].
Quartz crystal microbalances (QCM) were examined for possible monitoring applications of cleaning processes. The use of QCM [15] to analyze thin layers based on the principle of the inverse piezoelectric effect is widely established in various physical, biological, or chemical applications [16]- [19]. A shear vibration can be induced into a quartz with a suitable crystallographic orientation (transverse or longitudinal) by applying a highfrequency 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 [17], [20], [21].
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.) [22] or measuring rheological properties of crude oil and lubricants [23]. Olesen et al. [24] used QCM to monitor thin, greasy, and non-swellable soil layers to characterize different cleaning detergents within a laboratory setup. Jüschke et al. and Koch et al. [25], [26] 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 [27].
The cited applications have in common that they are used for rigid or non-swellable soil layers, which do not change their viscous properties significantly during cleaning. Therefore, they can be detected well by analyzing the resonance frequency.
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 soil 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 [1].
In the following, a sensor calibration procedure is developed by extracting promising signal characteristics in the scattering parameter course and assessing the generated parameters for different food test soils. Based on these results, an approach for automated differentiation between clean and soiled sensor surface is examined.

General test setup
All tests were conducted with a prototype QCM sensor (Figure 1), designed to meet the requirements in the pipe system of a food production line during processing and cleaning.
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 section (41 mm x 41 mm) of a CIP test rig ( Figure 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 °C 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 seconds during cleaning. For the camera sensor, a resolution of 10 seconds 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.

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 blowdried 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 soil application, only a minimum soil 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 tripleconcentrated 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.
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 soil types were dried at 58 °C for 15 minutes. Figure 3 shows the sensor coated with the three test model soils.

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 soil. Due to the fluorescence of the soil, 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 soil. Fig. 4. Exemplary images taken by the camera sensor at different moments during the cleaning process for tomato paste.
As Figure 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 figure 5. Exemplary signal course during a cleaning test with tomato paste. Soiled area in % of the ROI. Analysis based on camera images.

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 [15]. 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. 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.

Calibration of the sensor
As the sensor signal characteristics ( figure 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.
For the calibration of the sensor's clean state, 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 minutes. A confidence interval of two sigma around the mean value ̅ of each measured target parameter was then defined as the target area ( , in equation 1).
When the target parameter value lies within this target area during a cleaning procedure, it is considered that the clean state is reached. All calibration 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 figure 7 the determined values in the soiled state are compared to the calibration values for the clean state. It shows, that also with a very soft and viscous soil layer the signals can be clearly separated from each other. Fig. 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 figure 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.

Cleaning tests
During cleaning, an algorithm determines the difference between the current value of each target parameter and the target area (xu,l in equation 1) determined in the calibration procedure for 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 soil. 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 soil increases at the beginning of the cleaning process. This effect caused by swelling for some soil types is already known and described e.g., by Joppa et al. [7]. Nevertheless, the camera sensor can detect the end of the cleaning process precisely. In comparison, for the QCM, sensor the swelling of the soil layer leads to a decrease of the signal right from the start. This can be explained by the shifting viscosity of the soil 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 soil has been just swollen or removed from the surface. Especially for vanilla pudding, the effect of swelling is at least as distinct as soil removal.
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 soil 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 soil. The otherwise often-used turning point frequency [15] 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.

Automatic soil detection
Based on the calibration 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. Flow chart of the implemented evaluation process to determine the sensor soil state.
As shown in figure 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. Consecutive values within the clean reference area were handled as equal. The target parameter status (p in equation 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. After evaluating the status for each of the three parameters the system clean state is evaluated with equation 2, where p is the Boolean value of the target parameter status and w describes the weighting of each target parameter.
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. 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.

VALIDATION
To validate the algorithm for automatic soil detection, 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 soil is removed. Table 2 shows the deviation in cleaning time between the sensors.  Table 3 shows an average difference between the cleaning times of over twenty percent. 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 7 th measurement, which can be considered a statistical outlier. Disregarding this measurement, the general margin to the reference system comes down to 15,5 % and the margin for tomato paste is 13.9 %. 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 very close to each other. Suggesting the systematic offset caused by the live detection as main source for the detection delay.
Assessing the absolute margin between the two sensor systems needs to be done in the perspective of an industrial cleaning process. As cleaning processes generally take hours, the 56 second difference between sensors is nearly negligible. 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.

CONCLUSION
It could be shown that with the presented quartz crystal sensor it is possible to monitor the cleaning progress also for swellable industrial soils, such as vanilla pudding, tomato paste and milk. Thereby, the swelling has a big influence on the sensor signal, but with the presented detection algorithm it is possible to detect the end of the cleaning process.
To get a sufficient signal quality with regard to soil 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 of 55.9 s 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.

ACKNOLEDGEMENT
This work was supported by the Federal Ministry of Food and Agriculture BMEL (Grant number: 28-1A106116).

NOMENCLATURE
x limit value ̅ mean value standard deviation w parameter weight p parameter status Subscript u upper l lower