Design and optimization of multidimensional control strategy based on optimization algorithm and modeling of wastewater treatment process
Published Online: Mar 24, 2025
Received: Oct 27, 2024
Accepted: Feb 10, 2025
DOI: https://doi.org/10.2478/amns-2025-0732
Keywords
© 2025 You Li et al., published by Sciendo
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Wastewater treatment is one of the important contents of modern urban environmental protection, and its process requires the comprehensive use of physical, chemical and biological and other technical means to treat the water quality in accordance with the relevant national standards [1-2].
Primary treatment is the first step of wastewater treatment, and its purpose is to remove most of the precipitable and suspended matter. Firstly, the sewage will be passed through the grating to remove the large solid impurities, and then the sewage will flow into the sand sedimentation tank or precipitation tank, in the process of resting, the heavier suspended matter will be settled to the bottom and form sludge [3-6]. Biological treatment is a step of further purification of sewage after primary treatment. This process mainly utilizes the action of microorganisms to decompose and transform organic matter and nutrient salts such as nitrogen and phosphorus. Common biological treatment methods include activated sludge method, fixed membrane method and so on. After the primary and biological treatment, the organic matter and nutrient salts in the wastewater have been greatly reduced, but a certain amount still exists [7-10]. Secondary treatment aims to further reduce these organic matter and nutrient salts to prevent eutrophication and biological processes in the water body. Common secondary treatment methods include sedimentation, oxidation ditch, and artificial wetland [11-13]. Advanced treatment is used to purify wastewater that has undergone primary, biological and secondary treatment to achieve higher purification standards. Common advanced treatment technologies include adsorption, membrane separation, and activated carbon filtration [14-16]. Disinfection is the last line of defense to kill residual bacteria and viruses. Common disinfection methods include chlorination, ultraviolet irradiation, and ozone oxidation [17-18].
Literature [19] discusses the characteristics of wastewater and the technologies used in wastewater treatment. Innovative technologies are revealed to be constantly evolving, as well as conventional practices in wastewater treatment plants. The importance of introducing sustainable and friendly procedures is emphasized. Literature [20] is based on a literature review in order to provide results about the advantages, disadvantages and applications of wastewater treatment processes. Information related to technologies still under development is also provided. The results describe a discussion of the impact of applying the proposed process in a sludge production line to a very large capacity wastewater treatment plant. Literature [21] proposes the application of machine learning methods such as ELM and SVM for modeling wastewater treatment plants. And these machine learning methods are compared with the conventional ARIMA. The simulation results point out that ELM model performs better in comparison to other models. Literature [22] takes particle swarm optimization algorithm and activated sludge wastewater treatment method as the research object, and based on the experiment, it verifies that the particle swarm optimization algorithm can play an important role in wastewater treatment system, and it can also be applied to other wastewater plants using activated sludge oxidation ditch process, which is of great value for promotion. Literature [23] modeled, calibrated and validated the activated sludge process in a wastewater treatment plant. The process parameters of the validated model were optimized using a multi-objective optimization approach and the study was carried out using ANSGA-III, NSGA-II and PSO optimization algorithms. The results show that the ANSGA-III algorithm and the multi-objective optimization method have good capability in energy conservation and retrofitting of wastewater treatment plants. Literature [24] proposed RLPSO to optimize the control settings in wastewater treatment process and tested RLPSO. The simulation results verified that the RLPSO has good performance and its ability to effectively reduce energy consumption while ensuring qualified water quality. Literature [25] proposes the algorithm DMOPSO-CD consisting of an optimization module and a self-organizing fuzzy neural network aiming at obtaining an optimal solution for the balance between EC and EQ in the wastewater treatment process. By using the algorithm in a benchmark simulation model, the results show that the proposed algorithm performs better compared to other algorithms, which is important for decision making in wastewater treatment optimization. Literature [26] proposed an intelligent control method for wastewater treatment by combining the MOPSO algorithm. And based on practice, it is shown that the intelligent control system combined with the MOPSO algorithm can make the COD in wastewater treatment quickly reach the expected requirements and effectively improve the performance of wastewater treatment.
In order to better solve the multi-objective optimization problem of wastewater treatment process with effluent water quality meeting the standard and low total energy consumption, a multi-objective sparrow algorithm incorporating multiple strategies is proposed after the multi-objective optimal control modeling of wastewater treatment process. Firstly, the good point set is used to initialize the sparrow population to make the population distribution more uniform and improve the search space, and the optimal bootstrap strategy and dynamic inertia weights are introduced in the finder position updating formula to improve the origin convergence problem of the finder, and balance the algorithm’s global exploration and local exploitation ability. Secondly, to improve the algorithm’s local escape ability, the vigilante position update strategy is improved and the optimal position of the sparrow individual is perturbed. Finally, the population updating method is introduced in the external archive updating process to accelerate the convergence speed of the algorithm and increase the diversity of the population. On this basis, in order to prove the effectiveness of the multi-objective optimization control method proposed in this paper, the algorithm is validated using the international benchmark simulation platform for activated sludge wastewater treatment.
Activated sludge series models fall under the category of mathematical models that are primarily used to describe the behavior of sewage in the biological treatment process. These models are all based on basic principles of conservation of mass, momentum, and energy, etc. By describing the processes of material transfer, biological reaction and air transfer in the activated sludge system, and considering the influence of environmental factors on the effect of sewage treatment, these models can predict the operation status and metabolites of the sewage treatment system, etc., and provide a basis for the actual engineering operation [27]. Common activated sludge series models are ASM1, ASM2, ASM2d, ASM3, ASM3d, etc. Different models consider different factors and complexity in describing the wastewater treatment process, so the selection of a suitable model needs to consider the specific engineering situation and needs.
The activated sludge model utilizes the concurrent consumption of oxygen or nitrate as a receptor, and is able to reflect the removal of organic carbon compounds and ammonium nitrogen in activated sludge. The activated sludge model was then developed as ASM1 to address biological nitrogen and phosphorus removal from effluents in wastewater treatment plants. Since then, more sophisticated ASM2 and ASM3 models have also emerged to model the biological removal of nitrogen by biopolymers under transient conditions.
The most popular current method for treating biological wastewater is known as the activated sludge process, which is characterized by stable performance and low operating costs. The activated sludge process is a biological method widely used in municipal and industrial wastewater treatment. This process is used to purify water quality by introducing sewage containing organic substances and nutrients into a reaction tank, and utilizing microbial groups (i.e., activated sludge) with anaerobic and aerobic effects to decompose and degrade the organic substances therein. The activated sludge process can be divided into preliminary treatment, primary treatment, secondary treatment (biological treatment), sludge treatment, and finally sludge recycling and utilization. Preliminary treatment involves removing floating materials and settling inorganic solids. The sludge treatment process process mainly includes thickening, digestion and dewatering, and the activated sludge treatment process is shown in Figure 1:

