Abstract

In the process of water treatment, coagulation is an important process to remove minerals and organic particles from raw water, which has typical time delay and nonlinearity. The effect of coagulation directly affects the turbidity of the effluent. According to the good correlation between the mean equivalent diameter of floc particles and the turbidity of effluent water, the image processing method is used to preprocess the floc image, the parameters of floc particles are quantitatively analyzed, and the mean equivalent diameter of floc particles is obtained, which is used as one of the bases for the control of coagulant dosage. However, no matter whether the coagulation process in actual situations interferes with the outside world or not, the equivalent diameters of floc particles after coagulation may have abnormal and invalid values, which may lead to a problem that there is a large difference between the mean equivalent diameter of floc particles calculated by a least square method and the mean valid equivalent diameter of floc particles. In response to this problem, this article proposes an optimal calculation method of the mean equivalent diameter of floc particles based on the maximum correntropy criterion (MCC) to reduce the negative impact of the abnormal and invalid equivalent diameters of floc particles on the mean equivalent diameter and provide an important reference data for the precise dosing control of coagulants. Finally, the feasibility of the theoretical results is verified by several numerical experiments.

1. Introduction

The traditional water treatment process mainly includes steps such as coagulation, sedimentation, filtration, and disinfection. Coagulation is an important process to remove minerals and organic particles in raw water, and its effect directly affects the turbidity of the effluent. When the coagulant is added to the raw water for a period of intense mixing, the coagulant is evenly and rapidly distributed in the water so that these colloidal particles in the water lose their stability. The interaction force between the destabilized colloidal particles will change from repulsion to attraction, so they collide continuously and slowly aggregate and finally form floc particles with certain strength, size, and density. This process is called coagulation, which has typical time-delay and nonlinear characteristics [13]. With the development of computer technology, the method of using image processing technology to detect the shape of floc particles and extract the characteristic parameters of floc particles has gradually become a current research focus [4] to control the coagulant dosage. The camera can capture a large number of floc images in the coagulation tank. After image preprocessing and feature extraction of the floc images, the equivalent diameters of the floc particles can be calculated by formula. The weighted average calculation of the equivalent diameters of floc particles can obtain the mean equivalent diameter of floc particles, which can be used as one of the important parameters to characterize the overall situation of coagulation. When the coagulant dosage is within an appropriate range, the floc particles slowly aggregate and become denser, which leads to fast sedimentation of floc particles, clear water, and low turbidity. At this time, the mean equivalent diameter of the floc particles is also within a reasonable range. The mean equivalent diameter of floc particles is adjusted by controlling the dosage of the coagulant so that the mean equivalent diameter of floc particles keeps approaching the set value of the mean equivalent diameter of floc particles and realizes the accurate control of the coagulant dosage and effluent turbidity [5]. Since there is a good correlation between the mean equivalent diameter of floc particles and the turbidity of effluent after flocculation and sedimentation, taking the mean equivalent diameter of floc particles as one of the control parameters for automatically controlling the dosage of coagulant can achieve better coagulation and sedimentation effect and obtain the expected effluent turbidity [6, 7].

Due to the important role of equivalent diameters of floc particles in modern water treatment automation control technology, scholars at home and abroad have carried out a lot of research on the extraction and application of the equivalent diameters of floc particles. To address the problem of hysteresis of obtaining water quality indicators in the water treatment process, Dai et al. [8] used micro-eddy current flocculation technology to detect floc particles. They combined the relationship between the equivalent diameter and the fractal dimension to determine the coagulant dosage and alleviate the time-delay problems in water treatment by analyzing and determining the coagulant dosage on the coagulation effect and the equivalent diameters of floc particles. Asensi et al. [9] developed a fully automatic activated sludge floc identification and morphological characterization toolbox based on digital image analysis and statistical processing. The toolbox could determine characteristic parameters such as the equivalent diameters of floc particles, which was mainly used to help study the characteristics of activated sludge flocs in urban sewage treatment plants. Khan et al. [10] used a microscope to collect floc images, used a state-of-the-art image segmentation algorithm to segment floc images with different equivalent diameters in different fluctuation ranges, and extracted morphological characteristic parameters for sludge volume index (SVI) and mixed liquor suspended solids (MLSS) modeling to explore the feasibility of applying the algorithm model to various plants in different regions. Chen et al. [11] used image acquisition system and data processing system to collect and process floc images in real time, took the mean equivalent diameter of floc particles calculated by the least square method as the target for controlling the coagulant dosage, and then automatically corrected the set system control parameters through flow and turbidity feedback so as to save the coagulant consumption and ensure the quality of the effluent from the sedimentation tank. Gao [12] used image processing technology to detect floc images, obtained various floc parameters that fluctuated within the correct range, and analyzed the effect of different flocculation time and coagulant dosage on the equivalent diameters of floc particles. It can provide a data reference for solving the problems of time delay and accuracy of dosing amount in the process of coagulation and dosing in water plants. Chen et al. [13] applied digital image processing technology to water treatment process control, improved the original water treatment experimental equipment, and used image processing algorithms to complete the extraction and analysis of the feature parameters of floc images in the coagulation process. The noncontact detection of floc properties in the flocculant addition control system provided an effective solution for water plants to improve the automation level of water treatment. Wang [14] used machine vision technology to explore the morphological change law of floc aggregation in the coagulation process and corresponded the characteristic parameters of floc particles such as porosity and equivalent diameters of floc particles with the factors that actually affected the flocculation process. Simulations were carried out to study the factors affecting the flocculation process and results, and the mean equivalent diameter of floc particles was determined as one of the key factors to regulate and control the flocculation process.

Although the above studies were only scattered and preliminary discussions on the application of the equivalent diameters of floc particles in the automatic process of water treatment, they have already demonstrated the importance of the equivalent diameter of floc particles in the automatic control technology of coagulant dosage. Researchers at home and abroad not only extracted the internal relationship between geometric parameters such as the equivalent diameters of floc particles and the coagulant dosage but also explored the internal relationship between other parameters of floc particles and the coagulant dosage, which alleviated the lag of water quality indicators in water treatment to a certain extent. However, the problem of accurate calculation of relevant parameters such as the mean equivalent diameter of floc particles still needs to be solved urgently in the application of precise control of coagulant dose. In the actual water treatment process of the water plant, the effect of coagulation is greatly affected by the actual environment. The influence of microorganisms, abnormal coagulant dosage, equipment leakage, and air temperature will lead to abnormal settlement in the floc particles after coagulation [15, 16]. For example, when the weather is hot, the microbes in the sludge will decompose and produce gas, which will cause trace bubbles in the sludge. The gas leakage in the equipment will cause the gas content in the water to be too high, and the low temperature will affect the reaction speed of the coagulant. These objective factors will affect the effect of the aggregation and sedimentation of floc particles so that the captured floc images can not reflect the actual situation of the sedimentation tank, and the equivalent diameters of floc particles calculated based on these images will have a small number of abnormal and invalid values. In addition, no matter how the coagulation effect is, there may also be a small number of abnormal and invalid values in the calculated equivalent diameters of floc particles without interference from the objective environment. The abnormal and invalid values will lead to a large deviation between the mean equivalent diameter obtained by the least square method and the mean valid equivalent diameter of floc particles so that the current coagulation effect cannot be accurately evaluated. Therefore, a new data processing optimization method of the mean equivalent diameter of floc particles is examined, which is of great significance to eliminate the negative effect of the abnormal and invalid equivalent diameters of a small number of floc particles on the mean equivalent diameter of floc particles.

In view of the abnormal and invalid values of the equivalent diameters of floc particles during the coagulation process, maximum correntropy criterion (MCC) [1719] will be introduced in this article, and an optimal method will be proposed to calculate the mean equivalent diameter of floc particles based on MCC. This method optimizes the process of solving the mean equivalent diameter of floc particles, reduces the calculation error caused by abnormal and invalid equivalent diameters, and achieves the purpose of accurately calculating the mean equivalent diameter of floc particles, which provides an important reference data for the precise dosing control of subsequent coagulants.

2. Preliminaries

The equivalent diameter means that when a particle has the same or similar physical properties to a spherical particle, we can replace the diameter of the particle with the diameter of the spherical particle. In water treatment, the sedimentation characteristics of floc particles are complicated. The floc particles are in a discrete state during the sedimentation process; their mass, size, and characteristics do not change; and the sedimentation velocity of the floc particles is not disturbed. The mathematical expression to characterize the particle settling motion often adopts the Stokes formula [11, 20], whose specific form is as follows:where is the settling velocity of the floc particle, is the floc density, refers to the density of water, is the acceleration of gravity, is the viscosity coefficient of water, and is the diameter of the floc particle.

Further studies show that as the diameter of the floc particle changes, the density of the floc particle changes according to the following formula:where is a coefficient, whose value is generally , depending on the coagulant filling rate and the quality of raw water. Combining the above formulas (1) and (2), it can be concluded that the relationship between the diameter and the sedimentation velocity of the floc particle can be obtained as

The above analysis is based on the assumption that the floc particle is spherical, but we know that the actual floc particle is in an irregular state, and its sedimentation speed should indeed be slower than that of the spherical floc particle of the same volume. The size and shape of floc particles can be well reflected by the floc images collected by industrial cameras. Each floc region in the image reflects the state of floc particle movement during the coagulation process. The image of a floc particle in the 2D plane can be characterized by four parameters [11, 21]: the size-related area of the floc particle, the shape-related perimeter of the floc particle, the vacant area in the middle of the floc particle related to the degree of looseness, and the length to width ratio of the floc particle. These features represent the characteristics of the floc particle. The above four parameters can be converted into using the following formula:where is the equivalent diameter of the th floc particle; is the area of the th floc particle; is the perimeter of the th floc particle; is the hollow area of the th floc particle; is the length to width ratio of the th floc particle; and , , and are the coefficients of the perimeter , the length to width ratio , and the hollow area , respectively. , , and are all decimals ranging from 0 to 1, which can be selected according to actual conditions.

By the above analysis and calculation, the equivalent diameter of a floc particle can be extracted from the image of the floc particle. The equivalent diameter of the floc particle is an important characteristic parameter of the floc particle and has a good correlation with the turbidity of water. It not only reflects the quality of the coagulation effect but also relates to whether the subsequent effluent turbidity meets the water supply requirements. Taking it as one of the target values to control the coagulant dosage can achieve a good control effect. It can be seen from the above formula (3) that the larger the equivalent diameter of the floc particle, the faster the settling velocity of the floc particle, that is, the better the integrity of floc particles, the more sufficient the sedimentation and the smaller the turbidity of the sedimented water. The change of the equivalent diameters of floc particles can not only reflect the quality of the coagulation effect but also relate to whether the utilization of the coagulant can achieve the maximum benefit.

However, the parameter still cannot fully characterize the overall effect of coagulation. In practical application, the equivalent diameter of each floc particle is calculated according to formula (4), and then the mean equivalent diameter , which is regarded as a key parameter for the control of coagulant dosage, is calculated in real time according to the equivalent diameters of floc particles obtained within a certain time. The mean equivalent diameter is expressed as follows:where represents the number of floc particles with different equivalent diameters, and represents the number of floc particles whose equivalent diameter is .

According to the above analysis, we can display the floc image collected in real time on the computer and calculate , , , and of the th floc particle in formula (4) by image preprocessing, image segmentation, and other image processing technologies, which lead to obtain . Finally, we can obtain the mean equivalent diameter of floc particles by substituting and into formula (5).

3. Main Results

In the actual water treatment process of water plant, the influence of microorganisms, too much or too little coagulant dose, equipment leakage, and air temperature will lead to abnormal aggregation and settlement of floc particles. This will make the captured floc images cannot reflect the real state of the sedimentation tank, and the calculated floc equivalent diameters will have some abnormal and invalid values. In addition, no matter whether the coagulation effect is disturbed by the environment or not, the equivalent diameters of floc particles calculated from floc images will also have some abnormal and invalid values, so that the mean equivalent diameter of floc particles calculated by the traditional calculation method (the least square method) cannot accurately characterize the coagulation effect. To weaken the influence of the invalid equivalent diameters of floc particles on the mean equivalent diameter of floc particles, MCC will be introduced to optimize the calculation process of the mean equivalent diameter of floc particles so as to provide important reference data for accurately describing the actual coagulation effect. Because of its good robustness [22], MCC is widely used in many fields, such as computer vision [23], feature extraction [24, 25], and signal processing [2628]. It is mainly used to deal with non-Gaussian noise and outliers [27, 29, 30]. MCC is based on entropy [31], which in turn derives from information theory. Correlation entropy is used to measure the similarity between two variables, which is expressed as follows:where is the expectation of , represents the Gaussian kernel function, and represents the kernel width of . Usually, the joint probability distribution between variables A and B is unknown, and only a finite amount of data and can be available, which make the estimator of correlation entropy (6) can be represented aswhere .

