US 12,105,075 B2
Total nitrogen intelligent detection method based on multi-objective optimized fuzzy neural network
Honggui Han, Beijing (CN); Chenxuan Sun, Beijing (CN); and Junfei Qiao, Beijing (CN)
Assigned to BEIJING UNIVERSITY OF TECHNOLOGY, Beijing (CN)
Filed by BEIJING UNIVERSITY OF TECHNOLOGY, Beijing (CN)
Filed on Sep. 10, 2021, as Appl. No. 17/472,433.
Claims priority of application No. 202010964415.6 (CN), filed on Sep. 15, 2020.
Prior Publication US 2022/0082545 A1, Mar. 17, 2022
Int. Cl. G06N 3/043 (2023.01); C02F 1/00 (2023.01); G01N 33/18 (2006.01); G06N 3/08 (2023.01)
CPC G01N 33/1806 (2013.01) [G06N 3/043 (2023.01); G06N 3/08 (2013.01); C02F 1/008 (2013.01); C02F 2209/16 (2013.01)] 2 Claims
OG exemplary drawing
 
1. A total nitrogen intelligent detection method based on multi-objective optimized fuzzy neural network, the method comprising following steps:
(1) selecting input variables and collecting data by transmission devices; first, using a least square method to extract feature variables, wherein dosage, oxidation-reduction potential, orthophosphate, pH, ammonia nitrogen, nitrate-nitrogen and chemical oxygen demand are the feature variables that affect total nitrogen concentration; measuring each of the feature variables by a dosage device, an oxidation-reduction potential sensor, an orthophosphate sensor, a pH detector, an ammonia nitrogen sensor, a nitrate-nitrogen sensor and a chemical oxygen demand sensor, respectively, and then transmitting the measured feature variables to a computer via an optical fiber communication network, wherein the transmitted feature variables will be applied to the multi-objective optimized fuzzy neural network; wherein the dosage device is located at an end of an aerobic tank, the oxidation-reduction potential sensor is located in a middle of an anaerobic tank, the orthophosphate sensor is located at the end of the aerobic tank, the pH detector is located in an inlet cell, the ammonia nitrogen sensor is located in the inlet cell, the nitrate-nitrogen sensor is located at an end of an anoxic tank and the chemical oxygen demand sensor is located at an end of a primary sedimentation tank, the sensors use probes to detect concentration amounts for the respective feature variables, and the dosage device uses a flow meter to detect a concentration amount for the dosage feature variable; and obtaining the feature variables by using devices, wherein the feature variables are normalized to [0, 1];
(2) building a total nitrogen intelligent detection model based on a fuzzy neural network, the fuzzy neural network contains four layers: an input layer, a membership function layer, a rule layer and an output layer; the fuzzy neural network is 7-P-Q-1, including 7 neurons in the input layer, P neurons in the membership function layer, Q neurons in the rule layer and 1 neuron in the output layer, P and Q are positive integers between [2, 15], and P=Q; the number of training samples is N, an input of the fuzzy neural network is x(n)=[x1(n), x2(n), . . . , x7(n)], x1(n) represents the dosage in nth training sample; x2(n) represents the oxidation-reduction potential in the middle of the anaerobic tank in nth training sample, x3(n) represents the orthophosphate at the end of the aerobic tank in nth training sample, x4(n) represents pH in the inlet cell in nth training sample, x5(n) represents the ammonia nitrogen in the inlet cell in nth training sample, x6(n) represents the nitrate nitrogen at the end of the anoxic tank in nth training sample, and x7(n) represents the chemical oxygen demand of a primary sedimentation tank in nth training sample, an output of the fuzzy neural network is y(n) which represents predicted total nitrogen concentration in nth training sample and an actual output is ŷ(n) which represents an actual total nitrogen concentration in nth training sample measured by a total nitrogen sensor, n=1, 2, . . . , N; the fuzzy neural network includes:
1 input layer: there are 7 neurons in the input layer, an output of the input layer is:
um(n)=xm(n),m=1,2, . . . ,7  (1)
where um(n) is mth output value, m=1, 2, . . . , 7;
2 Membership function layer: there are P neurons in the membership function layer, an output of the membership function layer is:

OG Complex Work Unit Math
where μmp(n) is a center of pth membership function neuron with mth input, σp(n) is a standard deviation of pth membership function neuron, φp(n) is an output value of pth membership function;
3 rule layer: there are Q neurons in the rule layer, and an output value of the rule layer is:

OG Complex Work Unit Math
where ηq(n) is an output of qth neuron;
4 output layer: there is 1 neuron in the output layer, and an output value of the output layer is y(n):

