Introduction

In most food companies, many procedures to detect quality characteristics rely on the knowledge and experience of employees, as well as their sense of sight, smell, and touch [1]. However, to keep up with global competition and simultaneously prevent food waste, artificial intelligence methods in the food industry show tremendous potential [2]. Through efficient online analytics, the manufacturing process of a product can be continuously monitored. The generated data can be used to implement model-based process control strategies and concepts by preserving information about product and process characteristics in real time. In this context, the large amounts of data collected during production are ideally suited to be processed in a learning value network and, thus, to train and continuously improve AI models [3,4,5,6].

Currently, the bakery industry also experiences operational and product failures due to inadequate controls during the manufacturing and baking process [7]. As a preliminary stage for fine bakery products, biscuit batter is a complex macroemulsion whipped into a foam by mechanical action. The effects of emulsifiers and air entrapment play an important role in the structure of sponge cake batters [8]. The rheological properties of the biscuit batter are influenced by various physical changes during technological processing. However, one of the most critical process steps that dramatically impacts the final product quality is the mechanical foaming of the ingredients.

Reducing the density of the biscuit batters also changes the texture and rheology of the final product. Density as a simple parameter is often used in industry to characterize air absorption [9]. Whipped foams are thermodynamically unstable, so the bubbles must be stabilized. The three phenomena that affect foam stability are film drainage, bubble coalescence, and bubble disproportionation. The most critical destabilization mechanism is the coalescence of the bubbles, which is determined firstly by the separation pressure and secondly by the resistance to film rupture. This increases with increasing surface tension and decreasing bubble size [9, 10].

Mechanical stirring of the biscuit batter should achieve an average bubble size at equilibrium, beginning with viscous and interfacial forces, thus preventing bubbles from bursting [11]. However excessive shear forces during whip** can also lead to foam disintegration [11]. For this reason, numerous research papers have addressed the effects of processing parameters on bubble size and distribution, density, textural properties, and, thus, final product quality. Therefore foams were studied by characterizing the quality and texture of the foams based on rheological measurements, bubble size and density [11]. Furthermore, the effects of mixing time and additives on dough rheological properties and cookie quality in bakery products were analysed. It showed a significant effect of mixing time on the dough and cookie quality [12]. There is also a strong interaction between the density and bubble distribution [10].

Furthermore, the evolution of the gas volume fraction and bubble size distribution in a model sponge cake depends on operating conditions such as the mixing head speed and headspace pressure [13]. To determine the bubble size and distribution, microscopic analysis is often used, in which several drops of the batter or food foam are viewed at a time under the same conditions and then photographed to be evaluated with image analysis software [10, 11, 13, 14]. Density has also been frequently determined using a destructive offline measurement by placing the dough in a calibrated container of known volume and then measuring the weight on balance [10, 11, 13, 15]. The advantages of the methods are that the necessary equipment is widely available and, in the case of density measurement, remarkably inexpensive. On the other hand, the analysis is invasive as small amounts must be removed from the batter mass, which inevitably compromises its integrity and questions the validity of the data [14, 15]. Disadvantages with offline measurements include the need for trained personnel, possible sampling errors, complex sample preparation, destructiveness, and time delay of analyses [7]. To study the bubble size distribution in wheat flour dough and obtain a comprehensive insight into the whipped structure microcomputed tomography (µCT) can be used [15]. Spectral changes in NIR spectroscopy related to kneading time during the mixing of dough can also be used for process monitoring of dough mixing [16]. However, both methods offer disadvantages, such as reducing the sensitivity of overlap** spectra and a small sample volume in NIR spectroscopy or the high cost of µCT [17].

An ultrasonic-based approach could form an alternative. Ultrasonic sensors are becoming increasingly popular in specific areas of process monitoring. Ultrasound is a space-saving, fast, and non-destructive method to analyze process and product parameters. In the food industry, the non-invasive, ultrasonic-based online measurement method has already been applied in many product-sensitive process areas, such as the detection of contamination in process equipment [18], ultrasound-based monitoring of fermentation processes [19], or the determination of fill levels in containers [20]. Ultrasound was also used in the bakery industry to evaluate the rheological properties of dough [21]. Ultrasonics are also used for online process monitoring and characterization of doughs [22,23,24,25,26]. The sensors are also inexpensive, robust, can be applied to various media, and are easy to maintain [6, 27,28,29,30]. Ultrasonic waves are mechanical waves with frequencies above 20 kHz [31]. For metrological applications, so-called low-intensity ultrasound is used. These sound waves are in the high-frequency range (0.5–10 MHz) with low powers (< 1 W cm−2), since they leave the food system unchanged [6, 30].

