Multi-time Scale Model Predictive Control of Wastewater Treatment Process

Abstract
A multi-time scale model predictive control method for wastewater treatment process is designed to control the dissolved oxygen concentration and nitrate nitrogen concentration in different time scales to ensure that the effluent quality meets the standard. In view of the difference of time scales in wastewater treatment process caused by different sampling periods of dissolved oxygen concentration and nitrate nitrogen concentration, prediction models with different time scales are firstly designed to unify the prediction outputs to the fast time scale. Then, the gradient descent algorithm is used to solve the optimal solution with fast time scale to control the wastewater treatment system. It not only conforms to the operation characteristics of wastewater treatment process, but also solves the problem of poor operation performance of multiobjective model predictive control caused by different time scales. The experimental results show that the multi-time scale model predictive control method can achieve accurate on-line control of dissolved oxygen concentration and nitrate nitrogen concentration with fast time scales.
Description
CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefits to Chinese Patent Application No. 202110733306.8 filed on Jun. 30, 2021, the content of which is hereby incorporated by reference in its entirety.


TECHNOLOGY AREA

In this invention, the different time scale prediction models are used to predict the dissolved oxygen concentration and nitrate nitrogen concentration of wastewater treatment process in real time online in a fast time scale, and the control laws are calculated in the fast time scale to realize the accurate control of dissolved oxygen concentration and nitrate nitrogen concentration. As an important part of wastewater treatment process, the control of dissolved oxygen concentration and nitrate nitrogen concentration is an important branch of advanced manufacturing technology, which belongs to the field of intelligent control and water treatment.


TECHNOLOGY BACKGROUND

The discharged wastewater contains a lot of organic matter, nitrogen, phosphorus and other substances, which is the main reason of water pollution. Wastewater treatment plant is one of the important ways to purify wastewater and realize the recycling of water resources. With the increasingly strict wastewater discharge standards, the control requirements for wastewater treatment process are also increasing. wastewater treatment process, as a complex process, has the characteristics of uncertainty, nonlinearity, time scale difference and so on. After years of construction, China's wastewater treatment industry has obtained lots of achievements. However, the backward production technology and extensive management mode make most wastewater treatment plants have high treatment cost and low efficiency. Therefore, it is an urgent problem to reduce energy consumption and improve wastewater treatment efficiency on the premise that the effluent quality of wastewater treatment plant meets the standard at this stage.


The concentration of dissolved oxygen in aerobic zone and nitrate nitrogen in anoxic zone of wastewater treatment process directly reflect the process of nitrification and denitrification. Controlling the dissolved oxygen concentration and nitrate nitrogen concentration within an appropriate range can improve the wastewater treatment capacity and ensure that the effluent quality meets the standard. Therefore, it is very important to control the dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process. However, due to the limitation of measuring instruments, the sampling periods of dissolved oxygen concentration and nitrate nitrogen concentration are different, which has the characteristics of inconsistent time scales. Meanwhile, the control of wastewater treatment process is difficult because the complexity of the physical, chemical and biological phenomena and the fluctuation of the influent flow and components. Traditional PID controller or nonlinear model predictive control cannot adapt to the above characteristics, which may reduce the system performance and wastewater treatment efficiency, and even difficult to maintain the stability of the closed-loop system.


The invention designs an multi-time scale model predictive control method for wastewater treatment process. In this method, different time scale prediction models are introduced to unify the prediction outputs of dissolved oxygen concentration and nitrate nitrogen concentration to the fast time scale, and the gradient descent algorithm is used to solve the control law on the fast time scale to realize the accurate on-line control of dissolved oxygen concentration and nitrate nitrogen concentration in the fast time scale.


SUMMARY

In view of the difference of time scales in wastewater treatment process caused by different sampling periods of dissolved oxygen concentration and nitrate nitrogen concentration, the invention proposes a multi-time scale model predictive control method for wastewater treatment process. Prediction models with different time scales are designed to unify the prediction outputs to the fast time scale and the gradient descent algorithm is used to solve the optimal solution with fast time scale to control the wastewater treatment process system. The invention solves the problem of poor operation performance of multivariable model predictive control for multi time scale system and effectively improves the accuracy of online control of dissolved oxygen concentration and nitrate nitrogen concentration; The invention adopts the following technical scheme and implementation steps:


1. A multi-time scale model predictive control method of wastewater treatment process, comprising the following steps:


(1) the multi-time scale model predictive control system for wastewater treatment process control comprising a set of measuring devices arranged to obtain a dataset, measuring devices include dissolved oxygen detector, nitrate nitrogen detector, the dataset comprises a plurality of process variables related to a parameter of wastewater treatment process; a programmable logic controller arranged to perform digital/analog conversion and analog/digital conversion; a variable-frequency drive arranged to control the air-blower and electronic valve by changing the working power frequency of motor; an air-blower arranged to provide the required oxygen to the microorganisms in the wastewater treatment process; an electronic valve arranged to adjust internal return flow; a multi-time scale model predictive control module arranged to calculate the control law to track the dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process with different time scales; the multi-time scale model predictive control module comprising two fuzzy neural network to predict the system outputs, a time scale conversion mechanism to unify the prediction time scales to fast time scale, and an optimization control module to calculate the control law;


(2) the time scales of dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process are different, specifically:


Tf is the sampling interval of dissolved oxygen concentration, Tf∈[6, 10] is a positive integer in minutes, tf=fTf represents the sampling instant of dissolved oxygen concentration, f is the number of sampling steps of dissolved oxygen concentration, and f∈[1, 1000] is a positive integer;


Ts is the sampling interval of nitrate nitrogen concentration, Ts∈[12, 20] is a positive integer in minutes, ts=sTs represents the sampling instant of nitrate nitrogen concentration, s is the number of sampling steps of nitrate nitrogen concentration, and s∈[1, 400] is a positive integer;


ζ is the maximum common divisor of Tf and Ts, tη=ηζ is the prediction instant of slow sampling fuzzy neural network, η is the number of prediction steps of slow sampling fuzzy neural network, η∈[1, 2000] is a positive integer;


(3) a fast sampling fuzzy neural network is designed to predict dissolved oxygen concentration with time scale Tf, which is as follows:


the input of the fast sampling fuzzy neural network is xf(tf)=[xf1(tf−1), xf2(tf−1), xf3(tf−1)]T, T is the transposition of the matrix, and the output of the fast sampling fuzzy neural network is the predicted value of dissolved oxygen concentration ŷf(tf) at time tf, the output is defined as follows












y
ˆ

f

(

t
f

)

=





j
=
1

6




w
fj

(

t
f

)



e

-





i
=
1



3






(



x
fi

(


t
f

-
1

)

-


c
fij

(

t
f

)


)

2


2



σ
fij
2

(

t
f

)













j
=
1

6


e

-





i
=
1



3






(



x
fi

(


t
f

-
1

)

-


c
fij

(

t
f

)


)

2


2



σ
fij
2

(

t
f

)













(
1
)







where xf(tf−1) is the ith input of the fast sampling fuzzy neural network at time tf, i=1, 2, 3, wfj(tf) is the weight between the jth regular layer neuron and the output layer neuron of the fast sampling fuzzy neural network at time tf, wfj(t0) is randomly assigned within [0, 1], j=1, 2, 3, 4, 5, 6, t0 is the initial instant, cfij(tf) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf, σfij(t0) is randomly assigned within [0,1], σfij(tf) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf, and σfij(t0) is randomly assigned within [0,1];


(4) a slow sampling fuzzy neural network is designed to predict nitrate nitrogen concentration with time scale ζ, which is as follows:


The input of the slow sampling fuzzy neural network is xs(tη)=[xs1(tη−1), xs2(tη−1), xs3(tη−1)]T, and the output of the slow sampling fuzzy neural network is the predicted value of nitrate nitrogen concentration ŷs(tη) at time tη, the output is defined as follows












y
ˆ

f

(

t
η

)

=





j
=
1

6




ω
sj

(

t
η

)



e

-





i
=
1



3






(



x
si

(


t
η

-
1

)

-


c
sij

(

t
η

)


)

2


2



σ
sij
2

(

t
η

)













j
=
1

6


e

-





i
=
1



3






(



x
si

(


t
η

-
1

)

-


c
sij

(

t
η

)


)

2


2



σ
sij
2

(

t
η

)













(
2
)







where xsi(tη−1) is the ith input of the slow sampling fuzzy neural network at time tη, wsj(tη) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tη, wsj(t0) is randomly assigned within [0, 1], σsij(tη) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη, csij(t0) is randomly assigned within [0,1], σsij(tη) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη, and σsij(t0) is randomly assigned within [0,1];


a dataset Ω whose time scale is ζ is constructed as follows, when ts≤tη<ts+1:






u
s1
η(tη)=us1(ts)  (3)






u
s2
η(tη)=us2(ts)  (4)






y
s
η(tη)=ys(ts)+Ts(ys(ts+1)−ys(ts))/tη  (5)


where us1η(tη) is the virtual value of aeration rate at time tη, us1(ts) is the actual value of aeration rate at time ts, us2η(tη) is the virtual value of internal reflux at time tη, us2(ts) is the actual value is of internal reflux at time ts, ysη(tη) is the virtual estimated value of nitrate nitrogen concentration at time tη, ys(ts) is the actual value of the nitrate nitrogen concentration converted by the programmable logic controller at time ts, ys(ts+1) is the actual value of the nitrate nitrogen concentration converted by the programmable logic controller at time ts+1; the dataset Ω is composed of us1η(tη), us2η(tη), and ysη(tη);


