# Convolutional Neural Network (CNN)-Based Measurement of Properties in Liquid–Liquid Systems

^{*}

## Abstract

**:**

^{−3}for rising n-butanol droplets and 0.894 kg·m

^{−3}for toluene droplets. For the derived parameters, such as the interfacial tension estimation, all of the data points lie in a range from 12.75 mN·m

^{−1}to 15.25 mN·m

^{−1}. The trueness of the investigated system thus is in a range from −1 to +0.4 mN·m

^{−1}, with a precision of ±0.3 to ±0.6 mN·m

^{−1}. For density estimation using our system, a standard deviation of 1.4 kg m

^{−3}from the literature was determined. Using camera images in conjunction with image analysis improved by artificial intelligence algorithms, combined with using empirical mathematical formulas, this article contributes to the development of easily accessible, cheap sensors.

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Experimental Setup

_{int}= 17 mL) made of glass which is surrounded by a glass chamber. The inner diameter of the cell is 15 mm. The glass chamber and the heating jacket of the extraction cell were filled with water to reduce optical effects in the videos and images. In total, three glass nozzles with different and initially unknown inner diameters (at the top) were used (determination of the inner diameters made using micro-computed tomography—see Data Availability Statement). Images of the experimental setup and a sketch of the setup are shown in Figure 1.

^{−1}while the image resolution is set to 1920 × 1080 pixels for video recording.

#### 2.2. Droplet Segmentation Using CNNs

## 3. Results

#### 3.1. Accuracy of CNN for Droplet Projection Area

#### 3.2. Rising Velocities

_{up}and Δz

_{low}) between image frames, the frame rates (FPS), the measure of length ML and the difference in between the frames Δn

_{frames}. The measurements from the top and bottom are averaged to reduce the influence of droplet deformations in between the frames. In combination with the already known inner nozzle diameter, a measure of length ML for the single pixel in the image can be derived.

_{b}(11), the inertia force F

_{i,r}(12) and the drag force F

_{d}(13)

_{p}is the volume of the droplet. For the determination, it is assumed that the droplet is rotationally symmetric, and the projection area of the droplet is equal to the orthogonal area. The volume integral is calculated by a rotation around the x-axis. To determine the volume, a volume integral is used. Therefore, an equation for the contour line of the droplet needs to be determined. This task is solved by an algorithm that uses the labels of the segmentation. It searches for droplets with the assigned label “detached droplet” and determines which labels can be seen in the 4-neighborhood of the analyzed pixel. If one pixel with the label “background” and one pixel with the label “detached droplet” is found in the 4-pixel-neighborhood it is assigned as a pixel of the contour line of the droplet. The positions of the pixels that form the contour line are stored, and afterward, a function consisting of lots of third-order polynomials is fitted through these points. The exact count of subsections depends on the size of the droplet.

**J**is the Jacobian matrix. The function f is a differentiable function with f: ℝ

^{2}→ ℝ

^{2}[16]. The problem is set up to find the zeros of the function f by varying the difference in density and the density of the dispersed phase [17].

^{−1}in the beginning to 0.07 m s

^{−1}after 0.22 s and follows a logarithmic course. Overall, the curve has a lightly periodic shape because the droplets perform an upward motion.

#### 3.3. Flow Resistance & Drag Coefficient

_{ortho}[18]. Accordingly, small orthogonal areas are beneficial to decrease pressure resistance.

_{s}and the surface in contact S. [18]

_{d}is the overall drag coefficient. The pressure influence is represented by ${c}_{\mathrm{p}}$ and the friction by ${c}_{\mathrm{f}}$.

#### 3.4. Density

^{−3}to 0.5 kg m

^{−3}[27]. Since the density measurement working with the fourth picture indicates a standard deviation of 1.4 kg m

^{−3}, a good starting point for a cheap and quick measurement approach is created. Problems in measurements can be caused by air bubbles.

#### 3.5. Interfacial Tension