OG Complex Work Unit Math
where wq(n) is connection weight between qth neuron in the rule layer and the neuron in the output layer;
(3) training the total nitrogen intelligent detection model based on a multi-objective particle swarm optimization algorithm by:
1 in the fuzzy neural network, each variable in an initial center vector μq(1) is randomly selected in an interval [−1, 1], an initial width σq(1) is assigned to 1, q=1, 2, . . . , Q; each variable in an initial connection weight vector w(1) is randomly selected in an interval [−1, 1]; and set a current iteration number t=1;
2 Set maximum number of iterations is Tmax, Tmax∈[200, 500]; the number of particles in a population of the multi-objective particle swarm optimization algorithm is L, L∈[50, 150], and each particle represents a fuzzy neural network; maximum number of neurons in the rule layer is 15, and fixed maximum dimension of the particles is set to 135, so that each particle is represented by a 135-dimensional row vector; position and velocity of lth particle can be expressed as:
al(1)=[μl,1(1),σl,1(1),wl,1(1),μl,2(1),σl,2(1),wl,2(1), . . . ,μl,Ql(1)(1),σl,Ql(1)(1),wl,Ql(1)(1)]  (5)
vl(1)=[vl,1(1),vl,2(1), . . . ,vl,9Ql(1)(1)]  (6)
where l=1, 2, . . . , L, al(1) represents a position vector of initial lth particle, μl,k(1), σl,k(1), wl,k(1) represent a center vector, width and connection weight of kth neuron in the rule layer corresponding to the initial lth particle, respectively, k=1, 2, . . . , Ql(1), Ql(1) is the number of neurons in the rule layer corresponding to the initial lth particle, vl(1) represents an initial velocity vector of lth particle; an initial position vector al(1) is determined by parameters and structure of initial fuzzy neural network; each variable of the initial velocity vector vl(1) can take any value in [−0.5, 0.5]; initial effective dimension of the lth particle is 9Ql(1); when an effective particle dimension is less than 135, values of remaining dimensions are filled with 0 to ensure consistency of particle dimensions in the population;
3 objective functions of the multi-objective particle swarm optimization algorithm include accuracy and complexity of the fuzzy neural network; the accuracy of the fuzzy neural network is represented by a root mean square error, so a first objective function is:

OG Complex Work Unit Math
where yl(n) is the output of the fuzzy neural network, representing the predicted total nitrogen concentration in nth training sample and corresponding to the lth particle al(t), ŷ(n) is the actual total nitrogen concentration in nth training sample, and fl(al(t)) is a first objective function value corresponding to the particle al(t) at lth iteration; in addition, a second objective function based on structure complexity is designed as:

OG Complex Work Unit Math
where Ql(t) is the number of neurons in a layer corresponding to the lth particle at th iteration, y is an average value of the actual total nitrogen concentration in the N training samples, f2(al(t)) is a second objective function value corresponding to the particle al(t) at tth iteration;
4 according to the first and second objective function values fl(al(t)) and f2(al(t)) of the multi-objective particle swarm optimization algorithm, crowded distances of particles in an objective space and a decision space are as follows:

OG Complex Work Unit Math
where SO(al(t)) is a crowded distance of the particle al(t) in the objective space at tth iteration, and SD(al(t)) is a crowded distance of the particle al(t) in the decision space at tth iteration; based on the diversity and convergence of particles, a global optimal particle is selected:

OG Complex Work Unit Math
where GR(al(t)) is a comprehensive index value of particle al(t) in the population at tth iteration, as well as S′O(al(t)) and S′D (al(t)) are respectively SO(al(t)) and SD(al(t)) normalized crowding distance; the particle al(t) with smallest GR(al(t)) value in the population is the global optimal particle at tth iteration;
5 dth dimensional velocity and position of the particle is updated:
vl,d(t+1)=ωvl,d(t)+c1r1(pl,d(t)−αl,d(t))+c2r2(gd(t)−αl,d(t))  (13)
αl,d(t+1)=αl,d(t)+vl,d(t+1)  (14)
where vl,d(t) represents the dth dimensional velocity of the lth particle at tth iteration, al,d(t) represents the dth dimensional position of the lth particle at tth iteration, vl,d(t+1) and al,d(t+1) represent the dth dimensional velocity and position of the lth particle at the t+1 iteration, d=1, 2, . . . , 135; an extra particle dimension is set to 0; ω is a weight of inertia, ω can be arbitrarily selected in [0, 1], c1 is individual learning factors, and c1 is arbitrarily selected in [1.5, 2]; c2 is global learning factors, and c2 is arbitrarily selected in [1.5, 2]; r1 and r2 represent random values uniformly distributed between [0, 1], pt(t)=[pl,1(t), pl,2 (t), . . . , pl,135 (t)], pl(t) is the lth individual optimal particle at tth iteration, g(t)=[g1(t), g2(t), . . . , g135(t)], g (t) is the global optimal particle at tth iteration;
6 if mod (t, 5)≠0 and t<Tmax, the number of iterations t will increase by 1, and go to step 3; if mod (t, 5)=0 and t<Tmax, go to step 7; if t=Tmax, stop training process; mod ( ) is the remainder operation;
7 update rules of the fuzzy neural network structure are as follows:

OG Complex Work Unit Math
when Qave(t)<Ql(t), h=−1; when Qave(t)=Ql(t), h=0; when Qave(t)>Ql(t), h=1; Qg(t) is the number of neurons in the rule layer corresponding to the global optimal particle g(t) at tth iteration, i is the difference with the current iteration number, i=0, 1, . . . , 4, Ql(t+1) represents the number of neurons in the rule layer corresponding to the t+1 iteration of the lth particle;
8 if t<Tmax, the number of iterations t increase by 1, and go to step 3; if t=Tmax, stop the training process;
(4) applying input to the trained intelligent detection model, wherein the input comprises the dosage, the oxidation-reduction potential in the middle of the anaerobic tank, the orthophosphate at the end of the aerobic tank, pH in the inlet cell, the ammonia nitrogen in the inlet cell, the nitrate-nitrogen at the end of the anoxic tank and the chemical oxygen demand of the primary sedimentation tank; obtaining an output value of the total nitrogen intelligent detection model which represents a predicted total nitrogen concentration that is normalized to [0, 1] and de-normalizing the output value of the total nitrogen intelligent detection model to obtain a predicted total nitrogen concentration.