[go: up one dir, main page]

CN116151121A - A Neural Network-Based NH4-N Soft-Sensing Method for Effluent Water - Google Patents

A Neural Network-Based NH4-N Soft-Sensing Method for Effluent Water Download PDF

Info

Publication number
CN116151121A
CN116151121A CN202310181946.1A CN202310181946A CN116151121A CN 116151121 A CN116151121 A CN 116151121A CN 202310181946 A CN202310181946 A CN 202310181946A CN 116151121 A CN116151121 A CN 116151121A
Authority
CN
China
Prior art keywords
sub
network
echo state
reserve pool
effluent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310181946.1A
Other languages
Chinese (zh)
Other versions
CN116151121B (en
Inventor
杨翠丽
乔俊飞
王明星
刘阳
王明
顾明珠
白冉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202310181946.1A priority Critical patent/CN116151121B/en
Publication of CN116151121A publication Critical patent/CN116151121A/en
Application granted granted Critical
Publication of CN116151121B publication Critical patent/CN116151121B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/20Identification of molecular entities, parts thereof or of chemical compositions
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/70Machine learning, data mining or chemometrics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Purification Treatments By Anaerobic Or Anaerobic And Aerobic Bacteria Or Animals (AREA)

Abstract

The invention provides a neural network-based effluent NH4-N soft measurement method, which comprises the following steps: initializing a network structure and network parameters of the constructed echo state network; constructing a sub-reserve pool according to a singular value decomposition method based on the initialized echo state network; optimizing the sub-pool according to the condition number and the differential evolution algorithm; updating the optimized weight, input weight and state matrix of the sub-reserve pool, judging whether the iteration times are smaller than a preset iteration threshold, if so, jumping to the step of constructing the sub-reserve pool according to a singular value decomposition method based on the initialized echo state network; if yes, calculating an output weight; testing the echo state network according to the output weight and the test sample to obtain a determined effluent NH4-N detection model; and inputting the data to be detected into a determined effluent NH4-N detection model to obtain a detection result. The invention provides a high-efficiency and rapid solution for measuring key water quality parameters in the sewage treatment process.

Description

一种基于神经网络的出水NH4-N软测量方法A soft-sensing method for effluent NH4-N based on neural network

技术领域Technical Field

本发明涉及水处理技术领域,特别是涉及一种基于神经网络的出水NH4-N软测量方法。The invention relates to the technical field of water treatment, and in particular to a soft measurement method of effluent NH4-N based on neural network.

背景技术Background Art

随着当今社会城市化和工业化的快速发展,我国水环境已受到严重破坏。污水排放不仅严重影响居民的日常生活,而且破坏了大自然的生态平衡。为了降低污水的排放量,实现水的循环利用,全国各地纷纷建立了污水处理厂。在污水处理过程中,NH4-N浓度是衡量污水处理工艺(WWTP)性能的一个重要参数,然而由于污水处理过程是一个具有高度非线性、大滞后、大时变、多变量耦合等特点的复杂系统,而且维护成本较高,因此对其进行预测仍然是一个悬而未决的问题。因此,如何低成本、高效率地对出水NH4-N的浓度进行预测对于出水水质的达标考核以及污水处理厂的稳定运行是非常有必要的。With the rapid development of urbanization and industrialization in today's society, my country's water environment has been severely damaged. Sewage discharge not only seriously affects the daily life of residents, but also destroys the ecological balance of nature. In order to reduce the discharge of sewage and realize the recycling of water, sewage treatment plants have been established all over the country. In the sewage treatment process, NH4-N concentration is an important parameter to measure the performance of sewage treatment process (WWTP). However, since the sewage treatment process is a complex system with high nonlinearity, large hysteresis, large time variation, multivariate coupling and other characteristics, and the maintenance cost is high, its prediction is still an unresolved problem. Therefore, how to predict the concentration of effluent NH4-N at low cost and high efficiency is very necessary for the assessment of effluent water quality and the stable operation of sewage treatment plants.

发明内容Summary of the invention

为了克服现有技术的不足,本发明的目的是提供一种基于神经网络的出水NH4-N软测量方法,本发明通过将差分进化算法与条件数分析结合应用于构建新型回声状态网络,能够对污水处理过程中氨氮浓度进行预测。In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a soft measurement method for effluent NH4-N based on neural network. The present invention combines the differential evolution algorithm with condition number analysis to construct a new echo state network, which can predict the ammonia nitrogen concentration in the sewage treatment process.

为实现上述目的,本发明提供了如下方案:To achieve the above object, the present invention provides the following solutions:

一种基于神经网络的出水NH4-N软测量方法,包括:A soft measurement method for effluent NH4-N based on neural network, comprising:

构建回声状态网络,并对所述回声状态网络的网络结构及网络参数进行初始化;所述回声状态网络的输入变量包括进水温度、总固体悬浮物、溶解氧浓度、pH值以及出水氧化还原电位;所述回声状态网络的输出变量包括氨氮浓度;Constructing an echo state network, and initializing the network structure and network parameters of the echo state network; the input variables of the echo state network include inlet water temperature, total suspended solids, dissolved oxygen concentration, pH value, and outlet water redox potential; the output variables of the echo state network include ammonia nitrogen concentration;

基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池;Based on the initialized echo state network, a sub-reservoir is constructed according to the singular value decomposition method;

根据条件数和差分进化算法优化所述子储备池;Optimizing the sub-reservoir according to a condition number and a differential evolution algorithm;

对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值;The weights, input weights and state matrix of the optimized sub-reserve pool are updated, and it is determined whether the number of iterations is less than a preset iteration threshold. If so, jump to the step of "constructing a sub-reserve pool based on the initialized echo state network according to the singular value decomposition method"; if so, calculate the output weights;

根据输出权值和测试样本对所述回声状态网络进行测试,得到确定好的出水NH4-N检测模型;The echo state network is tested according to the output weights and the test samples to obtain a determined effluent NH4-N detection model;

将待检测数据输入至确定好的出水NH4-N检测模型中,得到检测结果。The data to be tested is input into the determined effluent NH4-N detection model to obtain the test results.

优选地,对所述回声状态网络的网络结构及网络参数进行初始化,包括:Preferably, initializing the network structure and network parameters of the echo state network includes:

确定所述回声状态网络的初始结构为5-N-1;其中N表示子储备池节点个数;N的大小是逐渐增加;Determine the initial structure of the echo state network as 5-N-1; wherein N represents the number of nodes in the sub-reservoir; and the size of N is gradually increased;

将sigmoid函数作为网络激活函数G(·),确定初始迭代次数i=1,最大迭代次数imax≤30,训练样本

Figure BDA0004104784510000021
其中,uk表示第k组输入样本,tk表示第k组实际输出值,
Figure BDA0004104784510000022
表示输入样本维度为n,L为样本总数;The sigmoid function is used as the network activation function G(·), the initial iteration number i=1, the maximum iteration number i max ≤30, and the training sample
Figure BDA0004104784510000021
Among them, uk represents the kth group of input samples, tk represents the kth group of actual output values,
Figure BDA0004104784510000022
Indicates that the input sample dimension is n, and L is the total number of samples;

随机初始化网络输入权值Win和储备池内部权值W在(0,1)之间。Randomly initialize the network input weights W in and the internal weights W of the reserve pool between (0,1).

优选地,所述基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池,包括:Preferably, the constructing of the sub-reservoir based on the initialized echo state network according to the singular value decomposition method comprises:

随机生成一个对角矩阵

Figure BDA0004104784510000023
以及两个正交矩阵Ui和Vi;其中,
Figure BDA0004104784510000024
为随机生成的在(0,1)之间数值,nk为子储备池节点个数;Randomly generate a diagonal matrix
Figure BDA0004104784510000023
And two orthogonal matrices U i and V i ; where,
Figure BDA0004104784510000024
is a randomly generated value between (0,1), and n k is the number of nodes in the sub-reservation pool;

利用所述对角矩阵和两个所述正交矩阵构造子储备池ΔWi=UiSiViThe sub-reservoir ΔW i =U i S i V i is constructed using the diagonal matrix and the two orthogonal matrices.

优选地,所述根据条件数和差分进化算法优化所述子储备池,包括:Preferably, the optimizing the sub-reserve pool according to the condition number and the differential evolution algorithm comprises:

构建适应度函数fitness(ΔWi)=κ(Hi)-κ(Hi-1);其中,κ(Hi)代表新的子储备池加入后,储备池对应的状态矩阵的条件数;Construct a fitness function fitness(ΔW i )=κ(H i )-κ(H i-1 ); where κ(H i ) represents the condition number of the state matrix corresponding to the reserve pool after the new sub-reserve pool is added;

初始化初始种群NP=50,变异算子F=0.7,交叉算子CR=0.5,并初始化种群

Figure BDA0004104784510000025
其中n∈{1,2…,NP},并设置最大迭代次数G;Initialize the initial population NP = 50, mutation operator F = 0.7, crossover operator CR = 0.5, and initialize the population
Figure BDA0004104784510000025
Where n∈{1,2…,NP}, and set the maximum number of iterations G;

根据公式

Figure BDA0004104784510000026
得到变异个体μn;其中,r1,r2,r3∈[1,NP]为三个互不相同的整数;According to the formula
Figure BDA0004104784510000026
Get the mutant individual μ n ; where r 1 , r 2 , r 3 ∈[1,NP] are three different integers;

通过

Figure BDA0004104784510000027
完成交叉操作,对于每一个独立个体
Figure BDA0004104784510000028
得到交叉个体
Figure BDA0004104784510000031
其中,j∈{1,2…,10},rand∈(0,1)是随机生成的;pass
Figure BDA0004104784510000027
Complete the crossover operation, for each independent individual
Figure BDA0004104784510000028
Get crossover individuals
Figure BDA0004104784510000031
Among them, j∈{1,2…,10}, rand∈(0,1) is randomly generated;

当算法达到最大迭代次数后,终止算法流程,返回最优个体,并利用所述最优个体构造新的子储备池。When the algorithm reaches the maximum number of iterations, the algorithm process is terminated, the optimal individual is returned, and a new sub-reserve pool is constructed using the optimal individual.

优选地,所述对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值,包括:Preferably, the weights, input weights and state matrix of the optimized sub-reserve pool are updated, and it is determined whether the number of iterations is less than a preset iteration threshold. If so, the process jumps to the step of "constructing a sub-reserve pool based on the initialized echo state network according to a singular value decomposition method"; if so, the output weights are calculated, including:

将储备池权值更新为

Figure BDA0004104784510000032
Update the reserve pool weight to
Figure BDA0004104784510000032

将输入权值更新为

Figure BDA0004104784510000033
Update the input weights to
Figure BDA0004104784510000033

将状态矩阵更新为H=[H1,…,Hi];Update the state matrix to H = [H 1 ,…,H i ];

若满足i≥imax,则执行下一步骤,否则返回步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;If i≥i max is satisfied, the next step is executed, otherwise the process returns to the step "constructing a sub-reservoir based on the initialized echo state network according to the singular value decomposition method";

通过公式Wout=HΓT计算输出权值Wout;其中,Γ代表伪逆计算,T为目标输出数据。The output weight W out is calculated by the formula W out =H Γ T, wherein Γ represents pseudo-inverse calculation, and T is the target output data.

根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

本发明提供了一种基于神经网络的出水NH4-N软测量方法,包括:构建回声状态网络,并对所述回声状态网络的网络结构及网络参数进行初始化;所述回声状态网络的输入变量包括进水温度、总固体悬浮物、溶解氧浓度、pH值以及出水氧化还原电位;所述回声状态网络的输出变量包括氨氮浓度;基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池;根据条件数和差分进化算法优化所述子储备池;对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值;根据输出权值和测试样本对所述回声状态网络进行测试,得到确定好的出水NH4-N检测模型;将待检测数据输入至确定好的出水NH4-N检测模型中,得到检测结果。本发明为污水处理过程中关键水质参数的测量提供了一种高效快速的解决方案。The present invention provides a soft measurement method for effluent NH4-N based on a neural network, comprising: constructing an echo state network, and initializing the network structure and network parameters of the echo state network; the input variables of the echo state network include inlet water temperature, total suspended solids, dissolved oxygen concentration, pH value and effluent redox potential; the output variables of the echo state network include ammonia nitrogen concentration; based on the initialized echo state network, constructing a sub-reserve pool according to a singular value decomposition method; optimizing the sub-reserve pool according to a condition number and a differential evolution algorithm; updating the weights, input weights and state matrix of the optimized sub-reserve pool, and judging whether the number of iterations is less than a preset iteration threshold, if so, jumping to the step of "constructing a sub-reserve pool according to a singular value decomposition method based on the initialized echo state network"; if so, calculating the output weight; testing the echo state network according to the output weight and a test sample to obtain a determined effluent NH4-N detection model; inputting the data to be detected into the determined effluent NH4-N detection model to obtain a detection result. The present invention provides an efficient and rapid solution for measuring key water quality parameters in the sewage treatment process.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

图1为本发明实施例提供的方法流程图;FIG1 is a flow chart of a method provided by an embodiment of the present invention;

图2为本发明实施例提供的神经网络拓扑结构图;FIG2 is a topological structure diagram of a neural network provided by an embodiment of the present invention;

图3为本发明实施例提供的输出权值绝对值分布图;FIG3 is a distribution diagram of absolute values of output weights provided by an embodiment of the present invention;

图4为本发明实施例提供的出水NH4-N浓度预测结果图;FIG4 is a diagram showing the prediction results of effluent NH4-N concentration provided by an embodiment of the present invention;

图5为本发明实施例提供的出水NH4-N浓度预测误差图。FIG5 is a diagram showing an error in prediction of effluent NH4-N concentration according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤、过程、方法等没有限定于已列出的步骤,而是可选地还包括没有列出的步骤,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤元。The terms "first", "second", "third" and "fourth" in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps, processes, methods, etc. are not limited to the listed steps, but may optionally include steps that are not listed, or may optionally include other step elements inherent to these processes, methods, products or devices.

本发明的目的是提供一种基于神经网络的出水NH4-N软测量方法,本发明能够为污水处理过程中关键水质参数的测量提供了一种高效快速的解决方案。The purpose of the present invention is to provide a soft measurement method for effluent NH4-N based on neural network, which can provide an efficient and fast solution for the measurement of key water quality parameters in the sewage treatment process.

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

图1为本发明实施例提供的方法流程图,如图1所示,本发明提供了一种基于神经网络的出水NH4-N软测量方法,包括:FIG1 is a flow chart of a method provided by an embodiment of the present invention. As shown in FIG1 , the present invention provides a soft measurement method for effluent NH4-N based on a neural network, comprising:

步骤100:构建回声状态网络,并对所述回声状态网络的网络结构及网络参数进行初始化;所述回声状态网络的输入变量包括进水温度、总固体悬浮物、溶解氧浓度、pH值以及出水氧化还原电位;所述回声状态网络的输出变量包括氨氮浓度;Step 100: construct an echo state network, and initialize the network structure and network parameters of the echo state network; the input variables of the echo state network include inlet water temperature, total suspended solids, dissolved oxygen concentration, pH value and outlet water redox potential; the output variables of the echo state network include ammonia nitrogen concentration;

步骤200:基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池;Step 200: Based on the initialized echo state network, construct a sub-reservoir according to a singular value decomposition method;

步骤300:根据条件数和差分进化算法优化所述子储备池;Step 300: Optimizing the sub-reservoir according to the condition number and differential evolution algorithm;

步骤400:对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值;Step 400: Update the weights, input weights and state matrix of the optimized sub-reservoir, and determine whether the number of iterations is less than a preset iteration threshold. If so, jump to the step of "constructing a sub-reservoir based on the initialized echo state network according to the singular value decomposition method"; if so, calculate the output weights;

步骤500:根据输出权值和测试样本对所述回声状态网络进行测试,得到确定好的出水NH4-N检测模型;Step 500: testing the echo state network according to the output weights and the test samples to obtain a determined outlet water NH4-N detection model;

步骤600:将待检测数据输入至确定好的出水NH4-N检测模型中,得到检测结果。Step 600: input the data to be detected into the determined effluent NH4-N detection model to obtain the detection result.

优选地,对所述回声状态网络的网络结构及网络参数进行初始化,包括:Preferably, initializing the network structure and network parameters of the echo state network includes:

确定所述回声状态网络的初始结构为5-N-1;其中N表示子储备池节点个数;N的大小是逐渐增加;Determine the initial structure of the echo state network as 5-N-1; wherein N represents the number of nodes in the sub-reservoir; and the size of N is gradually increased;

将sigmoid函数作为网络激活函数G(·),确定初始迭代次数i=1,最大迭代次数imax≤30,训练样本

Figure BDA0004104784510000051
其中,uk表示第k组输入样本,tk表示第k组实际输出值,
Figure BDA0004104784510000061
表示输入样本维度为n,L为样本总数;The sigmoid function is used as the network activation function G(·), the initial iteration number i=1, the maximum iteration number i max ≤30, and the training sample
Figure BDA0004104784510000051
Among them, uk represents the kth group of input samples, tk represents the kth group of actual output values,
Figure BDA0004104784510000061
Indicates that the input sample dimension is n, and L is the total number of samples;

随机初始化网络输入权值Win和储备池内部权值W在(0,1)之间。Randomly initialize the network input weights W in and the internal weights W of the reserve pool between (0,1).

具体的,本实施例中的基于CNEESN神经网络的出水NH4-N软测量方法,其网络是一个不断增长的网络,主要操作流程如下:首先生成一个小规模的储备池,并初始化相应的权值,然后根据条件数分析和差分进化算法优化利用通过奇异值分解(SVD)方法随机生成的奇异值,并利用优化过的奇异值构建新的子储备池,再将新的子储备池添加进网络,如图2所示。本实施例利用条件数分析和差分进化算法,使得每一个子储备池添加进网络后,网络的储备池条件数尽可能的小,从而训练得到一个较好的输出权值,然后对污水处理过程中的氨氮浓度进行预测。本实施例包括以下步骤:Specifically, the effluent NH4-N soft measurement method based on the CNEESN neural network in this embodiment is a continuously growing network, and the main operation process is as follows: first, a small-scale reserve pool is generated and the corresponding weights are initialized, and then the singular values randomly generated by the singular value decomposition (SVD) method are optimized according to the condition number analysis and differential evolution algorithm, and a new sub-reserve pool is constructed using the optimized singular values, and then the new sub-reserve pool is added to the network, as shown in Figure 2. This embodiment uses condition number analysis and differential evolution algorithms to make the condition number of the network's reserve pool as small as possible after each sub-reserve pool is added to the network, so as to train to obtain a better output weight, and then predict the ammonia nitrogen concentration in the sewage treatment process. This embodiment includes the following steps:

步骤1:初始化网络结构及参数Step 1: Initialize network structure and parameters

步骤1.1:初始化网络结构Step 1.1: Initialize the network structure

将进水温度、总固体悬浮物、溶解氧浓度、pH值以及出水氧化还原电位作为输入变量,氨氮浓度作为输出变量,确定回声状态网络初始结构为5-N-1,其中N表示子储备池节点个数。典型回声状态网络的储备池节点个数N取值为50≤N≤1000,但本方法所提出的模型是增长型模型,N的大小是逐渐增加的。该网络中初始N取10,即该网络含有5个输入节点,10个储备池节点,1个输出节点。Taking the inlet water temperature, total suspended solids, dissolved oxygen concentration, pH value and outlet redox potential as input variables and ammonia nitrogen concentration as output variable, the initial structure of the echo state network is determined to be 5-N-1, where N represents the number of sub-reservoir nodes. The number of reserve pool nodes N of a typical echo state network is 50≤N≤1000, but the model proposed by this method is a growth model, and the size of N gradually increases. The initial N in this network is 10, that is, the network contains 5 input nodes, 10 reserve pool nodes, and 1 output node.

步骤1.2:初始化网络参数Step 1.2: Initialize network parameters

将sigmoid函数作为网络激活函数G(·),确定初始迭代次数i=1,最大迭代次数imax≤30,训练样本

Figure BDA0004104784510000062
uk表示第k组输入样本,tk表示第k组实际输出值,
Figure BDA0004104784510000063
表示输入样本维度为n,L为样本总数;随机初始化网络输入权值Win和储备池内部权值W在(0,1)之间。The sigmoid function is used as the network activation function G(·), the initial iteration number i=1, the maximum iteration number i max ≤30, and the training sample
Figure BDA0004104784510000062
u k represents the kth group of input samples, t k represents the kth group of actual output values,
Figure BDA0004104784510000063
Indicates that the input sample dimension is n, L is the total number of samples; the network input weight W in and the internal weight W of the reserve pool are randomly initialized between (0,1).

优选地,所述基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池,包括:Preferably, the constructing of the sub-reservoir based on the initialized echo state network according to the singular value decomposition method comprises:

随机生成一个对角矩阵

Figure BDA0004104784510000064
以及两个正交矩阵Ui和Vi;其中,
Figure BDA0004104784510000065
为随机生成的在(0,1)之间数值,nk为子储备池节点个数;Randomly generate a diagonal matrix
Figure BDA0004104784510000064
And two orthogonal matrices U i and V i ; where,
Figure BDA0004104784510000065
is a randomly generated value between (0,1), and n k is the number of nodes in the sub-reservation pool;

利用所述对角矩阵和两个所述正交矩阵构造子储备池ΔWi=UiSiViThe sub-reservoir ΔW i =U i S i V i is constructed using the diagonal matrix and the two orthogonal matrices.

可选地,本实施例的步骤2为根据奇异值分解构造子储备池。本实施例随机生成一个对角矩阵

Figure BDA0004104784510000071
以及两个正交矩阵Ui和Vi,利用三个矩阵可以构造子储备池ΔWi=UiSiVi。通过这种方法可以确保ΔWi和Si有相同的奇异值,从而保证ESP特性。Optionally, step 2 of this embodiment is to construct a sub-reserve pool according to singular value decomposition. This embodiment randomly generates a diagonal matrix
Figure BDA0004104784510000071
And two orthogonal matrices U i and V i , using three matrices, the sub-reservoir ΔW i = U i S i V i can be constructed. This method can ensure that ΔW i and S i have the same singular value, thus ensuring the ESP characteristics.

优选地,所述根据条件数和差分进化算法优化所述子储备池,包括:Preferably, the optimizing the sub-reserve pool according to the condition number and the differential evolution algorithm comprises:

构建适应度函数fitness(ΔWi)=κ(Hi)-κ(Hi-1);其中,κ(Hi)代表新的子储备池加入后,储备池对应的状态矩阵的条件数;Construct a fitness function fitness(ΔW i )=κ(H i )-κ(H i-1 ); where κ(H i ) represents the condition number of the state matrix corresponding to the reserve pool after the new sub-reserve pool is added;

初始化初始种群NP=50,变异算子F=0.7,交叉算子CR=0.5,并初始化种群

Figure BDA0004104784510000072
其中n∈{1,2…,NP},并设置最大迭代次数G;Initialize the initial population NP = 50, mutation operator F = 0.7, crossover operator CR = 0.5, and initialize the population
Figure BDA0004104784510000072
Where n∈{1,2…,NP}, and set the maximum number of iterations G;

根据公式

Figure BDA0004104784510000073
得到变异个体μn;其中,r1,r2,r3∈[1,NP]为三个互不相同的整数;According to the formula
Figure BDA0004104784510000073
Get the mutant individual μ n ; where r 1 , r 2 , r 3 ∈[1,NP] are three different integers;

通过

Figure BDA0004104784510000074
完成交叉操作,对于每一个独立个体
Figure BDA0004104784510000077
得到交叉个体
Figure BDA0004104784510000075
其中,j∈{1,2…,10},rand∈(0,1)是随机生成的;pass
Figure BDA0004104784510000074
Complete the crossover operation, for each independent individual
Figure BDA0004104784510000077
Get crossover individuals
Figure BDA0004104784510000075
Among them, j∈{1,2…,10}, rand∈(0,1) is randomly generated;

当算法达到最大迭代次数后,终止算法流程,返回最优个体,并利用所述最优个体构造新的子储备池。When the algorithm reaches the maximum number of iterations, the algorithm process is terminated, the optimal individual is returned, and a new sub-reserve pool is constructed using the optimal individual.

具体的,本实施例中步骤3为根据条件数和差分进化算法优化子储备池,具体步骤如下:Specifically, step 3 in this embodiment is to optimize the sub-reserve pool according to the condition number and the differential evolution algorithm, and the specific steps are as follows:

步骤3.1:设计适应度函数根据矩阵条件数的理论分析我们可知,条件数越大的矩阵,在进行矩阵的运算时越容易产生病态解的问题。因此本实施例设计适应度函数用来衡量新生成的子储备池的性能。具体计算方式如下:Step 3.1: Design fitness function According to the theoretical analysis of matrix condition number, we know that the larger the condition number of a matrix, the easier it is to produce ill-conditioned solutions when performing matrix operations. Therefore, this embodiment designs a fitness function to measure the performance of the newly generated sub-reserve pool. The specific calculation method is as follows:

fitness(ΔWi)=κ(Hi)-κ(Hi-1) (1)fitness(ΔW i )=κ(H i )-κ(H i-1 ) (1)

其中κ(Hi)代表新子储备池加入后,储备池对应的状态矩阵的条件数。Where κ(H i ) represents the condition number of the state matrix corresponding to the reserve pool after the new sub-reservoir is added.

步骤3.2:利用差分进化算法优化SVD产生的奇异值Step 3.2: Use differential evolution algorithm to optimize the singular values generated by SVD

初始化初始种群NP=50,变异算子F=0.7,交叉算子CR=0.5。初始化种群

Figure BDA0004104784510000076
其中n∈{1,2…,NP},并设置最大迭代次数G。Initialize the initial population NP = 50, mutation operator F = 0.7, crossover operator CR = 0.5. Initialize the population
Figure BDA0004104784510000076
Where n∈{1,2…,NP}, and the maximum number of iterations G is set.

通过公式(2)得到变异个体μn The mutant individual μ n is obtained by formula (2):

Figure BDA0004104784510000081
Figure BDA0004104784510000081

其中r1,r2,r3∈[1,NP]为三个互不相同的整数。Where r 1 , r 2 , r 3 ∈[1,NP] are three different integers.

通过公式(3)完成交叉操作,对于每一个独立个体σjn得到交叉个体γjnThe crossover operation is completed by formula (3), and for each independent individual σ j n, the crossover individual γ j n is obtained

Figure BDA0004104784510000082
Figure BDA0004104784510000082

其中,j∈{1,2…,10},rand∈(0,1)是随机生成的。Among them, j∈{1,2…,10}, rand∈(0,1) is randomly generated.

通过公式(4)完成选择操作The selection operation is completed by formula (4)

Figure BDA0004104784510000083
Figure BDA0004104784510000083

fitness(·)代表公式(1)中的适应度函数计算。fitness(·) represents the fitness function calculation in formula (1).

算法达到最大迭代次数后,终止算法流程,返回最优个体。该个体用来构造新的子储备池。After the algorithm reaches the maximum number of iterations, the algorithm process is terminated and the optimal individual is returned. This individual is used to construct a new sub-reserve pool.

优选地,所述对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值,包括:Preferably, the weights, input weights and state matrix of the optimized sub-reserve pool are updated, and it is determined whether the number of iterations is less than a preset iteration threshold. If so, the process jumps to the step of "constructing a sub-reserve pool based on the initialized echo state network according to a singular value decomposition method"; if so, the output weights are calculated, including:

将储备池权值更新为

Figure BDA0004104784510000084
Update the reserve pool weight to
Figure BDA0004104784510000084

将输入权值更新为

Figure BDA0004104784510000085
Update the input weights to
Figure BDA0004104784510000085

将状态矩阵更新为H=[H1,…,Hi];Update the state matrix to H = [H 1 ,…,H i ];

若满足i≥imax,则执行下一步骤,否则返回步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;If i≥i max is satisfied, the next step is executed, otherwise the process returns to the step "constructing a sub-reservoir based on the initialized echo state network according to the singular value decomposition method";

通过公式Wout=HΓT计算输出权值Wout;其中,Γ代表伪逆计算,T为目标输出数据。The output weight W out is calculated by the formula W out =H Γ T, wherein Γ represents pseudo-inverse calculation, and T is the target output data.

进一步地,本实施例中的步骤4为更新网络的结构及参数。本实施例将储备池权值更新为

Figure BDA0004104784510000091
输入权值更新为
Figure BDA0004104784510000092
状态矩阵更新为H=[H1,…,Hi]。Furthermore, step 4 in this embodiment is to update the structure and parameters of the network. In this embodiment, the weight of the reserve pool is updated to
Figure BDA0004104784510000091
The input weights are updated to
Figure BDA0004104784510000092
The state matrix is updated to H = [H 1 ,…,H i ].

若满足i≥imax,则执行步骤5,否则返回步骤2。If i≥i max is satisfied, execute step 5, otherwise return to step 2.

更进一步地,如图3所示,本实施例中的步骤5:计算输出权值。输出权值可通过公式(5)计算:Furthermore, as shown in FIG3 , step 5 in this embodiment: calculating the output weight. The output weight can be calculated by formula (5):

Wout=HΓT(5)W out =H Γ T (5)

其中Γ代表伪逆计算,T为目标输出数据。Where Γ represents pseudo-inverse calculation and T is the target output data.

此外,本实施例的步骤6为测试网络,利用以上步骤得到的输出权值Wout,输入测试样本,对网络进行测试。本实施例将测试好的网络应用于出水NH4-N浓度的预测,其结果如和误差分别如图4和图5所示。In addition, step 6 of this embodiment is to test the network, using the output weight W out obtained in the above steps, input the test sample, and test the network. This embodiment applies the tested network to the prediction of effluent NH4-N concentration, and the results and errors are shown in Figures 4 and 5 respectively.

本实施例中的数据样本如下所示,其中表1-12是本发明实验数据。表1-5为训练输入样本:进水温度、好氧末段溶解氧、好氧末端总固体悬浮物、出水酸碱度pH、出水氧化还原电位,表6为训练样本出水氨氮的浓度,表7-11为测试输入样本:进水温度、好氧末段溶解氧、好氧末端总固体悬浮物、出水酸碱度pH、出水氧化还原电位,表12为测试样本出水氨氮的浓度。The data samples in this embodiment are as follows, where Tables 1-12 are experimental data of the present invention. Tables 1-5 are training input samples: inlet water temperature, dissolved oxygen at the end of aerobic stage, total suspended solids at the end of aerobic stage, pH value of effluent, and redox potential of effluent, Table 6 is the concentration of ammonia nitrogen in the effluent of the training sample, Tables 7-11 are test input samples: inlet water temperature, dissolved oxygen at the end of aerobic stage, total suspended solids at the end of aerobic stage, pH value of effluent, and redox potential of effluent, and Table 12 is the concentration of ammonia nitrogen in the effluent of the test sample.

表1辅助变量进水温度(℃)Table 1 Auxiliary variables Inlet water temperature (℃)

Figure BDA0004104784510000093
Figure BDA0004104784510000093

Figure BDA0004104784510000101
Figure BDA0004104784510000101

表2辅助变量溶解氧(mg/L)Table 2 Auxiliary variables dissolved oxygen (mg/L)

Figure BDA0004104784510000102
Figure BDA0004104784510000102

Figure BDA0004104784510000111
Figure BDA0004104784510000111

表3辅助变量总固体悬浮物(mg/L)Table 3 Auxiliary variables Total suspended solids (mg/L)

Figure BDA0004104784510000121
Figure BDA0004104784510000121

Figure BDA0004104784510000131
Figure BDA0004104784510000131

表4辅助变量pH值Table 4 Auxiliary variables pH value

Figure BDA0004104784510000132
Figure BDA0004104784510000132

Figure BDA0004104784510000141
Figure BDA0004104784510000141

表5辅助变量氧化还原电位Table 5 Auxiliary variables Redox potential

Figure BDA0004104784510000142
Figure BDA0004104784510000142

Figure BDA0004104784510000151
Figure BDA0004104784510000151

表6实测出水NH4-N浓度(mg/L)Table 6 Measured effluent NH4-N concentration (mg/L)

Figure BDA0004104784510000161
Figure BDA0004104784510000161

Figure BDA0004104784510000171
Figure BDA0004104784510000171

测试样本如下:The test samples are as follows:

表7辅助变量进水温度(℃)Table 7 Auxiliary variables Inlet water temperature (℃)

26.666426.6664 25.592525.5925 26.075126.0751 26.865526.8655 24.930724.9307 24.943624.9436 25.251625.2516 25.825525.8255 24.917724.9177 25.469125.4691 25.646325.6463 23.623923.6239 26.796126.7961 23.383523.3835 25.566425.5664 25.623125.6231 23.680623.6806 24.183324.1833 25.538825.5388 25.741025.7410 25.999125.9991 25.557625.5576 24.946524.9465 24.972524.9725 24.741824.7418 27.208727.2087 25.866325.8663 26.713626.7136 24.906124.9061 25.669625.6696 24.681324.6813 23.277023.2770 23.863123.8631 24.966724.9667 26.806526.8065 24.480124.4801 24.887424.8874 25.485025.4850 22.962522.9625 25.247225.2472 25.996225.9962 27.109427.1094 25.628925.6289 25.408125.4081 24.229124.2291 25.472025.4720 27.202827.2028 25.399425.3994 25.564925.5649 24.669824.6698 24.901824.9018 24.547624.5476 25.361725.3617 23.737823.7378 24.302224.3022 24.984024.9840 22.809822.8098 25.010025.0100 25.297925.2979 25.030325.0303 27.078427.0784 24.272124.2721 24.419824.4198 24.982624.9826 25.666725.6667 23.055923.0559 23.730723.7307 25.477825.4778 25.389325.3893 25.512625.5126 25.672525.6725 25.406725.4067 25.053425.0534 23.156523.1565 25.088125.0881 24.911924.9119 24.966724.9667 24.948024.9480 24.868624.8686 26.909826.9098 25.930525.9305 23.284123.2841 25.348625.3486 25.299325.2993 24.518824.5188 25.437125.4371 24.948024.9480 27.293327.2933 25.984525.9845 25.461825.4618 25.221225.2212 27.056227.0562 23.102723.1027 24.861424.8614 25.085225.0852 24.559124.5591 25.415325.4153 25.626025.6260 26.934926.9349 25.350125.3501 25.348625.3486 24.379624.3796 25.293625.2936 23.625323.6253 24.540424.5404 24.204724.2047 26.791726.7917 24.605124.6051 25.615825.6158 24.636824.6368 22.911522.9115 24.904724.9047 25.255925.2559 26.504626.5046 27.133127.1331 25.964125.9641 24.999924.9999 26.042926.0429 23.629523.6295 24.669824.6698 24.790824.7908 24.749024.7490 26.028326.0283 23.063023.0630 25.495225.4952 25.158925.1589 23.203223.2032 23.559823.5598 25.652225.6522 23.331023.3310 25.540225.5402 23.155123.1551 23.874523.8745 24.615224.6152 26.785826.7858 25.163325.1633 25.943625.9436 23.629523.6295 25.153225.1532 25.825525.8255 24.805224.8052 25.295025.2950 25.177825.1778 23.990223.9902 27.333427.3334 27.188027.1880 23.474523.4745 26.955626.9556 25.339925.3399 23.404823.4048 25.953925.9539 26.815326.8153 25.674025.6740 25.445825.4458 26.040026.0400 25.131525.1315 24.822524.8225 24.949424.9494 23.431823.4318 25.505325.5053 26.672326.6723 26.821226.8212 23.095623.0956 25.498125.4981 25.229925.2299 23.576923.5769 23.609623.6096 23.138123.1381 23.700623.7006 25.506825.5068 23.511423.5114 25.640525.6405 25.148825.1488 23.871723.8717 26.976326.9763 27.214727.2147 26.952626.9526 25.104025.1040 23.642223.6422 25.128525.1285 25.130025.1300 23.847723.8477 23.419023.4190 23.019123.0191 24.959524.9595 24.121824.1218 23.633823.6338 25.284925.2849 23.629523.6295 26.765226.7652

表8辅助变量溶解氧(mg/L)Table 8 Auxiliary variables Dissolved oxygen (mg/L)

0.05620.0562 0.03660.0366 0.04800.0480 0.04920.0492 0.04970.0497 0.03550.0355 0.02980.0298 0.06800.0680 0.05010.0501 1.49711.4971 0.03070.0307 0.93340.9334 0.03950.0395 0.35740.3574 0.03220.0322 0.04800.0480 1.18281.1828 0.48210.4821 0.07920.0792 0.05070.0507 0.06920.0692 0.04010.0401 4.83004.8300 0.03710.0371 0.06060.0606 0.05180.0518 0.08110.0811 0.06020.0602 0.05420.0542 0.03250.0325 0.04500.0450 0.38210.3821 0.85500.8550 0.03820.0382 0.05590.0559 0.37640.3764 5.76955.7695 1.57151.5715 1.05031.0503 0.03670.0367 0.10610.1061 0.05070.0507 0.03110.0311 0.26920.2692 0.48670.4867 0.03100.0310 0.05810.0581 0.05040.0504 0.05090.0509 0.05010.0501 0.04570.0457 0.37470.3747 0.03750.0375 0.25190.2519 0.43570.4357 0.03960.0396 0.27460.2746 0.03190.0319 0.03360.0336 3.37703.3770 0.06440.0644 0.47010.4701 5.48445.4844 0.03910.0391 0.03050.0305 0.58610.5861 0.21030.2103 0.03440.0344 0.53810.5381 0.34840.3484 0.03910.0391 2.26882.2688 0.08820.0882 0.26110.2611 0.03210.0321 0.07160.0716 0.06590.0659 0.03590.0359 0.04270.0427 0.06560.0656 0.05310.0531 0.32680.3268 0.03110.0311 0.02960.0296 5.34605.3460 0.18820.1882 0.02880.0288 0.03940.0394 0.08600.0860 0.11660.1166 0.03360.0336 0.07350.0735 0.34120.3412 0.04230.0423 0.05670.0567 0.18190.1819 0.03030.0303 0.03080.0308 0.06540.0654 0.03010.0301 0.51690.5169 0.41930.4193 0.09110.0911 0.87420.8742 0.18410.1841 0.48820.4882 0.09720.0972 0.11700.1170 0.03180.0318 0.07650.0765 0.34440.3444 0.06660.0666 0.03400.0340 0.05820.0582 0.05850.0585 0.06090.0609 0.03390.0339 0.06830.0683 0.91170.9117 5.25135.2513 0.04160.0416 0.02910.0291 0.06890.0689 0.29620.2962 0.03330.0333 0.04500.0450 0.26930.2693 0.24760.2476 0.06030.0603 0.36960.3696 0.03740.0374 0.33430.3343 0.54400.5440 0.40430.4043 0.05870.0587 0.03420.0342 0.06330.0633 0.26510.2651 0.03800.0380 0.07930.0793 0.03070.0307 0.04600.0460 0.03520.0352 0.82740.8274 0.03830.0383 0.03820.0382 0.37650.3765 0.04840.0484 0.04380.0438 0.91110.9111 0.04250.0425 0.04110.0411 0.03980.0398 2.05652.0565 0.03980.0398 0.07390.0739 0.06630.0663 0.03010.0301 0.35940.3594 0.41450.4145 0.13270.1327 0.09870.0987 0.27340.2734 1.18291.1829 0.03150.0315 0.45370.4537 0.24590.2459 0.30240.3024 0.51100.5110 1.26521.2652 0.34950.3495 0.03170.0317 0.03950.0395 0.48440.4844 0.04700.0470 0.05140.0514 0.04170.0417 0.03360.0336 1.25511.2551 0.03510.0351 0.08430.0843 0.26650.2665 0.73750.7375 0.71970.7197 0.09620.0962 0.77560.7756 0.24650.2465 0.12650.1265 0.88170.8817 0.07930.0793

表9辅助变量总固体悬浮物(mg/L)Table 9 Auxiliary variables Total suspended solids (mg/L)

Figure BDA0004104784510000181
Figure BDA0004104784510000181

Figure BDA0004104784510000191
Figure BDA0004104784510000191

表10辅助变量pH值Table 10 Auxiliary variable pH value

Figure BDA0004104784510000192
Figure BDA0004104784510000192

Figure BDA0004104784510000201
Figure BDA0004104784510000201

表11辅助变量氧化还原电位Table 11 Auxiliary variables Redox potential

Figure BDA0004104784510000202
Figure BDA0004104784510000202

Figure BDA0004104784510000211
Figure BDA0004104784510000211

表12实测出水NH4-N浓度(mg/L)Table 12 Measured effluent NH4-N concentration (mg/L)

Figure BDA0004104784510000212
Figure BDA0004104784510000212

Figure BDA0004104784510000221
Figure BDA0004104784510000221

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

本发明发明将条件数分析与差分进化算法相结合来优化ESN网络结构,进而避免病态解问题,提高网络的鲁棒性,增加其抗干扰性能。The invention combines condition number analysis with a differential evolution algorithm to optimize the ESN network structure, thereby avoiding the problem of ill-conditioned solutions, improving the robustness of the network, and increasing its anti-interference performance.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims (5)

1.一种基于神经网络的出水NH4-N软测量方法,其特征在于,包括:1. A soft measurement method for effluent NH4-N based on neural network, characterized by comprising: 构建回声状态网络,并对所述回声状态网络的网络结构及网络参数进行初始化;所述回声状态网络的输入变量包括进水温度、总固体悬浮物、溶解氧浓度、pH值以及出水氧化还原电位;所述回声状态网络的输出变量包括氨氮浓度;Constructing an echo state network, and initializing the network structure and network parameters of the echo state network; the input variables of the echo state network include inlet water temperature, total suspended solids, dissolved oxygen concentration, pH value, and outlet water redox potential; the output variables of the echo state network include ammonia nitrogen concentration; 基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池;Based on the initialized echo state network, a sub-reservoir is constructed according to the singular value decomposition method; 根据条件数和差分进化算法优化所述子储备池;Optimizing the sub-reservoir according to a condition number and a differential evolution algorithm; 对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值;The weights, input weights and state matrix of the optimized sub-reserve pool are updated, and it is determined whether the number of iterations is less than a preset iteration threshold. If so, jump to the step of "constructing a sub-reserve pool based on the initialized echo state network according to the singular value decomposition method"; if so, calculate the output weights; 根据输出权值和测试样本对所述回声状态网络进行测试,得到确定好的出水NH4-N检测模型;The echo state network is tested according to the output weights and the test samples to obtain a determined effluent NH4-N detection model; 将待检测数据输入至确定好的出水NH4-N检测模型中,得到检测结果。The data to be tested is input into the determined effluent NH4-N detection model to obtain the test results. 2.根据权利要求1所述的基于神经网络的出水NH4-N软测量方法,其特征在于,对所述回声状态网络的网络结构及网络参数进行初始化,包括:2. The method for soft-sensing NH4-N in water outlet based on neural network according to claim 1, characterized in that the network structure and network parameters of the echo state network are initialized, comprising: 确定所述回声状态网络的初始结构为5-N-1;其中N表示子储备池节点个数;N的大小是逐渐增加;Determine the initial structure of the echo state network as 5-N-1; wherein N represents the number of nodes in the sub-reservoir; and the size of N is gradually increased; 将sigmoid函数作为网络激活函数G(·),确定初始迭代次数i=1,最大迭代次数imax≤30,训练样本
Figure FDA0004104784500000011
其中,uk表示第k组输入样本,tk表示第k组实际输出值,
Figure FDA0004104784500000012
表示输入样本维度为n,L为样本总数;
The sigmoid function is used as the network activation function G(·), the initial iteration number i=1, the maximum iteration number i max ≤30, and the training sample
Figure FDA0004104784500000011
Among them, uk represents the kth group of input samples, tk represents the kth group of actual output values,
Figure FDA0004104784500000012
Indicates that the input sample dimension is n, and L is the total number of samples;
随机初始化网络输入权值Win和储备池内部权值W在(0,1)之间。Randomly initialize the network input weights W in and the internal weights W of the reserve pool between (0,1).
3.根据权利要求2所述的基于神经网络的出水NH4-N软测量方法,其特征在于,所述基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池,包括:3. The effluent NH4-N soft-sensing method based on neural network according to claim 2 is characterized in that the sub-reserve pool is constructed based on the initialized echo state network according to the singular value decomposition method, including: 随机生成一个对角矩阵
Figure FDA0004104784500000013
以及两个正交矩阵Ui和Vi;其中,
Figure FDA0004104784500000021
为随机生成的在(0,1)之间数值,nk为子储备池节点个数;
Randomly generate a diagonal matrix
Figure FDA0004104784500000013
And two orthogonal matrices U i and V i ; where,
Figure FDA0004104784500000021
is a randomly generated value between (0,1), and n k is the number of nodes in the sub-reservation pool;
利用所述对角矩阵和两个所述正交矩阵构造子储备池ΔWi=UiSiViThe sub-reservoir ΔW i =U i S i V i is constructed using the diagonal matrix and the two orthogonal matrices.
4.根据权利要求3所述的基于神经网络的出水NH4-N软测量方法,其特征在于,所述根据条件数和差分进化算法优化所述子储备池,包括:4. The method for soft sensing of effluent NH4-N based on neural network according to claim 3, characterized in that the sub-reserve pool is optimized according to the condition number and differential evolution algorithm, comprising: 构建适应度函数fitness(ΔWi)=κ(Hi)-κ(Hi-1);其中,κ(Hi)代表新的子储备池加入后,储备池对应的状态矩阵的条件数;Construct a fitness function fitness(ΔW i )=κ(H i )-κ(H i-1 ); where κ(H i ) represents the condition number of the state matrix corresponding to the reserve pool after the new sub-reserve pool is added; 初始化初始种群NP=50,变异算子F=0.7,交叉算子CR=0.5,并初始化种群
Figure FDA0004104784500000025
其中n∈{1,2…,NP},并设置最大迭代次数G;
Initialize the initial population NP = 50, mutation operator F = 0.7, crossover operator CR = 0.5, and initialize the population
Figure FDA0004104784500000025
Where n∈{1,2…,NP}, and set the maximum number of iterations G;
根据公式
Figure FDA0004104784500000026
得到变异个体μn;其中,r1,r2,r3∈[1,NP]为三个互不相同的整数;
According to the formula
Figure FDA0004104784500000026
Get the mutant individual μ n ; where r 1 , r 2 , r 3 ∈[1,NP] are three different integers;
通过
Figure FDA0004104784500000022
完成交叉操作,对于每一个独立个体
Figure FDA0004104784500000028
得到交叉个体
Figure FDA0004104784500000027
其中,j∈{1,2…,10},rand∈(0,1)是随机生成的;
pass
Figure FDA0004104784500000022
Complete the crossover operation, for each independent individual
Figure FDA0004104784500000028
Get crossover individuals
Figure FDA0004104784500000027
Among them, j∈{1,2…,10}, rand∈(0,1) is randomly generated;
当算法达到最大迭代次数后,终止算法流程,返回最优个体,并利用所述最优个体构造新的子储备池。When the algorithm reaches the maximum number of iterations, the algorithm process is terminated, the optimal individual is returned, and a new sub-reserve pool is constructed using the optimal individual.
5.根据权利要求4所述的基于神经网络的出水NH4-N软测量方法,其特征在于,所述对优化后的所述子储备池的权值、输入权值和状态矩阵进行更新,并判断迭代次数是否小于预设迭代阈值,若是,则跳转至步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;若是,则计算输出权值,包括:5. The effluent NH4-N soft sensor method based on neural network according to claim 4 is characterized in that the weights, input weights and state matrix of the optimized sub-reserve pool are updated, and it is judged whether the number of iterations is less than a preset iteration threshold. If so, jump to the step of "constructing a sub-reserve pool based on the initialized echo state network according to the singular value decomposition method"; if so, calculate the output weight, including: 将储备池权值更新为
Figure FDA0004104784500000023
Update the reserve pool weight to
Figure FDA0004104784500000023
将输入权值更新为
Figure FDA0004104784500000024
Update the input weights to
Figure FDA0004104784500000024
将状态矩阵更新为H=[H1,...,Hi];Update the state matrix to H = [H 1 , ..., H i ]; 若满足i≥imax,则执行下一步骤,否则返回步骤“基于初始化后的回声状态网络,根据奇异值分解方法构造子储备池”;If i≥i max is satisfied, the next step is executed, otherwise the process returns to the step "constructing a sub-reservoir based on the initialized echo state network according to the singular value decomposition method"; 通过公式Wout=HΓT计算输出权值Wout;其中,Γ代表伪逆计算,T为目标输出数据。The output weight W out is calculated by the formula W out =H Γ T, wherein Γ represents pseudo-inverse calculation, and T is the target output data.
CN202310181946.1A 2023-02-21 2023-02-21 A soft measurement method for effluent NH4-N based on neural network Active CN116151121B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310181946.1A CN116151121B (en) 2023-02-21 2023-02-21 A soft measurement method for effluent NH4-N based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310181946.1A CN116151121B (en) 2023-02-21 2023-02-21 A soft measurement method for effluent NH4-N based on neural network

Publications (2)

Publication Number Publication Date
CN116151121A true CN116151121A (en) 2023-05-23
CN116151121B CN116151121B (en) 2024-03-26

Family

ID=86356179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310181946.1A Active CN116151121B (en) 2023-02-21 2023-02-21 A soft measurement method for effluent NH4-N based on neural network

Country Status (1)

Country Link
CN (1) CN116151121B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104629A (en) * 2014-05-27 2014-10-15 温州大学 Rapid signal detection method based on echo state network
CN110837886A (en) * 2019-10-28 2020-02-25 北京工业大学 A Soft-Sensing Method for Effluent NH4-N Based on ELM-SL0 Neural Network
CN115660165A (en) * 2022-10-23 2023-01-31 北京工业大学 A multi-step prediction method for effluent ammonia nitrogen concentration based on a modular neural network with double-layer PSO

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104629A (en) * 2014-05-27 2014-10-15 温州大学 Rapid signal detection method based on echo state network
CN110837886A (en) * 2019-10-28 2020-02-25 北京工业大学 A Soft-Sensing Method for Effluent NH4-N Based on ELM-SL0 Neural Network
CN115660165A (en) * 2022-10-23 2023-01-31 北京工业大学 A multi-step prediction method for effluent ammonia nitrogen concentration based on a modular neural network with double-layer PSO

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GE ZHAO 等: "An ammonia nitrogen concentration online soft measure method based on the neural network", 《PROCEEDINGS OF THE 36TH CHINESE CONTROL CONFERENCE》, pages 3994 - 3999 *
乔俊飞 等: "改进K-means算法优化RBF神经网络的出水氨氮预测", 《控制工程》, vol. 25, no. 3, pages 375 - 379 *
王磊: "回声状态网络优化设计及应用研究", 《中国博士学位论文全文数据库 信息科技辑》, no. 3, pages 140 - 16 *

Also Published As

Publication number Publication date
CN116151121B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
US10570024B2 (en) Method for effluent total nitrogen-based on a recurrent self-organizing RBF neural network
CN102323906B (en) A method for automatic generation of MC/DC test data based on genetic algorithm
CN114331788B (en) An intelligent detection method for nitrogen content in effluent from urban sewage treatment process based on cascaded modular neural network
CN103336867A (en) Proton exchange membrane fuel cell model optimizing process method
CN108595892A (en) Soft-measuring modeling method based on time difference model
CN104573869A (en) Optimization method and system for achieving dredging operations based on BP neural network and NSGA-II
CN112765902B (en) A soft sensor modeling method for COD concentration in rural domestic sewage treatment process based on RBF neural network of TentFWA-GD
CN112989704A (en) DE algorithm-based IRFM-CMNN effluent BOD concentration prediction method
CN111859807A (en) Initial pressure optimizing method, device, equipment and storage medium for steam turbine
Yasmin et al. Improved support vector machine using optimization techniques for an aerobic granular sludge
CN110991616B (en) Method for predicting BOD of effluent based on pruning feedforward small-world neural network
CN115755589B (en) An optimization method for reactor fuzzy control system based on genetic algorithm
CN116151121B (en) A soft measurement method for effluent NH4-N based on neural network
CN113223633A (en) Width GRNN model-based papermaking process drain water quality prediction method
CN106802983B (en) Optimized BP neural network-based biogas yield modeling calculation method and device
CN104345636A (en) Dissolved-oxygen control method based on improved differential algorithm
CN113537454B (en) Soft sensing method of effluent ammonia nitrogen based on ADw-CLPSO radial basis function affective neural network
CN112924646A (en) Effluent BOD soft measurement method based on self-adaptive pruning feedforward small-world neural network
CN110837886A (en) A Soft-Sensing Method for Effluent NH4-N Based on ELM-SL0 Neural Network
CN112446168A (en) Effluent BOD concentration soft measurement method based on MIC and RBFNN
CN115541837B (en) Intelligent detection method for total nitrogen in effluent based on dynamic fuzzy neural network
CN114912543B (en) An online compensation method for missing data in urban sewage treatment process based on autoencoder neural network
CN116307255A (en) Water body eutrophication prediction method based on improved MIMO depth double 3Q learning
CN110909492A (en) Sewage treatment process soft measurement method based on extreme gradient lifting algorithm
CN113065242B (en) A soft sensing method for total nitrogen concentration in sewage treatment effluent based on KPLSR model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant