Hierarchical Model Predictive Control Method of Wastewater Treatment Process based on Fuzzy Neural Network

Information

  • Patent Application
  • 20220112108
  • Publication Number
    20220112108
  • Date Filed
    August 02, 2021
    3 years ago
  • Date Published
    April 14, 2022
    2 years ago
Abstract
A hierarchical model predictive control (HMPC) method based on fuzzy neural network for wastewater treatment process (WWTP) is designed to realize hierarchical control of dissolved oxygen (DO) concentration and nitrate nitrogen concentration. In view of the difference of time scales in WWTP, it is difficult to accurately control the concentration of DO and nitrate nitrogen. The disclosure establishes a HMPC structure according to different time scales. Then, the concentration of DO and nitrate nitrogen is controlled with different frequencies. It not only conforms to the operation characteristics of WWTP, but also solves the problem of poor operation performance of multivariable model predictive control. The experimental results show that the HMPC method can achieve accurate on-line control of DO concentration and nitrate nitrogen concentration with different time scales.
Description
CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese application No. 202011080017.4, filed on Oct. 10, 2020, the content of which is hereby incorporated by reference in its entirety.


Technology Area Since the control effect of DO concentration and nitrate nitrogen concentration directly affects the effluent quality and operation energy consumption of WWTP, the invention designs a FNN based HMPC method of WWTP to realize the online hierarchical control of DO concentration and nitrate nitrogen concentration. As an important part of WWTP, the control of DO 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 Most countries and regions in the world are facing a serious shortage of water resources. Wastewater treatment is one of the important solutions to solve the shortage of water resources. It can not only reduce the discharge of water pollutants, but also produce renewable water sources to maintain the balance of ecological and natural material circulation.


The concentration of DO in aerobic zone of wastewater treatment unit directly affects the nitrification process. When the concentration of DO increases, the concentration of ammonia nitrogen and total nitrogen in the effluent will decrease, but when the concentration of DO reaches a certain value, the change range of ammonia nitrogen in the effluent will weaken. Nitrate concentration in anoxic zone of wastewater treatment unit is an important index to measure the effect of denitrification, which reflects the process of denitrification. Controlling nitrate concentration in a suitable range can improve the potential of denitrification. Therefore, it is very important to control the concentration of DO and nitrate nitrogen in the wastewater treatment unit. It is necessary to control the concentration of DO and nitrate nitrogen in a certain range in order to improve the effluent quality.


However, due to the complexity of physical, chemical and biological phenomena associated with the WWTP, as well as the sudden change of inflow flow, the control of WWTP is a very complex problem. Although the traditional PID control or nonlinear model predictive control is a widely used control method at present, due to the different time scales of the control variables in the WWTP, it may reduce the system performance and even destroy the stability of the closed-loop system.


The invention designs a HMPC method for WWTP based on FNN, and realizes online hierarchical control of DO concentration and nitrate nitrogen concentration in WWTP according to different time scales by constructing hierarchical model predictive control structure.


SUMMARY

Aiming at the DO concentration and nitrate nitrogen concentration are difficult to accurately control caused by the characteristics of time scale difference in WWTP, the invention proposes a HMPC method for WWTP based on FNN. According to different time scales, the control method establishes a hierarchical model predictive control structure, and controls the DO concentration and nitrate concentration according to different frequency. The invention solves the problem of poor operation performance of current multivariable model predictive control, and effectively improves the accuracy of online control of DO concentration and nitrate nitrogen concentration;


The invention adopts the following technical scheme and implementation steps:


1. A hierarchical model predictive control (HMPC) system of wastewater treatment process (WWTP) based on fuzzy neural network (FNN) is proposed to solve the problem that control variables have different time scales. Then, the effect of wastewater treatment is improved by hierarchical control of dissolved oxygen (DO) concentration and nitrate nitrogen concentration, comprising the following steps:


(1) The HMPC system for WWTP control comprising a set of measuring means arranged to obtain a dataset, the dataset comprises a plurality of process variables related to a parameter of WWTP; a programmable logic controller (PLC) arranged to perform D/A conversion and A/D conversion; a variable-frequency drive (VFD) arranged to control the aeration pump and electronic valve by changing the working power frequency of motor; a HMPC module arranged to calculate the control law to track the DO concentration and nitrate nitrogen concentration in WWTP with different time scales; the HMPC module comprising a hierarchical structure, in which each layer contains a FNN to predict the system output and an optimization control module to calculate the control law;