A promising new ultrasonic method for determining the density of a highly aerated batter in batch processes was shown using wave mode conversion [32]. Ultrasonic waves are influenced at the interfaces between two materials with different acoustic properties. The ultrasonic wave propagates in the medium, is reflected partly at the boundary surface or is propagated as a surface wave between the boundary surfaces. With an abnormal angle of incidence of the ultrasonic waves between media of different impedances, the mode of the ultrasonic propagation can change, leading to mode conversion [33]. When a longitudinal wave encounters an interface at an inclined angle, some energy is transferred by transverse particle displacements, producing a (transverse) shear wave. These phenomena, referred to as mode conversion, occur when the incident ultrasonic wave impacts an interface between materials with different acoustic impedances and the angle of incidence deviates from normal incidence. Highly foamed batters have different phases (solid, liquid, air), thus fulfilling properties for converting longitudinal, shear and surface-acoustic waves [34,35,36]. The interpretation of ultrasonic signals is of utmost importance and relies on specialized analytical strategies. Since ultrasonic signals first must be interpreted per mathematical causalities, two primary approaches are commonly employed: physics-based techniques and data-driven approaches [37]. In this study, the ultrasonic features utilized are derived from the physical behavior exhibited by the biscuit batters based on previous work [32]. Through machine learning algorithms, the ultrasonic features based on physical effects can be correlated to the foam structure parameter of the biscuit batter in a data-driven approach. As a result, physics knowledge can be seamlessly integrated into the machine-learning strategy by incorporating these ultrasonic features.

Therefore, this work shows an ultrasound mode-conversion-based, AI-enabled monitoring method for the continuous production process of biscuit batter. For this purpose, the density difference of biscuit batter in pipes was determined during ultrasonic measurements using mode conversion detection. The tests were carried out with an ultrasonic measurement system consisting of two ultrasonic sensors mounted on a pipe commonly used in industry. Furthermore, reference measurements were performed to validate the structural foam parameters of the biscuit batter. Subsequently, ultrasonic data based on ultrasonic mode conversion are also correlated to the foam structure parameters to better describe the foam quality of biscuit batters.

Materials and methods

Materials

Wheat flour (Type 550) was supplied by Rosenmehl, Rosenmühle GmbH (Ergolding, Germany). Pasteurized whole egg, white sugar, and wheat starch were purchased from the local market. Emulsifier (Colco) was supplied by Aromatic Marketing GmbH (Berlin, Germany).

Batter composition

The biscuit mass (industrial recipe) for the pilot plant trials was prepared according to the recipe given in Table 1 [32]. For one single run, a total mass of 25 kg was used. Due to the limited capacity of the devices for sample preparation, the biscuit mass was prepared in 5 kg batches and subsequently combined. The ingredients are weighed into the mixing bowl and mixed with a Bear Vari Mixer (Varimixer A/S, Broendby, Denmark) for 3 min at speed 1 (5 kg per batch). Due to the maximum filling level of the rotor-stator mixer a portion of 10 kg of biscuit mass was poured directly into the hopper of a rotor-stator mixer (Mondomix P13124-03, HOWDEN B.V., Hengelo, Netherlands). At the same time, the other 15 kg was kept in bowls and added later during the experiment. The measured temperature after the foaming process was 22 ± 2 °C.

Table 1 Composition of the batter formulation per batch (5 kg) [32]

Batter properties

Batter density