_{b}(39), the viscous force F

_{η}(40), the inertia force F

_{i}(41) and the surface force F

_{σ}(42) is applicable. [20,29]

_{c}and density ρ

_{c}of the continuous phase and the density of the dispersed phase ρ

_{disp}. Moreover, geometric parameters such as the diameters of the nozzle d

_{n}and particles d

_{p}are relevant. Finally, the volume flow in the nozzle $\dot{V}$ and gravity g are influential. Since the diameter of the particle is a third-order term, it exhibits the highest influence on the overall force balance.

^{−1}to 15.25 mN m

^{−1}. The trueness of the investigated system thus is in a range from −1 to +0.4 mN m

^{−1}with a precision of ±0.3 to ±0.6 mN m

^{−1}.

## 4. Conclusions and Future Work

^{−3}with a precision of approx. ±11 kg m

^{−3}. The accuracy of the determination of the interfacial tension is approx. ±1.25 mN m

^{−1}and the precision is approx. ±0.6 mN m

^{−1}. Therefore, precision is the main target for further enhancement.

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

Latin Symbols | ||

A | cross-sectional area | - |

b | threshold | - |

c_{d} | drag coefficient | - |

d_{p} | droplet diameter | m |

E | energy | Nm |

F | force | N |

g | gravitation acceleration | m s^{−2} |

J | Jacobian matrix | - |

S | surface | m ^{2} |

t | time | s |

V_{int} | internal volume | mL |

v | velocity | - |

w | weight function of a neural network | - |

x | input into a neural network | - |

z | transfer function | - |

Greek Symbols | ||

α | factor | - |

η | dynamic viscosity | kg m^{−2} s^{−3} |

Ψ | correlation function | - |

ρ | density | kg m^{−3} |

σ | surface tension | N m^{−1} |

τ | shear stress | N m^{−2} |

Dimensionless Numbers | ||

Mo | Morton number | - |

Re | Reynolds number | - |

We | Weber number | - |

## Appendix A

#### Appendix A.1

- a.
- Load trained neural network, set image resolution and cannula size and calibrate length per pixel
- b.
- Set filter for minimal pixel for droplet detection
- c.
- Read and then disassemble video
- d.
- Perform image segmentation using trained CNN
- a.
- Detect first image frame with a pixel with the label “detached droplet.” Save the following three images and the image before this frame
- b.
- Determination of area and diameter
- i.
- Filter out areas smaller than set filter area, overwrite falsely detected pixel labels with their most likely neighborhood values

- c.
- Determination of volume from area splines
- i.
- If one pixel with the label neighborhood is assigned as a pixel of the contour line of the droplet
- ii.
- The positions of the pixels that form the contour line are stored and a function (lots of third-order polynomial “splines” are fitted to smaller subsections of the contour, exact count of subsections depends on size of the droplet) is fitted through these points.

- e.
- Calculation of aspect ratio
- a.
- Aspect ratio = diameter width/diameter height of selected images

- f.
- Determination of velocity based on the pixels uprising from image to image and the image’s time difference
- g.
- Show & save segmentation result

**Table A1.**Parameters for the velocity curves shown in Section 3.2.

Parameter | Value | Unit |
---|---|---|

ρ_{c} | 997 | kg∙m^{−3} |

ρ_{disp} | 877.2 | kg∙m^{−3} |

d_{p} | 4.4 | mm |

d_{tube} | 15 | mm |

v_{p} (t = 0) | 10^{−6} | m∙s^{−1} |

g | 9.81 | m∙s^{−2} |

c_{d,wall} | calculated with (30) | - |

**Table A2.**Resulting trueness and precision for the chemical systems. All data can be found in the link titled “Data availability statement”.

Parameter | n-Butyl Acetate | n-Butanol | Toluene |
---|---|---|---|

Trueness | −1 to +0.4 mN m^{−1} | +0.8 mN m^{−1} | −1.2 mN m^{−1} |