(2) According to different time scales, the hierarchical control structure of HMPC module is designed to control the DO concentration and nitrate nitrogen concentration in WWTP:


The high-level controller consists of high-level FNN and high-level model predictive controller, it takes the sampling period of nitrate nitrogen concentration 2T as the time scale to track the set values of nitrate nitrogen concentration and DO concentration, and calculates the high-level control law, t1=2mT is the sampling time of nitrate nitrogen concentration, and m is the sampling steps of nitrate nitrogen concentration; The low-level controller consists of low-level FNN and low-level model predictive controller, it takes the sampling period of DO concentration T as the time scale to track the set values of DO concentration and the control law calculated by high-level controller, and calculates the low-level control law, t2=kT is the sampling time of DO concentration, and k is the sampling steps of DO concentration;


(3) The high-level FNN is designed to predict the concentration of nitrate nitrogen at each sampling time t1, which is as follows:


1) Set q=1;


2) The input of the high-level FNN is x1(t1)=[y1(t1), u21(t1), u22(t1)]T, y1(t1)=[y1(t1−1), y1(t1−2)], u21(t1)=[u21(t2−5), u21(t2−6)], u22(t1)=[u22(t2−5), u22(t2−6)], y1(t1−1) is the actual value of nitrate nitrogen concentration at t1−1, y1(t1−2) is the actual value of nitrate nitrogen concentration at t1−2, u21(t2−5) is the aeration rate at t2−5, u21(t2−6) is the aeration rate at t2−6, u22(t2−5) is the internal reflux in WWTP at t2−5, u22(t2−6) is the internal reflux in WWTP at t2−6, T is the transpose of matrix, the output of the high-level FNN is the predicted value of nitrate nitrogen concentration ŷ1(t1) at t1, the output expression is as follows:













y
^

1



(

t
1

)


=





j
=
1

8





w
hj



(

t
1

)




e

-









i
=
1

6





(



x

1

i




(

t
1

)


-


c
hij



(

t
1

)



)

2


2



σ
hij
2



(

t
1

)













j
=
1

8



e

-









i
=
1

6





(



x

1

i




(

t
1

)


-


c
hij



(

t
1

)



)

2


2



σ
hij
2



(

t
1

)










,




(
1
)







