Online self-learning random configuration network outlet water ammonia nitrogen concentration real-time prediction method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF TECH
- Filing Date
- 2022-10-19
- Publication Date
- 2026-06-26
Smart Images

Figure CN115713977B_ABST
Abstract
Description
Technical fields:
[0001] This invention relates to the field of artificial intelligence and has direct applications in the field of wastewater treatment. Background technology:
[0002] Ammonia nitrogen refers to nitrogen existing in water in the form of free ammonia and ammonium ions, and it is one of the most common pollutants in water bodies. Its main sources are the decomposition products of nitrogenous organic matter in domestic sewage and industrial wastewater from coking and ammonia synthesis. In wastewater treatment, the concentration of ammonia nitrogen in the effluent is a crucial parameter for assessing the quality of the treated water. When the concentration of ammonia nitrogen in water bodies is too high, it can cause serious harm to aquatic organisms and the surrounding ecosystem. Therefore, timely and effective measurement of ammonia nitrogen concentration in water bodies is of paramount importance.
[0003] Currently, various methods exist for determining ammonia nitrogen concentration in wastewater treatment plants both domestically and internationally, including instrumental analysis, electrochemical analysis, and spectrophotometry. While these methods offer high measurement accuracy, their cumbersome processes, long detection times, and high costs prevent real-time monitoring of effluent ammonia nitrogen concentration. Although some online monitoring instruments can achieve real-time measurement of ammonia nitrogen concentration in water, they require chemical reagents for auxiliary detection, are susceptible to interference, and lack versatility. Therefore, how to accurately, efficiently, and cost-effectively predict effluent ammonia nitrogen concentration in real time remains a key research challenge.
[0004] In recent years, with the rapid development of soft sensing technology, data-driven soft sensing technology has become an important approach for real-time monitoring of ammonia nitrogen in water bodies due to its advantages such as low cost and ease of operation. However, it is worth noting that the effluent ammonia nitrogen concentration collected in actual industrial production processes often exists in the form of data streams. These data have characteristics such as high-dimensional nonlinearity, dynamic temporal sequence, unknown nature, and massive volume. Most traditional neural network models are designed based on the assumption of static data or stable data streams, without considering the instability of the statistical characteristics of samples in the data stream, resulting in an inability to effectively learn the changing characteristics of dynamic non-stationary data. Therefore, how to analyze and utilize the effective information contained in the data stream is a challenge of data-driven modeling. To this end, this invention proposes an online self-learning stochastic configuration network structure dynamic optimization algorithm with autonomous learning characteristics to adjust the network's own parameters and structure according to the real-time data stream. This algorithm, based on an error feedback strategy, adjusts the parameters and corrects the network structure of the constructed model online based on real-time samples, so that the network has good continuous learning ability, better handles the modeling problem of non-stationary dynamic data, and thus improves the real-time prediction performance of effluent ammonia nitrogen concentration in wastewater treatment processes. Summary of the Invention
[0005] This invention proposes an online self-learning stochastic configuration network method for predicting effluent ammonia nitrogen concentration with autonomous learning characteristics. Through its own online parameter learning mechanism and network structure correction mechanism, the constructed model possesses excellent continuous learning capabilities. This method solves the problem of measuring effluent ammonia nitrogen concentration in wastewater treatment processes, achieving real-time and effective prediction of effluent ammonia nitrogen concentration, and further improving the prediction performance of effluent ammonia nitrogen concentration.
[0006] Due to the high complexity and instability of wastewater treatment processes, the distribution characteristics of acquired water quality data often change continuously over time. This makes it impossible for models trained on historical data to effectively learn from real-time acquired data. To extract valuable information and patterns from the dynamic, real-time data stream, this invention proposes an online self-learning stochastic configuration network (SCN) with self-learning characteristics. It is worth noting that the self-learning characteristic of the network not only implies online updates of network parameters but also dynamic changes in the network topology. Specifically, this method can select either an online parameter update mechanism or a network structure correction mechanism to adjust the network model online based on the error magnitude of the real-time data output, enabling SCNs to have good continuous learning capabilities to adapt to the needs of actual systems. The specific details are as follows.
[0007] Online parameter update mechanism
[0008] Given an initial training set A randomly configured network is constructed based on the initial training set. Assuming the constructed SCNs have L hidden nodes, and the activation function g(·) of the hidden layer neurons uses the sigmoid activation function, the output of the j-th hidden node is...
[0009]
[0010] in,
[0011]
[0012] The output weights of the network can then be calculated from (2).
[0013]
[0014] Its matrix description is as follows:
[0015]
[0016] in, These are the output matrix and the target expected value matrix of the hidden layer, respectively. This is the initial output weight matrix. At this point, t=1, that is, when the first new sample arrives, the network output weights are:
[0017]
[0018] Its matrix description is as follows:
[0019]
[0020] in,
[0021]
[0022]
[0023] At this point, the network's output weights are:
[0024]
[0025] Similarly, when t = k, that is, when the kth group of samples arrives, the adjustment formula for the network output weights is as follows:
[0026]
[0027] in,
[0028]
[0029] Let P k =G k -1 Then, when the k-th sample arrives, the network weights are adjusted as follows.
[0030]
[0031] It is worth noting that if the network output error is small when new samples arrive, we can assume that the nodes selected by the SCNs supervision mechanism are still effective. Therefore, the network parameters are corrected online according to (11-12).
[0032] Network structure correction mechanism
[0033] In practical industrial applications, data streams often exhibit significant distribution variations, and simple online parameter adjustments cannot effectively enhance the network's learning ability to adapt to data changes. Therefore, to effectively analyze and process real-time data streams and better improve the model's online learning and autonomous adjustment capabilities, we propose a dynamic adjustment strategy for the SCN structure that integrates sensitivity analysis and random configuration algorithms. This part mainly involves adjusting the network structure in two stages: the pruning stage and the network construction stage.
[0034] 1: Pruning stage
[0035] First, assuming that an SCN with L hidden layer nodes has been constructed based on historical samples, the network output when a sample arrives in the new time window t is:
[0036]
[0037] If the l-th neuron node is deleted, the network output will be:
[0038]
[0039] Network output residual
[0040]
[0041] Therefore, the sensitivity of the I-th hidden layer node to changes in the output residual is defined as:
[0042]
[0043] The larger the value of S, the greater the contribution of the I-th neuron to the network output. Therefore, sensitivity analysis can be used to rank the contributions of hidden layer neurons: S′1≥S′2≥…≥S′ L Since the more hidden layer neurons are deleted, the greater the change in the model output residual, the network size fitness is defined as:
[0044]
[0045] J I The larger the value, the larger the network structure size, and the smaller the learning residual. Therefore, the network size that matches the learning samples can be defined by the network structure fitness as:
[0046] J = min{IJ} I ≥γ,1≤I≤L} (18)
[0047] Where γ (0 < γ < 1) is the network size fitness threshold, and J is the number of hidden layer nodes retained in the network.
[0048] 2: Network Construction Phase
[0049] To avoid the loss of sample information due to the deletion of hidden layer nodes, the retained network structure needs further optimization and adjustment to better learn new samples. Here, the Random Allocation Algorithm III is adopted to rebuild nodes based on the newly arrived samples in the deleted network.
[0050] Assume the network output after removing M nodes is:
[0051]
[0052] The current network residual is:
[0053] e L-M =ff′ L-M =[e L,1 ,e L,2 ,...,e L-M,K (20)
[0054] If the current network output residual ||e L-M If the preset error tolerance requirement is not met, the network will select new hidden layer neurons based on the inequality constraints, thus obtaining the parameter g of the (L-M+1)th hidden layer node. L-M+1 (w L-M+1 and b L-M+1 The inequality constraints for selecting hidden layer node parameters in the network are as follows:
[0055]
[0056] Where: h L-M+1 =g L-M+1 (<w L-M+1 ,X>+b L-M+1 ) represents the output of the (L-M+1)th hidden node, 0 < r < 1, which can be changed as needed during parameter selection, μ L-M+1 ≤(1-r) is a non-negative real number sequence and At this point, the optimal output weights of the hidden layer nodes in the network can be calculated using the following formula.
[0057]
[0058] After the (L-M+1)th hidden layer node is established, the network output is:
[0059]
[0060] Then, determine the network's output error ||e L-M+1 Does the preset error requirement (||e) meet the requirements? L-M+1 ||≤e P If the condition is met, the SCNs construction is complete; otherwise, continue to add new hidden layer nodes according to the inequality constraint (21) to build the network, reduce the network's output error, until the termination condition is met (the current network's output error ||e||≤e). P or L≥L max ).
[0061] This invention differs from traditional neural network prediction methods in the following ways:
[0062] This invention addresses the highly complex nature of wastewater treatment processes, which leads to highly nonlinear, dynamic, and non-stationary characteristics in the collected data. To effectively solve the problem of low predictability of effluent ammonia nitrogen concentration, an online stochastic network structure dynamic optimization algorithm with self-learning characteristics is proposed. This algorithm adjusts the network's parameters and structure based on the real-time data stream, thereby improving the real-time prediction performance of effluent ammonia nitrogen. Therefore, the proposed method has the following advantages:
[0063] 1) It can dynamically adjust the network structure and parameters in real time based on the characteristics of the data stream acquired by the wastewater treatment plant;
[0064] 2) It naturally inherits the general approximation capability of SCNs;
[0065] 3) Through self-learning of network parameters and structure, the network has the ability to continuously learn and better adapt to online data stream prediction. Attached Figure Description
[0066] Figure 1 A basic network structure diagram for random configuration;
[0067] Figure 2 This is a schematic diagram of the model algorithm framework of the present invention.
[0068] Figure 3 This is a graph showing the ammonia nitrogen test results in the effluent for this example;
[0069] Figure 4 Error graph for effluent ammonia nitrogen test in this example Detailed implementation method:
[0070] The experimental data came from water quality analysis data of a wastewater treatment plant in Beijing, yielding 498 sets of data. Mechanistic analysis of effluent ammonia nitrogen concentration during wastewater treatment was conducted. Six variables were selected as input variables for effluent ammonia nitrogen concentration (NH3-N): ① temperature, ② pH value, ③ dissolved oxygen concentration (DO) at the aerobic front end, ④ total phosphorus concentration (TP) in the influent, ⑤ oxidation-reduction potential (ORP) at the anaerobic end, and ⑥ nitrate nitrogen concentration (NO3-N) in the effluent. The effluent NH3-N concentration was selected as the output variable. The first 75% of the samples were selected as the training set, and the remaining 25% as the test set. The main steps are as follows:
[0071] Step 1: Data Preprocessing
[0072] Choose an input variable, denoted as X = {x ip |p=1,2,…,P,i=1,2,…,N}, where p is the dimension of the input features, here P= 6; N is the number of samples. ip Let p be the p-th feature of the i-th data point. The effluent NH4-N concentration is selected as the output variable, denoted as Y = {y}.i |i=1,2,…,N},y i Let represent the i-th output sample. Since the different water quality parameters collected have different dimensions, and the data values of these parameters vary greatly, the collected data is normalized to eliminate the influence of data size and different dimensions on model performance. The input variable X and output variable Y are normalized according to the following formula:
[0073]
[0074]
[0075] X and Y represent the data after normalization, with values ranging from [0,1].
[0076] Step 2: Design a real-time prediction model for effluent ammonia nitrogen concentration based on an online self-learning randomized configuration network;
[0077] Step 2.1: Based on the data collected by the system, set an initial time window t0 of fixed size, and establish a random configuration network model based on the data within the window.
[0078] The Randomized Network (SCN) is a three-layer feedforward neural network, mainly consisting of an input layer, hidden layers, and an output layer. The input layer feeds samples into the network and contains 6 neurons. Initially, the hidden layer contains 1 neuron, denoted by L, which initially equals 1. Notably, unlike traditional single-hidden-layer feedforward neural networks, SCN can start with a small network with minimal human intervention, randomly selecting input weights and thresholds, and gradually increasing the number of hidden layer neurons until the network's output accuracy meets the termination condition. Furthermore, a significant contribution of SCN is the addition of inequality constraints for the random parameters and the adaptive selection of the range of random parameter values, further ensuring the general approximation of the randomized learning model. Here, the activation function for the hidden layer neurons is the sigmoid activation function, i.e., ...
[0079]
[0080] The output of the j-th hidden node at this point:
[0081]
[0082] Here, <·> represents the inner product operation in Euclidean space. j and b j is the input weights and biases of the j-th hidden layer neuron, which are randomly generated in [-λ,λ] and subject to the inequality constraint (8) of the random allocation algorithm. β is a positive real number.j This is the output weight vector of the j-th hidden node. The current network output is:
[0083]
[0084] The current network residual is:
[0085] e L =ff L =[e L,1 ,e L,2 ,...,e L,K (29)
[0086] If the current network output residual ||e L ||, where ||·|| refers to the L2 norm, i.e. The network's preset error tolerance requirement was not met, i.e., ||e L ||≤e P ,e P To preset the tolerance error threshold and set e P If L = 0.001, the network will select new hidden layer nodes for network construction according to a random allocation algorithm. At this time, L = L + 1, until the termination condition ||e| is met. L ||≤e P or L≥L max ,L max =150 is the preset maximum number of hidden nodes. The random allocation algorithm can be simply described as follows:
[0087] Suppose that Γ:={h1,h2,h3,…} represents a set of real-valued functions, and span(Γ) represents the function space consisting of Γ, which is dense in L2 space. 0≤||h||≤b h ,in Given positive real numbers. 0 < r < 1 and a sequence of non-negative real values {μ} L}, And μ L ≤(1-r),. For L=1,2,..., define
[0088]
[0089] And the generated hidden nodes satisfy the conditions.
[0090]
[0091] The output weights between the hidden layer and the output layer are calculated as follows:
[0092]
[0093] Then, we can obtain in
[0094] Assume the initial training set at t=0 is N0 represents the initial number of samples, and M and K represent the input and output dimensions of the network, respectively. A randomly configured network with L hidden nodes is constructed based on the initial training set. The optimal initial output weights of the network can be calculated using formula (32), and their matrix description is as follows:
[0095]
[0096] in, Let be the output matrix and the target expectation matrix of the hidden layer, respectively, and β(0) = [β1(0), β2(0), ..., β...]. L (0)] T , This is the initial output weight matrix.
[0097] Step 2.2: Test the data acquired within the new time window based on the constructed network, and calculate the network's output error.
[0098] Assuming an SCN with L hidden layer nodes has been constructed based on historical samples, the data at the new time window T is Xt={x tp |p=1,2,…,P,t=1,2,…,N t},Yt={y t |t=1,2,…,N t},N t Let t be the number of new samples within the window at time t. Therefore, when a new sample arrives, the network output is:
[0099]
[0100] The current network output error e(t) is calculated using formula (29), where e(t) is the network output error at time t.
[0101] Step 2.3: When the error value ||e(t)|| is within the preset error range [E min E max When [the time is right], the SCN parameters are updated online using an online learning mechanism. Here, E is set to [value]. min = 3 × e(t-1), E max = 5 × e(t-1), where e(t-1) is the network output error at time t-1;
[0102] When the t=kth sample arrives, the adjustment formula for the network output weights is as follows:
[0103]
[0104] in,
[0105]
[0106] Let P k =G k -1 Then, when the k-th sample arrives, the network weights are adjusted as follows.
[0107]
[0108] Among them, H k =[h1,h2...,h Nt ] T Y is the output matrix of the hidden layer of the network at time k. k Let be the expected output value of the sample within the window at time k.
[0109] Step 2.4: When the error value ||e(t)|| is greater than the upper bound of the preset error interval, E max At that time, the network structure is dynamically modified based on sensitivity analysis and random configuration algorithm.
[0110] Based on the samples within the new time window t, the output of the current network is calculated using formula (34). Then, the l-th neuron node is deleted, and the network output is:
[0111]
[0112] The changes in the network output residuals are as follows:
[0113]
[0114] Therefore, the sensitivity S of the l-th hidden layer node to changes in the output residual is... l for:
[0115]
[0116] Sensitivity analysis can be used to rank the contributions of hidden layer neurons: S1′≥S2′≥…≥S L ′, where S j '' represents the sensitivity of the hidden layer node ranked j in importance. The network size fitness J is calculated. I
[0117]
[0118] The number of nodes J that satisfy the conditions is obtained.
[0119] J = min{I|J I ≥γ,1≤I≤L} (42)
[0120] Based on (41) and (42), the top J nodes with higher sensitivity are selected for retention, and γ is a manually set network size fitness threshold, which is 0.8 here. To avoid the loss of sample information due to the deletion of hidden layer nodes, the retained network structure needs to be further optimized and adjusted to better learn new samples. Here, a random allocation algorithm is used to rebuild nodes on the basis of the deleted network based on the newly arrived samples.
[0121] Assume the network output after removing M nodes is:
[0122]
[0123] The current network residual is:
[0124] e L-M =ff′ L-M =[e L,1 ,e L,2 ,...,e L-M,K (44)
[0125] If the current network output residual ||e L-M ||Failed to meet the preset error tolerance requirement (||e) L-M ||≤e P If the network selects new hidden layer neurons based on the inequality constraints, it will obtain the parameter g of the (L-M+1)th hidden layer node. L-M+1 (w L-M+1 and b L-M+1 The inequality constraints for selecting hidden layer node parameters in the network are as follows:
[0126]
[0127] Where: h L-M+1 =g L-M+1 (<w L-M+1 ,X>+b L-M+1 ) represents the output of the (L-M+1)th hidden node, 0 < r < 1, which can be changed as needed during parameter selection, μ L-M+1 ≤(1-r) is a non-negative real number sequence and Then the optimal output weights of the hidden layer nodes in the network at this time are:
[0128]
[0129] After the (L-M+1)th hidden layer node is established, the network output is:
[0130]
[0131] Then, determine the network's output error ||eL-M+1 Does the preset error requirement (||e) meet the requirements? L-M+1 ||≤e P If the condition is met, the SCNs construction is complete; otherwise, continue to add new hidden layer nodes according to the inequality constraint (45) to build the network, reduce the network's output error, until the termination condition is met (the current network's output error ||e||≤e). P or L≥L max Step 2.5: When a new sample arrives, t = t + 1, return to step 2.2, and continue until training ends, i.e., the number of samples within window t is 0. Step 2.6: Input the test sample into the constructed network, select samples within window t for prediction in the same way as the training set, return to step 2.2, calculate the network output value based on the constructed network, and record it. Finally, after inverse normalization, obtain the predicted value of the effluent ammonia nitrogen concentration, and then, based on the newly acquired samples, perform real-time corrections to the network through steps 2.3-2.5.
Claims
1. A method for real-time prediction of ammonia nitrogen concentration in effluent from an online self-learning randomly configured network is characterized by: Includes the following steps: Step 1: Water quality data acquisition and preprocessing Based on actual water quality data collected during wastewater treatment at a wastewater treatment plant, this study analyzes the mechanism of effluent ammonia nitrogen (NH3-N) in the wastewater treatment process. Six variables were selected as input variables: ① temperature, ② pH value, ③ dissolved oxygen (DO) at the aerobic front end, ④ total phosphorus concentration (TP) in the influent, ⑤ oxidation-reduction potential (OPR) at the anaerobic end, and ⑥ effluent nitrate nitrogen (NO3-N). These variables are denoted as X = {x im | i = 1, 2, …, N, m = 1, 2, …, M,}, where m is the dimension of the input features, here M = 6; N is the number of samples; X im This is represented as the m-th feature of the i-th data point; The NH3-N concentration in the effluent is selected as the output variable, denoted as Y = { y ik |i = 1, 2, ..., N, k = 1, 2, ..., K}, where k is the number of output nodes; y ik Let X represent the k-th output value of the i-th sample. Since the different water quality parameters collected have different dimensions, and the data values of these parameters vary greatly, the collected data is normalized to eliminate the influence of data size and different dimensions on model performance. The input variable X and output variable Y are normalized according to the following formula: The input variable X and the output variable Y are normalized according to the following formula: (1) (2) X and Y represent the data after normalization, and their values range from [0,1]. Step 2: Design a real-time prediction model for effluent ammonia nitrogen concentration based on an online self-learning randomized configuration network; Step 2.1: Based on the data collected by the system, set an initial time window t0 of fixed size, and establish a randomized network model based on the data within the window; The Randomized Network (SCN) is a three-layer feedforward neural network consisting of an input layer, hidden layers, and an output layer. The input layer feeds samples into the network and contains 6 neurons. Initially, each hidden layer contains 1 neuron. Let L represent the number of neurons in the hidden layer; initially, L=1. The activation function for the hidden layer neurons is the sigmoid activation function. (3) The output of the j-th hidden node at this point: (4) Where < > denote the inner product operation in Euclidean space; w j and b j It is the input weights and biases of the j-th hidden layer neuron, which in Randomly generated x is a positive real number and is subject to the constraints of formula (8) of the random allocation algorithm; i This represents the i-th sample; This is the output weight vector of the j-th hidden node. The current network output is: (5) The current network output residual is: (6) If the current network output residual ,here The L2 norm, i.e. The network's preset error tolerance requirements were not met, i.e. , To preset the tolerance error threshold and set If the value is 0.001, the network will select new hidden layer nodes for network construction according to the random allocation algorithm. At this time, the number of nodes L = L + 1, until the termination condition is met. or , The maximum number of hidden nodes is preset; Assumption To represent a set of real-valued functions, span( ) indicates by The function space it forms is dense in L2 space; , ,in It is a positive real number; given and a nonnegative real-valued sequence , and ,.for Define the error reduction factor for the Lth hidden node. as follows: (7) And the generated hidden nodes satisfy the conditions. (8) Output weights between hidden layers and output layers Calculated in the following way = (9) So, we get ,in , ; Assume the initial training set at t=0 is N0 is the initial number of samples, and M and K are the input and output dimensions of the network, respectively. A randomly configured network with L hidden nodes is constructed based on the initial training set; at this time, the output matrix of the hidden layer of the network is... ,definition h j The optimal initial output weights of the network can be calculated using formula (3-4); the optimal initial output weights of the network can be calculated using formula (9), and their matrix description is as follows: ,(10) in, These are the output matrix and the target expected value matrix of the hidden layer, respectively. , This is the initial output weight matrix; Step 2.2: Test the data acquired within the new time window t based on the constructed network, calculate and record the network's output value and output error; Assuming an SCN with L hidden layer nodes has been constructed based on historical samples, and the data within the new time window t is Xt={x tm | m= 1, 2,…, M, t= 1, 2,…, N t },Yt = { y t |t= 1, 2, …, N t },N t Let t be the number of new samples within the window at time t; therefore, when a new sample arrives, the network output is: (11) The current network output error e(t) is calculated using formula (6), where e(t) is the network output error at time t. Step 2.3: When the error value Within the preset error range [E min E max When [the time is right], the SCN parameters are updated online using an online learning mechanism. Here, E is set to [value]. min =3 e(t-1), E max =5 e(t-1), where e(t-1) is the network output error at time t-1; Define the hidden layer matrix parameters at t=0. If t=1, then we have , and The relationship is ; Hidden layer matrix parameters The inverse of; therefore, when the t=kth sample arrives, the adjustment formula for the network output weights is as follows: (12) ,(13) make, When the k-th sample arrives, the network weights are adjusted as follows: (14) in, Let be the output matrix of the hidden layer of the network at time k. Let be the expected output value of the sample within the window at time k; Step 2.4: When the error value Greater than the upper limit of the preset error interval E max At that time, the network structure is dynamically modified based on sensitivity analysis and random configuration algorithm; Based on the samples within the new time window t, the output of the current network is calculated using formula (11); then, the l-th neuron node is deleted, and the network output is: (15) The changes in the network output residuals are as follows: (16) Therefore, the sensitivity of the l-th hidden layer node to changes in the output residual is... for: (17) Sensitivity analysis can be used to rank the contributions of hidden layer neurons. ,in The sensitivity of the hidden layer node ranked j in importance; the network size fitness is calculated. ; (18) The number of nodes J that satisfy the conditions is obtained. (19) Based on formulas (17) and (18), the top J nodes with higher sensitivity are selected for retention. The network size fitness threshold is set to 0.8 here. To avoid the loss of sample information due to the deletion of hidden layer nodes, the retained network structure needs to be further optimized and adjusted to better learn new samples. Here, a random allocation algorithm is used to rebuild the network based on the newly arrived samples after deletion. Assume the network output after removing M nodes is: (20) The current network residual is: (21) If the current network output residual Failed to meet the preset error tolerance requirements The network will then select new hidden layer neurons based on the inequality constraints, thus obtaining the parameters of the (L-M+1)th hidden layer node. Include and The inequality constraints for selecting hidden layer node parameters in the network are as follows: (22) In the formula: This represents the output of the (L-M+1)th hidden node. , It is a sequence of non-negative real numbers and Then the optimal output weights of the hidden layer nodes in the network at this time are: (23) After the (L-M+1)th hidden layer node is established, the network output is: (24) Then, determine the network's output error. Does it meet the preset error requirements, i.e. If the condition is met, the SCNs construction is complete; otherwise, continue to add new hidden layer nodes according to the inequality constraint (22) to build the network, reduce the network's output error, until the termination condition is met, that is, the current network's output error is reduced. or ; Step 2.5: When a new sample arrives, t = t + 1, return to step 2.2, until the sample learning is complete, that is, the number of samples in window t is 0; Step 2.6: Input the test samples into the constructed network, select samples within window t for prediction in the same way as the training set, return to step 2.2 to calculate and record the output value of the network based on the constructed network; finally, after inverse normalization, obtain the predicted value of effluent NH3-N, and then, based on the newly acquired samples, perform real-time correction of the network through steps 2.3-2.5.