1. Introduction
With the expansion of the concept of environmental protection, relevant sewage treatment systems have been designed in various fields. In general, the current sewage treatment systems have the following advantages: stable operation effect; simple process flow; low cost; little treatment equipment; a simple structure; and easy operation, maintenance, and management. The disadvantages are as follows: the automation control level cannot meet the requirements, and the post-treatment equipment needs to be large, for example, large disinfection equipment, large contact pool volume, and large drainage facilities such as drainage pipes. In order to improve the performance of sewage treatment systems, improve the efficiency of sewage treatment, and reduce the cost of treatment, the relevant algorithms must be used to optimize the intelligent control system.
Sewage treatment is an important part of ecological environmental protection, and many scholars have been studying sewage treatment. Zhao Q developed a novel sewage treatment system based on an upflow anaerobic sludge bed. The experiments showed that the sewage treatment performance of the new system was greatly enhanced compared with the previous one [
1]. Velosa A C studied the composition, characteristics, and application conditions of a rural sewage distributed treatment system based on the discharge characteristics of rural domestic sewage. Finally, he developed several practical technologies for distributed rural sewage treatment systems [
2]. Jaremkow A applied Internet of Things technology to a factory sewage treatment system, and realized real-time monitoring of the sewage treatment process by setting up various smart sensors [
3]. Hassan M applied the sequential batch activated sludge process to the rural sewage treatment. The experimental results showed that higher quality water resources could be obtained using the sequential batch activated sludge method [
4]. Liang H proposed a hybrid fuzzy controller for urban sewage treatment. The practice showed that the controller had a fast speed and strong stability, and it showed a good performance in the sewage treatment system [
5]. Lahlou K introduced the denitrification mechanism and research progress of a constructed wetland sewage system, and analyzed the internal and external factors affecting denitrification efficiency in detail. He finally provided a scientific basis for the application of the constructed wetland sewage treatment process [
6]. Mukherjee M designed a sewage treatment method for the problems of low efficiency and high energy consumption of sewage treatment technology, which realized the automatic operation and remote monitoring of the sewage treatment process [
7]. The above research regarding sewage treatment is relatively specific, but the multi-objective particle swarm algorithm was not applied.
As a high-performance optimization method, particle swarm optimization has found increasing application scenarios. Wang D proposed a particle swarm algorithm combined with fuzzy clustering. The practical examples showed that the new algorithm could successfully solve the highly constrained economic scheduling problem [
8]. Zhang H proposed an opposition-based MOPSO algorithm to enhance the convergence performance of the algorithm, and finally successfully dealt with those difficult multimodal functions [
9]. Yuan F applied the particle swarm algorithm to travel route planning, and obtained the best travel route through simulation experiments [
10]. Cheng Y applied the MSPSO algorithm to the optimal load distribution in the short-term dispatch of power generation systems, and verified the performance of the algorithm through practical calculation examples [
11]. Ren W applied the MOPSO algorithm to the 5G network base station setting. Practical examples showed that this algorithm greatly improved the effective coverage of 5G networks [
12]. Zeidan M used an adaptive particle swarm algorithm to optimize a mass spectrometer in his laboratory, and found that the algorithm significantly improved the performance of the mass spectrometer [
13]. Yang Z proposed a threshold method combined with the MOPSO algorithm, and compared it with the existing population-based threshold method, and finally concluded that the new method had a better processing effect [
14]. These research works on particle swarm optimization are relatively detailed, but they did not involve sewage treatment.
In view of the current situation of the sewage treatment system, this paper first introduces the concept and principle of the MOPSO algorithm, then constructs an intelligent control system for sewage treatment based on the MOPSO algorithm, then optimizes the adaptive energy consumption and effluent quality model of sewage treatment using the MOPSO algorithm, and uses a PID (proportional integral differential) controller to track and control the optimal set values in each key model. Finally, the multi-objective optimization control of the sewage treatment process is realized. The research shows that the new intelligent control optimization method of sewage treatment has a good effect for improving the efficiency of sewage treatment.
2. Correlation between Sewage Treatment and Multi-Objective Particle Swarm Optimization (MOPSO) Algorithm
The purpose of the optimal control of wastewater treatment is to achieve energy conservation and consumption reduction under the condition of effluent constraints. The total cost of its control operation mainly includes two aspects: system energy consumption and fines caused by excessive effluent quality. These two evaluation indicators contradict each other in the process of wastewater treatment control, and many of them are limited by indicators. Therefore, it is of great significance to develop a method that can deal with the multi-objective optimization problems of the wastewater treatment control process. The particle swarm optimization (PSO) algorithm simulates the foraging behavior of birds, and compares the search space of the problem with the flight space of birds, which can realize the search of the optimal solution in the complex space. However, just like the effluent quality and system energy consumption in the sewage treatment process, they are a pair of contradictory target indicators. Many optimization problems need to be optimized simultaneously for multiple target problems. Compared with the single objective optimization problem, the multi-objective optimization problem cannot find an excellent solution to the multi-objective problem in a simple search process. In this paper, combined with the multi-objective particle swarm optimization (MOPSO) algorithm, the sewage treatment system was studied.
Figure 1 is a schematic diagram of the MOPSO algorithm, which is formed on the basis of single objective PSO algorithm and has a good performance when solving multi-objective optimization problems. When selecting the individual optimal solution, the individual optimal solution can be replaced with the set optimal solution, or the selection of the global optimal solution can be the focus. At present, most MOPSO algorithms use the Pareto optimality theorem to solve problems. The calculation mode formed by this method has become a stable program flow [
15].
3. Intelligent Control Method of Sewage Treatment Combined with the Multi-Objective Particle Swarm Optimization Algorithm
3.1. Intelligent Control System Combined with the MOPSO Algorithm
Figure 2 shows the structure diagram of the system. Its main control variables are the output content of the system, specifically including the aeration volume, return sludge ratio, and excess sludge discharge in the aeration tank. The sequencing batch activated sludge process is a biological metabolism process that requires oxygen. Microbes in the reactor can decompose substances in the sludge through COD generated during aeration, and factors such as influent concentration, aeration volume, and sewage concentration will directly affect the change in COD. In general, COD can be detected online using a detector [
16], so that COD can be used as the control parameter in the SBR method. In the system, air is directed to the aeration tank through the blower to add dissolved oxygen to the tank. Then, the fan speed controller is adjusted by recording the COD value online, the air inlet volume of the aeration tank is adjusted, and finally the chemical oxygen demand is made to be within the appropriate range for the whole reaction process.
3.2. Mathematical Model of Sewage Treatment Process
In order to verify the effectiveness of the control scheme, it is necessary to simulate the environment of the sewage treatment plant. This paper uses the “Benchmark Simulation Model 1 (BSM1)” of sewage treatment jointly developed by the International Water Association and the European Union Organization for Scientific and Technological Cooperation for reference [
17].
The structure example of BSM1 is shown in
Figure 3, including the biochemical reaction tank and secondary sedimentation tank. The biochemical reaction tank includes five units, the first two units are oxygen deficient areas and the last three units are aerobic areas.
For each unit, represents the flow rate, represents the concentration of each component, and represents the reaction rate of each component. The material balance equation of each unit is as follows:
For unit 1,
, there is a formula:
In the formula, , , , and are the mixed liquid return flow, sludge return flow, and sleeping flow, respectively.
For the other units,
, there is the following formula:
where
.
The material balance of the dissolved oxygen can be expressed as follows:
In the formula, represents the oxygen conversion rate and represents the saturated dissolved oxygen concentration.
4. Sewage Treatment Process Combined with MOPSO Algorithm
4.1. Energy Consumption and Effluent Quality
In order to ensure the sewage treatment process is in an optimal operation state, the analysis starts from the energy consumption and effluent quality models. Their expressions are as follows:
In the formula, represents energy consumption; represents the effluent quality; represents the volume of the th reaction tank. is the oxygen transfer coefficient, used to control the dissolved oxygen concentration; and is the oxygen setpoint. is the internal reflux, used to control the concentration of nitrate nitrogen . is the external return, used to control the concentration of the mixed suspension solids (MLSS); is the sludge discharge. is the effluent flow; is the concentration of suspended solids. is the chemical oxygen demand; is Kjeldahl nitrogen concentration. is the total nitrogen concentration; is the ammonia nitrogen concentration.
In sewage treatment, in addition to meeting the requirements of effluent quality, it is also necessary to reduce the operating cost of sewage treatment. In order to solve these problems scientifically and rationally, the real-time optimization control concept provides the concrete realization steps.
4.2. Real-Time Optimal Control of the Sewage Treatment Process
The main idea of the real-time optimal control is to combine real-time optimization and control loop, and then to use a hierarchical structure for optimal control. Usually, the upper layer uses the optimization objective function to control the optimal set value of the variable, and the lower layer uses the controller to track the optimal set value [
18]. The specific contents include the following: constructing an energy consumption model and effluent quality model based on the adaptive regression kernel function; using the PID controller to monitor and locate the optimal set value.
4.3. Adaptive Energy Consumption and Effluent Quality Model
This paper constructs a model between the energy consumption and process variables and a model between effluent quality and process variables based on the idea of adaptive regression kernel function. It can be seen from Formulas (1) and (2) that variables such as
,
,
would affect
, and
is mainly related to variables such as
,
,
, and
. Therefore,
,
,
,
are selected as the input variable of the model, and
and
are selected as the output variables. The main purpose of constructing an adaptive regression kernel function model is to better connect the input variables and the input variables, and its expression is as follows:
In the formula,
represents the output of the
moment model,
, and satisfies the following:
In the formula,
is the energy consumption model of the adaptive regression kernel function,
is the effluent water quality model of the adaptive regression kernel function,
represents the number of kernel functions, and
represents the
th kernel function at
time, then the radial basis kernel function can be expressed as:
4.4. Multi-Objective Optimal Control
Usually, the establishment of an adaptive effluent quality model is limited. When solving the restriction problem, the restricted mathematical model can be transformed into an unrestricted mathematical model by combining the idea of penalty function [
19]. After analysis, the optimization objective function of the multi-objective optimization method in the sewage treatment process can be written as follows:
In the above formulas, is the adaptive energy consumption model, is the effluent quality model, and is the effluent quality constraint. Parameters such as , , , , , and can be obtained through model training of the energy consumption and effluent quality.
In general, the PSO algorithm combined with the adaptive grid can make the solution obtained by the multi-objective optimization algorithm as evenly distributed as possible [
20]. The specific calculation method is as follows:
In the formulas, represents the velocity in the th iteration and represents the position in the th iteration. is the global contraction factor and , are the acceleration factors. and are a randomly generated number and represents the global optimal position at the -th iteration.
When selecting the global optimal solution, it is necessary to design an appropriate value
in each grid, and to satisfy the following:
In the formula, represents the number of solutions in the th grid, and is the constant.
The optimal set value combined with the adaptive grid mechanism algorithm is completed by the PID controller, and the PID controller needs to add an incremental PID control algorithm, namely
Through the above calculation, it can be concluded that the control performance of the system under this mathematical model is the best.
5. Experimental Simulation Results of Intelligent Control Method for Sewage Treatment
This paper optimizes the sewage treatment process using the MOPSO algorithm and data analysis technology. In this paper, variable constraint conditions and performance indexes are input according to the state equation of the sewage treatment-controlled system, and a group of optimal control variables are provided for sewage treatment through calculation. The overall sewage treatment can be realized according to the optimal control, which can maximize the treatment effort, treatment efficiency, and treatment cost. In order to verify the optimization effect, the following experiments were designed: using MATLAB software to simulate the sewage treatment environment. The sample data came from the domestic sewage treatment data of City A in 2020. In this paper, the domestic sewage treatment data were taken as the optimization objective function, and the multi-objective particle swarm optimization algorithm was used to optimize the objective function so as to obtain the optimal set value of the control variable, and then the optimal set value of the control variable was transmitted to the controller for the tracking control. Then, the optimization methods proposed in this paper were tested from the sewage treatment cost, sewage treatment power consumption, sewage treatment capacity, and sewage treatment efficiency.
Table 1 shows the sewage treatment cost of City A for two months, which is divided into pre-optimization and post optimization. The treatment cost per ton of sewage before optimization is set at 1200 RMB/ton.
It can be seen from the above table that under the same total amount of sewage, the sewage treatment cost in the first month after optimization is 0.723 million RMB less than that before optimization, and the sewage treatment cost per 100 tons is 10.14 million RMB, 0.86 million yuan less than that before optimization. Similarly, although the total amount of sewage increased in February, with the help of the optimization method, both the total cost and the cost per 100 tons decreased a lot compared with that before optimization. The change in sewage treatment can could reflect that the new method is effective at capital consumption.
In the method part, the intelligent control of the sewage treatment process is realized combined with the MOPSO algorithm. According to the above content, the simulation experiment is designed as follows: the MOPSO algorithm is used to set and control the oxygen demand concentration in the sewage treatment process. The water inflow is a constant value, and the expected oxygen demand concentration is 6 mg/L. The simulation results are shown in
Figure 4.
It can be concluded from the graph that with the support of the MOPSO algorithm, the control system becomes more accurate and stable, and the response speed is also improved compared with that before optimization.
The most important energy consumption in the sewage treatment process is electricity. In order to verify whether the optimized sewage treatment method can reduce the electricity consumption, this paper investigates the electricity consumption of sewage treatment in City A within 5 weeks. The power consumption is divided into before optimization and after optimization. The weekly sewage treatment amount before and after optimization is the same. The specific investigation results are shown in
Figure 5.
From the histogram in
Figure 5, it can be concluded that after the optimization of the sewage treatment process, the weekly power consumption is much lower than before the optimization, and the gap between the power consumption is the largest in the fifth week. It also proves that the new method has a good effect at reducing power consumption.
After using the new method, the monthly sewage treatment volume before and after the optimization of the sewage treatment in City A was investigated. The specific time was from January to June, and the survey results are shown in
Figure 6.
It can be seen that after optimization, the processing volume in the first month was basically the same as that before the optimization, and the processing volume in the other months was much higher than that before the optimization. This means that after using the new method, the processing capacity of the system was improved to be stronger.
In the processing process, the processing efficiency is an important indicator reflecting the quality of the processing method.
Figure 7 shows a comparison of the processing efficiency between the traditional method and the new method. The specific time is within one year, and the maximum processing efficiency is set at 100%.
It can be concluded from the line chart that in January and February, the processing efficiency of the new method was lower than that of the traditional method, because the practice of the new method required an adaptation process. From March, the processing efficiency under the new method began to rise steadily, and the processing efficiency in the following months was higher than that of the traditional method. In contrast, the overall processing efficiency under the new method was 7.15% higher than that of the traditional method.
From the above experiments, it can be concluded that the intelligent control optimization method of the sewage treatment based on multi-objective particle optimization algorithm can improve the sewage treatment capacity and treatment efficiency to a certain extent, and also reduce the treatment cost.
6. Conclusions
Sewage treatment is not only related to environmental changes, but also plays a very important role in people’s daily life. With the increasing difficulty of treatment, traditional sewage treatment methods have exposed many problems, which can no longer meet the current treatment requirements. Relevant managers should increase the technical input to make sewage treatment more scientific and reasonable. The continuous maturity of the particle swarm optimization algorithm and data mining technology has brought opportunities for the innovation and optimization of sewage treatment methods. The rational application of the two treatments to the sewage treatment process is of great significance for the realization of intelligent control of sewage treatment.