The dataset Ω is used to pre-train the slow sampling fuzzy neural network offline, and the training input is xsη(tη)=[ysη(tη−1), us1η(tη−1), us2η(tη−1)]T, ysη(tη−1) is the nitrate nitrogen concentration at time tη−1 in Ω, us1η(tη−1) is the aeration rate at time tη−1 in Ω, us2 (tη−1) is the internal reflux at time tη−1 in Ω, the training output is the prediction value of nitrate nitrogen concentration ŷsη(tη) at time tη; using the error between nitrate nitrogen concentration value in dataset Ω and predicted value Esη(tη)=½[ysη(tη)−ŷsη(tη)]2 at time tη, correct parameters of slow sampling fuzzy neural network:






w
sj(tη+1)=wsj(tη)−0.2∂Esη(tη)/∂wsj(tη)  (6)






c
sij(tη+1)=csij(tη)−0.2Esη(tη)/∂csij(tη)  (7)





σsij(tη+1)=σsij(tη)−0.2∂Esη(tη)/∂σsij(tη)  (8)


where wsj(tη+1) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tη+1, csij(tη+1) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη+1, σsij(tη+1) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη+1;


(5) The multi-time scale model predictive control method is designed to control the dissolved oxygen concentration and nitrate nitrogen concentration in time scale Tf, specifically:


{circle around (1)} set s=1, f=1, η=1;


{circle around (2)} according to the sampling information converted by programmable logic controller, predict nitrate nitrogen concentration at time tη using slow sampling fuzzy neural network; the inputs of the slow sampling fuzzy neural network are as follows: xs1(tη−1) is the actual value of nitrate nitrogen concentration ys(tη−1) at time tη−1, xs2(tη−1) is the aeration rate u1(tη−1) at time tη−1, xs3(tη−1) is the internal reflux u2(tη−1) at time tη−1; the output of the slow sampling fuzzy neural network is the prediction value of nitrate nitrogen concentration ŷs(tη) at time tη;


{circle around (3)} if tη=tf, set ŷs(tf)=fs(tη), where ŷs(tf) is the prediction value of nitrate nitrogen concentration at time tf, go to step {circle around (6)} after performing step {circle around (4)}; if tη≠tf, go to step {circle around (6)} after performing step {circle around (5)};


{circle around (4)} if tη=ts, increase the value of s by 1, update the parameters of the slow sampling fuzzy neural network by the error between the predicted value and the actual value of nitrate nitrogen concentration Es(tη)=½[ys(ts)−ŷs(tη)]2:






w
sj(tη+1)=wsj(tη)−0.2∂Es(tη)/∂wsj(tη)  (9)






c
sij(tη+1)=csij(tη)−0.2∂Es(tη)/∂csij(tη)  (10)





σsij(tη+1)=σsij(tη)−0.2∂Es(tη)/∂σsij(tη)  (11)


if tη≠ts, the parameters of slow sampling fuzzy neural network are not updated;


{circle around (5)} set ys(tη)=ŷs(tη), u1(tη)=u1(tf), u2(tη)=u2(tf), increase the value of η by 1, go to step {circle around (2)}, where ys(tη) is the actual nitrate nitrogen concentration converted by the programmable logic controller at time tη, u1(tη) is the aeration rate at time tη, u2(tη) is the internal reflux at time tη, u1(tf) is the aeration rate at time tf, u2(tf) is the internal reflux at time tf;


{circle around (6)} predict dissolved oxygen concentration at time tf by the fast sampling fuzzy neural network; the inputs of the fast sampling fuzzy neural network are as follows: xf1(tf−1) is the actual value of dissolved oxygen concentration ŷf(tf−1) converted by the programmable logic controller at time tf−1, xf2(tf−1) is the aeration rate u1(tf−1) at time tf−1, xf3(tf−1) is the internal reflux u2(tf−1) at time tf−1; the output of the fast sampling fuzzy neural network is the prediction value of dissolved oxygen concentration ŷf(tf) at time tf; update the parameters of the fast sampling fuzzy neural network by the error between the predicted value and the actual value of dissolved oxygen concentration Ef(tf)=½[yf(tf)−ŷf(tf)]2:






w
fj(tf+1)=wfj(tf)−0.2∂Ef(tf)/∂wfj(tf)  (12)






c
fij(tf+1)=cfij(tf)−0.2∂Ef(tf)/∂cfij(tf)  (13)





σfij(tf+1)=σfij(tf)−0.2∂Ef(tf)/∂σfij(tf)  (14)


where wfj(tf+1) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tf+1, cfij(tf+1) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf+1, σfij(tf+1) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf+1;


{circle around (7)} design an objective function of multi-time scale model predictive control to track the set-points of nitrate nitrogen concentration and dissolved oxygen concentration, and calculate the control law at time tf:






J(tf)=0.25[[rf(tf)−ŷf(tf)]T[rf(tf)−ŷf(tf)]+Δu(tf)TΔu(tf)]+0.45[rs(tf)−ŷs(tf)]T[rs(tf)−ŷs(tf)]+Δu(tf)TΔu(tf)   (15)


where rf(tf)=[rf(tf+1), rf(tf+2), rf(tf+3)]T is the set-point of dissolved oxygen concentration, rf(tf+1)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+1, rf(tf+2)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+2, rf(tf+3)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+3; ŷf(tf)=[ŷf(tf+1), ŷf(tf+2), ŷf(tf+3)]T is the prediction output of the fast sampling fuzzy neural network, ŷf(tf−1) is the prediction value of dissolved oxygen concentration at time tf+1, ŷf(tf+2) is the prediction value of dissolved oxygen concentration at time tf+2, ŷf(tf+3) is the prediction value of dissolved oxygen concentration at time tf+3; rs(tf)=[rs(tf+1), rs(tf+2), rs(tf+3)]T is the set-point of nitrate nitrogen concentration; rs(tf+1)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+1, rs(tf+2)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+2, rs(tf+3)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+3; ŷs(ts)=[ŷs(ts+1), ŷs(ts+2), ŷs(ts+3)]T is the prediction output of slow sampling fuzzy neural network, ŷs(tf−1) is the prediction value of nitrate nitrogen concentration at time tf+1, ŷs(tf+2) is the prediction value of nitrate nitrogen concentration at time tf+2, ŷs(tf+3) is the prediction value of nitrate nitrogen concentration at time tf+3; Δu(tf)=[Δu1(tf), Δu2(tf)]T is the incremental control moves at time tf, Δu1(tf) is the aeration rate adjustment amount at time tf, Δu2(tf) is the internal reflux adjustment amount at time tf, where





Δu(tf)=u(tf+1)−u(tf)  (16)





u(tf)|≤Δumax  (17)


u(tf)=[u1(tf), u2(tf)]T is control vector converting into analog signal through programmable logic controller and transmitting to variable frequency driver at time tf, u(tf−1)=[u1(tf−1), u2(tf−1)]T is control vector converting into analog signal through programmable logic controller and transmitting to variable frequency driver at time tf+1, u1(tf−1) is the aeration rate at time tf+1, u2(tf+1) is the internal reflux at time tf+1; Δumax=[ΔKLamax, ΔQamax]T is the maximum adjustment vector allowed by the controller, ΔKLamax=100 L/min is the maximum aeration adjustment amount, ΔQamax=50000 L/min is the maximum internal reflux adjustment amount, Δumax is set through the blower and internal reflux valve in the control system equipment;


an aeration rate and internal reflux adjustment vector are calculated by minimizing Eq.(15):










Δ


u

(

t
f

)


=

(


0.
4




(






y
ˆ

f

(

t
f

)





u

(

t
f

)



)

T

[



r
f

(

t
f

)

-



y
ˆ

f

(

t
f

)


]


+


0
.
0


8




(






y
ˆ

s

(

t
f

)





u

(

t
f

)



)

T

[



r
s

(

t
f

)

-



y
ˆ

s

(

t
f

)


]



)





(
18
)







adjust the aeration rate and internal reflux at time tf:






u(tf+1)=u(tf)+Δu(tf)  (19)


{circle around (8)} if f≤1000, increase the value of f by 1, increase the value of η by 1, go to step {circle around (2)}; if f>1000, end the cycle;


(6) the concentration of nitrate nitrogen and dissolved oxygen is controlled by u(tf), and u(tf)=[u1(tf), u2(tf)]T is transferred to programmable logic controller for digital/analog conversion to obtain U(tf)=[U1(tf), U2(tf)]T, which is the input of variable-frequency drive, the variable-frequency drive changes the working power frequency of motor to control the aeration pump and electronic valve, then, the aeration rate and internal reflux are controlled, the output of the system is the actual value of nitrate nitrogen concentration and dissolved oxygen concentration.


The Novelties of this Patent Contain:


(1) Aiming at the problem that the control variables of wastewater treatment process have different time scales, a multi-time scale model predictive control method is established to control the concentration of dissolved oxygen and nitrate nitrogen with fast time scale.


(2) To deal with the strong nonlinearity of wastewater treatment process, two fuzzy neural networks with different time scales are designed to model the concentration of dissolved oxygen and nitrate nitrogen, which solves the problem that the nonlinear system is difficult to model and obtains the prediction outputs of dissolved oxygen concentration and nitrate nitrogen concentration in the fast time scale.


(3) The invention introduced a gradient descent algorithm to solve the above multiobjective optimization problem, so as to calculate the control law.


