An Ultrasonic Multi-Beam Concentration Meter with a Neuro-Fuzzy Algorithm for Water Treatment Plants

Ultrasonic concentration meters have widely been used at water purification, sewage treatment and waste water treatment plants to sort and transfer high concentration sludges and to control the amount of chemical dosage. When an unusual substance is contained in the sludge, however, the attenuation of ultrasonic waves could be increased or not be transmitted to the receiver. In this case, the value measured by a concentration meter is higher than the actual density value or vibration. As well, it is difficult to automate the residuals treatment process according to the various problems such as sludge attachment or sensor failure. An ultrasonic multi-beam concentration sensor was considered to solve these problems, but an abnormal concentration value of a specific ultrasonic beam degrades the accuracy of the entire measurement in case of using a conventional arithmetic mean for all measurement values, so this paper proposes a method to improve the accuracy of the sludge concentration determination by choosing reliable sensor values and applying a neuro-fuzzy learning algorithm. The newly developed meter is proven to render useful results from a variety of experiments on a real water treatment plant.


Introduction
The sludges discharged from water, sewage and wastewater treatment plants are buried, dumped into the ocean or incinerated, and for this reason, urgent action is required to effectively reduce sludge emissions according to pollution regulations [1][2][3]. In general, the sludge treatment process involves precipitation from the sedimentation basin of the water treatment processes and it then goes through adjustment, concentration, dehydration and disposal [4]. Sludge is usually mixed with colloid material and hydroxide to create a coagulant which is then submerged and allows for the solid-liquid part to be separated from the agglomerated material. The main source of sludge from the water treatment plant stems from submerged and back-washed water and it is very important to know the amount of solids in the sludge through a density meter. Therefore, it is necessary to accurately measure the sludge concentration to optimize the polymer dosage rate and stabilize the water quality to be discharged to rivers [5,6].
When matters such as gas and air go through the ultrasonic sensor of an existing sludge density meter, the measured value can be overstated or can fluctuate like a flow measurement [7,8]. When a sludge feeding pump is operated, initially the sludge suddenly moves in a congested state, thus, time is needed for it to stabilize and to get an exact value. Widely used insertion-type density meters might deteriorate the sensor sensitivity due to sludge attachment on the sensor surface, which could cause more errors. To overcome these problems, an ultrasonic multi-beam concentration sensor was considered. An abnormal concentration value of a specific ultrasonic beam, however, degrades the accuracy of the entire measurement in case of using a conventional arithmetic mean for all measurement values. Figure 1 shows that Sensor-3 is disturbed by bubbling inside the pipe among four sensors and as a result, the arithmetically averaged measurement value gives a rather larger measurement error. In this paper, we propose a method to improve the accuracy of the sludge concentration determination by choosing reliable sensor values and applying a neuro-fuzzy learning algorithm. The newly developed meter is proven to render useful results from a variety of experiments performed on a real water treatment plant.

Development Overview
A detachable sensor instrument needs to be considered for easy cleaning, calibration and maintenance in addition to real-time sludge concentration measurement in sludge treatment processes in water purification plants (adjustment ↔ thickener ↔ storage tank ↔ dehydrator) and sewage treatment plants (primary sedimentation, thickener, aeration, secondary sedimentation basin, storage tank, dehydrator, etc.). The effects of air bubbles were minimized by filtering the measured values of the multi-beam method, which kept the output value stable.

Densitometer Configuration
In Figure 2, the diagram shows the structure of the developed ultrasonic densitometer which consists of a flange to be attached to the pipe, a sensor to measure its attenuation, a converter to be changed to an electric signal and a display to show its measured value. In addition, a compressor and portable calibration kit are built inside for periodic air cleansing and accuracy improvement.  Table 1 shows the design specification of the converter, which is considered to minimize the influence of gas and bubbles which are known to cause lower or abnormal measurements. As the block diagram of the meter in Figure 3 shows, four ultrasonic sensors measure the values, calculate a mutual deviation and then remove the largest abnormality which is likely to be calibrated poorly and influenced by air.  If the sludge transfer pumps are started, initially submerged sludge already in pipeline gives a non-uniform shape, which causes measurement errors. To solve this problem, as shown in Figure 4, the timing of the density measurement is delayed for a certain period of time after the initial start-up of the sludge feed pump operation (delay time: up to 300 s).