As we all know, the mean square error (MSE) is a measure that reflects the degree of difference between the estimator and the estimated value, and it is a global measure. Compared to the MSE, MCC is a local metric whose value mainly depends on the probability along the direction, and the local extent depends on the kernel size . The Gaussian kernel functions for various kernel widths are shown in Figure 1. As can be seen from Figure 1, the convergence rate of the function varies with the size of the kernel width. For large errors or outliers, the kernel function has better robustness. When the error between is large, the kernel function of gets a small value or even a value close to zero so that the calculation process can avoid the negative impact caused by outliers and has a good stable performance in the case of data anomalies caused by interference. Figures 2 and 3 illustrate the difference between the mean square error and the correlation entropy. In this article, an optimization model is constructed by MCC to eliminate the adverse effects of abnormal and invalid values (abnormal and invalid equivalent diameters of floc particles) on the mean equivalent diameter of floc particles.

The mean equivalent diameter of floc particles calculated by the least square method can be expressed as follows:which is an optimization problem whose solution of this optimization problem is

According to formula (9), the mean equivalent diameter of floc particles calculated by the least square method is the mean of the sum of all equivalent diameters of floc particles, which cannot eliminate the abnormal and invalid equivalent diameter of floc particles. Considering the abnormal and invalid equivalent diameters of floc particles, we introduce maximum correntropy criterion [32] to weaken the influence of abnormal and invalid equivalent diameters of floc particles on the mean equivalent diameter of floc particles. Using MCC, the optimization problem is formulated as follows:

Assuming , it can be obtained as follows:

By , we can find that the maximum value of can be obtained when .

The above derivation process is called the half-quadratic (HQ) strategy [33, 34].

If letandthen it is easy to getandwhere is an auxiliary variable.

If we take the partial derivative of of (14), then it is easy to obtainand it is easy to get

We can solve the problem (14) by alternative optimization.

Firstly, when is fixed, the solution of is derived as follows:where is the number of iterations.

Secondly, when is fixed, the solution of can be easily obtained as follows:

Furthermore, it is known from [23] that after each iteration should be updated as follows:

This update rule consists of the above three steps, which are repeated until the convergence condition is achieved. The procedure is summarized in Algorithm 1.

(1)Input: The equivalent diameter () of the th floc particle, and the number () of the th floc particle whose equivalent diameter is .
(2)Output: The MCC-based samples’ mean .
(3)Initialize: , .
(4)while Not convergent do
(5) Update (20).
(6) Update (18).
(7) Update (19).
(8).
(9)end while
(10) as the MCC-based samples’ mean.

The proof is completed.

4. Simulation Results