where x1i(t1) is the ith input of the high-level FNN at t1, whj(t1) is the connection weight between the jth neuron in the rule layer and the output neuron at t1, j∈[1, 8], chij(t1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t1, i∈[1, 6], σhij(t1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t1, e=2.72, the parameter update rules are as follows:






w
hj(ti+1)=whj(t1)−0.2∂E1(t1)/∂whj(t1),






c
hij(t1+1)=chij(t1)−0.2∂E1((t1)/∂chij(t1),





σhij(t1+1)=σhij(t1)−0.2∂E1(t1)/∂σhij(t1),  (2)


where whj(t1+1) is the connection weight between the jth neuron in the rule layer and the output neuron at t1+1, chij(t1+1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t1+1, σhij(t1+1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t1+1, E1(t1)=½[y1(t1)−ŷ1(t1)]2 is the error between the actual and predicted nitrate nitrogen concentration at t1;


3) Set q=q+1, if q≤20 is true, go to step 2), otherwise, exit the cycle;


(4) The low-level FNN is designed to predict the DO concentration at each sampling time t2, which is as follows:


I Set r=1;


II The input of the low-level FNN is x2(t2)=[y2(t2), u21(t2), u22(t2)]T, y2(t2)=[y2(t2−1), y2(t2−2)], u21(t2)=[u21(t2−5), u21(t2−6)], u22(t2)=[u22(t2−5), u22(t2−6)], y2(t2−1) is the actual value of DO concentration at t2−1, y2(t2−2) is the actual value of DO concentration at t2−2, the output of the low-level FNN if the predicted value of DO concentration y2(t2) at t2, the output expression is as follows:













y
^

2



(

t
2

)


=





j
=
1

8





w
lj



(

t
2

)




e

-









i
=
1

6





(



x

2

i




(

t
2

)


-


c
lij



(

t
2

)



)

2


2



σ
lij
2



(

t
2

)













j
=
1

8



e

-









i
=
1

6





(



x

2

i




(

t
2

)


-


c
lij



(

t
2

)



)

2


2



σ
lij
2



(

t
2

)










,




(
3
)







where x2i(t2) is the ith input of the low-level FNN at t2, wlj(t2) is the connection weight between the jth neuron in the rule layer and the output neuron at t2, j∈[1, 8], clij(t2) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t2, i∈[1, 6], σlij(t2) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t2, the parameter update rules are as follows:






w
lj(t2+1)=wlj(t2)−0.2∂E2(t2)/∂wlj(t2),






c
lij(t2+1)=clij(t2)−0.2∂E2(t2)/∂clij(t2),





σlij(t2+1)=σlij(t2)−0.2∂E2(t2)/∂σlij(t2),  (4)


where wlj(t2+1) is the connection weight between the jth neuron in the rule layer and the output neuron at t2+1, clij(t2+1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t2+1, σlij(t2+1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t2+1, E2(t2)=½[y2(t2)−ŷ2(t2)]2, is the error between the actual and predicted DO concentration at t2;


III Set r=r+1, if r≤20 is true, go to step II, otherwise, exit the cycle;


(5) The optimization control module of HMPC module is designed as follows:


{circle around (1)} Set k=0, m=0;


{circle around (2)} According to Eq.(1) and Eq.(3), the outputs of the high-level FNN ŷ1(t1) and the low-level FNN ŷ2(t2) are calculated respectively, ŷ1(t1)=[ŷ1(t1+1), ŷ1(t1+2), ŷ1(t1+5)]T, ŷ2(t2)=[ŷ2(t2+1), ŷ2(t2+2), . . . , ŷ2(t2+5)]T, ŷ1(t1+1) is the predicted value of nitrate nitrogen concentration at t1+1, ŷ1(t1+2) is the predicted value of nitrate nitrogen concentration at t1+2, ŷ1(t1+5) is the predicted value of nitrate nitrogen concentration at t1+5, ŷ2(t2+1) is the predicted value of DO concentration at t2+1, ŷ2(t2+2) is the predicted value of DO concentration at t2+2, ŷ2(t2+5) is the predicted value of DO concentration at t2+5;


{circle around (3)} The objective function of high-level MPC is designed to track the set value of nitrate nitrogen concentration and DO concentration, and the high-level law at t1 is calculated:






J
1(t1)=λ11ep1(t1)+ρ1Δu1(t1)TΔu1(t1)]+λ22ep2(t2)Tep2(t2)+ρ2Δu1(t1)TΔu1(t1)],   (5)


where ep1(t1)=r1(t1)−ŷ1(t1) is the error vector between the set value of nitrate nitrogen concentration at t1 and the predicted value of nitrate nitrogen concentration, ep1(t1)=[ep1(t1+1), ep1(t1+2), . . . , ep1(t1+5)]T, r1(t1)=[r1(t1+1), r1(t1+2), . . . , r1(t1+5)]T, ep1(t1+1) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+1, ep1(t1+2) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+2, ep1(t1+5) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+5, r1(t1+1) is the set value of nitrate nitrogen concentration at t1+1, r1(t1+2) is the set value of nitrate nitrogen concentration at t1+2, r1(t1+5) is the set value of nitrate nitrogen concentration at t1+5, ep2(t2)=r2(t2)−ŷ2(t2) is the error vector between the set value of DO concentration at t2 and the predicted value of DO concentration, ep2(t2)=[ep2(t2+1), ep2(t2+2), ep2(t2+5)]T, r2(t2)=[r2(t2+1), r2(t2+2), . . . , r2(t2+5)]T, ep2(t2+1) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+1, ep2(t2+2) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+2, ep2(t2+5) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+5, r2(t2+1) is the set value of DO concentration at t2+1, r2(t2+2) is the set value of DO concentration at t2+2, r2(t2+5) is the set value of DO concentration at t2+5, Δu1(t1)=[Δu11(t1), Δu12(t1)]T is the control vector adjustment amount at t1, Δu11(t1) is the adjustment amount of blower aeration at t1, Δu12(t1) is the adjustment amount of internal reflux at t1, λ1=0.5, λ2=0.5 are weight parameters, α1=30, ρ1=10, α2=0.5, ρ2=0.5 are control parameters, where





Δu1(t1)=u1(t1+1)−u1(t1),





∥Δu1(t1)|≤Δumax,  (6)


u1(t1)=[u11(t1), u12(t1)]T is the control vector at t1, u11(t1) is the aeration rate of the blower at t1, u12(t1) is the internal reflux at t1, u1(t1+1)=[u11(t1+1), u12(t1+1)]T is the control vector at t1+1, u11(t1+1) is the aeration rate of the blower at t1+1, u12(t1+1) is the internal reflux flow at t1+1, Δumax=[ΔKLamax, ΔQamax]T is the maximum adjustment vector allowed by the controller, ΔKLamax is the maximum aeration adjustment amount, ΔQamax is the maximum internal reflux adjustment amount, Δumax is set through the blower and internal reflux valve in the control system equipment;


The aeration rate and internal reflux adjustment vector of the high-level MPC are calculated by minimizing Eq.(5):











Δ



u
1



(

t
1

)



=


η
1



(





ξ
1



(






y
^

1



(

t
1

)







u
1



(

t
1

)




)


T




e

p

1




(

t
1

)



+




ξ
2



(






y
^

2



(

t
2

)







u
1



(

t
1

)




)


T




e

p

2




(

t
2

)




)



,




(
7
)







where η1=0.8, ξ1=3, ξ2=1 are control parameters to adjust the aeration rate and internal reflux at t1:






u
1(t1+1)=u1(t1)+Δu1(t1),  (8)


{circle around (4)} The objective function of the low-level MPC is designed to track the concentration of DO and the control law calculated by high-level controller, and the low-level control law is calculated at t2;






J
2(t2)=γ1ep2(t2)22[u22(t2)−u12(t1)]23Δu2(t2)TΔu2(t2),  (9)


where u22(t2) is the internal reflux of the low-level MPC at t2, u12(t1) is the internal reflux calculated by the high-level controller at t1, Δu2(t2)=[Δu21(t2), Δu22(t2)]T is the control vector adjustment amount at t2, Δu21(t2) is the blower aeration adjustment amount at t2, Δu22(t2) is the internal reflux adjustment amount at t2, γ1=30, γ2=10, γ3=1 are control parameters, where





Δu2(t2)=u2(t2+1)−u2(t2),





u2(t2)|≤Δumax,  (10)


where u2(t2)=[u21(t2), u22(t2)]T is the control vector at t2, u21(t2) is the aeration rate of the blower at t2, u22(t2) is the internal reflux flow at t2, u2(t2+1)=[u2 (t2+1), u22(t2+1)]T is the control vector at t2+1, u21(t2+1) is the aeration rate of the blower at t2+1, u21(t2+1) is the internal reflux flow at t2+1;


The aeration rate and internal reflux adjustment vector of the low-level MPC are calculated by minimizing Eq.(9):











Δ



u
2



(

t
2

)



=


η
2



[





γ
1



(






y
^

2



(

t
2

)







u
2



(

t
2

)




)


T




e

p

2




(

t
2

)



-




γ
2



(





u

2

2




(

t
2

)







u
2



(

t
2

)




)


T



(



u

2

2




(

t
2

)


-


u

1

2




(

t
1

)



)



]



,




(
11
)







where η2=8.4 is control parameter to adjust the aeration rate and internal reflux at t2:






u
2(t2+1)=u2(t2)+Δu2(t2),  (12)


{circle around (5)} Set k=k+1, if k=2(m+1) is true, set m=m+1 and go to step {circle around (2)}, otherwise, go to step {circle around (6)};


{circle around (6)} If k≤200 is true, calculate the output of the low-level FNN ŷ2(t2)=[ŷ2(t2+1), ŷ2(t2+2), . . . , ŷ2(t2+5)]T by Eq.(3), and go to step {circle around (4)}, otherwise, end the cycle;


(6) The concentration of nitrate nitrogen and DO is controlled by u2(t2) solved by the low-level controller, u2(t2)=[u21(t2), u22(t2)]T is the input of inverter and sensor at t2, the inverter controls the blower by adjusting the speed of motor, and the sensor controls the valve by adjusting the opening of instrument, then, the aeration rate and internal reflux are controlled, the output of the system is the actual value of nitrate nitrogen concentration and DO concentration.


The Novelties of this Patent Contain:


(1) To deal with the strong nonlinearity of WWTP, two FNNs are designed to model the concentration of DO and nitrate nitrogen, which solves the problem that the nonlinear system is difficult to model.


(2) Aiming at the problem that the control variables of WWTP have different time scales, a hierarchical model predictive control structure is established to control the concentration of DO and nitrate nitrogen according to different frequency.


(3) Due to the strong coupling of WWTP, the relationship between the high-level controller and the low-level controller is established. The low-level controller tracks the DO concentration and the control law calculated by the high-level controller.


(4) The invention designs a hierarchical optimization algorithm to solve the above hierarchical optimization problems, so as to calculate the control law.


(5) The hierarchical model predictive control method based on FNN proposed in this invention has the characteristics of high precision, low energy consumption, strong stability, etc.


Attention: for convenience of description, the invention only adopt the control of DO concentration and nitrate nitrogen concentration. The invention can also be used for the control of ammonia nitrogen in WWTP, 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 HMPC system of WWTP.



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



FIG. 3 is the result diagram of the DO concentration control in this invention.



FIG. 4 is the error diagram of the DO concentration control result in this invention.



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



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





DETAILED DESCRIPTION OF THE INVENTION

1. A hierarchical model predictive control (HMPC) system of wastewater treatment process (WWTP) based on fuzzy neural network (FNN) is proposed to solve the problem that control variables have different time scales. Then, the effect of wastewater treatment is improved by hierarchical control of dissolved oxygen (DO) concentration and nitrate nitrogen concentration, comprising the following steps:


(1) The HMPC system for WWTP control comprising a set of measuring means arranged to obtain a dataset, the dataset comprises a plurality of process variables related to a parameter of WWTP; a programmable logic controller (PLC) arranged to perform D/A conversion and A/D conversion; a variable-frequency drive (VFD) arranged to control the aeration pump and electronic valve by changing the working power frequency of motor; a HMPC module arranged to calculate the control law to track the DO concentration and nitrate nitrogen concentration in WWTP with different time scales; the HMPC module comprising a hierarchical structure, in which each layer contains a FNN to predict the system output and an optimization control module to calculate the control law;


(2) According to different time scales, the hierarchical control structure of HMPC module is designed to control the DO concentration and nitrate nitrogen concentration in WWTP:


The high-level controller consists of high-level FNN and high-level model predictive controller, it takes the sampling period of nitrate nitrogen concentration 2T as the time scale to track the set values of nitrate nitrogen concentration and DO concentration, and calculates the high-level control law, t1=2mT is the sampling time of nitrate nitrogen concentration, and m is the sampling steps of nitrate nitrogen concentration;


The low-level controller consists of low-level FNN and low-level model predictive controller, it takes the sampling period of DO concentration T as the time scale to track the set values of DO concentration and the control law calculated by high-level controller, and calculates the low-level control law, t2=kT is the sampling time of DO concentration, and k is the sampling steps of DO concentration;


(3) The high-level FNN is designed to predict the concentration of nitrate nitrogen at each sampling time t1, which is as follows:


1) Set q=1;


2) The input of the high-level FNN is x1(t1)=[y1(t1), u21(t1), u22(t1)]T, y1(t1)=[y1(t1−1), y1(t1−2)], u21(t1)=[u21(t2−5), u21(t2−6)], u22(t1)=[u22(t2−5), u22(t2−6)], y1(t1−1) is the actual value of nitrate nitrogen concentration at t1−1, y1(t1−2) is the actual value of nitrate nitrogen concentration at t1−2, u21(t2−5) is the aeration rate at t2−5, u21(t2−6) is the aeration rate at t2−6, u22(t2−5) is the internal reflux in WWTP at t2−5, u22(t2−6) is the internal reflux in WWTP at t2−6, T is the transpose of matrix, the output of the high-level FNN is the predicted value of nitrate nitrogen concentration ŷ1(t1) at t1, the output expression is as follows:













y
^

1



(

t
1

)


=





j
=
1

8





w
hj



(

t
1

)




e

-









i
=
1

6





(



x

1

i




(

t
1

)


-


c
hij



(

t
1

)



)

2


2



σ
hij
2



(

t
1

)













j
=
1

8



e

-









i
=
1

6





(



x

1

i




(

t
1

)


-


c
hij



(

t
1

)



)

2


2



σ
hij
2



(

t
1

)










,




(
13
)







where x1i(t1) is the ith input of the high-level FNN at t1, whj(t1) is the connection weight between the jth neuron in the rule layer and the output neuron at t1, j∈[1, 8], chij(t1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t1, i∈[1, 6], σhij(t1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t1, e=2.72, the parameter update rules are as follows:






w
hj(t1+1)=whj(t1)−0.2∂E1(t1)/∂whj(t1),






c
hij(t1+1)=chij(t1)−0.2∂E1(t1)/∂chij(t1),





σhij(t1+1)=σhij(t1)−0.2∂E1(t1)/∂σhij(t1)  (14)


where whj(t1+1) is the connection weight between the jth neuron in the rule layer and the output neuron at t1+1, chij(t1+1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t1+1, σhij(t1+1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t1+1, E1(t1)=½[y1(t1)−ŷ1(t1)]2 is the error between the actual and predicted nitrate nitrogen concentration at t1;


3) Set q=q+1, if q≤20 is true, go to step 2), otherwise, exit the cycle;


(4) The low-level FNN is designed to predict the DO concentration at each sampling time t2, which is as follows:


I Set r=1;


II The input of the low-level FNN is x2(t2)=[y2(t2), u21(t2), u22(t2)]T, y2(t2)=[y2(t2−1), y2(t2−2)], u21(t2)=[u21(t2−5), u21(t2−6)], u22(t2)=[u22(t2−5), u22(t2−6)], y2(t2−1) is the actual value of DO concentration at t2−1, y2(t2−2) is the actual value of DO concentration at t2−2, the output of the low-level FNN if the predicted value of DO concentration ŷ2(t2) at t2, the output expression is as follows:













y
^

2



(

t
2

)


=





j
=
1

8





w
lj



(

t
2

)




e

-









i
=
1

6





(



x

2

i




(

t
2

)


-


c
lij



(

t
2

)



)

2


2



σ
lij
2



(

t
2

)













j
=
1

8



e

-









i
=
1

6





(



x

2

i




(

t
2

)


-


c
lij



(

t
2

)



)

2


2



σ
lij
2



(

t
2

)










,




(
15
)







where x2i(t2) is the ith input of the low-level FNN at t2, wlj(t2) is the connection weight between the jth neuron in the rule layer and the output neuron at t2, j∈[1, 8], clij(t2) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t2, i∈[1, 6], σlij(t2) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t2, the parameter update rules are as follows:






w
lj(t2+1)=wlj(t2)−0.2∂E2(t2)/∂wlj(t2),






c
lij(t2+1)=clij(t2)−0.2∂E2(t2)/∂clij(t2),





σlij(t2+1)=σlij(t2)−0.2∂E2(t2)/∂σlij(t2),  (16)


where wlj(t2+1) is the connection weight between the jth neuron in the rule layer and the output neuron at t2+1, clij(t2+1) is the center value of the jth radial basal neuron corresponding to the ith input neuron at t2+1, σlij(t2+1) is the center width of the ith input neuron corresponding to the jth radial basal neuron at t2+1, E2(t2)=½[y2(t2)−ŷ2(t2)]2, is the error between the actual and predicted DO concentration at t2;


III Set r=r+1, if r≤20 is true, go to step II, otherwise, exit the cycle;


(5) The optimization control module of HMPC module is designed as follows:


{circle around (1)} Set k=0, m=0;


{circle around (2)} According to Eq.(1) and Eq.(3), the outputs of the high-level FNN ŷ1(t1) and the low-level FNN ŷ2(t2) are calculated respectively, ŷ1(t1)=[ŷ1(t1+1), ŷ1(t1+2), . . . , ŷ1(t1+5)]T, ŷ2(t2)=[ŷ2(t2+1), ŷ2(t2+2), . . . , ŷ2(t2+5)]T, ŷ1(t1+1) is the predicted value of nitrate nitrogen concentration at t1+1, ŷ1(t1+2) is the predicted value of nitrate nitrogen concentration at t1+2, ŷ1(t1+5) is the predicted value of nitrate nitrogen concentration at t1+5, ŷ2(t2+1) is the predicted value of DO concentration at t2+1, ŷ2(t2+2) is the predicted value of DO concentration at t2+2, ŷ2(t2+5) is the predicted value of DO concentration at t2+5;


{circle around (3)} The objective function of high-level MPC is designed to track the set value of nitrate nitrogen concentration and DO concentration, and the high-level law at t1 is calculated:






J
1(t1)=λ11ep1(t1)Tep1(t1)+ρ1Δu1(t1)TΔu1(t1)]+λ22ep2(t2)Tep2(t2)+ρ2Δu1(t1)TΔu1(t1)],   (17)


where ep1(t1)=r1(t1)−ŷ1(t1) is the error vector between the set value of nitrate nitrogen concentration at t1 and the predicted value of nitrate nitrogen concentration, ep1(t1)=[ep1(t1+1), ep1(t1+2), . . . , ep1(t1+5)]T, r1(t1)=[r1(t1+1), r1(t1+2), . . . , r1(t1+5)]T, ep1(t1+1) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+1, ep1(t1+2) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+2, ep1(t1+5) is the error between the set value of nitrate nitrogen concentration and the predicted value of nitrate nitrogen concentration at t1+5, r1(t1+1) is the set value of nitrate nitrogen concentration at t1+1, r1(t1+2) is the set value of nitrate nitrogen concentration at t1+2, r1(t1+5) is the set value of nitrate nitrogen concentration at t1+5, ep2(t2)=r2(t2)−ŷ2(t2) is the error vector between the set value of DO concentration at t2 and the predicted value of DO concentration, ep2(t2)=[ep2(t2+1), ep2(t2+2), . . . , ep2(t2+5)]T, r2(t2)=[r2(t2+1), r2(t2+2), . . . , r2(t2+5)]T, ep2(t2+1) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+1, ep2(t2+2) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+2, ep2(t2+5) is the error between the set value of DO concentration and the predicted value of DO concentration at t2+5, r2(t2+1) is the set value of DO concentration at t2+1, r2(t2+2) is the set value of DO concentration at t2+2, r2(t2+5) is the set value of DO concentration at t2+5, Δu1(t1)=[Δu11(t1), Δu12(t1)]T is the control vector adjustment amount at t1, Δu11(t1) is the adjustment amount of blower aeration at t1, Δu12(t1) is the adjustment amount of internal reflux at t1, λ1=0.5, λ2=0.5 are weight parameters, α1=30, ρ1=10, α2=0.5, ρ2=0.5 are control parameters, where





Δu1(t1)=u1(t1+1)−u1(t1),





u1(t1)|≤Δumax,  (18)


u1(t1)=[u11(t1), u12(t1)]T is the control vector at t1, u11(t1) is the aeration rate of the blower at t1, u12(t1) is the internal reflux at t1, u1(t1+1)=[u11(t1+1), u12(t1+1)]T is the control vector at t1+1, u11(t1+1) is the aeration rate of the blower at t1+1, u12(t1+1) is the internal reflux flow at t1+1, Δumax=[ΔKLamax, ΔQamax]T is the maximum adjustment vector allowed by the controller, ΔKLamax is the maximum aeration adjustment amount, ΔQamax is the maximum internal reflux adjustment amount, Δumax is set through the blower and internal reflux valve in the control system equipment;


The aeration rate and internal reflux adjustment vector of the high-level MPC are calculated by minimizing Eq.(5):











Δ



u
1



(

t
1

)



=


η
1



(





ξ
1



(






y
^

1



(

t
1

)







u
1



(

t
1

)




)


T




e

p

1




(

t
1

)



+




ξ
2



(






y
^

2



(

t
2

)







u
1



(

t
1

)




)


T




e

p

2




(

t
2

)




)



,




(
19
)







where η1=0.8, ξ1=3, ξ2=1 are control parameters to adjust the aeration rate and internal reflux at t1:






u
1(t1+1)=u1(t1)+Δu1(t1),  (20)


{circle around (4)} The objective function of the low-level MPC is designed to track the concentration of DO and the control law calculated by high-level controller, and the low-level control law is calculated at t2;






J
2(t2)=γ1ep2(t2)22[u22(t2)−u12(t1)]23Δu2(t2)TΔu2(t2),  (21)


where u22(t2) is the internal reflux of the low-level MPC at t2, u12(t1) is the internal reflux calculated by the high-level controller at t1, Δu2(t2)=[Δu21(t2), Δu22(t2)]T is the control vector adjustment amount at t2, Δu21(t2) is the blower aeration adjustment amount at t2, Δu22(t2) is the internal reflux adjustment amount at t2, γ1=30, γ2=10, γ3=1 are control parameters, where





Δu2(t2)=u2(t2+1)−u2(t2),





u2(t2)|≤Δumax,  (22)


where u2(t2)=[u21(t2), u22(t2)]T is the control vector at t2, u21(t2) is the aeration rate of the blower at t2, u22(t2) is the internal reflux flow at t2, u2(t2+1)=[u21(t2+1), u22(t2+1)]T is the control vector at t2+1, u21(t2+1) is the aeration rate of the blower at t2+1, u21(t2+1) is the internal reflux flow at t2+1;


The aeration rate and internal reflux adjustment vector of the low-level MPC are calculated by minimizing Eq.(9):











Δ



u
2



(

t
2

)



=


η
2



[





γ
1



(






y
^

2



(

t
2

)







u
2



(

t
2

)




)


T




e

p

2




(

t
2

)



-




γ
2



(





u

2

2




(

t
2

)







u
2



(

t
2

)




)


T



(



u

2

2




(

t
2

)


-


u

1

2




(

t
1

)



)



]



,




(
23
)







where η2=8.4 is control parameter to adjust the aeration rate and internal reflux at t2:






u
2(t2+1)=u2(t2)+Δu2(t2),  (24)


{circle around (5)} Set k=k+1, if k=2(m+1) is true, set m=m+1 and go to step {circle around (2)}, otherwise, go to step {circle around (6)};


{circle around (6)} If k≤200 is true, calculate the output of the low-level FNN ŷ2(t2)=[ŷ2(t2+1), ŷ2(t2+2), . . . , ŷ2(t2+5)]T by Eq.(3), and go to step {circle around (4)}, otherwise, end the cycle;


(6) The concentration of nitrate nitrogen and DO is controlled by u2(t2) solved by the low-level controller, u2(t2)=[u21(t2), u22(t2)]T is the input of inverter and sensor at t2, the inverter controls the blower by adjusting the speed of motor, and the sensor controls the valve by adjusting the opening of instrument, then, the aeration rate and internal reflux are controlled, the output of the system is the actual value of nitrate nitrogen concentration and DO concentration. FIG. 3 shows the DO concentration of the system, X-axis: time, unit: day, Y-axis: DO concentration, unit: mg/L, the solid line is the expected DO concentration, the dotted line is the actual DO concentration; the error between the actual output DO concentration and the expected DO concentration is shown in FIG. 4, X-axis: time, unit: day, Y-axis: DO concentration error, unit: mg/L FIG. 5 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. 6, 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 hierarchical model predictive control (HMPC) method of wastewater treatment process (WWTP) based on fuzzy neural network (FNN), comprising the following steps: (1) according to different time scales, a hierarchical control structure of HMPC module is designed to control dissolved oxygen (DO) concentration and nitrate nitrogen concentration in WWTP:a high-level controller comprises high-level FNN and high-level model predictive controller, sampling period of nitrate nitrogen concentration 2T being taken as time scale to track set values of nitrate nitrogen concentration and DO concentration, and calculates a high-level control law, t1=2mT is a sampling time of nitrate nitrogen concentration, and m is sampling steps of nitrate nitrogen concentration;a low-level controller comprises low-level FNN and low-level model predictive controller, sampling period of DO concentration T being taken as time scale to track set values of DO concentration and the high-level control law calculated by the high-level controller, and calculates a low-level control law, t2=kT is sampling time of DO concentration, and k is sampling steps of DO concentration;(3) the high-level FNN is designed to predict a concentration of nitrate nitrogen at each sampling time t1, which is as follows:1) set q=1;2) an input of the high-level FNN is x1(t1)=[y1(t1), u21(t1), u22(t1)]T, y1(t1)=[y1(t1−1), y1(t1−2)], t21(t1)=[u21(t2−5), u21(t2−6)], u22(t1)=[u22(t2−5), u22(t2−6)], y1(t1−1) is an actual value of nitrate nitrogen concentration at t1−1, y1(t1−2) is an actual value of nitrate nitrogen concentration at t1−2, u21(t2−5) is an aeration rate at t2−5, u21(t2−6) is an aeration rate at t2−6, u22(t2−5) is an internal reflux in WWTP at t2−5, u22(t2−6) is an internal reflux in WWTP at t2−6, T is a transpose of matrix, an output of the high-level FNN is a predicted value of nitrate nitrogen concentration ŷ1(t1) at t1, an output expression is as follows:
Priority Claims (1)
Number Date Country Kind
202011080017.4 Oct 2020 CN national