Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Innovative rapid liquid concentration measurement based on thermal lens effect and machine learning

Open Access Open Access

Abstract

This study addresses the critical need for rapid and online measurement of liquid concentrations in industrial applications. Although the thermal lens effect (TLE) is extensively explored in laser systems for determining thermal lens focal lengths, its application in quantifying solution concentrations remains underexplored. This research explores the relationship between various liquid concentrations and the interference fringes induced by the TLE. A novel approach is introduced, utilizing TLE to measure solution concentrations, with integration of image processing and discrete Fourier transform (DFT) techniques for feature extraction from interference rings. Further, machine learning, specifically backpropagation artificial neural network (BP-ANN), is employed to model concentration measurement. The model demonstrates high accuracy, evidenced by low root mean square error (RMSE) values of 3.055 and 5.396 for the training and test sets, respectively. This enables precise, real-time determination of soy sauce concentration, offering significant implications for industrial testing, environmental monitoring, and other related fields.

© 2024 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. Introduction

In various industries such as chemical, pharmaceutical, food and beverage, and petroleum, the measurement of solution concentrations is of great importance. Solution concentration refers to the quantitative measure of a solute within a solvent. Typically, this metric can be expressed in two ways: if denoted by the ratio of the solute's volume to the total volume of the solution, it is known as volume concentration; if represented by the value of the solute's mass per unit volume of the solution, it is termed mass concentration [1]. This study focuses on volume concentration, expressed in terms of volume, which is frequently applied in the standardization of liquid mixtures in the food and beverage industry. Current common methods for measuring solution concentration, including spectroscopic techniques such as ultraviolet/visible spectroscopy (UV/Vis), infrared spectroscopy (IR), and atomic absorption spectroscopy (AAS) [2,3]. Chromatographic methods include high-performance liquid chromatography (HPLC), gas chromatography (GC), and thin-layer chromatography (TLC). Additionally, there are electrochemical methods, such as conductivity, potentiometry (e.g., pH measurement), and polarography [4]. Cai et al. used a dual-rotator Mueller matrix polarimeter for glucose concentration [5]. There are also chemical analysis methods, Fang et al. used the conductivity method to measure the solution concentration [6]. Li et al. studied the measurement of solution concentration by titration method [7]. Seo et al. measured ethanol concentrations using solvent extraction-dichromate oxidation methods and gas chromatography [8]. However, these techniques often have limitations [9]. Spectroscopic methods require specialized, costly equipment and complex sample preparation, demanding high technical skills. For example, Inductively Coupled Plasma Mass Spectrometry (ICP-MS) is often need to dissolve the sample in acid, a process that is time-consuming and may subject the sample to acid effects, limiting its applicability [10]. AAS and Atomic fluorescence spectroscopy (AFS) involve time-consuming preparations, needing sample dissolution [11]. In the case of AFS, after conversion to a liquid state, derivatization is necessary to transform the analyte into a form more amenable to fluorescence detection [12]. Chromatography, like HPLC, requires expensive equipment and materials, with method establishment and sample pre-treatment being labor-intensive. GC is suited for volatile compounds but has limitations with large or polar molecules, while TLC offers limited quantitative analysis [13,14]. In electrochemical methods such as potentiometry, there is a high demand for maintenance of electrodes and other measurement components. Signal interference can be an issue in complex matrices. For instance, conductivity is significantly influenced by the ionic strength of the solution, presenting challenges in analyzing low concentrations or in complex matrices [15]. Therefore, this study offers a new approach to the measurement of liquid concentrations.

The thermal lens effect (TLE) represents a photothermal phenomenon. Occurring when a Gaussian beam encounters an absorbing medium, it results in a refractive index gradient due to the absorption of laser energy and subsequent temperature rise [16]. While TLE has been widely studied in fields such as high-power laser analysis and micro-space [17]. Li et al. focused on the relationship between the TLE and light's orbital angular momentum [18]. Ren et al. investigated the elimination of TLE for Repeat Rate High Power Nd: Glass Laser [19]. Moreover, thermal lens spectrometry [20], represents an application for precisely measuring the absorption spectrum of various media [21,22]. An example of its utility is demonstrated by Khabibullin et al. [23], where dual-beam thermal lens spectrometry is employed to determine the thermal diffusivity of aqueous dispersions of silicon oxide nanoparticles. A notable study is Xie's approach [24], which demonstrated a general correlation between the concentration of sodium chloride solution and the relative intensity of the spot under TLE, by investigating parameters such as the interference spot radius. However, this approach does not precisely measure the concentration of the solution, and when relying solely on the relative strength of the TLE for fitting, it yields a relatively weak correlation. TLE is a complex nonlinear physical phenomenon influenced by multiple factors including light absorption intensity, energy distribution of the beam, thermal conductivity of the sample, thermo-optical coefficient, and geometric shape. Relying solely on TLE intensity as a single variable for linearly predicting solution concentration in this study fails to capture the intricate relationship between TLE response, leading to significant prediction errors due to insufficient information. For instance, phase shifts indicate the delay in phase experienced by light waves passing through a heated medium, and the divergence angle describes the degree of beam spreading caused by TLE, both revealing critical information about TLE. Therefore, employing a multivariate model is more suitable for accurately characterizing the TLE response in predicting solution concentrations. Additionally, the simple linear fitting used in previous research cannot accurately represent the nonlinear characteristics of TLE, necessitating the use of more complex mathematical models for fitting and analysis. Therefore, this study offers a new approach to the measurement of liquid concentrations.