The Schematic of wastewater treatment process
The main facilities of the BSM1 wastewater simulation platform are five activated sludge reaction tanks and one secondary sedimentation tank. The five activated sewage reaction tanks are composed of two anoxic tanks and three aerobic tanks respectively. The average daily sewage volume of the platform is 20000m3, and the biodegradable chemical oxygen demand is 300mg/L; in order to realize biological nitrogen removal, the sewage treatment process includes nitrification and pre-denitrification process.
The BSM1 model integrates eight reaction processes, including oxidation and nitrification reaction processes, as well as five stoichiometric constants, fourteen kinetic coefficients, and thirteen components.Of the thirteen components, the soluble component is denoted by the symbol
Four error assessment metrics are proposed in this paper to measure the ability to predict the results during the soft measurement process of wastewater treatment. The four error assessments are root mean square error, mean absolute error, mean absolute percentage error and correlation coefficient.
where
According to the objective function set by dissolved oxygen, the performance of the established optimization control model is evaluated by the value of energy consumption (EC) and the value of effluent water quality (EQ) given by BSM1. Among them, EQ is the evaluation index of effluent water quality, the smaller the EQ value is, the better the water quality is, and vice versa, the worse, the formula is as follows:
where AE is the aeration energy consumption and PE is the pumping energy consumption
Based on the BSM1 platform using multi-objective optimal control, the essence is to optimize two key and contradictory indicators to achieve relative balance: water quality (
Where
The expression for
where
Where
The optimization problem of wastewater treatment process can be described as:
Where
The setting values of
After the multi-objective evolutionary algorithm for
Step1: Take the Pareto solutions obtained from the preference search as
Step2: If
Step3: If
The method of selecting setting values can prejudge whether the water quality is up to standard or not, and selecting the preferred solutions as
The set of good points was proposed by Hua Luogeng et al. Its basic definition is: Let
The optimization performance of the algorithm has a certain relationship with the diversity of the initial population, the better the diversity, the faster the algorithm converges and the higher the accuracy. In the basic sparrow algorithm, the initialization of the population adopts the random number initialization method, which is easy to fall into the local optimum due to the uneven distribution of the population and the poor diversity, while the initialization of the population based on the set of good points has an even distribution history and the initial population diversity is better, which can effectively improve the performance of the algorithm. The specific steps of initializing the population based on the good point set: (1) Generate the good point set
To verify the superiority of the good point set initialized population, it is used as a comparison with random number initialized population and tent mapping initialized population. The random number initialized population method generates an initial population by randomly generating individuals in the solution space. tent mapping initialized population method first generates a chaotic sequence by using tent mapping, and then generates an initial population by mapping the sequence into the solution space.
In the original discoverer position update strategy, when
where
For the vigilant at the edge of the population, i.e., the individual of
where
The improved position update formulas for both the discoverer and the vigilant introduce a globally optimal position, which will cause the algorithm to fall into a local optimum if that optimal individual is a locally optimal individual due to the gradual convergence to the optimal individual in the later iterations of the algorithm [29]. To address this problem, this paper adopts a perturbation strategy to improve the ability of the algorithm to jump out of the local optimum by transforming the probability
From Eq. (25), the transition probability decreases with the number of iterations. When
where
Population renewal is performed by comparing the relationship between individuals in the previous generation population and individuals in the new population:
If the individuals of the previous generation population dominate the individuals of the new population, replace the positions and fitness values of the corresponding individuals of the previous generation population with the positions and fitness values of the new population. If the new population individuals dominate the previous generation of population individuals, the replacement is made with a small probability, preserving the diversity of the population to some extent. If they do not dominate each other, then replacement is done with 50% probability.
By this method of updating the population, the individuals with high adaptation can be updated in the next iteration, which not only improves the subgeneration utilization rate and algorithm convergence speed, but also improves the diversity of the population to a certain extent.
The updated population is used as the next-generation population and is non-dominated sorted with the optimal solution set archive to produce a new elite external archive that replaces the previous generation optimal solution set archive in the next generation update. The cycle continues until the termination condition is satisfied and the final elite archive is output.
The multi-objective optimization control structure for wastewater treatment mainly includes the following: firstly, there is no clear mathematical relationship between OCI, EQI and

Multi-objective optimization control structure of wastewater treatment
The objective of this chapter is to evaluate the level of control of dissolved oxygen and nitrate nitrogen using the MSIMOSSA-based optimization control method proposed in this paper. All the experiments were carried out on the BSM1 simulation platform and were realized in the Microsoft Windows 8 environment using MATLAB 2014b programming. In order to objectively understand the performance of the control strategies under different conditions, 7 d of data from the BSM1 database were used to simulate the weather conditions, in which the sampling interval was 15 min and the optimization period was 2 h. The simulated binary crossover and polynomial variation methods were used in this experiment, with the crossover parameter
Figures 3 and 4 show the modeling results of MSIMOSSA for EC and EQ, respectively. From Fig. 3, it can be seen that MSIMOSSA’s prediction for EC can better approximate the actual output value, while the original sparrow algorithm cannot accurately and efficiently track the EC value when it has a steeper inflection point. Similarly, it can be seen from Fig. 4 that for the prediction of EQ, MSIMOSSA can track the actual EQ values better except for a smaller deviation in the range of 1-5 at the inflection point. In contrast, the original Sparrow algorithm showed large deviations and could not accurately track the actual EQ values. Therefore, for the establishment of the objective function, MSIMOSSA shows better prediction and tracking results compared to the original sparrow algorithm.

Model results of EC

Model results of EQ
As the wastewater treatment should get different set values in different situations, in order to verify the performance of the multi-objective optimization algorithms in this control strategy, the optimization results of different multi-objective optimization algorithms for EC and EQ set values are shown in Fig. 5 for one optimization cycle, and the optimized results are kept unchanged in each cycle, meanwhile, this experiment selects every two hours as an optimization cycle, and the experiment is The results are compared with the three optimization algorithms NSGAII, dMOPSO and BBMOPSO respectively. The Pareto optimal solution sets of the above algorithms in the first optimization cycle of the second day, and the preferred solutions decided by the decision system are given in Fig. From the figure, it can be seen that MSIMOSSA has better convergence and distribution than other optimization algorithms. And it has the lowest energy consumption set value of up to 384, with the same quality of effluent water.

Pareto optimal solutions and identify ofpreferred solution
The nonlinear changes of working conditions in the wastewater treatment process, and the biochemical and nitrification reactions occurring, etc., according to the dynamic changes of the influent flow, in order to reduce the EQ while the EC meets the standard, it is necessary to track and control the real-time changes of the variables

Solution of solution and control

Solution of solution
The control effect and error of the PID controller tracking the optimized setpoint

The determination of nitrate and the tracking control

Nitrous nitrogen tracking control error
In the wastewater treatment process, the concentrations of

Variations of

Variations of
The parameter information of six test functions selected from the CEC2019 series is shown in Table 1.
6 ceccec2022 test function parameter information
| Function name | Target number | Functional relation | The solution exists |
|---|---|---|---|
| MMF1 | 2 | Nonlinearity | No |
| MMF2 | 2 | Nonlinearity | Yes |
| MMF3 | 2 | Nonlinearity | Yes |
| MMF8 | 2 | Nonlinearity | No |
| MMF12 | 2 | Linearity | Yes |
| MMF15 | 3 | Linearity | Yes |
The modified sparrow algorithm (MSIMOSSA) is compared with several other optimization algorithms with specific parameter settings as shown in Table 2.
Parameter setting of different multi-objective optimization algorithm
| Algorithm | Parameter setting |
|---|---|
| MSIMOSSA | Q=230,q=450,FADs=0.1,P=0.4 |
| MOEA/D | Q=230,q=450,w=0.4 |
| MODA | Q=230,q=450,w=0.4~0.8 |
| MOALO | Q=230,q=450 |
| MOMV0 | Q=230,q=450 |
| MSSA | Q=230,q=450 |
The IGD and rPSP values of MSIMOSSA with MOPSO, MODA, MOALO, MOMVO and MSSA algorithms in the test functions are shown in Table 3 and Table 4. From the test results, it can be seen that the overall IGD mean and variance of the MSIMOSSA algorithm proposed in this paper is better than that of MOEA/D, MODA, MOALO, MOMVO, and MSSA in MMF1, MMF2, MMF3, MMF8, and MMF12, and although there is a slight shortfall in MMF15 the difference is very small, with a difference of only 0.0284~0.0073 Range. Among the rPSP values, MSIMOSSA and MOEA/D show better solution coverage. However, the rPSP metrics of MOMPA are smaller and satisfy most of the test functions when compared to the two. The above analysis shows that the MOMPA algorithm is superior in convergence and diversity.
IGD values of different optimization algorithms
| Function name | Index | MSIMOSSA | MOPSO | MODA | MOALO | MOMVO | MSSA |
|---|---|---|---|---|---|---|---|
| MMF1 | Mean | 0.0077 | 0.0098 | 0.008 | 0.0108 | 0.0081 | 0.0221 |
| Variance | 0.0044 | 0.0054 | 0.0036 | 0.0044 | 0.0036 | 0.0083 | |
| MMF2 | Mean | 0.0062 | 0.0137 | 0.0502 | 0.0166 | 0.0137 | 0.0204 |
| Variance | 0.0036 | 0.0073 | 0.0214 | 0.0067 | 0.0086 | 0.0075 | |
| MMF3 | Mean | 0.0059 | 0.0125 | 0.0325 | 0.0138 | 0.0068 | 0.0188 |
| Variance | 0.0035 | 0.0067 | 0.0116 | 0.0062 | 0.0031 | 0.0071 | |
| MMF8 | Mean | 0.008 | 0.0117 | 0.0102 | 0.0151 | 0.009 | 0.0192 |
| Variance | 0.0045 | 0.0063 | 0.0056 | 0.007 | 0.0038 | 0.0071 | |
| MMF12 | Mean | 0.0758 | 0.086 | 0.0927 | 0.0876 | 0.0792 | 0.0874 |
| Variance | 0.0378 | 0.0427 | 0.046 | 0.0305 | 0.0284 | 0.0311 | |
| MMF15 | Mean | 0.2148 | 0.1978 | 0.1939 | 0.2175 | 0.2262 | 0.2517 |
| Variance | 0.1013 | 0.093 | 0.094 | 0.0729 | 0.0757 | 0.0846 |
RPS pvalues for different optimization algorithms
| Function name | Index | MSIMOSSA | MOPSO | MODA | MOALO | MOMVO | MSSA |
|---|---|---|---|---|---|---|---|
| MMF1 | Mean | 0.0876 | 0.0816 | 0.0836 | 0.1286 | 0.0969 | 0.2215 |
| Variance | 0.049 | 0.0463 | 0.0285 | 0.0434 | 0.0328 | 0.0742 | |
| MMF2 | Mean | 0.0686 | 0.0359 | 0.0931 | 0.1304 | 0.0726 | 0.0778 |
| Variance | 0.0362 | 0.0198 | 0.0338 | 0.0874 | 0.0373 | 0.027 | |
| MMF3 | Mean | 0.0471 | 0.0689 | 0.0865 | 0.0675 | 0.0512 | 0.0986 |
| Variance | 0.0241 | 0.0395 | 0.0365 | 0.0277 | 0.045 | 0.0396 | |
| MMF8 | Mean | 0.1424 | 1.0264 | 0.1843 | 1.4026 | 1.453 | 1.8445 |
| Variance | 0.0808 | 0.6093 | 0.1064 | 0.7393 | 0.6186 | 0.7991 | |
| MMF12 | Mean | 1.0448 | 1.4048 | 1.0592 | 2.0869 | 2.3115 | 2.7801 |
| Variance | 0.5952 | 0.8052 | 0.5926 | 0.9307 | 0.7662 | 1.1146 | |
| MMF15 | Mean | 0.1962 | 0.4926 | 0.4136 | 0.4438 | 0.6363 | 0.5434 |
| Variance | 0.0927 | 0.2252 | 0.185 | 0.2199 | 0.2108 | 0.2218 |
In order to verify the effectiveness of MOMPA, the algorithm was applied to the BSM1 simulation platform, and the total optimization period was set to be 14d, the performance index optimization period was set to be 2h, and each sampling interval was set to be 15 min.The simulation data were selected as the wastewater data under the sunny, rainy, and stormy days, respectively. The optimization ranges of

Optimized control curves and error plots of SO and SNO in sunny days
From the figure, it can be seen that under sunny weather, the change process of effluent water quality indexes is relatively smooth.MSIMOSSA algorithm presents good tracking control effect according to the actual operation status of the system, the tracking trajectory and the set value change process basically coincide, and the average value of the overall discharge concentration of the effluent water quality parameter is in the range of effluent discharge indexes of 0~2.7 mg/L, which meets the effluent treatment process The constraints of the wastewater treatment process are met, which verifies the superiority of MSIMOSSA in the optimization of wastewater treatment, and is a prerequisite to further ensure that the energy consumption achieves the best treatment results.
The study proposes performance evaluation indexes for the soft measurement and optimization control part of the wastewater treatment process. For modeling prediction of The MSIMOSSA algorithm is used to determine the optimal setpoints and the substructure is a PID controller for tracking the optimal setpoints of On the BSM1 simulation platform, the MSIMOSSA algorithm is used to find the optimal setting values of