The densities of the foamed masses are determined directly after the experiment has been carried out. In the gravimetric method, a cylindrical liter vessel of known volume (CSM Deutschland GmbH, Bingen, Germany, with 100 cm3 at a temperature of 22 ± 2 °C) is placed on a balance (Kern, accuracy to ± 0.5 mg) and tared. A portion of the mass is added to the liter vessel, and the excess mass is removed with a dough scraper. The filled vessel is again placed on the scale, and the weight is noted. The density can be calculated and then noted using the mass and the known volume. The density is determined in triplicate for each mass and can be described with Eq. (1).

$$\rho = \frac{{m_{litre\ weight + batter} - m_{litre\ weight} }}{{100 \,{\text{cm}}^{3} }}*10$$
(1)

\({m}_{litre\ weight}\): mass of empty liter weight (g); \({m}_{litre\ weight+batter}\): filled liter weight with batter (g); \(\rho\): density of batter (g/L).

Foam structure parameters

Foam structure analysis was performed using a digital microscope (Keyence VHX-950F, KEYENCE Deutschland GmbH, Germany), as shown in Fig. 1. The samples were viewed at a magnification of ×2000. A small amount of the foamed masses is prepared immediately after the pilot plant tests. An already prepared microscope slide is used for the analysis. The measuring chamber with a depth of 60 µm was realized analogously to Allais et al. utilizing adhesive tape [10]. Using a spatula, a drop of the biscuit batter was placed on the cut-out and spread with a razor blade to obtain a sample as uniform in thickness as possible. The slide is focused on the microscope stage, and five depth-of-field images are taken at different positions for each sample. The sample volume per image is thus 0.001 mm3.

Fig. 1
figure 1

Foam structure analysis with KEYENCE digital microscope at ×2000. A Foam structure. B Detected bubbles for analysis

The images are then analyzed due to the detected bubbles. For this purpose, all visible bubbles are marked with a red circle and their diameters are automatically evaluated by the internal software. MATLAB then calculates each sample’s Sauter diameter (d32, Eq. 2), the largest or smallest bubble size, and the Relative span (s, Eq. 3) as decisive parameters for the evaluation of the foam structure.

Sauter diameter

$$d_{32} = \frac{{\sum {n_{i} d_{i}^{3} } }}{{\sum {n_{i} d_{i}^{2} } }}$$
(2)

Relative span

$$s = \frac{{d_{0.9} - d_{0.1} }}{{d_{0.5} }}$$
(3)

The diameters d0.9, d0.5 and d0.1 represent diameters of less than 90%, 50% and 10% of the bubble diameter, respectively.

Ultrasonic measurement system

The ultrasonic transducers used for the experiments are self-developed round-shaped ultrasonic transducers with a diameter of 16 mm, based on a piezoceramic (PIC 255, PI Ceramic GmbH, Lederhose, Germany) and a median frequency of 1 MHz. The piezoceramics are encapsulated in resin and tungsten-based backing material to reduce ringing and guarantee stable signals. The piezo transducer was excited by a rectangular 100 V excitation of 450 ns (< 1 W). A microcontroller unit (Gimbio GmbH, Freising, Germany) was used to record the ultrasonic-based signals. The ultrasonic signals captured from the ultrasonic transducer were stored and evaluated using Virtual Expert 4.0 software (Gimbio GmbH, Freising, Germany) and MATLAB (Version R2020b).

The ultrasonic system works according to the pitch–catch modus on the exterior surface of the pipeline (Fig. 2A). A through-transmission of the pipeline with the product is therefore not necessary. The transmitter generates the ultrasonic waves, which initially propagate in the pipeline. Two transducers [transmitter (T), receiver (R)] were mounted on an ordinary tube (DIN EN 10357, DN 50). The mounting comprises two welded screws (distance 7 cm), whose center distance is 26.2 cm. At the interface between the pipeline and the medium, the ultrasonic wave is influenced by mode conversion. During this process, the ultrasonic energy is divided into different types of waves [longitudinal (into the product), transverse (in the pipeline), surface wave (between the pipeline and the product)]. Consequently, the ultrasonic signals received at the receiver contain various ultrasonic-based wave types. These are subsequently utilized for the analysis of foam structure. The sensor unit was implemented in the foam system, utilizing a milk pipe screw connection (DIN 11851, Fig. 2B). The ultrasonic measurement was always in the direction of flow at constant flow rate. Therefore, effects due to the flow velocity (e.g., Doppler effect) are identical for all measurements and were therefore not further considered. The measuring unit was implemented vertically directly after the rotor-stator mixer to ensure that the tube was always filled with biscuit batter during the tests. These parameters could be adjusted or kept constant by implementing pressure, temperature and flow velocity control.