This study introduces an innovative application of TLE for precise liquid concentration measurement, innovatively combining the TLE with image processing techniques and machine learning (ML), overcoming the nonlinear challenges and the constraints of single-variable analysis that have been manifested in previous studies exploring the correlation between TLE intensity and solution concentration. A system has been developed where a CMOS camera captures interference patterns for image processing analysis. The concentration of the solution is measured using interference patterns of TLE rather than just the TLE intensity. By extracting features in both spatial and frequency domains of images, intricate details are preserved for effective use, enabling multivariate analysis through the extraction of multiple features. To address the challenges of multivariate analysis and the nonlinear characteristics of TLE, ML, specifically the backpropagation artificial neural network (BP-ANN), is employed as mathematical model in this study, benefitting from its adaptability and capability to analyze complex data. BP-ANN excels in nonlinear modeling and is capable of revealing the intricate nonlinear relationships between TLE interference patterns and liquid concentration. It surpasses the limitations of traditional linear models. Another strength of BP-ANN lies in its capacity for multivariate analysis, integrating interactions among various features (e.g., those extracted from spatial and frequency domains) and learning the relationships between these features and concentration, thereby facilitating precise measurements. Thanks to ML's ability to process and analyze complex data, it finds wide application in the fields of chemistry and physics measurement, such as tracing the source of plastic combustion smoke by combining Laser-induced breakdown spectroscopy with BP-ANN [25], and estimating forest aboveground biomass by integrating high-resolution satellite imagery with BP-ANN [26]. The results showcase the feasibility and potential of the TLE-based concentration measurement method, integrating image processing and machine learning. This innovative method is expected to make significant contributions to environmental conservation, industrial detection, and liquid concentration measurement.

2. Experimental section

2.1 Experimental set up

The constructed experimental setup, depicted in Fig. 1, is designed to detect and quantify the concentration of solutions using the TLE to gather medium information. The system incorporates a semiconductor laser, operating in a continuous wave mode at a central wavelength of 532 nm and emitting a power of 50 mW. To generate a pronounced TLE, the laser beam is focused onto a thin liquid film using a converging lens with a 60 mm focal length. This exposure to the laser results in a temperature rise within the liquid film, characterized by higher temperatures centrally and lower temperatures peripherally, thereby creating a temperature-dependent refractive index variation field. This field leads to the generation of TLE and consequent emergence of additional transverse phase shifts, the passed laser beam appears as an interference fringe.

 figure: Fig. 1.

Fig. 1. Schematic diagram of TLE experimental system for the solution concentration detection.

Download Full Size | PDF

To compact the device’s volume, a pair of flat mirrors is integrated to fold the optical path, projecting the interference patterns onto an optical screen. An overhead CMOS camera (RYYB SONY IMX700, 4096 × 3072 resolution) positioned above it records the interference patterns. The images captured by the CMOS camera are then transmitted to a computer for further analysis.

2.2 Sample preparation

The experiment employed soy sauce as the primary test solution, while soy sauce essence is utilized as an adulterant to simulate the market scenario of blending soy sauce for concentration identification testing. It's important to note that the use of soy sauce essence in this context is solely for experimental simulation and does not imply that all soy sauce essence in the market is used for adulteration purposes. The color and flavor of soy sauce and soy sauce essence are similar, making it challenging to distinguish between them solely based on these characteristics. Therefore, employing both soy sauce and soy sauce essence as experimental subjects would yield more meaningful results.

A range of samples with varying doping concentrations are prepared, from 100% soy sauce to progressively reduced concentrations in 5% decrements, culminating in samples of 20 distinct concentrations. Each concentration category comprised multiple samples. The thickness of the liquid film is meticulously controlled at 180 µm, regulated by the cover glass and slide. The structural layout of the liquid film container is illustrated in Fig. 2.

 figure: Fig. 2.

Fig. 2. Device structure of liquid film.

Download Full Size | PDF

3. Analysis and processing

3.1 Theoretical verification

In this experiment, a Gaussian beam laser source is utilized. The beam undergoes paraxial propagation, and its intensity distribution adheres to the Gaussian function [27]:

$$I(d) = {I_0}{e^{( - \frac{{{d^2}}}{{\omega _0^2}})}}$$

Here, $d$ represents the distance from any point on the laser beam to its central axis, ${I_0}$ denotes the intensity at the beam center $d = 0$, and ${\omega _0}$ is the waist radius of the Gaussian beam.

Assuming the $z$ axis as the direction of incidence for a Gaussian beam, its axial energy density distribution conforms to the Gaussian distribution [28]. As the Gaussian beam passes through a liquid film, the radial energy gradient within the film is given by:

$$E(d) = \frac{{\beta P}}{{\pi r}}{e^{( - \frac{{2{d^2}}}{{{r^2}}})}}$$

Here, $\beta $ represents the absorption coefficient of liquid film, $P$ denotes the optical power of the incident laser, and $r$ is the laser's irradiation radius.

If the refractive index of a medium at temperature $T$ is ${n_0}(T)$, then at a temperature $T + \Delta T$, the refractive index becomes:

$$n({T + \Delta T} )= {n_0}(T )+ \frac{{dn}}{{dT}}\Delta T$$