Design and Function of the Detector
A newly developed stainless steel detector is designed in order to prevent the corrosion and suppress sludge deposition by curving the surface of the sensor and using a directional ultrasonic wave. The ultrasonic sensor cable is designed as a connector type for convenience of detaching and attaching the ultrasonic sensor. The water resistance level is chosen as IP 67 for easy portable calibration. The Tx and Rx sensors are designed to accommodate multiple sensors, in this paper, a set of four. In addition, a compressor was built into the panel in order to suppress the deposition of sludge on the sensor during operation, as shown in Figure 5. Air is periodically injected into the sensor surface through the holes (1.5 mm) of the lower end of sensor to prevent interference of the fluid flow, so it is called self-cleaning. A converter is designed to allow the removal of sensors without interrupting the sludge treatment processes, which makes the present bypass pipeline and valve useless and saves space and cost. The sensors can be easily removed and attached by local operators, which usually must be done by professional engineers and with tools.

Design and Function of the Calibration Kit
A portable calibration device can be applied to a variety of pipe diameters can complete calibration work quickly and easily within 2 h. Ultrasonic sensors are inserted into both sides of the calibrator, where the ultrasonic transmitting plate is fixed inside and the receiving plate is flexible so the position for each diameter can be adjusted. At first, the sensor calibrator is inserted in the receiving plate with the same portable sensor diameter as the ultrasonic sensor. Then, transmitting and receiving sensors are removed from the calibrated density meter and attached into a portable calibration device. Zero calibration is completed by entering the ultrasonic attenuation measurement by ultrasonic sensor channels in the clear water. Laboratory calibration is also done by entering the attenuation value after injecting the laboratory reagent, kaolin. Calibration processes should be carried out individually and repeatedly, because the attenuation between each channel is different.

Sludge Density Estimation Algorithm Using Neuro-Fuzzy Method
The proposed algorithm uses a data selector to choose data from three of the sensors with lower disturbance among the four sensors with input selection, as shown in Figure 6, and then sludge density is estimated through a neuro-fuzzy algorithm for the three selected sensor data.

Data Selection
Data preprocessing is done to eliminate the largest deviating data. That is, the Euclidean distances between the values of four sensors are calculated and then the sensor having the largest deviation is removed in every data point, which is thought to be due to disturbance by bubbles or lumps of sludge. For a kaolin solution test in a pilot plant, Sensor 1 and Sensor 2 are relatively stable as shown in Figure 7. Sensor 3, however, has large amplitudes that change continuously. On the other hand, Sensor 4 is closest to the actual measured value, but strange changes suddenly occur three times due to disturbance factors.  In this case, Figure 8 shows the results of input selection removal data of sensors, where Sensor 3 has been removed most frequently at 982 times, while Sensors 1, 2, and 4 were removed 395, 185, and 98 times, respectively. It is shown that only one dominant sensor does not continuously and significantly affect the measurement error. Since bubbles and the mass of sludge are moving in the pipe, they can affect any sensor among the four sensors. So, if the values of Sensor 2 or Sensor 4 deviate from the other sensor values, they can also be removed. Figure 9 shows the neuro-fuzzy algorithm structure for the sludge concentration forecasting. For the concentration predictions calculated by the proposed algorithm, each learning was based on three sensors after removing the sensor having the largest deviating value. The Adaptive Network-based Fuzzy Inference System (ANFIS) uses the Tagagi-Sugeno-Kang (TSK) fuzzy structure, which is believed to be computationally efficient and amendable to elegant mathematical analysis. The characteristics and learning processes of ANFIS with Matlab Fuzzy Logic Toolbox are as follows [9][10][11][12].

Neuro Fuzzy Algorithm
Layer 1: Let us denote , as selected three sensor outputs, then every node in this layer, calculate the membership value for the premise parameter as shown in Equation (1): Here, a generalized bell function is selected as membership function for the fuzzy set (= , ) as shown in Equation (2): where, { , , }is the parameter set.
Layer 2: Output the weight to multiply the membership value obtained in layer 1 by each rule: Layer 3: Calculate ratio of i-th rule's strength vs. all rules' firing strength and normalize firing strength as shown in Equation (4): Layer 4: Calculate the multiplication of normalized value and consequent parameters for each node as shown in Equation (5): where, are normalized firing strengths obtained in Layer 3 and , , and are the linear parameters of Tagaki-Sugeno fuzzy modeling [13].
Layer 5: Calculate overall output by using weighted average: Figure 10 shows a neuro-fuzzy learning process to be completed for the sludge concentration prediction and to be composed of 10 fuzzy clusters and rules. Each fuzzy membership of the selected three sensor inputs is calculated and minimum membership values are taken in each rule. Then, a final output is calculated by the weighted sum of the output and its weight [14,15].