(4) The multi-time scale model predictive control method in this invention has the characteristics of high precision, low energy consumption, strong stability, etc.


The invention adopts the model predictive control method to solve the control law in the fast time scale, realizes the accurate on-line control of dissolved oxygen concentration and nitrate nitrogen concentration, and has the characteristics of high precision, high efficiency, strong stability, etc;


Attention: for convenience of description, the invention only adopt the control of dissolved oxygen concentration and nitrate nitrogen concentration. The invention can also be used for the control of ammonia nitrogen in wastewater treatment process, etc. As long as the principle of the invention is adopted for control, it shall be the scope of the invention.





DESCRIPTION OF DRAWINGS


FIG. 1 is diagram of the multi-time scale model predictive control system of wastewater treatment process.



FIG. 2 is a control structure diagram of the invention.



FIG. 3 is an algorithm diagram of the invention.



FIG. 4 is the time diagram of the invention.



FIG. 5 is the result diagram of the dissolved oxygen concentration control in this invention.



FIG. 6 is the error diagram of the dissolved oxygen concentration control result in this invention.



FIG. 7 is the result diagram of nitrate nitrogen concentration control in this invention.



FIG. 8 is the error diagram of the nitrate nitrogen concentration control result in this invention.





DETAILED DESCRIPTION OF THE INVENTION

1. A multi-time scale model predictive control method of wastewater treatment process, comprising the following steps:


(1) the multi-time scale model predictive control system for wastewater treatment process control comprising a set of measuring devices arranged to obtain a dataset, measuring devices include dissolved oxygen detector, nitrate nitrogen detector, the dataset comprises a plurality of process variables related to a parameter of wastewater treatment process; a programmable logic controller arranged to perform digital/analog conversion and analog/digital conversion; a variable-frequency drive arranged to control the air-blower and electronic valve by changing the working power frequency of motor; an air-blower arranged to provide the required oxygen to the microorganisms in the wastewater treatment process; an electronic valve arranged to adjust internal return flow; a multi-time scale model predictive control module arranged to calculate the control law to track the dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process with different time scales; the multi-time scale model predictive control module comprising two fuzzy neural network to predict the system outputs, a time scale conversion mechanism to unify the prediction time scales to fast time scale, and an optimization control module to calculate the control law;


(2) the time scales of dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process are different, specifically:


Tf is the sampling interval of dissolved oxygen concentration, Tf∈[6, 10] is a positive integer in minutes, tf=fTf represents the sampling instant of dissolved oxygen concentration, f is the number of sampling steps of dissolved oxygen concentration, and f∈[1, 1000] is a positive integer;


Ts is the sampling interval of nitrate nitrogen concentration, Ts∈[12, 20] is a positive integer in minutes, ts=sTs represents the sampling instant of nitrate nitrogen concentration, s is the number of sampling steps of nitrate nitrogen concentration, and s∈[1, 400] is a positive integer;


ζ is the maximum common divisor of Tf and Ts, tη=ηζ is the prediction instant of slow sampling fuzzy neural network, η is the number of prediction steps of slow sampling fuzzy neural network, η∈[1, 2000] is a positive integer;


(3) a fast sampling fuzzy neural network is designed to predict dissolved oxygen concentration with time scale Tf, which is as follows:


the input of the fast sampling fuzzy neural network is xf(tf)=[xf1(tf−1), xf2(tf−1), xf3(tf−1)]T, T is the transposition of the matrix, and the output of the fast sampling fuzzy neural network is the predicted value of dissolved oxygen concentration ŷf(tf) at time tf, the output is defined as follows












y
ˆ

f



(

t
f

)


=





j
=
1

6




w
fj

(

t
f

)



e

-





i
=
1



3






(



x
fi

(


t
f

-
1

)

-


c
fij

(

t
f

)


)

2


2



σ
fij
2

(

t
f

)













j
=
1

6


e

-





i
=
1



3






(



x
fi

(


t
f

-
1

)

-


c
fij

(

t
f

)


)

2


2



σ
fij
2

(

t
f

)













(
20
)







where xfi(tf−1) is the ith input of the fast sampling fuzzy neural network at time tf, i=1, 2, 3, wfj(tf) is the weight between the jth regular layer neuron and the output layer neuron of the fast sampling fuzzy neural network at time tf, wfj(t0) is randomly assigned within [0, 1], j=1, 2, 3, 4, 5, 6, t0 is the initial instant, cfij(tf) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf, cfij(t0) is randomly assigned within [0,1], σfij(tf) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf, and σfij(t0) is randomly assigned within [0,1];


(4) a slow sampling fuzzy neural network is designed to predict nitrate nitrogen concentration with time scale ζ, which is as follows:


The input of the slow sampling fuzzy neural network is xs(tη)=[xs1(tη−1), xs2(tη−1), xs3(tη−1)]T, and the output of the slow sampling fuzzy neural network is the predicted value of nitrate nitrogen concentration ŷs(tη) at time tη, the output is defined as follows