Here, $n$ signifies the refractive index, $dn/dT$ is the thermo-optical coefficient, and $\Delta T$ is the change in temperature. For most substances, the refractive index exhibits a negative correlation with temperature [18], implying $dn/dT$. As $\Delta T$ is associated with ${d^2}$, this results in a radially symmetric temperature gradient in the soy sauce film. Consequently, within the laser irradiation zone, the refractive index $n$ of the liquid film increases radially from the center, effectively forming a region akin to a concave lens at the site of laser irradiation.

Owing to the gradient in refractive index, the beam's phase experiences a corresponding alteration [29]. In the context of a thin sample medium, the transverse phase shift of the light beam at the exit surface can be approximated by a Gaussian distribution:

$$\Delta \varphi (d )= \Delta {\varphi _0}{e^{\left( { - \frac{{2{d^2}}}{{{\omega^2}}}} \right)}}$$

Here, $\Delta {\varphi _0}$ represents the peak of the nonlinear phase shift induced in a Gaussian beam by a nonlinear medium. Through the analysis of the incident field, the thermal lens diffraction screen function, and the application of the Fresnel-Kirchhoff diffraction integral formula in polar coordinates, it becomes evident that the Gaussian beam, upon passing through the nonlinear medium, produces concentric rings of bright and dark phases in the far-field region. Figure 3 depicts the interference rings generated after light passes through a thermal lens, where the spacing between the fringes gradually increases from the center outward. The essence of this phenomenon is attributed to the distribution of refractive index within the film, which induces a constant phase difference as light traverse different optical paths at varying locations, resulting in interference. Owing to the negative thermo-optic coefficient, changes in temperature and refractive index are most pronounced in the central region, thereby causing the liquid film to act similarly to a concave lens with strong diverging capabilities, resulting in the enlargement of interference rings (imaged with a wide divergence angle), which can be observed with the eye and camera. The characteristics of the interference rings, such as size, intensity distribution, can vary with the different effects of the equivalent concave lens under different concentration.

 figure: Fig. 3.

Fig. 3. Interference ring caused by TLE. The internal refractive index distribution gives rise to a constant phase difference, which is a necessary condition for interference. The equivalent concave lens also causes the interference ring to diverge into a larger image.

Download Full Size | PDF

In the realm of nonlinear optics, as a light beam traverses a medium with nonlinear properties, the medium's refractive index undergoes alterations in response to variations in light intensity, thereby inducing an additional phase displacement. This supplementary phase shift can be mathematically represented as:

$$\Delta \varphi = {k_0}\int {nI(z )dz}$$

Here, ${k_0}$ denotes the wave vector. At the center of the Gaussian beam, where the light intensity is maximal, the phase shift $\Delta {\varphi _0}$ can be expressed as:

$$\Delta {\varphi _0} = \frac{{2\pi n{I_0}L}}{\lambda }$$

In this equation, $\lambda $ is the wavelength of the light wave. The additional phase displacement $\Delta \varphi (d )$ is related to the refractive index; therefore, for media with different concentrations, the molecular density distribution within the liquid film varies, leading to differences in both the thermo-optic coefficient [30]. As a result of variations in the thermo-optical coefficient due to concentration differences at a fixed laser power, changes in the refractive index distribution ensue. Consequently, liquid films with varying concentrations induce diverse additional transverse phase shifts, leading to the formation of dissimilar patterns of concentric rings with bright and dark fringes in the far field. These variances are primarily manifested in alterations of ring size, number of fringes, fringe spacing, and the relative and absolute light intensities between fringes.

3.2 Detection of liquid film

In this study, the concentration measurement model is developed by combining image processing and machine learning techniques. The process involved in establishing this recognition model is depicted in Fig. 4.

 figure: Fig. 4.

Fig. 4. The measurement model based on image processing and machine learning.

Download Full Size | PDF

The pattern is captured by a CMOS camera and transmitted to a computer, where feature extraction from the pattern photos is conducted through discrete Fourier transform (DFT) and numerical statistics in image processing, encompassing both spatial domain and frequency domain analyses. Ultimately, ML model is employed as the mathematical analysis model, trained with experimental data to learn the complex nonlinear mapping relationship between input (image features) and output (concentration). This data-based mapping relationship acts as a calibration factor during the prediction phase, enabling us to directly use the input features to predict accurate concentration values through the mapping relationship.

Before measurement, it is necessary to determine the appropriate thickness setting for the sample's film. For the detection based on TLE, liquid films consisting of 100% soy sauce are fabricated with thicknesses of 180 µm, 360 µm, and 540 µm. The resulting interference fringe patterns are illustrated in Fig. 5.

 figure: Fig. 5.

Fig. 5. Interference patterns of samples with different liquid film thickness. (a) 180 µm. (b) 360 µm. (c) 540 µm.

Download Full Size | PDF

The interference patterns of the liquid film exhibit notable variations in relation to different thicknesses, as depicted in Fig. 5. Furthermore, an increase in film thickness correlates with a decrease in the signal-to-noise ratio (SNR). To ensure enhanced accuracy and a higher SNR for identification purposes, the liquid film with a thickness of 180 µm is selected, thereby facilitating subsequent concentration quantification.

Different samples, characterized by varying concentrations, are analyzed based on TLE. When the laser is focused onto the liquid film, additional transverse phase shifts occur, leading to the emergence of interference fringes. Images of the interference fringes captured from each sample are collected and stored, with some representative examples illustrated in Fig. 6.

 figure: Fig. 6.

Fig. 6. Interference patterns of samples with different soy sauce concentration. (a) 5% concentration. (b) 60% concentration. (c) 100% concentration.