Configuration of the Experimental Device
A pilot plant is configured as shown in Table 2 and Figure 11 for the performance test of the multi-beam sludge concentration meter. Its main components are composed of a sludge storage tank, stirrer for mixing, inverter pump for the circulation of the mixed sludge, electromagnetic flowmeter, multi-beam ultrasonic meter, and data logger.  The ultrasonic meter is designed and manufactured in order to mount a set of four multiple beam sensors. The detector is made with stainless steel to prevent corrosion, and the sensor surface was curved as much as possible for the improvement of the ultrasonic directional strength, which also helps to suppress the deposition of sludge. The ultrasonic sensor cable is manufactured as a connector type for convenient attachment and detachment, and a IP67 rating is taken into account for usage as a portable calibration device.

Experimental Method
Fresh water is mixed with kaolin powder similar to sludge characteristics, by which various concentrations of sludge are created in order to be tested in the pilot plant. Before data is acquired from the densitometer sensor, the sensor needs zero and span calibration because it depends on the characteristics of installation conditions and manufacture status.
The pilot plant test procedures are conducted as shown in Figure 12. Data are acquired in real-time by the second through a Human Machine Interface (HMI) software installed on a laptop computer, which is connected with the densitometer converter through RS-232 communication. The sensor clean step removes foreign substances on its surface in order to reduce the measurement error before calibration. In the zero calibration step, the reception attenuation displayed on ultrasonic sensor transducer is set to a concentration value of 0%, in which fresh water is filled in the densitometer. The span setting is calibrated by comparing a 3% concentration of kaolin solution with the measurement value for the attenuation of the ultrasonic sensor transducer. The converter setting involves the connection and acquisition of data through an RS-232 interface with a laptop computer in the densitometer converter. Sludge density measurement involves the measurement of the real-time concentration for the sludge supplied by a feed pump from a tank.
Finally, the sludge moisture-content measurement step involves measuring the water content of sludge, in which the weight of the evaporation dish ( ) and the weight of a sample liquid ( ) in an evaporating dish are measured. Then the weight ( ) is measured again after drying by heating for 12 h or more in an oven at 105 °C. The water content is calculated as the ratio of the solid ( ) and the sludge ( ). The concentration calculation formula is shown below: A scale and oven are used to know the true sludge density, where the scale is a model ALC2100.2 produced by ACCULAB (Tokyo, Japan) and the oven is a model DMF-5T produced by LAB house (Pocheon-si, Gyeoggi-do, Korea).

Experimental Results
Various algorithms are reviewed in order to improve the measuring accuracy of the meter from the acquired data. General methods and intelligent algorithms are compared with each other to improve the measurement accuracy of the sludge concentration meter. The algorithms are verified through sample kaolin solution and sludge in a water treatment plant in order to evaluate the performance measurement. In addition, outlier removal algorithms are adopted to minimize the error according to mass and air bubbles. The algorithms are shown in Table 3 to review the sludge concentration prediction.

Kaolin Solution Test in the Pilot Plant
We use a kaolin solution which can easily change its concentration. It is measured by multi-beam sensors only to estimate its density by the proposed algorithms. The data set composed of desired input-output pairs is called the training data and the data set to see if the model identified responds correctly is referred to as the test data [13]. A total of 2920 datapoints are measured and averaged in arithmetic mean method without the division of training and testing data. However, even-indexed and odd-indexed data are divided into training and testing data equally for the linear regression and neuro-fuzzy models to check the over-fitting and under-fitting error.  Table 4 shows the analysis results by the arithmetic means and the learning algorithms with and without outlier removal. The percentage error of one sensor is 28%, which can vary by sensor, before multiple sensors are used. Multiple sensors can improve the error to 13% using the conventional arithmetic mean. If the outlier removal method is added to remove the data with the largest deviation among four sensors, arithmetic mean without outlier can reduce its error to 8.9%. The conventional linear regression method improves the error to 3% and the proposed algorithm (neuro fuzzy with outlier removal) has the lowest error of 0.0009%. Figure 13 shows the analysis results of the error characteristics for one sensor. As the sludge concentration is increased, the measurement error also increases. It is assumed that 2500th data values have a sudden high error due to bubbles or mass of sludge. The error characteristic for arithmetic mean using four sensors is improved when compared with one sensor in a high concentration. Most of estimated values are lower than the actual measured value. It is thought that the difference is caused by the off-set depending on the fluid status such as bubble and sludge attachment to sensors.  Figure 14 is the result of a linear regression analysis and ANFIS with input selection, which helps minimize the estimation error. The estimated values are located around the true value contrary to arithmetic mean. While the error of linear regression still exists a little more in high density areas, the error of ANFIS cannot be noticed because the true and estimated values are overlapped. In the error analysis with histograms, it ranges from −0.5 × 10 −4 to 0.5 × 10 −4 . Figure 14. Performance curve of Methods 4 and 6.