y
ˆ

f



(

t
η

)


=





j
=
1

6




ω
sj

(

t
η

)



e

-





i
=
1



3






(



x
si

(


t
η

-
1

)

-


c
sij

(

t
η

)


)

2


2



σ
sij
2

(

t
η

)













j
=
1

6


e

-





i
=
1



3






(



x
si

(


t
η

-
1

)

-


c
sij

(

t
η

)


)

2


2



σ
sij
2

(

t
η

)













(
21
)







where xsi(tη−1) is the ith input of the slow sampling fuzzy neural network at time tη, wsj(tη) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tη, wsj(t0) is randomly assigned within [0, 1], csij(tη) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη, csij(t0) is randomly assigned within [0,1], σsij(tη) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη, and σsij(t0) is randomly assigned within [0,1];


a dataset Ω whose time scale is ζ is constructed as follows, when ts≤tη<ts+1.






u
s1
η(tη)=us1(ts)  (22)






u
s2
η(tη)==us2(ts)  (23)






y
s
η(tη)=ys(ts)+Ts(ys(ts+1)−ys(ts))/tη  (24)


where us1η(tη) is the virtual value of aeration rate at time tη, us1(ts) is the actual value of aeration rate at time ts, us2η(tη) is the virtual value of internal reflux at time tη, us2(ts) is the actual value of internal reflux at time ts, ysη(tη) is the virtual estimated value of nitrate nitrogen concentration at time tη, ys(ts) is the actual value of the nitrate nitrogen concentration converted by the programmable logic controller at time ts, ys(ts+1) is the actual value of the nitrate nitrogen concentration converted by the programmable logic controller at time ts+1; the dataset Ω is composed of us1η(tη), us2η(tη), and ysη(tη);


The dataset Ω is used to pre-train the slow sampling fuzzy neural network offline, and the training input is xsη(tη)=[ysη(tη−1), us1η(tη−1), us2η(tη−1)]T, ysη(tη−1) is the nitrate nitrogen concentration at time tη−1 in Ω, us1η(tη−1) is the aeration rate at time tη−1 in Ω, us2η(tη−1) is the internal reflux at time tη−1 in Ω, the training output is the prediction value of nitrate nitrogen concentration ŷsη(tη) at time tη; using the error between nitrate nitrogen concentration value in dataset Ω and predicted value Esη(tη)=½[ysη(tη)−ŷsη(tη)]2 at time tη, correct parameters of slow sampling fuzzy neural network:






w
sj(tη+1)=wsj(tη)−0.2∂Esη(tη)/∂wsj(tη)  (25)






c
sij(tη+1)=csij(tη)−0.2∂Esη(tη)/∂csij(tη)  (26)





σsij(tη+1)=σsij(tη)−0.2∂Esη(tη)/∂σsij(tη)  (27)


where wsj(tη+1) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tη+1, csij(tη+1) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time tη+1, σsij(tη+1) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the slow sampling fuzzy neural network at time t+1;


(5) The multi-time scale model predictive control method is designed to control the dissolved oxygen concentration and nitrate nitrogen concentration in time scale Tf, specifically:


{circle around (1)} set s=1, f=1, η=1;


{circle around (2)} according to the sampling information converted by programmable logic controller, predict nitrate nitrogen concentration at time tη using slow sampling fuzzy neural network; the inputs of the slow sampling fuzzy neural network are as follows: xs1(tη−1) is the actual value of nitrate nitrogen concentration ys(tη−1) at time tη−1, xs2(tη−1) is the aeration rate u1(tη−1) at time tη−1, xs3(tη−1) is the internal reflux u2(tη−1) at time tη−1; the output of the slow sampling fuzzy neural network is the prediction value of nitrate nitrogen concentration ŷs(tη) at time tη;


{circle around (3)} if tη=tf, set ŷs(tf)=ŷs(tη), where ŷs(tf) is the prediction value of nitrate nitrogen concentration at time tf, go to step {circle around (6)} after performing step {circle around (4)}; if tη≠tf, go to step {circle around (6)} after performing step {circle around (5)};


{circle around (4)} if tη=ts, increase the value of s by 1, update the parameters of the slow sampling fuzzy neural network by the error between the predicted value and the actual value of nitrate nitrogen concentration Es(tη)=½[ys(ts)−ŷs(tη)]2:






w
sj(tη+1)=wsj(tη)−0.2∂Es(tη)/∂wsj(tη)  (28)






c
sij(tη+1)=csij(tη)−0.2∂Es(tη)/∂csij(tη)  (29)





σsij(tη+1)=σsij(tη)−0.2∂Es(tη)/∂σsij(tη)  (30)