Fig. 2
figure 2

Schematic representation of the ultrasonic-based measuring system: A ultrasonic waves propagate at the surface between the steel pipe and batter/bubbles. B Sectional view of the ultrasonic measurement setup

Experimental design

For one trial, a mass of 25 kg is prepared (see Table 1). The biscuit batter is foamed in the rotor-stator mixer and then pumped through the tube, where the ultrasonic measurements occur. The measurement data are stored in the online database and later processed with MATLAB. During a test series, the mixing head speed was kept at the starting condition for 15 min and then changed every 10 min according to Table 2 and the injection pressure was kept constant. In this context, the selection of foaming parameters within these defined limits was undertaken with the aim of producing foam structures that are analogous to those observed in preceding research papers [32, 38]. Starting with minute 6, a sample of 500 mL of the foamed biscuit batter was taken every 3 minutes at the end of the measuring tube. With an initial mass of 25 kg, 16 reference samples could be generated per test series. These were set aside for the reference analyses. In total, this resulted in 96 reference measurements being conducted across all experiments.

Table 2 Design of experiments for the foaming trials

Theory/calculation

Mode conversion detection

The processing of the ultrasonic signals included filtering with three different sets of Butterworth bandpass filters (radial waves, surface waves, longitudinal waves). This allowed the elimination of interfering noise, such as that generated by the motor or pump of the Mondomix. Every piezoelectric component has several fundamental vibrations, which depend on the geometry. Therefore, a thin piezoelectric disk has a radial and thickness vibration that propagates when the sensor is excited. The employed transducers primarily generate longitudinal waves, which, at the interface between the pipeline and the medium, are partially reflected due to impedance differences. At this interface, besides the reflected longitudinal wave, transverse waves and surface waves also arise because of the curvature of the pipeline and the associated angle. In radial vibration, the waves travel outside the tube surface. They have a different characteristic than the surface waves of interest since they travel between the media of air and steel and are thus largely unaffected by the masses [39, 40]. The operating longitudinal frequency of the sensors used was 1 MHz. The surface acoustic waves generated by the transducer are travelling along the pipe surface from transmitter to receiver. Thereby they are also entering the product. In addition to the direct way, the ultrasonic waves can also run spirally around the pipe, as shown in Fig. 2. If density changes occur in the medium, these can be detected by changes in the surface acoustic signal due to impedance changes. Longitudinal waves, on the other hand, travel directly through the product to the other side of the tube and are reflected. Thus, the product and its properties directly affect these wave fractions. Due to the dam** properties of the biscuit batter and the given layer thickness (pipe diameter 50 mm), the longitudinal component of the generated signal energy should be completely damped.

Therefore, the Butterworth bandpass filters were chosen as follows: In the first range between 270 and 350 kHz, a signal deflection could be seen, which was related to the radial vibration of the piezoelectric ceramic. Since surface waves are expected at approximately 500 kHz, a second range between 351 and 800 kHz was chosen. In the third range of 801 and 1250 kHz, longitudinal waves are expected. The signals were recorded with a sampling rate of 50 MHz with a total number of 20,000 signal points. Therefore, the recorded signal time corresponds to 400 µs. The time of flight (TOF) describes the time required for an ultrasonic wave to travel from the transmitter to the receiver [41, 42]. Thus, the TOF can be calculated by multiplying the signal point at the beginning of the wave by the sampling rate of 20 ns. In Fig. 3A, two ultrasonic signals of the experiments from the first filter range were superimposed as an example. At 81.1 µs, a first peak can be seen, corresponding to a surface wave travelling directly from the transmitter to the receiver. According to the literature, the speed of sound of transverse waves in stainless steel is between 2990 and 3230 m/s [43]. At a sensor distance of 26.2 cm and a TOF of 81.1 µs, the speed of sound c of the wave in steel at room temperature can be calculated with Eq. 4:

$$c = \frac{{0.262 {\text{m}}}}{{8.11 \times 10^{ - 5} {\text{s}}}} = 3230 \frac{{\text{m}}}{{\text{s}}}$$
(4)
Fig. 3
figure 3

Display two filtered signals with the respective evaluated areas: A Filtered signal between 270 and 350 kHz (radial waves). B Filtered signal between 350 and 800 kHz (surface waves). C Filtered signal between 800 and 1250 kHz (longitudinal waves). D Frequency spectrum of the ultrasonic signals with the marked areas of the frequency filters

Since surface waves propagate at a similar speed to transverse waves, this can be used as a comparison. The calculated speed of sound c is precisely in this range, and thus it could be shown that the first peak is a surface wave. As mentioned, surface waves can also travel along the surface in a spiral form (Fig. 2B). Because of the curved surface, the excitation of the ultrasound wave induces sound waves to disperse in all directions around the circular piezoelectric transducers. This distinct propagation feature generates additional sound wave fronts, supplementing the primary front of sound waves oriented solely in the x-direction. This occurrence arises from the mutual influence of propagating sound waves, a phenomenon accentuated by the curvature of the pipeline. Given this characteristic, within the ultrasound sensor and at a fixed distance from the transmitter, these signal fronts can be temporally separated. Since the sound velocity of the transverse waves remains constant, the distance travelled in the pipeline can be calculated using this information. The path distances resulting from waves travelling spirally along the tube are shown in Table 3. However, the sound velocity of waves can also be affected by interactions with the medium. In this case, the longer the distance the waves travel, the more they are affected until they are completely damped.

Table 3 Path distances of the spiral waves between the two sensors on the tube

Furthermore, in the case of wave propagation along a curved tube, it cannot be excluded that the waves interfere destructively. However, the energy is retained and can be transferred to other wavefronts whose shape and propagation can change. In addition, it must be considered that the waves in this work were excited with a multiple excitation pattern. This makes the signals that are received broader. Thus, a signal range results in which, for example, a surface wave is expected to travel once spirally around the tube (Fig. 2B). Accordingly, the TOF indicates the time the wave can be detected at the earliest.

While the calculated signal ranges for the radial waves (270–350 kHz) still match well (see Fig. 3A), the overlap of the signals increases with increasing frequency. While the second and fourth spiral ranges for the surface waves (350–800 kHz) are also still well visible in the signal (see Fig. 3B), the ranges for the longitudinal waves (800–1250 kHz) can no longer be observed (see Fig. 3C). The flow velocity of a flowing medium affects the travel time of the ultrasonic wave propagating in that medium [44]. However, since the mixing head speed was deliberately changed during the tests, the flow velocity also changed. Since longitudinal waves penetrate the product directly, they are affected and can be detected as distortions and mode conversions in the ultrasonic signal. For a long time of flight of the ultrasonic signal, it can interact intensively with the medium, and the formation of the effect is strengthened. Therefore, entire signal ranges around the corresponding points of interest were considered for evaluating the signals. The corresponding ranges for the signals are given in Table 4. To include other effects of mode conversion between the ultrasound wave types in the model, the Fourier-transformed signals [45] in the frequency domain were also investigated (see Fig. 3D).

Table 4 Overview of the frequency ranges for the filtering process of the ultrasonic signals, and the signal ranges for creating the features in the time and frequency domain (No.)

Easy to calculate and physically explainable features were created to extract crucial information from ultrasonic signals, which can be used for machine learning in the post-processing phase. The attenuation of the ultrasonic-based signal ranges (direct, spiral), TOF changes, and the shift of the frequencies are decisive factors. The following features, based on the field “speech, music and environmental sounds” [46], were created for all three filtered signals (see Fig. 3A–C).

MaxAmp corresponds to the highest amplitude of the signal (Eq. 5).

maxAmp:

$$\max Amp = \max \left( {\left| {x\left( n \right)} \right|} \right)$$
(5)

MaxLoc represents the TOF of the highest amplitude of the signal (Eq. 6).

maxLoc:

$$\max Loc = TOF\ of \max \left( {\left| {x\left( n \right)} \right|} \right)$$
(6)