Real Sludge Test in the Pilot Plant
Real sludge was gathered from the sludge thickener at an operating water treatment plant, retained for two days and a high concentration sludge from a lower layer was extracted. The test was done with the highly concentrated sludge diluted with water.
A total of 1600 datapoints are averaged in the arithmetic mean method without input selection. In the linear regression and neuro-fuzzy models, all data is equally divided into training and testing data. Table 5 shows the test results of the water treatment plant sludge in the pilot plant, in which one sensor has an error of 12.6% while the multi-sensor has an error of 3%-4%. As it is known in the linear regression analysis, more variables result in better performance. The proposed neuro-fuzzy algorithm with three sensors subjected to input selection, however, is the lowest with an error of 0.01%.  Figure 15 shows the error analysis of one sensor, where the estimated value is higher in terms of high density but it is lower in terms of low density. In the error analysis of four sensors, the estimated value is especially lower in the middle density and the other area has a sudden peak of data several times compared to one sensor case. It is assumed to be caused by bubbles and a mass of sludge. Figure 16 shows the result of multiple linear regression analysis, where the error in the arithmetic mean is smoothed, but the rather small error is observed in all densities. The outlier shown in Figure 15 is removed, because the sensor affected by the distortion would have a lower weight. On the contrary, the proposed neuro-fuzzy algorithm with input selection gives almost the same result as the real value. Therefore, the proposed method renders the best solution to estimate the density for real sludge tests in the pilot plant.

Real Sludge Test in a Real Water Treatment Plant
The developed multi-beam density meter was installed and operated in a real water treatment plant in Korea. The data obtained from the meter was compared with the data from an actual water analysis method. The total data is a 4990 data set, which are equally divided into learning and testing data. Table 6 shows the results of tests in the actual operating water treatment plant. When using only one sensor, the error was 2.74% and whereas the multi-sensor has a 0.1 to 0.6 percent error. The multi-linear regression method has 0.1% error and neuro fuzzy algorithm has the least error at 0.02%. Figure 17 shows the results of analysis of the error characteristics using only one sensor and the arithmetic mean on the four sensors. While one sensor case has the error between −0.05 to 0.15, which is a little biased towards the positive value to be corrected, The error of four sensor average method is greatly improved compared with the one sensor and is close to the true value in all sectors.    Figure 18 shows the result of multiple linear regression analysis and ANFIS for three sensors. The error in arithmetic mean almost disappears, because it helps to overcome the bias in the conventional average method by analyzing the past data. The proposed neuro-fuzzy system with input selection has the least error as shown in Figure 18. Thus, the proposed method is shown to estimate the sludge density properly also in case of the real plant.

Conclusions
Sludge concentration meters, which are mostly calibrated at initial installation to achieve the automation, are very important to automate sludge treatment processes and polymer injection. However, they are likely to contain bubbles or debris because of the sludge characteristics and fouling, and sensors can be easily distorted in specific density range. In addition, sludge is deposited on the sensor unlike in fresh water, which causes errors and failures. Thus, the multi-beam densitometer is developed and new algorithms are proposed to solve these problems and improve its reliability.
This paper proposes a method to improve the accuracy of sludge concentration determinations by choosing reliable sensor values and learning them by a neuro fuzzy algorithm, which is tested by the various experiments in a pilot plant and a real water treatment plant. It is shown that estimation of sludge density requires more sensors to increase the number of accurate measurements and the outliers needs to be sorted by an input selection algorithm to find the sensor with the largest deviation. Even though the pre-processing results show inconsistency in the linear method, the proposed neuro-fuzzy algorithm with multiple sensors and the input selection is proven to improve the performance significantly both in the pilot plant and a real water treatment plant.

Author Contributions
Sang-Bok Jang provided the problem of densitometer and performed the field experiment. Ho-Hyun Lee and Gang-Wook Shin proposed machine learning algorithm and performed data analysis. Sung-Taek Hong and Sang-Bok Jang supervised the development of ultrasonic multi-beam densitometer. Myung Geun Chun and Dae-Jong Lee wrote the outline of article and advised the method of the proposed algorithm and experiment. Myung Geun Chun contributed to English language correction. All authors provided substantive comments

Conflicts of Interest
The authors declare no conflict of interest.