if tη≠ts, the parameters of slow sampling fuzzy neural network are not updated;


{circle around (5)} set ys(tη)=ŷs(tη), u1(tη)=u1(tf), u2(tη)=u2(tf), increase the value of η by 1, go to step {circle around (2)}, where ys(tη) is the actual nitrate nitrogen concentration converted by the programmable logic controller at time tη, u1(tθ) is the aeration rate at time tη, u2(tθ) is the internal reflux at time tη, u1(tf) is the aeration rate at time tf, u2(tf) is the internal reflux at time tf;


{circle around (6)} predict dissolved oxygen concentration at time tf by the fast sampling fuzzy neural network; the inputs of the fast sampling fuzzy neural network are as follows: xf1(tf−1) is the actual value of dissolved oxygen concentration yf(tf−1) converted by the programmable logic controller at time tf−1, xf2(tf−1) is the aeration rate u1(tf−1) at time tf−1, xf3(tf−1) is the internal reflux u2(tf−1) at time tf−1; the output of the fast sampling fuzzy neural network is the prediction value of dissolved oxygen concentration ŷf(tf) at time tf; update the parameters of the fast sampling fuzzy neural network by the error between the predicted value and the actual value of dissolved oxygen concentration Ef(tf)=½[yf(tf)−ŷf(tf)]2:






w
fj(tf+1)=wfj(tf)−0.2∂Ef(tf)/∂wfj(tf)  (31)






c
fij(tf+1)=cfij(tf)−0.2∂Ef(tf)/∂cfij(tf)  (32)





σfij(tf+1)=σfij(tf)−0.2∂Ef(tf)/∂σfij(tf)  (33)


where wfj(tf+1) is the weight between the jth regular layer neuron and the output layer neuron of the slow sampling fuzzy neural network at time tf+1, cfij(tf−1) is the center of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf+1, σfij(tf+1) is the width of the ith input neuron corresponding to the jth radial basis function neuron of the fast sampling fuzzy neural network at time tf+1;


{circle around (7)} design an objective function of multi-time scale model predictive control to track the set-points of nitrate nitrogen concentration and dissolved oxygen concentration, and calculate the control law at time tf:






J(tf)=0.25[[rf(tf)−ŷf(tf)]T[r(tf)−ŷf(tf)]+Δu(tf)TΔu(tf)]+0.45[rs(tf)−ŷs(tf)]T[rs(tf)−ŷs(tf)]+Δu(tf)TΔu(tf)   (34)


where rf(tf)=[rf(tf−1), rf(tf+2), rf(tf+3)]T is the set-point of dissolved oxygen concentration, rf(tf+1)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+1, rf(tf+2)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+2, rf(tf+3)=2 mg/l represents the set-point of dissolved oxygen concentration at time tf+3; ŷf(tf)=[ŷf(tf+1), ŷf(tf+2), ŷf(tf+3)]T is the prediction output of the fast sampling fuzzy neural network, ŷf(tf−1) is the prediction value of dissolved oxygen concentration at time tf+1, ŷf(tf+2) is the prediction value of dissolved oxygen concentration at time tf+2, ŷf(tf+3) is the prediction value of dissolved oxygen concentration at time tf+3; rs(tf)=[rs(tf+1), rs(tf+2), rs(tf+3)]T is the set-point of nitrate nitrogen concentration; rs(tf+1)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+1, rs(tf+2)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+2, rs(tf+3)=1 mg/l represents the set-point of nitrate nitrogen concentration at time tf+3; ŷs(ts)=[ŷs(ts+1), ŷs(ts+2), ŷs(ts+3)]T is the prediction output of slow sampling fuzzy neural network, ŷs(tf+1) is the prediction value of nitrate nitrogen concentration at time tf+1, ŷs(tf+2) is the prediction value of nitrate nitrogen concentration at time tf+2, ŷs(tf+3) is the prediction value of nitrate nitrogen concentration at time tf+3; Δu(tf)=[Δu1(tf), Δu2(tf)]T is the incremental control moves at time tf, Δu1(tf) is the aeration rate adjustment amount at time tf, Δu2(tf) is the internal reflux adjustment amount at time tf, where





Δu(tf)=u(tf+1)−u(tf)  (35)





u(tf)|≤Δumax  (36)


u(tf)=[u1(tf), u2(tf)]T is control vector converting into analog signal through programmable logic controller and transmitting to variable frequency driver at time tf, u(tf+1)=[u1(tf+1), u2(tf−1)]T is control vector converting into analog signal through programmable logic controller and transmitting to variable frequency driver at time tf+1, u1(tf+1) is the aeration rate at time tf+1, u2(tf+1) is the internal reflux at time tf+1; Δumax=[ΔKLamax, ΔQamax]T is the maximum adjustment vector allowed by the controller, ΔKLamax=100 L/min is the maximum aeration adjustment amount, ΔQamax=50000 L/min is the maximum internal reflux adjustment amount, Δumax is set through the blower and internal reflux valve in the control system equipment;