Temporal energy describes the energy of the signal part, expressed by the sum of the absolute values of the signal range (Eq. 7).

tempEnergy:

$$tE = \mathop \sum \limits_{n = 1}^{N} \left| {x\left( n \right)} \right|$$
(7)

In addition to the time domain features, a frequency feature was also used for the three signal frequency ranges.

The spectral energy gives the energy of the total frequencies as described by the area under the frequency curve by summing the values of the Fourier-transformed signal (see Eq. 8).

specEnergy:

$$specEnergy = \mathop \sum \limits_{n = 1}^{M} x\left( n \right)$$
(8)

Regression method

The data sets of the 31 features (see Table 4) were combined for model building. A separate model was formed for each foam structure parameter (density, Sauter diameter, Relative span, number of bubbles). Subsequently, the data were first subjected to principal component analysis (PCA). In the statistical procedure, the 31 features were combined into a few principal components, thus reducing complexity. The number of principal components used is sufficient if 95 % of the variance can be explained [47]. The data set for the density correlation comprises test numbers 1–6, whereas the data set for the correlation of the other foam structure parameters (number of bubbles, Sauter diameter, Relative span) comprises test numbers 4–6 (see Table 2). For regression of the foam structure parameters of the biscuit batter utilizing the ultrasonic-based features, Gaussian process regression (GPR) was performed [48]. Gaussian process regression is a nonparametric kernel-based probabilistic model, that allows modeling data with varying multiple scales. The rational GPR used model can be described with equation (9).

$$\begin{gathered} k\left( {x_{i} ,x_{j} |\theta } \right) = \sigma_{f}^{2} \left( {1 + \frac{{r^{2} }}{{2\alpha \sigma_{l}^{2} }}} \right) \hfill \\ {\text{where}} \hfill \\ r = \sqrt {\left( {x_{i} - x_{j} } \right)^{T} \left( {x_{i} - x_{j} } \right)} \hfill \\ \end{gathered}$$
(9)

\(k\left({x}_{i},{x}_{j}|\theta \right)\): covariance (kernel) function between input points \({x}_{i}\) and \({x}_{j}\), \(\theta\): Maximum of posterior estimates, \({\sigma }_{f}\): vertical signal standard deviation, \({\sigma }_{l}\): horizontal signal standard deviation \(\alpha\): non-negative parameter of the covariance, superscript T denotes transpose operation

Results and discussion

Rheological characterisation of biscuit batter

Density

By reducing the density, the texture and rheology of the compound are changed. This, in turn, significantly impacts the final product quality. The density was determined gravimetrically in this work. Figure 4A shows an example of the density plot of test series four at a pressure of two bars versus time, while Fig. 4B shows the change in mixing head speed versus time. A high mixing head speed was expected to lead to a low density (approx. min. 35–45) and vice versa (approx. min. 45). An offset time between the change in mixing head speed and the alteration in density of approximately 1 min must be considered due to the product line between the foaming and measuring units. Considering this offset time, a density change with the mixing head speed could be confirmed and reproduced. In an exemplary process, the desired density can therefore be set by process settings. However, manufacturing processes often do not run ideally. The foaming process can result in varying densities, even for identical process parameters. These discrepancies can be related to various process-dependent factors, such as variable ingredient quality, or malfunctions in the machine being used. The pilot plant scale also showed that the production line was influenced by external factors such as room temperature.

Fig. 4
figure 4

Evolution of the gravimetrically determined density (above, 3-fold determination, reference) over the processing time at varying mixing head speeds (below) with constant pressure (2 bar)

Foam structure