There are four sets of simulation data generated for us to verify the effectiveness of Algorithm 1, and () is always equal to 1 for the convenience of simulation.(1)The first set of simulation data is generated for us to verify the effectiveness of Algorithm 1. There are ninety points representing ninety valid equivalent diameters of floc particles randomly generated in 1D space by Gaussian distribution with mean mm and covariance and ten points representing ten abnormal and invalid equivalent diameters of floc particles by Gaussian distribution with mean mm and covariance . Using these generated data, we can compute the conventional samples’ mean by (9), the MCC-based samples’ mean by Algorithm 1, and the valid samples’ mean by (9) with only considering the valid equivalent diameters. The positions of the three means are shown in Figure 4. It is obvious that the MCC-based samples’ mean and the valid samples’ mean are almost overlapped, whereas the conventional samples’ mean is seriously biased from the valid samples’ mean due to the existence of ten abnormal and valid equivalent diameters.(2)The second set of simulation data is generated for us to verify the effectiveness of Algorithm 1. There are ten points representing ten abnormal and valid equivalent diameters of floc particles randomly generated in 1D space by Gaussian distribution with mean mm and covariance and ninety points representing ninety valid equivalent diameters of floc particles by Gaussian distribution with mean mm and covariance . Using these generated data, we can compute the conventional samples’ mean by (9), the MCC-based samples’ mean by Algorithm 1, and the valid samples’ mean by (9) with only considering the valid equivalent diameters. The positions of the three means are shown in Figure 5. It is obvious that the MCC-based samples’ mean and the valid samples’ mean are almost overlapped, whereas the conventional samples’ mean is seriously biased from the valid samples’ mean due to the existence of ten abnormal and valid equivalent diameters.(3)The third set of simulation data is generated for us to verify the effectiveness of Algorithm 1. Firstly, there are ninety points representing ninety valid equivalent diameters of floc particles randomly generated in 1D space by Gaussian distribution with mean mm and covariance and ten points representing ten abnormal and valid equivalent diameters of floc particles by Gaussian distribution with mean mm and covariance . Secondly, the 100 points are randomly sorted. Finally, using these generated data, we can compute the conventional samples’ mean by (9), the MCC-based samples’ mean by Algorithm 1, and the valid samples’ mean by (9) with only considering the valid equivalent diameters. The positions of the three means are shown in Figure 6. It is obvious that the MCC-based samples’ mean and the valid samples’ mean are almost overlapped, whereas the conventional samples’ mean is seriously biased from the valid samples’ mean due to the existence of ten abnormal and valid equivalent diameters.(4)The last set of simulation data is generated for us to verify the effectiveness of Algorithm 1. Firstly, there are ten points representing ten abnormal and valid equivalent diameters of floc particles randomly generated in 1D space by Gaussian distribution with mean mm and covariance and ninety points representing ninety valid equivalent diameters of floc particles by Gaussian distribution with mean mm and covariance . Secondly, the 100 points are randomly sorted. Finally, using these generated data, we can compute the conventional samples’ mean by (9), the MCC-based samples’ mean by Algorithm 1, and the valid samples’ mean by (9) with only considering the valid equivalent diameters. The positions of the three means are shown in Figure 7. It is obvious that the MCC-based samples’ mean and the valid samples’ mean are almost overlapped, whereas the conventional samples’ mean is seriously biased from the valid samples’ mean due to the existence of ten abnormal and valid equivalent diameters.

If the mean equivalent diameter of floc particles corresponding to the turbidity of the effluent within the normal range is about 1 mm-2 mm, then it can be seen from Figures 4 and 6 that the corresponding coagulation effect is good, which indicates that the turbidity of the effluent is within the normal range, and then it can be seen from Figures 5 and 7 that the corresponding coagulation effect is not good, which indicates that the turbidity of the effluent is outside the normal range.

Several sets of mean equivalent diameters of floc particles calculated by the conventional method and the MCC-based optimization method are presented in Table 1, and the corresponding error rates are given. As can be seen from Table 1, the error rates of the mean equivalent diameters of the floc particles are reduced by means of the MCC algorithm.

5. Conclusion

According to the characteristics that the mean equivalent diameter of floc particles is closely related to the turbidity of the effluent, we use image processing technology to process and extract the characteristics of the collected floc images to obtain the relevant important parameters such as the mean equivalent diameter of floc particles and feed them back to the control system of coagulant dose. This can not only effectively improve the utilization rate of coagulants but also liberate human resources and reduce production costs. The mean equivalent diameter of floc particles is an important parameter used to describe the characteristics of floc precipitation after coagulation in the water treatment process. In the actual operation of the water plant, no matter whether the coagulation effect is good or bad, there will be abnormal and invalid values in the equivalent diameters of floc particles. To avoid the deviation of the mean equivalent diameter and the mean valid equivalent diameter caused by the abnormal and invalid equivalent diameters of floc particles, the MCC algorithm is introduced in this article. The MCC algorithm optimizes the solution of the mean equivalent diameter of floc particles to eliminate or reduce the influence of the abnormal and invalid values of equivalent diameters on the overall sedimentation in the actual situation and provides a reference method for water treatment fields such as tap water treatment and sewage treatment. Finally, the validity of the theoretical results is verified by numerical experiments.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported in part by the Natural Science Foundation of Sichuan of China under Grant 2022NSFSC0462, the Major Industrial Projects of Sichuan Science and Technology Department of China under Grant 21ZDYF2965, and the National Natural Science Foundation of China under Grant 61802036.