an aeration rate and internal reflux adjustment vector are calculated by minimizing Eq.(15):










Δ


u

(

t
f

)


=

(


0.
4




(






y
ˆ

f

(

t
f

)





u

(

t
f

)



)

T

[



r
f

(

t
f

)

-



y
ˆ

f

(

t
f

)


]


+


0
.
0


8




(






y
ˆ

s

(

t
f

)





u

(

t
f

)



)

T

[



r
s

(

t
f

)

-



y
ˆ

s

(

t
f

)


]



)





(
37
)







adjust the aeration rate and internal reflux at time tf:






u(tf+1)=u(tf)+Δu(tf)  (38)


{circle around (8)} if f≤1000, increase the value of f by 1, increase the value of η by 1, go to step {circle around (2)}; if f>1000, end the cycle;


(6) the concentration of nitrate nitrogen and dissolved oxygen is controlled by u(tf), and u(tf)=[u1(tf), u2(tf)]T is transferred to programmable logic controller for digital/analog conversion to obtain U(tf)=[U1(tf), U2(tf)]T, which is the input of variable-frequency drive, the variable-frequency drive changes the working power frequency of motor to control the aeration pump and electronic valve, then, the aeration rate and internal reflux are controlled, the output of the system is the actual value of nitrate nitrogen concentration and dissolved oxygen concentration. FIG. 4 shows the dissolved oxygen concentration of the system, X-axis: time, unit: day, Y-axis: dissolved oxygen concentration, unit: mg/L, the solid line is the expected dissolved oxygen concentration, the dotted line is the actual dissolved oxygen concentration; the error between the actual output dissolved oxygen concentration and the expected dissolved oxygen concentration is shown in FIG. 5, X-axis: time, unit: day, Y-axis: dissolved oxygen concentration error, unit: mg/L FIG. 6 shows the nitrate concentration value of the system, X-axis: time, unit: day, Y-axis: nitrate concentration value, unit: mg/L, solid line is expected nitrate concentration value, dotted line is actual nitrate concentration value; the error between actual output nitrate concentration and expected nitrate concentration is shown in FIG. 7, X-axis: time, unit: day, Y-axis: nitrate concentration error value, unit: mg/L. The results show that the method is effective.

Claims
  • 1. A multi-time scale model predictive control method of wastewater treatment process, comprising the following steps: (1) the multi-time scale model predictive control system for wastewater treatment process control comprising a set of measuring devices arranged to obtain a dataset, measuring devices include dissolved oxygen detector, nitrate nitrogen detector, the dataset comprises a plurality of process variables related to a parameter of wastewater treatment process; a programmable logic controller arranged to perform digital/analog conversion and analog/digital conversion; a variable-frequency drive arranged to control the air-blower and electronic valve by changing the working power frequency of motor; an air-blower arranged to provide the required oxygen to the microorganisms in the wastewater treatment process; an electronic valve arranged to adjust internal return flow; a multi-time scale model predictive control module arranged to calculate the control law to track the dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process with different time scales; the multi-time scale model predictive control module comprising two fuzzy neural network to predict the system outputs, a time scale conversion mechanism to unify the prediction time scales to fast time scale, and an optimization control module to calculate the control law;(2) the time scales of dissolved oxygen concentration and nitrate nitrogen concentration in wastewater treatment process are different, specifically:Tf is the sampling interval of dissolved oxygen concentration, Tf∈[6, 10] is a positive integer in minutes, tf=fTf represents the sampling instant of dissolved oxygen concentration, f is the number of sampling steps of dissolved oxygen concentration, and f∈[1, 1000] is a positive integer;Ts is the sampling interval of nitrate nitrogen concentration, Ts∈[12, 20] is a positive integer in minutes, ts=sTs represents the sampling instant of nitrate nitrogen concentration, s is the number of sampling steps of nitrate nitrogen concentration, and s∈[1, 400] is a positive integer;ζ is the maximum common divisor of Tf and Ts, tη=ηζ is the prediction instant of slow sampling fuzzy neural network, η is the number of prediction steps of slow sampling fuzzy neural network, η∈[1, 2000] is a positive integer;(3) a fast sampling fuzzy neural network is designed to predict dissolved oxygen concentration with time scale Tf, which is as follows:the input of the fast sampling fuzzy neural network is xf(tf)=[xf1(tf−1), xf2(tf−1), xf3(tf−1)]T, T is the transposition of the matrix, and the output of the fast sampling fuzzy neural network is the predicted value of dissolved oxygen concentration ŷf(tf) at time tf, the output is defined as follows
Priority Claims (1)
Number Date Country Kind
202110733306.8 Jun 2021 CN national