Precision | ±0.3 to ± 0.6 mN m^{−1} | ±0.2 mN m^{−1} | ±4.9 mN m^{−1} |

## References

- Kockmann, N.; Bittorf, L.; Krieger, W.; Reichmann, F.; Schmalenberg, M.; Soboll, S. Smart Equipment—A Perspective Paper. Chem. Ing. Tech.
**2018**, 90, 1806–1822. [Google Scholar] [CrossRef] - Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; Adaptive Computation and Machine Learning Series; MIT Press Ltd.: Cambridge, MA, USA, 2017. [Google Scholar]
- Villalba-Diez, J.; Schmidt, D.; Gevers, R.; Ordieres-Meré, J.; Buchwitz, M.; Wellbrock, W. Deep Learning for Industrial Computer Vision Quality Control in the Printing Industry 4.0. Sensors
**2019**, 19, 3987. [Google Scholar] [CrossRef] [PubMed] - Schuler, J.; Neuendorf, L.; Petersen, K.; Kockmann, N. Micro-computed tomography for the 3D time‐resolved investigation of monodisperse droplet generation in a co-flow setup. AIChE J.
**2020**, 67, e17111. [Google Scholar] [CrossRef] - Kockmann, N. Digital methods and tools for chemical equipment and plants. React. Chem. Eng.
**2019**, 4, 1522–1529. [Google Scholar] [CrossRef] - Ahmad, A.; Song, C.; Tan, R.; Gartler, M.; Klopper, B. Active Learning Application for Recognizing Steps in Chemical Batch Production. In Proceedings of the 2022 IEEE 27th International Conference on Emerging Technologies and Factory Automation (ETFA), Stuttgart, Germany, 6–9 September 2022; IEEE: Stuttgart, Germany, 2022. [Google Scholar]
- Neuendorf, L.M.; Baygi, F.; Kolloch, P.; Kockmann, N. Implementation of a control strategy for hydrodynamics of a stirred liquid–liquid extraction column based on convolutional neural networks. ACS Eng. Au
**2022**, 2, 369–377. [Google Scholar] [CrossRef] - Nandakumar, S.C.; Harper, S.; Mitchell, D.; Blanche, J.; Lim, T.; Yamamoto, I.; Flynn, D. Bio-Inspired Multi-Robot Autonomy. arXiv
**2022**, arXiv:2203.07718. [Google Scholar] - Wiederkehr, P.; Finkeldey, F.; Merhofe, T. Augmented semantic segmentation for the digitization of grinding tools based on deep learning. CIRP Ann.
**2021**, 70, 297–300. [Google Scholar] [CrossRef] - Roshani, G.H.; Ali, P.; Mohammed, S.; Hanus, R.; Abdulkareem, L.; Alanezi, A.; Sattari, M.; Amiri, S.; Nazemi, E.; Eftekhari-Zadeh, E.; et al. Simulation study of utilizing X-ray tube in monitoring systems of liquid petroleum products. Processes
**2021**, 9, 828. [Google Scholar] [CrossRef] - Abuqaddom, I.; Mahafzah, B.; Faris, H. Oriented stochastic loss descent algorithm to train very deep multi-layer neural networks without vanishing gradients. Knowl. Based Syst.
**2021**, 230, 107391. [Google Scholar] [CrossRef] - Chen, T.-C.; Alizadeh, S.; Alanazi, A.; Guerrero, J.G.; Abo-Dief, H.; Eftekhari-Zadeh, E.; Fouladinia, F. Using ANN and Combined Capacitive Sensors to Predict the Void Fraction for a Two-Phase Homogeneous Fluid Independent of the Liquid Phase Type. Processes
**2023**, 11, 940. [Google Scholar] [CrossRef] - Medl, M.; Rajamanickam, V.; Striedner, G.; Newton, J. Development and Validation of an Artificial Neural-Network-Based Optical Density Soft Sensor for a High-Throughput Fermenta-tion System. Processes
**2023**, 11, 297. [Google Scholar] [CrossRef] - Clift, R.; Grace, J.; Weber, M. Bubbles, Drops, and Particles; Acad. Press: New York, NY, USA, 1978. [Google Scholar]
- Nielsen, M. (Ed.) Neural Networks and Deep Learning; Determination Press: San Francisco, CA, USA, 2015. [Google Scholar]
- Böckh, P.; Saumweber, C. Fluidmechanik: Einführendes Lehrbuch, 3rd ed.; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Dahmen, W.; Reusken, A. Numerik für Ingenieure und Naturwissenschaftler; Springer-Lehrbuch, Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Crowe, C.T. Multiphase Flows with Droplets and Particles, 2nd ed.; CRC Press: Boca Raton, FL, USA, 2012. [Google Scholar]
- Wegener, M.; Grünig, J.; Stüber, J.; Paschedag, A.; Kraume, M. Transient rise velocity and mass transfer of a single drop with interfacial instabilities—Experimental investigations. Chem. Eng. Sci.
**2007**, 62, 2967–2978. [Google Scholar] [CrossRef] - Räbiger, N.; Schlüter, M. VDI-Wärmeatlas, 11th ed.; L4 Blasen und Tropfen in technischen Apparaten; Springer Reference; Springer Vieweg: Berlin, Germany, 2013. [Google Scholar]
- Barati, R.; Neyshabouri, S.; Ahmadi, G. Development of empirical models with high accuracy for estimation of drag coefficient of flow around a smooth sphere: An evolutionary approach. Powder Technol.
**2014**, 257, 11–19. [Google Scholar] [CrossRef] - Kelbaliyev, G.I. Drag coefficients of variously shaped solid particles, drops, and bubbles. Theor. Found Chem. Eng.
**2011**, 45, 248–266. [Google Scholar] [CrossRef] - Chang, C.-C.; Liou, B.-H.; Chern, R. An analytical and numerical study of axisymmetric flow around spheroids. J. Fluid Mech.
**1992**, 234, 219–246. [Google Scholar] [CrossRef] - Bohl, W.; Elmendorf, W. Technische Strömungslehre: Stoffeigenschaften von Flüssigkeiten und Gasen, Hydrostatik, Aerostatik, Inkompressible Strömungen, Kompressible Strömungen, Strömungsmesstechnik, 15th ed.; Kamprath-Reihe, Vogel: Würzburg, Germany, 2014. [Google Scholar]
- Kishore, N.; Gu, S. Wall Effects on Flow and Drag Phenomena of Spheroid Particles at Moderate Reynolds Numbers. Ind. Eng. Chem. Res.
**2010**, 49, 9486–9495. [Google Scholar] [CrossRef] - Bäumler, K.; Wegener, M.; Paschedag, A.; Bänsch, E. Drop rise velocities and fluid dynamic behavior in standard test systems for liquid/liquid extraction—Experimental and numerical investigations. Chem. Eng. Sci.
**2011**, 66, 426–439. [Google Scholar] [CrossRef] - Hradetzky, G.; Sommer, K. Flüssigkeits-Dichtemessung: Übersichtsartikel. Available online: https://physchem.hs-merseburg.de/Dichte.pdf (accessed on 17 March 2021).
- Zierep, J.; Bühler, K. Grundzüge der Strömungslehre: Grundlagen, Statik und Dynamik der Fluide, 9th ed.; Springer Fachmedien: Wiesbaden, Germany, 2013. [Google Scholar]
- Voit, H.; Zeppenfeld, R.; Mersmann, A. Calculation of primary bubble volume in gravitational and centrifugal fields. Chem. Eng. Technol.
**1987**, 10, 99–103. [Google Scholar] [CrossRef]