Download Full Size | PDF

As shown in Fig. 6, With the increase in concentration, the TLE effect and interference pattern becomes more apparent and different, which essentially act as modifications in the medium's material properties. Such changes lead to alterations in the thermo-optical coefficient, thereby causing shifts in the lateral refractive index distribution, the difference of which within the film increases. As a consequence, this leads to a stronger diverging capability of the equivalent concave lens that is formed, thus resulting in larger imaged interference rings, and liquid films of different concentrations under identical laser action generate diverse additional transverse phase shifts. This results in observable discrepancies in the pattern of concentric rings, characterized by bright and dark phases, in the far field.

Combining the aforementioned factors, liquid films of different concentrations produce varying interference models and imaging effects due to different additional phase shifts. Under the influence of the TLE, each liquid film's interference pattern varies in size, number of fringes, spacing between the fringes, and intensity distribution. The interference patterns of higher concentrations are characterized by larger rings, a greater number of interference fringes, and a variation in light intensity distribution that correlates with the number and spacing of the fringes.

The principle of quantification in solution measurement is based on the characteristics of interference patterns at different concentrations, such as variations in size and energy distribution. Innovatively, through image processing and numerical statistical calculations, each interference image characteristics is quantified (by calculating characteristics such as mean, variance, spectral energy, average frequency, and others). These quantified characteristics, serving as a unique “fingerprint,” encapsulate the medium's properties, including concentration information. Utilizing ML, the model is trained on quantified characteristics extracted through image processing from a dataset of 136 images. Once the model is trained, it can directly input quantified characteristics to predict concentration, thereby achieving the quantification of concentration. This approach enables the automatic acquisition of the nonlinear relationship between various concentration and facilitates the establishment of a robust concentration recognition model, capable of rapid and accurate identification.

3.3 Feature extraction of pattern

Feature extraction in this study is bifurcated into two primary categories: extraction of image spatial domain features, and extraction of image frequency domain features. Given that the interference fringes manifest as symmetrical circular rings, it suffices to utilize the spatial information along a radial line passing through the circle's center to represent the spatial domain information of the entire ring pattern.

To determine the center of the interference fringe ring, the image's center of mass is calculated. The first step involves binarizing the image. Binarization transforms the image into a two-pixel value format (typically 0 and 1). Given an image $I$, the binarization process is expressed as:

$$B({x,y} )= \left\{ \begin{array}{l} 1,\textrm{ if }I({x,y} )> T\\ 0,\textrm{ otherwise} \end{array} \right.$$
$B({x,y} )$ represents the pixel value of the binary image at coordinates $({x,y} )$, $I({x,y} )$ is the pixel value at the corresponding location in the original image, and $T$ is the threshold used to distinguish the foreground from the background. Subsequently, the connected domains in the image are computed, referring to continuous groups of pixels within the image [31]. In the connected domain proximal to the image center, the center of mass is calculated as follows:
$$\bar{x} = \frac{{\sum\nolimits_{i = 1}^M {{x_i}} }}{M}$$
$$\bar{y} = \frac{{\sum\nolimits_{i = 1}^N {{y_i}} }}{N}$$

Here, the connected domain comprises the set $\{{({{x_i},{y_i}} )} \}$, where $i$ is the index of the connected domain, $M$ and $N$ represent the number of rows and columns in the image, respectively.

Taking a 100% concentration soy sauce film as an example, the binary image is presented in Fig. 7, with the centroid coordinates located at row 1230 and column 2267.

 figure: Fig. 7.

Fig. 7. Raw image and binary image. (a) raw image. (b) binary image.

Download Full Size | PDF

The Horizontal line containing the centroid is selected to analyze its light intensity distribution, characterizing the overall light intensity distribution of the entire interference ring.

The captured image is inevitably influenced by the shooting equipment and environmental factors. To mitigate the impact of noise, and improve the SNR. Gaussian filtering is applied to the selected data from the horizontal line [32]. This filtering technique is effective in reducing noise while preserving essential edge information, thereby enhancing the quality of data. For filter, A standard deviation of 10 is employed for optimal filtering performance. Consequently, the data after Gaussian filtering is chosen for feature extraction. Figure 8 illustrates the impact of Gaussian filtering on the data.

 figure: Fig. 8.

Fig. 8. Light intensity distribution. (a) data without filter. (b) data with filtered.

Download Full Size | PDF

As observed from Fig. 8, the interference pattern of TLE in the liquid film showcases a distinctive distribution pattern: there is high light intensity at the center and periphery, with a gradual transition of intensity occurring from the periphery towards the center. Specifically, the interference pattern exhibits regions of high intensity at both the center and edges, with the light intensity gradually decreasing and then increasing from the periphery towards the central region.

As shown in Fig. 8(b), it is evident that the image after Gaussian filtering appears smoother and less noisy, rendering it more suitable for feature extraction. The Gaussian filtering process is described by the following equation:

$$G(x )= \frac{1}{{\sqrt {2\pi {\sigma ^2}} }}{e^{ - \frac{{{x^2}}}{{2{\sigma ^2}}}}}$$

Here, $G(x )$ represents a one-dimensional Gaussian function, $\sigma $ is the standard deviation, and $x$ denotes the distance from the central point.

Gaussian filtering enhances image smoothness by substituting each pixel value with a weighted average of pixel values in its vicinity. For one-dimensional data, this process is expressed as:

$$I^{\prime}(x )= \sum\nolimits_{i ={-} k}^k {G(i )({x + i} )}$$

To quantify the spatial features of the interference pattern, calculations of the mean value, standard deviation, peak width, quartile distance, and average energy of the filtered data are performed [33].

The formula for calculating the average energy ${E_{aver}}$ is given by:

$${E_{aver}} = \frac{1}{M}\sum\nolimits_{i = 1}^N {{x_i}^2}$$

These extracted features encapsulate vital information about the interference patterns corresponding to different concentrations. For instance, the mean value reflects the average brightness of the image, providing insight into the overall intensity. The standard deviation measures the average fluctuation from the mean, indicating variability. The peak width serves as an indicator of the spread of the peak value, thus reflecting the stability of the feature. Additionally, the quartile range quantifies the data's variability, offering a measure of dispersion.

Frequency domain analysis facilitates a more straightforward approach to analyzing and extracting global structural information from images. In the feature extraction process of frequency domain, the initial step involves performing a two-dimensional discrete Fourier transform (DFT) on the two-dimensional image. Analysis in the frequency domain can unveil repetitive patterns and textures in images that are not readily apparent in the spatial domain [34]. For example, periodic structures or textural features in specific directions are more discernible in the frequency domain. Analyzing images at various scales within the frequency domain aids in identifying features of different sizes and levels of detail. DFT is a pivotal tool in digital signal processing for analyzing the frequency domain characteristics of two-dimensional signals, such as images. It is typically computed on the pixel values of digital images. The basic formula for this process is as follows:

$$\mu = \frac{1}{{MN}}\sum\nolimits_{x = 1}^M {\sum\nolimits_{y = 1}^N {I({x,y} )} }$$
$${I_{centered}}({x,y} )= I({x,y} )- \mu$$

Equation (13) calculates the mean pixel value of the image, and Eq. (14) represents the formula for centralization, where ${I_{centered}}({x,y} )$ is the pixel value after centralization. The centralization process effectively eliminates the direct current (DC) component from the signal's frequency, thereby enhancing the image contrast and making its features more pronounced. The formula for the DFT is given as:

$$F({u,v} )= \sum\nolimits_{x = 0}^{M - 1} {\sum\nolimits_{y = 0}^{N - 1} {{I_{centered}}({x,y} ){e^{ - j2\pi \left( {\frac{{ux}}{M} + \frac{{vy}}{N}} \right)}}} }$$
$${F_{centered}}({u,v} )= F\left( {u - \frac{M}{2},v - \frac{N}{2}} \right)$$

$F({u,v} )$ represents the frequency domain post-DFT, Eq. (15) and Eq. (16) detail the DFT process, and Eq. (16) represents the centralization of the frequency spectrum post-DFT, shifting the zero-frequency component to the center. The centralization of the spectrum positions the low-frequency components at the center and the high-frequency components around it. This arrangement makes it easier to discern and analyze the dominant frequencies within the image, thereby enhancing the overall effectiveness of the frequency domain analysis.

To accommodate the large dynamic range of the spectrum and prevent the loss of detail due to significant intensity differences, a logarithmic scale transformation is applied to the amplitude spectrum. This transformation is mathematically represented as:

$$M({u,v} )= ln({|{{F_{centered}}({u,v} )} |+ 1} )$$

This logarithmic transformation enhances the visibility of finer details in the spectrum by compressing the wider range of values into a more manageable scale, as indicated in Eq. (17).

The frequency domain representation of the interference fringe pattern, obtained through DFT and the ensuing centralization process, is showcased in Fig. 9. This diagram highlights that different interference patterns correspond to distinctly different frequency domains, which capture the intricate details of the interference patterns, reflecting the initial disparities in concentrations. The differences in Fig. 9 at varying concentrations are subtle and require careful observation. While interference patterns change with concentration, leading to alterations in both high and low frequency components on the spectrum, these changes are often microscopic and not always easily distinguishable at a macroscopic level. Although changes on the overall spectrum are not pronounced, differences in peak numbers and frequency band distribution are indeed observed. These minute variations are crucial as they reveal the microstructural information of the solution at different concentrations. This is why the use of image processing for feature extraction combined with ML enables more accurate identification of concentrations, as ML can learn and predict from these subtle differences. Table 1 allows for the observation of subtle differences through the data. In essence, they encapsulate information pertinent to different media, revealing the unique characteristics of each pattern through their distinct frequency signatures.

 figure: Fig. 9.

Fig. 9. Frequency domain image processed by DFT. (a) 25% concentration. (b) 50% concentration. (c) 75% concentration. (d) 100% concentration.

Download Full Size | PDF

Tables Icon

Table 1. Frequency characteristics in Fig. 9.

Subsequently, based on the frequency domain analysis, various parameters such as the main peak frequency, main peak amplitude, number of peaks, frequency band energy, average frequency, frequency variance, and spectrum entropy are calculated to extract the frequency domain features. The calculation formula for spectrum entropy is expressed in Eq. (18):

$$H ={-} \sum\nolimits_{i = 1}^N {p(i ){{\log }_2}p(i )}$$

Here, $H$ represents the spectrum entropy, $N$ is the number of discrete frequency points in the spectrum, and $p(i )$ denotes the normalized amplitude at each frequency point.

The extraction of features not only aids in overcoming the limitations of human observation but also provides a systematic and quantitative approach to analyzing the nuanced details and complexities inherent in the data.

Table 2 presents the values of various features across different concentrations for selected samples. The data corresponding to certain characteristics display distinct patterns as the concentration varies. However, a comprehensive consideration should be given to the varying concentrations. Given the nonlinear nature of TLE, deriving definitive rules from the extensive characteristic data poses a significant challenge. Consequently, the application of machine learning becomes essential for developing a concentration identification model that effectively captures this complex nonlinear relationship.

Tables Icon

Table 2. Partial characteristic data of partial samples.

3.4 Concentration recognition model based on BP-ANN

The Back Propagation Artificial Neural Network (BP-ANN) is widely employed in various fields [35], based on the principle of error back-propagation. BP-ANN possesses the capability of performing intricate pattern classification and exhibits exceptional proficiency in mapping multi-dimensional functions. Fundamentally, the BP-ANN employs a gradient descent method to minimize the objective function, which is defined by the squared network error. Owing to its advantages in large-scale distribution, parallel processing, self-organization, and self-learning, BP-ANN is particularly well-suited for identifying and classifying the concentration information embodied in the interference fringe patterns.

For the concentration identification task, a total of 136 data groups, consisting of features extracted through image processing, are selected. These data groups represent a comprehensive range of concentrations, covering twenty distinct concentrations from 5% to 100%. The dataset is partitioned into a test set comprising 20% of the data and a training set constituting 80%. The learning rate is set at 0.01, with the target error established at 1e-6. Other related parameters are kept at default settings, and the number of nodes in the hidden layer is varied from 2 to 25. The features derived from the aforementioned extraction process are utilized as the input features for the BP-ANN, with the output being the liquid concentration. To mitigate the risk of overfitting during model training, input features are normalized. Given the inherent randomness in model training, the process is repeated ten times, averaging the outcomes to ensure robustness, and a ten-fold cross-validation is implemented.

After the completion of the training process, the performance of the model was evaluated using the R2, a measure of correlation. The R2 value for the training set attained a high score of 0.997, indicating a strong correlation between the predicted and actual values. Similarly, the test set achieved an R2 value of 0.978, demonstrating robust model performance on unseen data. Overall, the R2 value for the entire model reached 0.994, reflecting its high accuracy and reliability in concentration identification.

Figure 10 and Fig. 11 illustrate the curves of the true values and the predicted values. A closer alignment of the two points suggests a higher accuracy of the concentration recognition model, demonstrating its efficacy in precisely predicting the concentrations. The proximity of the blue points with the red points for each sample serves as a visual representation of the model's accuracy and predictive capability. The training set exhibits an exceptional Root Mean Square Error (RMSE) of 3.055, indicating a strong predictive accuracy during the training phase. While the RMSE for the test set is slightly higher at 5.396, it remains impressively low, suggesting the model's robustness and its capability to generalize effectively to unseen data. These metrics reflect the model's precision and reliability in concentration prediction tasks. Additional performance indicators are enumerated in Table 3.

 figure: Fig. 10.

Fig. 10. The Model effects of the training set.

Download Full Size | PDF

 figure: Fig. 11.

Fig. 11. The Model effects of the test set.

Download Full Size | PDF

Tables Icon

Table 3. Evaluation index of training set and test set.

Moreover, the Mean Absolute Error (MAE) for both the training and test sets is notably low, which further corroborates the model's precision in making predictions. The Mean Bias Error (MBE) is close to zero for both datasets, indicating an unbiased model that neither systematically overestimates nor underestimates the concentration values. Additionally, the standard deviation (STD) of the prediction errors, although marginally higher in the test set, indicates consistency and dependability in the model's predictive performance across different datasets. While the results demonstrate high accuracy, some errors are inevitable and may arise from factors such as the light screen, exposure settings of the CMOS camera, and shutter time parameters.

Despite these minor discrepancies, the results and evaluation indicators robustly affirm the reliability of the concentration identification model and further validate the effectiveness of feature extraction through image processing. The methodology adopted in this study holds significant promise for contributing to environmental conservation, industrial detection, liquid concentration measurement and the research about TLE in the future.

4. Conclusion

In this study, a comprehensive theoretical analysis is conducted on the variation of Thermal Lens Effect (TLE) with different solution concentrations, and distinct changes in the interference circles generated by TLE are observed experimentally. This research presents a novel approach to concentration measurement utilizing the TLE, which is complemented by image processing such as DFT, and statistical methods to extract interference pattern features ensuring preservation of intricate details. A precise liquid concentration measurement system is established, combining TLE with ML, and applied to determine the concentration of soy sauce film. The employment of ML has proven effective for accurate concentration determination, demonstrating high recognition efficacy. The results indicate that the training set achieves an RMSE of 3.055, while the test set shows an RMSE of 5.396, and the R2 value approaches 1 with minor deviation. This demonstrates the feasibility of feature extraction through image processing and concentration measurement based on the combination of TLE and ML. This study is anticipated to offer a novel perspective and direction for future research in TLE and concentration measurement, showing potential for extensive applications in industrial detection, environmental protection, food analysis, and other relevant fields.

Funding

Natural Science Foundation of Jiangsu Province (BK20180799); Academic Degree and Postgraduate Education Reform Project of Jiangsu Province (JGKT23_C025); Education Reform Project of Nanjing University of Information Science & Technology (2023XYBJG17).

Disclosures

The authors declare no conflicts of interest.

Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

Reference

1. T. Laue, “Proximity energies: a framework for understanding concentrated solutions,” J. Mol. Recognit. 25(3), 165–173 (2012). [CrossRef]  

2. S. Jodpimai, S. Boonduang, and P. Limsuwan, “Inline ozone concentration measurement by a visible absorption method at wavelength 605 nm,” Sens. Actuators, B 222, 8–14 (2016). [CrossRef]  

3. Z. Hu, T. Huang, Y. Wang, et al., “Study on the Effect of Solar Spectra on the Retrieval of Atmospheric CO2 Concentration Using High Resolution Absorption Spectra,” Spectrosc Spect Anal. 31(6), 1683–1687 (2011). [CrossRef]  

4. M. Grabarczyk, E. Wlazlowska, and M. Fialek, “Electrochemical Methods for the Analysis of Trace Tin Concentrations-Review,” Materials 16(24), 7545 (2023). [CrossRef]  

5. Z. Cai, Y. Lo, and C. Chang, “Dual-rotator mueller matrix polarimeter for high-accuracy and high-precision measurements of glucose concentration,” Optik. 245, 167662 (2021). [CrossRef]  

6. J. Fang, X. Li, Z. Chen, et al., “Online measurement of tetra-butyl ammonium bromide concentration in hydrate slurry by electric conductivity,” Chem. Ind. Eng. Prog. 36(6), 2038–2044 (2017).

7. H. Li, O. Dong, Y. Yao, et al., “The Mass Titration Analytical Method and Its Application,” J. Salt Lake Res. 19(3), 31–36 (2011).

8. H. Seo, H. Kim, O. Lee, et al., “Measurement of ethanol concentration using solvent extraction-dichromate oxidation methods and gas chromatography,” J Ind Microbiol Biot. 36(2), 285–292 (2009). [CrossRef]  

9. G. Palai and S. K. Tripathy, “A novel method for measurement of concentration using two dimensional photonic crystal structures,” Opt. Commun. 285(10-11), 2765–2768 (2012). [CrossRef]  

10. L. L. Jin, X. J. Wang, H. L. Li, et al., “Progress in inductively coupled plasma mass spectrometry technology and its application in metallurgical analysis,” Metall. Ana. 36(7), 1–14 (2016). [CrossRef]  

11. D. J. Butcher, “Review: Recent Advances in Optical Analytical Atomic Spectrometry,” Appl. Spectrosc. Rev. 48(4), 261–328 (2013). [CrossRef]  

12. Y. F. Xiao, X. H. Wang, and W. Hang, “Recent Development of Atomic Spectrometry in China,” Spectrosc Spect Anal. 35(9), 2377–2387 (2015).

13. J. E. Welke, K. C. Hernandes, K. P. Nicolli, et al., “Role of gas chromatography and olfactometry to understand the wine aroma: Achievements denoted by multidimensional analysis,” J. Sep. Sci. 44(1), 135–168 (2021). [CrossRef]  

14. J. Sherma, “Advances in the thin-layer chromatographic forensic analysis of inks,” J. Liq. Chromatogr. Relat. Technol. 39(12), 549–557 (2016). [CrossRef]  

15. A. Allanore, “Electrochemical Methods for the Study of Liquid Metals: Highlights from Metallurgical Transactions,” Metall. Mater. Trans. B 52(6), 3671–3687 (2021). [CrossRef]  

16. J. P. Gordon, R. C. C. Leite, R. S. Moore, et al., “Long-transient effects in lasers with inserted liquid samples,” J. Appl. Phys. 36(1), 3–8 (1965). [CrossRef]  

17. S. Chenais, F. Druon, S. Forget, et al., “On thermal effects in solid-state lasers: The case of ytterbium-doped materials,” Prog. Quantum Electron. 30(4), 89–153 (2006). [CrossRef]  

18. Y. Li, W. Zhang, and L. Chen, “Thermal lens effect with light's orbital angular momentum,” Opt. Express 30(17), 30210–30218 (2022). [CrossRef]  

19. X. Ren, Y. Zhang, D. Guo, et al., “Elimination of Thermal Lens for Repeat Rate High Power Nd:Glass Laser,” J. Optoelectron. Laser. 17(9), 1150–1152 (2006).

20. M. Liu and M. Franko, “Thermal lens spectrometry: still a technique on the horizon?” Int. J. Thermophys. 37(7), 67 (2016). [CrossRef]  

21. R. C. C. Leite, R. S. Moore, and J. R. Whinnery, “Low absorption measurements by means of the thermal lens effect using an He-Ne laser,” Appl. Phys. Lett. 5(7), 141–143 (1964). [CrossRef]  

22. M. Long, R. L. Swofford, and A. Albrecht, “Thermal lens technique: a new method of absorption spectroscopy,” Science 191(4223), 183–185 (1976). [CrossRef]  

23. V. R. Khabibullin, L. O. Usoltseva, I. V. Mikheev, et al., “Thermal Diffusivity of Aqueous Dispersions of Silicon Oxide Nanoparticles by Dual-Beam Thermal Lens Spectrometry,” Nanomaterials. 13(6), 1006 (2023). [CrossRef]  

24. J. Xie, “Investigation of thermal lens effect and measurement of sodium chloride solution concentration,” Phys. Bull. 08, 105–107 (2022).

25. E. L. Wan, D. P. Tian, Z. M. Sun, et al., “The online in situ detection of plastic and its combustion smoke via laser-induced breakdown spectroscopy,” Spectrosc. Lett. 56(2), 62–72 (2023). [CrossRef]  

26. Y. M. Guo, M. P. Zhu, Y. Y. Wu, et al., “Estimating Forest Aboveground Biomass Combining Pleiades Satellite Imagery and Field Inventory Data in the Peak-Cluster Karst Region of Southwestern China,” Appl. Spectrosc. Rev. 48(4), 261–328 (2013). [CrossRef]  

27. R. D. Turchiello, L. A. A. Pereira, and S. L. Gómez, “Low-cost nonlinear optics experiment for undergraduate instructional laboratory and lecture demonstration,” Am. J. Phys. 85(7), 522–528 (2017). [CrossRef]  

28. K. Xu and B. O. Zhu, “A 2D Gaussian beam launcher applied in parallel plate waveguide field mapping systems,” Microwave Opt. Technol. Lett. 63(7), 1848–1854 (2021). [CrossRef]  

29. L. Rodriguez, J. L. Paz, and C. C. Vera, “Frequency-resolved thermal lensing: An approach for thermal diffusivity measurements in liquid samples,” J. Nonlinear Opt. Phys. Mater. 24(03), 1550032 (2015). [CrossRef]  

30. R. Karimzadeh and M. Arshadi, “Thermal lens measurement of the nonlinear phase shift and convection velocity,” Laser Phys. 23(11), 115402 (2013). [CrossRef]  

31. J. Angulo, “Structure Tensor Image Filtering using Riemannian L_1 and L_∞ Center-of-Mass,” Image Anal Stereol. 33(2), 95–105 (2014). [CrossRef]  

32. Y. Wu, X. Hu, D. Hu, et al., “Comments on “Gaussian particle filtering”,” IEEE Trans. Signal Process. 53(8), 3350–3351 (2005). [CrossRef]  

33. L. Wang, X. Tang, J. Zhang, et al., “Statistical Property Guided Feature Extraction for Volume Data,” IEICE Trans. Inf. Syst. E101D(1), 261–264 (2018). [CrossRef]  

34. W. Hsue and W. Chang, “Real Discrete Fractional Fourier, Hartley, Generalized Fourier and Generalized Hartley Transforms With Many Parameters,” IEEE Trans. Circuits Syst. I 62(10), 2594–2605 (2015). [CrossRef]  

35. X. Yu, M. O. Efe, and O. Kaynak, “A general backpropagation algorithm for feedforward neural networks learning,” IEEE Trans. Neural Netw. 13(1), 251–254 (2002). [CrossRef]  

Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (11)

Fig. 1.
Fig. 1. Schematic diagram of TLE experimental system for the solution concentration detection.
Fig. 2.
Fig. 2. Device structure of liquid film.
Fig. 3.
Fig. 3. Interference ring caused by TLE. The internal refractive index distribution gives rise to a constant phase difference, which is a necessary condition for interference. The equivalent concave lens also causes the interference ring to diverge into a larger image.
Fig. 4.
Fig. 4. The measurement model based on image processing and machine learning.
Fig. 5.
Fig. 5. Interference patterns of samples with different liquid film thickness. (a) 180 µm. (b) 360 µm. (c) 540 µm.
Fig. 6.
Fig. 6. Interference patterns of samples with different soy sauce concentration. (a) 5% concentration. (b) 60% concentration. (c) 100% concentration.
Fig. 7.
Fig. 7. Raw image and binary image. (a) raw image. (b) binary image.
Fig. 8.
Fig. 8. Light intensity distribution. (a) data without filter. (b) data with filtered.
Fig. 9.
Fig. 9. Frequency domain image processed by DFT. (a) 25% concentration. (b) 50% concentration. (c) 75% concentration. (d) 100% concentration.
Fig. 10.
Fig. 10. The Model effects of the training set.
Fig. 11.
Fig. 11. The Model effects of the test set.

Tables (3)

Tables Icon

Table 1. Frequency characteristics in Fig. 9.

Tables Icon

Table 2. Partial characteristic data of partial samples.

Tables Icon

Table 3. Evaluation index of training set and test set.

Equations (18)

Equations on this page are rendered with MathJax. Learn more.

I ( d ) = I 0 e ( d 2 ω 0 2 )
E ( d ) = β P π r e ( 2 d 2 r 2 )
n ( T + Δ T ) = n 0 ( T ) + d n d T Δ T
Δ φ ( d ) = Δ φ 0 e ( 2 d 2 ω 2 )
Δ φ = k 0 n I ( z ) d z
Δ φ 0 = 2 π n I 0 L λ
B ( x , y ) = { 1 ,  if  I ( x , y ) > T 0 ,  otherwise
x ¯ = i = 1 M x i M
y ¯ = i = 1 N y i N
G ( x ) = 1 2 π σ 2 e x 2 2 σ 2
I ( x ) = i = k k G ( i ) ( x + i )
E a v e r = 1 M i = 1 N x i 2
μ = 1 M N x = 1 M y = 1 N I ( x , y )
I c e n t e r e d ( x , y ) = I ( x , y ) μ
F ( u , v ) = x = 0 M 1 y = 0 N 1 I c e n t e r e d ( x , y ) e j 2 π ( u x M + v y N )
F c e n t e r e d ( u , v ) = F ( u M 2 , v N 2 )
M ( u , v ) = l n ( | F c e n t e r e d ( u , v ) | + 1 )
H = i = 1 N p ( i ) log 2 p ( i )
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.