The density change depends on the air trapped in the biscuit batter. An average bubble size should be obtained to achieve the most stable foam structure possible [11]. Thus, changes in the density of the masses should also be reflected in foam structure parameters such as bubble count, Sauter diameter and Relative span. The bubble count, Sauter diameter and Relative span were determined as references using the Keyence microscope as described in previously for test series 4, 5 and 6. The mean and standard deviation of the structural parameters were then calculated for each sample. In Fig. 5, the foam structure parameters (A–C) determined for test series four are plotted versus time. The fourth plot shows how the mixing head speed (D) changes with time. Similar to density, it was expected that the change in mixing head speed would be reflected in the change in parameters. For higher foaming conditions, a decrease in Sauter diameter and Relative span and an increase in bubble count were expected. A corresponding change can be seen for the Sauter diameter, the Relative span, and the number of bubbles (see Fig. 5). Here again, the offset time must be considered, which is required for a change in setting to be recognisable in the structure of the mass. However, the reference method results show relatively high standard deviations. In particular, larger bubbles seem to be affected. If larger bubbles are present, it can be assumed that the sample was whipped less. Accordingly, the foam structure might be less stable and damaged by bubble destabilization mechanisms. On the other hand, since the images of the foam structure were taken at arbitrary positions, the number of bubbles could vary within the sample. The foam structures produced in this study are comparable to those observed in previous studies [32, 38].

Fig. 5
figure 5

Evolution of the foam structure parameter (5-fold determination). A Bubble count, B Sauter diameter, C relative span over the processing time at varying mixing head speeds, D with constant pressure (2 bar)

However, comparing the foam structure parameters (see Fig. 6A–C) with the density (see Fig. 6D) as a function of the process settings shows that the values behave differently for the same settings. The structural parameters for test series 4 and 6 (see Table 2) are shown in Fig. 6 for different process points assigned to each mixing head speed. The figure shows that the number of bubbles (Fig. 6A) and the Sauter diameter (Fig. 6B) hardly seem to change in the range of 1–1.5 bar at a mixing head speed of 100–300 RPM, while the density (Fig. 6D) already varies significantly in the same range. Additionally, the Relative span (Fig. 6B) hardly changes in the range of 200–350 RPM in the 1–2 bar range, while the density (Fig. 6D) varies significantly. Thus, there appears to be a strong influence of density on the mixing head speed, whereas the pressure influences the Sauter diameter and the Relative span. However, since there are different foam structure parameters for similar densities, the sole consideration of density is insufficient. The links between the process settings and the structural parameters of the biscuit batters should be the subject of further research to better understand the phenomena. Therefore, the prediction of density is enhanced by the foam structure parameters.

Fig. 6
figure 6

Representation of the dependency of the foam structure parameters on the pressure and mixing head speed for A bubble count, B relative span, C Sauter diameter, and D density

Ultrasonic-based characterisation of biscuit batter

Density

First, the correlation between density and ultrasonic features using a 5-fold cross-validation approach with a Gaussian Process Regression (GPR) model (MATLAB2020b) was studied (see 0). To construct our GPR model, three principal components were utilized. These components were selected based on their ability to capture the most significant variations in the data set, allowing us to predict density effectively. Analyzing the impact of the different wave types, SAW waves had the greatest influence on density estimation, followed by radial frequency (see Fig. 7, Table 4). In contrast, longitudinal waves showed only a minor influence, indicating their limited relevance for density measurement. One of the critical factors investigated was energy, specifically symptomatic for the dam** ratio of the ultrasonic signal. The results demonstrate that energy has a high impact on density, suggesting that variations in dam** can provide valuable information for density estimation. Interestingly, the frequency features initially included in the analysis became less relevant due to the previous filtering. Consequently, these features did not exhibit a significant impact on density estimation. The density can be predicted with an R2 of 0.98 and RMSE of 10.08 g/L. Relative to the normalized deviation (NRMSE = 1.95%) of density observed in other studies, measured in static conditions, the density measurements presented here yield comparable results for dynamic measurements, particularly in more highly foamed biscuit masses [23, 32, 38]. The NRMSE was calculated with Eq. (10).

$$NRMSE = \frac{RMSE}{{mean\left( \rho \right)}}$$
(10)

NRMSE: normalised root mean squared error, ρ: density

Fig. 7
figure 7

A Coefficients of first principal component, B coefficients of second principal component, C coefficients of third principal component, D relationship between biscuit batter density predicted by ultrasonic signals and the reference (gravimetric determination) for varying pressures and mixing head speeds, R2 = 0.98, RMSE = 10.08 g/L, NRMSE = 1.95%