**Figure 3.**Recorded videos of the rising droplets are cut into frames. These frames are then manually labeled using Matlab’s Image Labeler tool. This means every pixel is assigned one of three classes: background (red color), attached droplet to the nozzle (yellow) or detached droplet (blue).

**Figure 4.**Representation of incorrectly identified pixels by the ResNet50 by an overlay of the correct (blue) and wrong (red) detected pixels over the original image.

**Figure 5.**Illustration of the velocity determination method with a static reference frame on a rising toluene droplet in water.

**Figure 6.**Velocity curves of a spherical rising droplet with a diameter of 4.4 mm for different values of the acceleration factor α in a tube with a diameter of 15 mm and for the system n-butyl acetate–water.

**Figure 7.**Velocity of measured (□) and calculated (○) drops. A correlation of the solution of the equation of motion without the consideration of wall effect (red line, Equation (20)) and the correlation of Bäumler et al. [13] including wall effects for comparison (lower black boundary, Equation (23)).

**Figure 8.**Shapes of droplets: spherical (

**left**), oblate form (

**center**) and prolate (

**right**). In the oblate shape, the diameter is larger than the height. In the prolate shape, the height is larger than the diameter.

**Figure 9.**Plot of the determined shape factors against the aspect ratios of the droplets for different liquid systems and optical resolutions.