Therefore, mode conversion was explored as a potential method for density measurement, specifically through detecting SAW waves. The findings suggest that mode conversion holds promise for estimating density accurately.

Foam structure

Principal component analysis (PCA) was employed to reduce dimensionality and identify the most influential factors affecting foam structure. The results indicate that two principal components capture the most variance (> 95%), highlighting the dominant factors sha** foam structure. Interestingly, it was found that the impact of SAW waves surpassed that of density. This suggests that wave propagation characteristics, specifically SAW waves, are crucial in foam structure analysis. In contrast, the influence of longitudinal and radial waves on foam structure parameters was found to be minimal (see Fig. 8D). The correlation between bubble count and ultrasonic features is high, as indicated by an R2 value of 0.95 (see Fig. 8A). The root mean square error (RMSE) of 4.56 [1/0.001 mm3] suggests that the predicted bubble count values have an average deviation of 4.56 from the actual values. The Relative span parameter also strongly correlates with the foam structure, as evidenced by an R2 value of 0.93. The low RMSE of 0.04 [–] indicates a slight average deviation 0.04 between the predicted and actual Relative span values. Sauter diameter, the last foam structure parameter, shows a moderately strong correlation with an R2 value of 0.83. The RMSE of 1.03 [µm] suggests an average deviation of 1.03 between the predicted and actual Sauter diameter values, indicating a reasonable level of accuracy in the predictions. The analysis of the foam structure parameters utilizing the ultrasonic signals reveals that the energy features also used for the density approach are significantly impacted by foam structure also. Variations in the dam** ratio are due to the mechanical properties of the foam and its ability to dissipate energy. Understanding this relationship is crucial for optimizing foam formulations and designing foam structures with tailored properties for specific applications. Mode conversion, a phenomenon where waves transform energy distribution as they propagate through a material, shows promise as a measurement technique for foam structures. Our study suggests that mode conversion can effectively be utilized for foam structure measurement, providing a non-destructive evaluation method for quality control. However, it should be noted that the frequency features employed in our analysis showed no significant impact due to previous filtering techniques. Develo** advanced signal processing methods and expanding the analysis frequency range is necessary to enhance future tests. This will enable a more comprehensive understanding of the relationship between foam structure parameters and their frequency-dependent behavior.

Fig. 8
figure 8

Relationship between foam structure parameter predicted by ultrasonic signals and the reference (offline determination) for varying pressures and mixing head speeds: A bubble count, R2 = 0.95, RMSE = 4.56 (1/0.001 mm3). B Relative span, R2 = 0.93, RMSE = 0.04 [–]. C Sauter diameter, R2 = 0.83, RMSE = 1.03 (µm), D principal component coefficients of the first two principal components which together explain 95% of the variance of the data

The results of the correlations of the ultrasonic features on the foam structure parameters are summarized in Table 5. Regarding the normalized error, the measuring method described here achieves an error of less than 6% for all foam structure parameters.

Table 5 Summary of the min, max, mean, std (standard deviation), RPD (ratio of performance to deviation), R2, RMSE (root mean squared error) and NRMSE (normalised root mean squared error) of the models for all foam structure parameters

Conclusion

In conclusion, the method utilized in this study offers a non-invasive approach for foam structure analysis, which has the advantage of being retrofittable into existing processes. By leveraging mode conversion, signals can be detected to broader ranges, with the most vital signals observed in surface acoustic wave (SAW) waves. Integrating foam structure parameters, particularly in enhancing density measurement, enables a more comprehensive understanding of the foam production process. Due to the measurement method on the inside of pipelines, this method could also be investigated for the detection of deposits or biofouling. Future tests should focus on enhancing the frequency features to understand their potential contribution, especially concerning mode conversion. This detailed description of the process can further facilitate the application of artificial intelligence (AI) methods for real-time product quality monitoring in continuous foam manufacturing processes. The use of machine learning in combination with ultrasound measurements demonstrates significant potential across various domains within the food industry [25, 49, 50]. Overall, the method’s non-invasive nature and retrofitting capability, combined with the utilization of mode conversion and the incorporation of foam structure parameters, contribute to the advancement of foam analysis techniques, and provide valuable insights for quality control and process optimization in foam production industries.