**Figure 10.**Results of the density measurement for n-butyl acetate droplets based on the third and fourth images after the reference frame. The horizontal line marks the reference value from the literature [26].

**Figure 11.**Equilibrium of forces for static droplet formation at the nozzle. Force balance taken from [29].

**Figure 12.**Results of the determination of the interfacial tension of n-butyl acetate droplets in water by using the third and fourth frames after the first frame of the droplet’s detachment. The thick horizontal line is taken as reference from literature [26].

System | σ [mN/m] | Mo [-] |
---|---|---|

toluene—DI water | 35 | 3.10 × 10^{−11} |

n-butyl acetate—DI water | 14 | 4.31 × 10^{−10} |

n-butanol—DI water | 1.63 | 3.45 × 10^{−7} |

Data Augmentation | Value |
---|---|

Random X reflection | true |

Random Y reflection | true |

Random rotation [°] | [−20, 20] |

Symmetric scaling [-] | [0.1, 2] |

Translation X [px] | [−120, 120] |

Translation Y [px] | [−120, 120] |

Indicator | ResNet50 |
---|---|

Recall | 0.995 |

Dice | 0.977 |

Accuracy | 0.993 |

F1 | 0.978 |

Precision | 0.998 |

Parameter | Initial Value |
---|---|

Δρ | 0.25∙ρ_{c} |

ρ_{disp} | 0.75∙ρ_{c} |

**Table 5.**Mean value, standard deviation, and fluctuation margin of the density determinations on the system n-butyl acetate–water. The results are based on the third and fourth frames after the reference frame.

Parameter | Third Frame | Fourth Frame | Condensed |
---|---|---|---|

$\overline{x}$ [kg·m^{3}] | 875.7 | 876.7 | 876.2 |

$s$ [kg·m^{3}] | 5.7 | 1.4 | 4.1 |

${s}_{\overline{x}}$ [kg·m^{3}] | 1.6 | 0.4 | 0.9 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Neuendorf, L.; Müller, P.; Lammers, K.; Kockmann, N.
Convolutional Neural Network (CNN)-Based Measurement of Properties in Liquid–Liquid Systems. *Processes* **2023**, *11*, 1521.
https://doi.org/10.3390/pr11051521

**AMA Style**

Neuendorf L, Müller P, Lammers K, Kockmann N.
Convolutional Neural Network (CNN)-Based Measurement of Properties in Liquid–Liquid Systems. *Processes*. 2023; 11(5):1521.
https://doi.org/10.3390/pr11051521

**Chicago/Turabian Style**

Neuendorf, Laura, Pascal Müller, Keno Lammers, and Norbert Kockmann.
2023. "Convolutional Neural Network (CNN)-Based Measurement of Properties in Liquid–Liquid Systems" *Processes* 11, no. 5: 1521.
https://doi.org/10.3390/pr11051521