CN111414694A - A sewage monitoring system based on FCM and BP algorithm and its establishment method - Google Patents
A sewage monitoring system based on FCM and BP algorithm and its establishment method Download PDFInfo
- Publication number
- CN111414694A CN111414694A CN202010196075.7A CN202010196075A CN111414694A CN 111414694 A CN111414694 A CN 111414694A CN 202010196075 A CN202010196075 A CN 202010196075A CN 111414694 A CN111414694 A CN 111414694A
- Authority
- CN
- China
- Prior art keywords
- data
- water quality
- algorithm
- pollution source
- particle
- 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.)
- Pending
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 148
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 115
- 238000000034 method Methods 0.000 title claims abstract description 101
- 239000010865 sewage Substances 0.000 title claims abstract description 56
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 175
- 239000002245 particle Substances 0.000 claims abstract description 103
- 230000008569 process Effects 0.000 claims abstract description 53
- 238000005457 optimization Methods 0.000 claims abstract description 44
- 238000013528 artificial neural network Methods 0.000 claims abstract description 32
- 238000012545 processing Methods 0.000 claims abstract description 12
- 238000003911 water pollution Methods 0.000 claims abstract description 12
- 230000002159 abnormal effect Effects 0.000 claims description 65
- 239000011159 matrix material Substances 0.000 claims description 30
- 238000004458 analytical method Methods 0.000 claims description 26
- 238000005516 engineering process Methods 0.000 claims description 26
- 239000003344 environmental pollutant Substances 0.000 claims description 26
- 231100000719 pollutant Toxicity 0.000 claims description 26
- 230000005540 biological transmission Effects 0.000 claims description 23
- 238000001514 detection method Methods 0.000 claims description 20
- 238000004891 communication Methods 0.000 claims description 18
- 230000008859 change Effects 0.000 claims description 17
- 238000013461 design Methods 0.000 claims description 17
- 238000012937 correction Methods 0.000 claims description 14
- 238000004088 simulation Methods 0.000 claims description 12
- 238000007781 pre-processing Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000010295 mobile communication Methods 0.000 claims description 7
- 239000003403 water pollutant Substances 0.000 claims description 7
- 239000003153 chemical reaction reagent Substances 0.000 claims description 6
- 238000002798 spectrophotometry method Methods 0.000 claims description 6
- 239000007788 liquid Substances 0.000 claims description 5
- 235000006719 Cassia obtusifolia Nutrition 0.000 claims description 3
- 235000014552 Cassia tora Nutrition 0.000 claims description 3
- 244000201986 Cassia tora Species 0.000 claims description 3
- 230000001133 acceleration Effects 0.000 claims description 3
- 238000005192 partition Methods 0.000 claims description 3
- 238000004904 shortening Methods 0.000 claims description 3
- 239000002351 wastewater Substances 0.000 claims description 3
- 230000009545 invasion Effects 0.000 claims 5
- 239000000356 contaminant Substances 0.000 claims 4
- 238000011109 contamination Methods 0.000 claims 2
- 125000001309 chloro group Chemical group Cl* 0.000 claims 1
- 239000000523 sample Substances 0.000 description 10
- 238000012360 testing method Methods 0.000 description 5
- 238000005259 measurement Methods 0.000 description 4
- ZAMOUSCENKQFHK-UHFFFAOYSA-N Chlorine atom Chemical compound [Cl] ZAMOUSCENKQFHK-UHFFFAOYSA-N 0.000 description 3
- 229910052801 chlorine Inorganic materials 0.000 description 3
- 239000000460 chlorine Substances 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 3
- 238000007405 data analysis Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 230000002572 peristaltic effect Effects 0.000 description 2
- 238000004064 recycling Methods 0.000 description 2
- 238000012552 review Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005086 pumping Methods 0.000 description 1
- 238000012372 quality testing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000025508 response to water Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 229910001220 stainless steel Inorganic materials 0.000 description 1
- 239000010935 stainless steel Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及污水处理监测技术领域,具体涉及一种基于FCM和BP算法的污水监测系统及其建立方法。The invention relates to the technical field of sewage treatment monitoring, in particular to a sewage monitoring system based on FCM and BP algorithms and a method for establishing the same.
背景技术Background technique
随着我国经济技术的发展,工厂林立,污水的排放对环境造成了严重的影响,目前,我国的污水排放呈现污水种类多、排放位置不统一、污水排放监管工作存在粗放型管理和经济技术不合理的问题,主要表现在:With the development of my country's economy and technology, there are many factories, and the discharge of sewage has caused a serious impact on the environment. At present, the discharge of sewage in my country shows that there are many types of sewage, inconsistent discharge locations, extensive management of sewage discharge supervision and poor economic and technological progress. Reasonable questions are mainly manifested in:
(1)检测技术仍然是简单的数学计算或人工审核,无法满足环境监管部门对真实环境的判断与管理;(1) The detection technology is still simple mathematical calculation or manual review, which cannot meet the judgment and management of the real environment by the environmental supervision department;
(2)污染源数据解析技术的实现基于简单的数学计算或人工审核,对于科学可靠的自动解析诊断方法尚缺乏深入研究;(2) The realization of pollution source data analysis technology is based on simple mathematical calculation or manual review, and there is still a lack of in-depth research on scientific and reliable automatic analysis and diagnosis methods;
(3)以往的污水监测中,通常采用人工监测和记录的形式,监测随机性大、实时性差,这些问题的存在对污水检测准确性带来了困难;(3) In the past sewage monitoring, the form of manual monitoring and recording is usually adopted, and the monitoring has large randomness and poor real-time performance. The existence of these problems brings difficulties to the accuracy of sewage detection;
伴随着自动监控技术的发展,利用有线技术实现污水监测的系统在美、日等发达国家已经开始大规模地投人使用,但仍存在布线麻烦、成本高等缺点;在我国,污水监测方法已从传统的定时定点采样、实验室离线分析发展到了在线监测,实验室离线分析测量周期长、操作复杂、实验要求严格,且不能满足实时监测的需求,而且传统的污水在线监测系统存在预处理过程复杂、检测设备体积庞大、检测周期长、不能实现连续自动检测等问题;With the development of automatic monitoring technology, the system of using wired technology to realize sewage monitoring has been put into use on a large scale in developed countries such as the United States and Japan, but there are still disadvantages such as troublesome wiring and high cost; in my country, sewage monitoring methods have been changed from The traditional sampling at fixed time and fixed point and laboratory offline analysis have developed into online monitoring. The offline analysis and measurement cycle of laboratory is long, the operation is complicated, the experimental requirements are strict, and it cannot meet the needs of real-time monitoring. Moreover, the traditional online sewage monitoring system has a complicated pretreatment process. , The detection equipment is bulky, the detection period is long, and the continuous automatic detection cannot be realized;
因此在污水在线监测管理技术中,急需一种采集数据精度高、数据解析诊断准确,以及监测系统体积小和性价比高的在线自动监测系统。Therefore, in the sewage online monitoring and management technology, there is an urgent need for an online automatic monitoring system with high data collection accuracy, accurate data analysis and diagnosis, as well as a small monitoring system and high cost performance.
发明内容SUMMARY OF THE INVENTION
针对上述存在的问题,本发明旨在提供一种基于FCM和BP算法的污水监测系统及其建立方法,通过FCM(模糊聚类)和BP(神经网络)算法对水污染源进行解析,同时利用粒子群优化算法可以快速的确定水污染物的侵入位置、开始侵入时间和侵入速度,设计基于利用FCM和BP混合算法运算的污染源解析模块的内置处理器,具有处理精度髙、速度快的优点;同时通过本污水监测系统,对水污染的快速反应,便于及时做出决策应对,具有降低污水对环境的污染,同时提高资源利用效率的特点。In view of the above existing problems, the present invention aims to provide a sewage monitoring system based on FCM and BP algorithm and its establishment method. The swarm optimization algorithm can quickly determine the intrusion position, start time and intrusion speed of water pollutants. The built-in processor based on the pollution source analysis module calculated by the FCM and BP hybrid algorithm is designed, which has the advantages of high processing accuracy and fast speed; Through the sewage monitoring system, the rapid response to water pollution facilitates timely decision-making and response, and has the characteristics of reducing sewage pollution to the environment and improving resource utilization efficiency.
为了实现上述目的,本发明所采用的技术方案如下:In order to achieve the above object, the technical scheme adopted in the present invention is as follows:
一种基于FCM和BP算法的污水监测系统的建立方法,所述方法包括以下步骤:A method for establishing a sewage monitoring system based on FCM and BP algorithm, the method comprises the following steps:
步骤一:利用FCM和BP混合算法对采集的水污染数据进行解析,同时利用粒子群优化算法确定水污染物的侵入位置、开始侵入时间和侵入速度,设计基于FCM和BP混合算法运算的污染源解析模块的内置处理器,并利用MATLAB编程工具进行编程;Step 1: Use the FCM and BP hybrid algorithm to analyze the collected water pollution data, and use the particle swarm optimization algorithm to determine the intrusion position, start time and intrusion speed of water pollutants, and design the pollution source analysis based on the FCM and BP hybrid algorithm. The built-in processor of the module is programmed using the MATLAB programming tool;
步骤二:在设计出基于FCM和BP混合算法运算的污染源解析模块的内置处理器后,利用面向对象的设计思想、基于C/S结构系统及MVC模式H层框架构建水质监测管理平台;Step 2: After designing the built-in processor of the pollution source analysis module based on the FCM and BP hybrid algorithm operation, use the object-oriented design idea, based on the C/S structure system and the MVC mode H-layer framework to build a water quality monitoring and management platform;
步骤三:在水质监测管理平台的基础上,采用纳氏试剂分光光度法检测水质参数,并结合PLC、组态软件、4G移动通信技术搭建基于物联网的水质监测系统硬件架构;Step 3: On the basis of the water quality monitoring and management platform, use Nessler's reagent spectrophotometry to detect water quality parameters, and combine PLC, configuration software, and 4G mobile communication technology to build the hardware architecture of the Internet of Things-based water quality monitoring system;
步骤四:在基于物联网的水质监测系统硬件架构的基础上,利用基于水质传感器、微控制器和无线模块的设计思路及实现方法,以及各部分之间的通信协议建立可以实现污水监测物联网系统信息采集与传递功能的基于物联网的污水监测系统。Step 4: On the basis of the hardware architecture of the water quality monitoring system based on the Internet of Things, using the design ideas and implementation methods based on water quality sensors, microcontrollers and wireless modules, as well as the establishment of communication protocols between various parts, the Internet of Things for sewage monitoring can be realized. IoT-based sewage monitoring system with system information collection and transmission functions.
进一步的,步骤一所述的利用FCM和BP混合算法对水污染解析的具体过程包括:Further, the specific process of utilizing FCM and BP hybrid algorithm to analyze water pollution described in step 1 includes:
S1.利用FCM(模糊聚类)算法对污染源监测数据进行解析,并利用隶属度函数确定数据点之间相关特性,对数据划分聚类:S1. Use the FCM (fuzzy clustering) algorithm to analyze the pollution source monitoring data, and use the membership function to determine the correlation characteristics between the data points, and divide and cluster the data:
S2.利用BP神经网络算法对S1划分的数据聚类中的异常类值进行修正,得到处理后的数据样本;S2. Use the BP neural network algorithm to correct the abnormal class values in the data clustering divided by S1, and obtain the processed data samples;
S3.将S2处理后的数据作为监测数据,并将其代入粒子群优化算法中,利用粒子群优化算法建立污染源反向追踪模型,将模拟优化时段内各监测点的实际监测值与模拟值的差的平方和作为模型目标函数,然后采用粒子群优化算法为优化求解工具,快速确定污染源位置及影响范围,设计基于利用FCM和BP混合算法运算的污染源解析模块内置处理器,所述的模型目标函数为:S3. Take the data processed by S2 as monitoring data, and substitute it into the particle swarm optimization algorithm, use the particle swarm optimization algorithm to establish a reverse tracking model of pollution sources, and compare the actual monitoring value and the simulated value of each monitoring point during the simulation optimization period. The sum of the squares of the differences is used as the objective function of the model, and then the particle swarm optimization algorithm is used as the optimization solution tool to quickly determine the location of pollution sources and the scope of influence. The function is:
其中X是污染源最优解,yi(t)是水质监测点i在t时刻的污染物模拟浓度;y′i(t)是水质监测点i在t时刻的污染物实测浓度;m是水质监测点个数;t是模拟历时。where X is the optimal solution of the pollution source, y i (t) is the simulated concentration of pollutants at the water quality monitoring point i at time t; y′ i (t) is the measured concentration of pollutants at the water quality monitoring point i at time t; m is the water quality The number of monitoring points; t is the simulation duration.
进一步的,步骤S1所述的利用FCM(模糊聚类)算法对污染源监测数据进行解析和划分聚类的过程包括:Further, the process of using the FCM (fuzzy clustering) algorithm described in step S1 to analyze and divide and cluster the pollution source monitoring data includes:
(1)原始数据预处理:数据预处理包括对监测到的水污染的原始数据进行插补缺失数据、清除噪声数据、按月分组,分组后观察每月数据的变化范围,判断是否需要对该月进行异常检测过程;(1) Raw data preprocessing: Data preprocessing includes imputing missing data, removing noise data, grouping by month, and observing the variation range of monthly data after grouping to determine whether it is necessary to Monthly anomaly detection process;
(2)在数据预处理完成后,利用FCM算法对预处理的数据进行聚类,将需要检测的月份依次作为FCM算法的输入源进行聚类,聚类的具体过程为:(2) After the data preprocessing is completed, use the FCM algorithm to cluster the preprocessed data, and use the months to be detected as the input source of the FCM algorithm for clustering. The specific process of clustering is as follows:
a.首先设定类别个数C,2≤C≤N,N为数据样本总量,给出迭代停止阈值ε,初始化聚类的原型模式P(b),给定迭代计数器b=0;a. First set the number of categories C, 2≤C≤N, N is the total number of data samples, give the iteration stop threshold ε, initialize the prototype pattern P (b) of the cluster, and give the iteration counter b=0;
b.计算划分矩阵U(b):对于k如果则有:b. Calculate the partition matrix U (b) : for k if Then there are:
对于k如果则有:for k if Then there are:
且对j≠r, And for j≠r,
c.对于上述两种情况进行迭代,得到迭代更新后的原型矩阵Pb+1为:c. Iterate for the above two cases, and obtain the prototype matrix P b+1 after iterative update is:
d.判断并输出分割后的矩阵U与聚类原型P:若则计算结束同时输出分割后的矩阵U与聚类原型P;否则令b=b+1,转步骤b再次进行迭代;d. Judge and output the segmented matrix U and the cluster prototype P: if Then the calculation is finished and the divided matrix U and the cluster prototype P are output at the same time; otherwise, let b=b+1, and go to step b to iterate again;
其中||.||是恰当的矩阵范数;where ||.|| is the appropriate matrix norm;
(3)数据聚类完成后,分析聚类结果,根据各类数据的自身特性,将数据分为正常类值和异常类值,完成对污染源监测数据的异常检测。(3) After the data clustering is completed, analyze the clustering results, and divide the data into normal and abnormal values according to the characteristics of various types of data, and complete the abnormal detection of pollution source monitoring data.
进一步的,步骤S2所述的利用BP神经网络算法数据聚类中的异常类值进行修正的具体过程包括:Further, the specific process of modifying the abnormal class value in the data clustering of the BP neural network algorithm described in step S2 includes:
(1)找出步骤一检测出的数据中的异常类值,并将异常类值之前的数据序列作为BP神经网络的输入样本;(1) Find out the abnormal class value in the data detected in step 1, and use the data sequence before the abnormal class value as the input sample of the BP neural network;
(2)然后将异常类值之前的数据序列代入BP神经网络算法,利用BP神经网络算法的非线性拟合能为,对异常类值位置进行数据预测;(2) Then the data sequence before the abnormal class value is substituted into the BP neural network algorithm, and the nonlinear fitting energy of the BP neural network algorithm is used to predict the data of the abnormal class value position;
(3)通过BP神经网络算法预测到的数据来代替原本数据中的的异常类值,即完成异常值的修正;(3) The abnormal value in the original data is replaced by the data predicted by the BP neural network algorithm, that is, the correction of the abnormal value is completed;
(4)当数据集中出现多个异常类值数据时,利用BP神经网络算法进行逐个修正,即在对第一个异常值修正完成后,替换出原数据序列中的异常值,用新的数据序列作为BP神经网络算法对下一个异常值预测时的输入样本去修正第二个异常数据。(4) When there are multiple abnormal data in the data set, use the BP neural network algorithm to correct one by one, that is, after the correction of the first abnormal value is completed, replace the abnormal value in the original data sequence, and use the new data The sequence is used as the input sample for the BP neural network algorithm to predict the next abnormal value to correct the second abnormal data.
进一步的,步骤S3所述的利用粒子群优化算法建立污染源反向追踪模型的具体过程包括:Further, the specific process of using the particle swarm optimization algorithm to establish the pollution source reverse tracking model described in step S3 includes:
(1)首先利用粒子群优化算法计算水利信息、管网属性和经步骤二修正后的监测数据之间的关系,分析管网中污染物浓度随时间、空间的变化的规律,设计模型参数,建立水力水质模型,并确保模型能较好地吻合管网中实际水力水质情况,所述利用粒子群优化算法分析管网中污染物浓度随时间、空间的变化的具体过程为:(1) First, use the particle swarm optimization algorithm to calculate the relationship between water conservancy information, pipe network attributes and the monitoring data corrected in step 2, analyze the change law of pollutant concentration in the pipe network with time and space, and design model parameters. Establish a hydraulic water quality model and ensure that the model can better match the actual hydraulic water quality in the pipeline network. The specific process of using the particle swarm optimization algorithm to analyze the changes of pollutant concentration in the pipeline network with time and space is as follows:
a.首先在污染源可行解空间中初始化一群粒子,每个粒子的特征用位置、速度和适应度值三项指标表示,其中粒子位置代表一个污染源的潜在解信息,粒子速度表示个体位置的变化幅度,适应度值的好坏表示粒子位置所代表污染源潜在解的优劣,以模型目标函数式作为适应度函数;a. First, initialize a group of particles in the feasible solution space of the pollution source. The characteristics of each particle are represented by three indicators: position, velocity and fitness value. The particle position represents the potential solution information of a pollution source, and the particle velocity represents the variation range of the individual position. , the fitness value indicates the quality of the potential solution of the pollution source represented by the particle position, and the model objective function is used as the fitness function;
b.粒子在解空间中运动时,通过跟踪单个粒子潜在污染源历史最优解位置和群体中潜在污染源历史最优解位置更新个体位置,粒子每更新一次位置,表示污染源潜在解进行一次更新,通过粒子此时的适应度值与个体先前最优适应度值、群体最优适应度值的大小比较,更新粒子潜在污染源最优解位置和群体潜在污染源最优解位置,反复迭代计算,搜索污染源最优解:b. When the particle moves in the solution space, the individual position is updated by tracking the historical optimal solution position of the potential pollution source of a single particle and the historical optimal solution position of the potential pollution source in the group. Each time the particle updates its position, it means that the potential solution of the pollution source is updated once. The fitness value of the particle at this time is compared with the previous optimal fitness value of the individual and the optimal fitness value of the group, and the optimal solution position of the particle's potential pollution source and the optimal solution position of the group's potential pollution source are updated. Optimal solution:
首先定义X=(X1,X2,...,Xn)T First define X=(X 1 ,X 2 ,...,X n ) T
Xi=(xi1,xi2,...,xi(3m-2),xi(3m-1),xi(3m))T X i =(x i1 ,x i2 ,...,x i(3m-2) ,x i(3m-1) ,x i(3m) ) T
V=(V1,V2,...,Vn)T V=(V 1 ,V 2 ,...,V n ) T
vi=(vi1,vi2,...,vi(3m-2),vi(3m-1),vi(3m))T v i =(v i1 ,v i2 ,...,v i(3m-2) ,v i(3m-1) ,v i(3m) ) T
其中:X是种群中n个粒子位置组成的矩阵,表示含有n个污染源潜在解的矩阵;Xi为第i个粒子的位置,即污染源的一个潜在解,其中xi1代表污染源的节点编号,xi2代表污染物的开始侵入时间,xi3代表污染物的侵入速度;xi(3m-2),xi(3m-1),xi(3m)则表示管网中有多个污染源时第m个污染源的信息;V是种群中n个粒子速度组成的矩阵;vi是第i个粒子的速度;其中,vi1代表污染源节点编号变化速度,vi2代表污染物开始侵入时间变化速度,vi3代表污染物侵入速度的变化速度;vi(3m-2),vi(3m-1),vi(3m)则表示管网中有多个污染源时第m个污染源的信息变化速度;Among them: X is a matrix composed of n particle positions in the population, representing a matrix containing n potential solutions of pollution sources; X i is the position of the ith particle, that is, a potential solution of the pollution source, where x i1 represents the node number of the pollution source, xi2 represents the start time of pollutants intrusion , xi3 represents the intrusion speed of pollutants; The information of the mth pollution source; V is the matrix composed of the velocity of n particles in the population; vi is the velocity of the ith particle; among them, v i1 represents the change speed of the node number of the pollution source, and v i2 represents the change speed of the time when the pollutant starts to invade , v i3 represents the change rate of the intrusion rate of pollutants; v i(3m-2) , v i(3m-1) , v i(3m) represent the information change of the mth pollution source when there are multiple pollution sources in the pipe network speed;
(2)根据水力水质模型构建管网中污染源的模拟,建立污染源反向追踪模型,污染源反向追踪模型以模拟优化时段内各水质监测点的模拟污染物浓度与实际浓度的差的平方和作为模型目标函数,内嵌EPANET工具箱作为模拟引擎,利用粒子群优化算法求解污染物的侵入位置、开始侵入时间和侵入速度。(2) According to the hydraulic water quality model, the simulation of the pollution sources in the pipeline network is constructed, and the pollution source reverse tracking model is established. The model objective function is embedded with the EPANET toolbox as a simulation engine, and the particle swarm optimization algorithm is used to solve the intrusion position, intrusion start time and intrusion speed of pollutants.
进一步的,步骤S3(2)所述的利用群优化算法求解污染物的侵入位置、开始侵入时间和侵入速度的具体过程包括:Further, the specific process of using the group optimization algorithm to solve the intrusion position, intrusion start time and intrusion speed of the pollutants described in step S3(2) includes:
a.设置算法参数a. Set the algorithm parameters
为防止粒子的盲目搜索,将污染源潜在解Xi和粒子速度vi限制在一定空间,即[Xmin,Xmax],[vmin,vmax];设定迭代次数上限N和预设精度ε,迭代次数达到上限q或适应度值f(x)<ε时,优化计算结束;In order to prevent the blind search of particles, the potential solution X i of the pollution source and the particle velocity v i are limited to a certain space, namely [X min , X max ], [v min , v max ]; set the upper limit of the number of iterations N and the preset precision ε, when the number of iterations reaches the upper limit q or the fitness value f(x)<ε, the optimization calculation ends;
b.粒子种群的初始化与初始极值b. Initialization and initial extreme value of particle population
随机产生含有多个污染源潜在解信息的粒子种群矩阵X和速度矩阵V,以模型目标函数式作为适应度函数,计算每个初始粒子的适应度值;根据适应度值寻找每个粒子的污染源潜在最优解Pi和群体中所有粒子的最优解Pg;Randomly generate the particle population matrix X and velocity matrix V containing the potential solution information of multiple pollution sources, and use the model objective function as the fitness function to calculate the fitness value of each initial particle; find the potential pollution source of each particle according to the fitness value. the optimal solution P i and the optimal solution P g of all particles in the population;
c.迭代寻优c. Iterative optimization
粒子通过个体极值位置(个体污染源最优解)Pi和群体极值位置(群体污染源最优解)Pg,更新自身的速度和位置,第i个粒子在第k+1次迭代时的速度和位置如下:The particle updates its own speed and position through the individual extreme value position (the optimal solution of individual pollution sources) P i and the group extreme value position (the optimal solution of the group pollution source) P g . speed and location as follows:
式中,ω是惯性权重,惯性权重,体现粒子继承先前速度的能力;c1,c2是加速度因子,为非负常数;r1,r2是分布于[0,1]区间的随机数;更新粒子潜在污染源最优解、群体潜在污染源最优解和相应适应度值;反复迭代,直到迭代次数达到上限或适应度值达到预设精度,迭代结束并输出群体中潜在污染源的最优解。In the formula, ω is the inertia weight, which reflects the ability of the particle to inherit the previous speed; c 1 , c 2 are the acceleration factors, which are non-negative constants; r 1 , r 2 are random numbers distributed in the [0,1] interval ; Update the optimal solution of particle potential pollution sources, the optimal solution of group potential pollution sources and the corresponding fitness value; iterate repeatedly until the number of iterations reaches the upper limit or the fitness value reaches the preset accuracy, the iteration ends and the optimal solution of the potential pollution sources in the group is output .
进一步的,步骤二所述的构建水质监测管理平台的具体过程为:Further, the specific process of constructing the water quality monitoring and management platform described in step 2 is as follows:
S1.利用面向对象的方法分别建立用户管理模块、数据采集模块、数据查询模块等功能单元,然后利用系统开发的面向对象技术分别建立模型层、视图层和控制层,形成水质监测管理平台的软件控制部分;其中模型层使用JavaBean技术实现、视图层使用JSP技术实现、控制层使用Servlet技术实现;S1. Use the object-oriented method to establish user management module, data acquisition module, data query module and other functional units respectively, and then use the object-oriented technology developed by the system to establish the model layer, view layer and control layer respectively, forming the software of the water quality monitoring management platform The control part; the model layer is realized by JavaBean technology, the view layer is realized by JSP technology, and the control layer is realized by Servlet technology;
S2.基于WEB的B/S结构将搭建的水质监测管理平台的软件控制部分与Web服务器联通,使水质监测管理平台的管理数据通过Web服务器上传到网络控制端;其中所述B/S架构即浏览器/服务器结构,客户端只需采用浏览器,向Web服务器发送请求,由Web服务器进行处理,便可将处理结果返回至客户端;S2. The WEB-based B/S structure connects the software control part of the built water quality monitoring and management platform with the Web server, so that the management data of the water quality monitoring and management platform is uploaded to the network control terminal through the Web server; wherein the B/S structure is Browser/server structure, the client only needs to use the browser to send a request to the web server, and the web server processes it, and then the processing result can be returned to the client;
S3.利用基于MVC模式H层框架的设计技术设计水质监测管理平台的模型层、视图层和控制层,得到可以随时间在线实时监测水质的水质监测管理平台。S3. Design the model layer, view layer and control layer of the water quality monitoring management platform using the design technology based on the MVC model H layer framework, and obtain a water quality monitoring management platform that can monitor water quality online and in real time over time.
进一步的,步骤三所述的水质监测系统硬件架构的建立过程包括:Further, the process of establishing the hardware architecture of the water quality monitoring system described in step 3 includes:
S1.根据纳氏试剂分光光度法检测水质参数的原理设计水质传感器的参数,保证水质传感器能够快速、准确的检测到水质信息;S1. Design the parameters of the water quality sensor according to the principle of detecting water quality parameters by Nessler reagent spectrophotometry to ensure that the water quality sensor can detect water quality information quickly and accurately;
S2.选择西门子PLC作为控制器的控制部分,减小检测设备体积;S2. Select Siemens PLC as the control part of the controller to reduce the size of the testing equipment;
S3.选择4G无线网关作为数据传输模块,缩短信息传输周期,进而缩短检测周期;S3. Select the 4G wireless gateway as the data transmission module to shorten the information transmission cycle, thereby shortening the detection cycle;
S4.建立信息服务端,实现数据的远程传送。S4. Establish an information server to realize remote transmission of data.
进一步的,步骤四所述基于物联网的污水监测系统的建立过程包括:Further, the establishment process of the IoT-based sewage monitoring system described in step 4 includes:
S1.选择传感器和微控制器,所述传感器包括水质传感器、水位传感器和流量传感器,其中水质传感器选用DPS400A数字型PH传感器、DLS400A数字型余氯传感器和DS18B20数字温度传感器,水位传感器选用投入式液位计,流量传感器选用霍尔流量传感器;根据传感器的型号选择匹配的微控制器,利用微控制器控制水质传感器采集水质的数据信息;S1. Select a sensor and a microcontroller, the sensors include a water quality sensor, a water level sensor and a flow sensor, wherein the water quality sensor selects DPS400A digital pH sensor, DLS400A digital residual chlorine sensor and DS18B20 digital temperature sensor, and the water level sensor selects the submerged liquid sensor Potentiometer and flow sensor use Hall flow sensor; select the matching microcontroller according to the model of the sensor, and use the microcontroller to control the water quality sensor to collect water quality data information;
S2.无线模块选择CZ80DTD模拟量无线传输装置;S2. Select CZ80DTD analog wireless transmission device for wireless module;
S3.选择两块12V可充电蓄电池串联作为污水监测系统的电力供应单元;S3. Select two 12V rechargeable batteries in series as the power supply unit of the sewage monitoring system;
S4.电压管理模块采用LM2576芯片将24V电压降至12V,采用LM2940芯片将12V电压降至5V,通过AMS11173.3芯片将5V电压降至3.3V,保证稳定输出系统各部分电路所需电压;S4. The voltage management module uses the LM2576 chip to reduce the 24V voltage to 12V, uses the LM2940 chip to reduce the 12V voltage to 5V, and uses the AMS11173.3 chip to reduce the 5V voltage to 3.3V to ensure stable output of the voltage required by each part of the system;
一种基于FCM和BP算法的污水监测系统,所述污水监测系统包括数据采集模块、水质监测管理平台和PC控制端:A sewage monitoring system based on FCM and BP algorithm, the sewage monitoring system includes a data acquisition module, a water quality monitoring management platform and a PC control terminal:
所述数据采集模块包括水质传感器、微控制器和无线传输单元,微控制器控制水质传感器采集水质的数据信息,并通过无线传输单元传输给水质监测管理平台;The data acquisition module includes a water quality sensor, a microcontroller and a wireless transmission unit, and the microcontroller controls the water quality sensor to collect water quality data information, and transmits it to the water quality monitoring and management platform through the wireless transmission unit;
所述水质监测管理平台包括废水资源管理模块、数据编辑模块、数据查询模块、染源解析模块、用户管理模块和若干通信协议模块,染源解析模块的控制输入端接收数据采集模块的数据信息,并分配到污染源解析模块进行分析处理,得到处理结果后通过通信协议模块送到数据编辑模块,数据编辑模块对数据处理后,形成数据包,再通过通信协议模块送到数据查询模块的数据库中进行储存和查询;The water quality monitoring and management platform includes a wastewater resource management module, a data editing module, a data query module, a dye source analysis module, a user management module and several communication protocol modules, and the control input end of the dye source analysis module receives the data information of the data acquisition module, It is assigned to the pollution source analysis module for analysis and processing, and the processing results are sent to the data editing module through the communication protocol module. After the data editing module processes the data, a data packet is formed, and then sent to the database of the data query module through the communication protocol module. storage and query;
所述PC控制端内置上位机软件,通过4G移动通信网络与水质监测管理平台和数据采集模块连接,污染源解析模块解析得到的水污染物的侵入位置、开始侵入时间和侵入速度结果进行显示,同时根据需要对通信协议模块数据库中的数据进行查询调用,还可以根据用户需要对数据采集模块发布命令,控制数据采集模块采集数据;The PC control terminal has built-in host computer software, and is connected to the water quality monitoring and management platform and the data acquisition module through the 4G mobile communication network. The pollution source analysis module analyzes the intrusion position, start time and intrusion speed of water pollutants. The results are displayed, and at the same time Query and call the data in the communication protocol module database as needed, and can also issue commands to the data acquisition module according to user needs to control the data acquisition module to collect data;
本发明的有益效果是:本发明公开了一种基于FCM和BP算法的污水监测系统及其建立方法,与现有技术相比,本发明的改进之处在于:The beneficial effects of the present invention are: the present invention discloses a sewage monitoring system based on FCM and BP algorithm and its establishment method. Compared with the prior art, the improvements of the present invention are:
(1)本发明基于FCM和BP混合算法建立了一种污水监测系统,在以往模糊聚类数据挖掘方法的基础上,提出一种水污染源物解析的方法,利用FCM和BP混合算法对采集的水污染数据进行解析,同时利用粒子群优化算法确定水污染物的侵入位置、开始侵入时间和侵入速度,设计基于利用FCM和BP混合算法运算的污染源解析模块的内置处理器,利用本方法改善了异常类值修正效果,解决了传统BP神经网络算法容易出现局部极小点、收敛速度慢且样本依赖性强的问题;(1) The present invention establishes a sewage monitoring system based on the FCM and BP hybrid algorithm. On the basis of the previous fuzzy clustering data mining method, a method for analyzing water pollution sources is proposed. The water pollution data is analyzed, and the particle swarm optimization algorithm is used to determine the intrusion position, start time and intrusion speed of water pollutants. The correction effect of abnormal class value solves the problems that the traditional BP neural network algorithm is prone to local minimum points, slow convergence speed and strong sample dependence;
(2)本发明提出在线平台和移动终端显示,便于技术人员和企业领导,甚至环保监测人员的监督检查,解决了现有污水监测信息反馈慢的问题,相对于传统的污染源数据检测技术处理精度髙、速度快,为科学化、信息化的环境监管提供技术支持。(2) The present invention proposes an online platform and mobile terminal display, which is convenient for the supervision and inspection of technicians and enterprise leaders, and even environmental monitoring personnel, solves the problem of slow feedback of existing sewage monitoring information, and has higher processing accuracy than traditional pollution source data detection technology. High and fast, providing technical support for scientific and information-based environmental supervision.
附图说明Description of drawings
图1为本发明基于FCM和BP算法的污水监测系统的建立方法的流程图。FIG. 1 is a flowchart of a method for establishing a sewage monitoring system based on the FCM and BP algorithms of the present invention.
图2为本发明BP算法对异常类值进行修正的流程图;Fig. 2 is the flow chart that the BP algorithm of the present invention corrects the abnormal class value;
图3为本发明粒子群优化算法建立污染源反向追踪模型的流程图。FIG. 3 is a flow chart of establishing a pollution source reverse tracking model by the particle swarm optimization algorithm of the present invention.
图4为本发明水质监测系统硬件架构建立的流程图。FIG. 4 is a flowchart of the establishment of the hardware architecture of the water quality monitoring system of the present invention.
图5为本发明基于FCM和BP算法的污水监测系统的系统框图。FIG. 5 is a system block diagram of the sewage monitoring system based on FCM and BP algorithm of the present invention.
具体实施方式Detailed ways
为了使本领域的普通技术人员能更好的理解本发明的技术方案,下面结合附图和实施例对本发明的技术方案做进一步的描述。In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention are further described below with reference to the accompanying drawings and embodiments.
参照附图1-5所示,一种基于FCM和BP算法的污水监测系统及其建立方法,其中所述建立方法包括以下步骤:1-5, a sewage monitoring system based on FCM and BP algorithm and its establishment method, wherein the establishment method includes the following steps:
步骤一:利利用FCM和BP混合算法对采集的水污染数据进行解析,同时利用粒子群优化算法确定水污染物的侵入位置、开始侵入时间和侵入速度,设计基于FCM和BP混合算法运算的污染源解析模块的内置处理器,并利用MATLAB编程工具进行编程;Step 1: Use the FCM and BP hybrid algorithm to analyze the collected water pollution data, and use the particle swarm optimization algorithm to determine the intrusion position, start time and intrusion speed of water pollutants, and design the pollution source based on the FCM and BP hybrid algorithm. The built-in processor of the parsing module is programmed using the MATLAB programming tool;
步骤二:在设计出基于FCM和BP混合算法运算的污染源解析模块的内置处理器后,利用面向对象的设计思想、基于C/S结构系统及MVC模式H层框架构建水质监测管理平台;Step 2: After designing the built-in processor of the pollution source analysis module based on the FCM and BP hybrid algorithm operation, use the object-oriented design idea, based on the C/S structure system and the MVC mode H-layer framework to build a water quality monitoring and management platform;
步骤三:在水质监测管理平台的基础上,采用纳氏试剂分光光度法检测水质参数,并结合PLC、组态软件、4G移动通信技术搭建基于物联网的水质监测系统硬件架构;Step 3: On the basis of the water quality monitoring and management platform, use Nessler's reagent spectrophotometry to detect water quality parameters, and combine PLC, configuration software, and 4G mobile communication technology to build the hardware architecture of the Internet of Things-based water quality monitoring system;
步骤四:在基于物联网的水质监测系统硬件架构的基础上,利用基于水质传感器、微控制器和无线模块的设计思路及实现方法,以及各部分之间的通信协议建立可以实现污水监测物联网系统信息采集与传递功能的基于物联网的污水监测系统。Step 4: On the basis of the hardware architecture of the water quality monitoring system based on the Internet of Things, using the design ideas and implementation methods based on water quality sensors, microcontrollers and wireless modules, as well as the establishment of communication protocols between various parts, the Internet of Things for sewage monitoring can be realized. IoT-based sewage monitoring system with system information collection and transmission functions.
优选的,步骤一所述的利用FCM和BP混合算法对采集的水污染数据进行解析的具体过程包括:Preferably, the specific process of analyzing the collected water pollution data using the FCM and BP hybrid algorithm described in step 1 includes:
S1.利用FCM(模糊聚类)算法对污染源监测数据进行解析:即利用隶属度确定数据点之间相关特性对数据划分聚类,其具体过程包括:S1. Use the FCM (fuzzy clustering) algorithm to analyze the pollution source monitoring data: that is, use the membership degree to determine the correlation characteristics between the data points to divide and cluster the data. The specific process includes:
(1)原始数据预处理:数据预处理包括对监测到的水污染的原始数据进行插补缺失数据、清除噪声数据、按月分组,分组后观察每月数据的变化范围,判断是否需要对该月进行异常检测过程;(1) Raw data preprocessing: Data preprocessing includes imputing missing data, removing noise data, grouping by month, and observing the variation range of monthly data after grouping to determine whether it is necessary to Monthly anomaly detection process;
(2)在数据预处理完成后,利用FCM算法对预处理的数据进行聚类,将需要检测的月份依次作为FCM算法的输入源进行聚类,聚类的具体过程为:(2) After the data preprocessing is completed, use the FCM algorithm to cluster the preprocessed data, and use the months to be detected as the input source of the FCM algorithm for clustering. The specific process of clustering is as follows:
a.首先设定类别个数C,2≤C≤N,N为数据样本总量,给出迭代停止阈值ε,初始化聚类的原型模式P(b),给定迭代计数器b=0;a. First set the number of categories C, 2≤C≤N, N is the total number of data samples, give the iteration stop threshold ε, initialize the prototype pattern P (b) of the cluster, and give the iteration counter b=0;
b.计算划分矩阵U(b):对于k如果则有:b. Calculate the partition matrix U (b) : for k if Then there are:
对于k如果则有:for k if Then there are:
且对j≠r, And for j≠r,
c.对于上述两种情况进行迭代,得到迭代更新后的原型矩阵Pb+1为:c. Iterate for the above two cases, and obtain the prototype matrix P b+1 after iterative update is:
d.判断并输出分割后的矩阵U与聚类原型P:若则计算结束同时输出分割后的矩阵U与聚类原型P;否则令b=b+1,转步骤b再次进行迭代;d. Judge and output the segmented matrix U and the cluster prototype P: if Then the calculation is finished and the divided matrix U and the cluster prototype P are output at the same time; otherwise, let b=b+1, and go to step b to iterate again;
其中||.||是恰当的矩阵范数;where ||.|| is the appropriate matrix norm;
(3)数据聚类完成后,分析聚类结果,根据各类数据的自身特性,将数据分为正常类值和异常类值,完成对污染源监测数据的异常检测;(3) After the data clustering is completed, analyze the clustering results, and divide the data into normal class values and abnormal class values according to the characteristics of various types of data, and complete the abnormal detection of pollution source monitoring data;
其中,在利用FCM(模糊聚类)算法对污染源监测数据进行解析过程中,所述FCM(模糊聚类)算法应用模糊隶属度的概念,对目标函数进行优化,计算各个样本数据和聚类中心的隶属度,利用隶属度判断数据属于哪一类,实现对数据的自动归类,其过程是:把聚类归结为一个带约束条件的非线性规划问题,再将其转化为优化问题利用经典数学的非线性规划方法获得最优解,最终完成对数据的模糊分割归类,具体过程是先确定目标隶属度函数,然后实现聚类过程;Among them, in the process of analyzing the pollution source monitoring data by using the FCM (fuzzy clustering) algorithm, the FCM (fuzzy clustering) algorithm applies the concept of fuzzy membership, optimizes the objective function, calculates each sample data and the cluster center The membership degree is used to determine which category the data belongs to, and the automatic classification of the data is realized. The process is: reduce the clustering to a nonlinear programming problem with constraints, and then convert it into an optimization problem using classical The mathematical nonlinear programming method obtains the optimal solution, and finally completes the fuzzy segmentation and classification of the data. The specific process is to first determine the target membership function, and then realize the clustering process;
所述隶属度函数表示被讨论的全体数据对象元素对于模糊集合的隶属程度,用u(x)表示,且其取值范围是[0,1],其中u(x)的值的大小表示元素x隶属于模糊集合s的程度的大小;假设数据集合定义X={x1,x2,...xn},将其聚为c类,聚类中心为v,则聚类的目标是使所有的数据到其所属的聚类中心的距离之和最小;根据Bezdek对Dunn方法提出的目标函数和带加权的误差平方进行推广改进的方法,得到聚类算法的基于目标隶属度函数的表达式为:The membership function represents the degree of membership of all the data object elements in question to the fuzzy set, represented by u(x), and its value range is [0, 1], where the value of u(x) represents the element The size of the degree to which x belongs to the fuzzy set s; assuming that the data set is defined as X={x 1 , x 2 ,...x n }, and it is clustered into class c, and the cluster center is v, the goal of clustering is The sum of the distances from all the data to the cluster center to which it belongs is minimized; according to the objective function proposed by Bezdek's Dunn method and the weighted error square to generalize and improve the method, the expression based on the objective membership function of the clustering algorithm is obtained. The formula is:
其中n、c分别是数据的个数和聚类中心的个数,通过以下迭代式求目标隶属度函数的最优值:where n and c are the number of data and the number of cluster centers respectively, and the optimal value of the target membership function is obtained by the following iterative formula:
其中uij为数据xj与聚类中心、vj之间的模糊隶属度,dij为数据xj与第i类的聚类中心vj之间的距离dij,表示样本点与聚类中心的相似度;where u ij is the fuzzy membership degree between the data x j and the cluster center and v j , d ij is the distance d ij between the data x j and the cluster center v j of the i-th class, representing the sample point and the cluster similarity of centers;
在目标函数表达式中,m∈[1,+∞]是模糊加权指数,也称为平滑参数,作用是调节模糊聚类的模糊程度,m越大,模糊程度越大;m越小,模糊程度越小,取值用以调节FCM划分的有效性;JFCM的值用来表示在某个差异性定义下类内的紧致性,JFCM越小,聚类越紧致;为了得到FCM聚类目标隶属度函数的最优解,利用聚类的原则,在极值的约束条件条件下,使得min{JFCM},利用拉格朗日方法能够求得该解,并进一步得到聚类中心解;In the objective function expression, m∈[1,+∞] is the fuzzy weighting index, also known as the smoothing parameter, which is used to adjust the fuzzy degree of fuzzy clustering. The smaller the degree is, the value is used to adjust the effectiveness of the FCM division; the value of J FCM is used to represent the compactness within a class under a certain difference definition, the smaller the J FCM , the more compact the clustering; in order to obtain the FCM The optimal solution of the membership function of the clustering target, using the principle of clustering, under the constraints of extreme values Under the condition of min{J FCM }, the solution can be obtained by using the Lagrangian method, and the cluster center solution can be obtained further;
因此FCM算法的聚类过程是首先取定C类,并选取C个初始聚类中心,将每一个模式归属到C类中的某个类,再不断地计算聚类中心,然后按最小距离原则并调整每一个模式的属类,直到让所有模式与其所属类的中心的距离平方和最小为止。Therefore, the clustering process of the FCM algorithm is to first select the C class, select C initial cluster centers, assign each pattern to a certain class in the C class, and then continuously calculate the cluster centers, and then follow the minimum distance principle. And adjust the class of each pattern until the sum of the squares of the distances between all patterns and the center of the class to which they belong is the smallest.
S2.利用BP(神经网络)算法对S1划分的数据聚类(污染源数据)中的异常类值进行修正,得到处理后的数据样本,其具体过程包括:S2. Use the BP (neural network) algorithm to correct the abnormal class values in the data clustering (pollution source data) divided by S1, and obtain the processed data samples. The specific process includes:
(1)找出步骤一检测出的数据中的异常类值,并将异常类值之前的数据序列作为BP神经网络的输入样本;(1) Find out the abnormal class value in the data detected in step 1, and use the data sequence before the abnormal class value as the input sample of the BP neural network;
(2)然后将异常类值之前的数据序列代入BP神经网络算法,利用BP神经网络算法的非线性拟合能为,对异常类值位置进行数据预测;(2) Then the data sequence before the abnormal class value is substituted into the BP neural network algorithm, and the nonlinear fitting energy of the BP neural network algorithm is used to predict the data of the abnormal class value position;
(3)通过BP神经网络算法预测到的数据来代替原本数据中的的异常类值,即完成异常值的修正;(3) The abnormal value in the original data is replaced by the data predicted by the BP neural network algorithm, that is, the correction of the abnormal value is completed;
(4)当数据集中出现多个异常类值数据时,利用BP神经网络算法进行逐个修正,即在对第一个异常值修正完成后,替换出原数据序列中的异常值,用新的数据序列作为BP神经网络算法对下一个异常值预测时的输入样本去修正第二个异常数据;(4) When there are multiple abnormal data in the data set, use the BP neural network algorithm to correct one by one, that is, after the correction of the first abnormal value is completed, replace the abnormal value in the original data sequence, and use the new data The sequence is used as the input sample for the BP neural network algorithm to predict the next abnormal value to correct the second abnormal data;
其中,在利用BP神经网络算法数据聚类中的异常类值进行修正的过程中,所述基于BP神经网络算法的异常类值修正算法是利用BP神经网络的强大的非线性拟合能力,通过对网络的训练,实现对异常数据的修正;异常类值修正的具体流程就是在检测出异常数据后,将异常类值之前的数据序列作为BP神经网络的输入样本,利用BP神经网络算法的非线性拟合能为,对异常类值位置进行数据预测,通过预测到的数据来代替原本的异常类值,完成异常类值的修正;并且,在环境污染源监测数据中不仅会出现单个异常数据,还会出现多个异常数据,基于BP神经网络算法对异常数据进行修正,可以实现对多个异常数据的修正:即在对第一个异常类值修正完成后,替换出原数据序列中的异常类值,用新的数据序列作为BP神经网络算法对下一个异常类值预测时的输入样本去修正第二个异常数据;按此方法依次完成对监测数据的异常类值的修正,其具体修正流程如图2所示。Wherein, in the process of correcting the abnormal class values in the data clustering of the BP neural network algorithm, the abnormal class value correction algorithm based on the BP neural network algorithm utilizes the powerful nonlinear fitting ability of the BP neural network, through The training of the network realizes the correction of abnormal data; the specific process of abnormal class value correction is to use the data sequence before the abnormal class value as the input sample of the BP neural network after detecting the abnormal data, and use the BP neural network algorithm. The linear fitting can be used to predict the position of the abnormal class value, and replace the original abnormal class value with the predicted data to complete the correction of the abnormal class value; and, not only a single abnormal data will appear in the monitoring data of environmental pollution sources, There will also be multiple abnormal data. Correcting the abnormal data based on the BP neural network algorithm can realize the correction of multiple abnormal data: that is, after the correction of the first abnormal class value is completed, the abnormal data in the original data sequence is replaced. Class value, use the new data sequence as the input sample for the BP neural network algorithm to predict the next abnormal class value to correct the second abnormal data; according to this method, the correction of the abnormal class value of the monitoring data is completed in turn, and the specific correction The process is shown in Figure 2.
S3.将S2处理后的数据作为监测数据,并将其代入粒子群优化算法中,利用粒子群优化算法建立污染源反向追踪模型,将模拟优化时段内各监测点的实际监测值与模拟值的差的平方和作为模型目标函数,然后采用粒子群优化算法为优化求解工具,快速确定污染源位置及影响范围,设计基于利用FCM和BP混合算法运算的污染源解析模块内置处理器,所述的模型目标函数为:S3. Take the data processed by S2 as monitoring data, and substitute it into the particle swarm optimization algorithm, use the particle swarm optimization algorithm to establish a reverse tracking model of pollution sources, and compare the actual monitoring value and the simulated value of each monitoring point during the simulation optimization period. The sum of the squares of the differences is used as the objective function of the model, and then the particle swarm optimization algorithm is used as the optimization solution tool to quickly determine the location of pollution sources and the scope of influence. The function is:
其中X是污染源最优解,yi(t)是水质监测点i在t时刻的污染物模拟浓度;y′i(t)是水质监测点i在t时刻的污染物实测浓度;m是水质监测点个数;t是模拟历时;where X is the optimal solution of the pollution source, y i (t) is the simulated concentration of pollutants at the water quality monitoring point i at time t; y′ i (t) is the measured concentration of pollutants at the water quality monitoring point i at time t; m is the water quality The number of monitoring points; t is the simulation duration;
优选的,利用粒子群优化算法建立污染源反向追踪模型的具体过程包括:Preferably, the specific process of using the particle swarm optimization algorithm to establish the reverse tracking model of the pollution source includes:
(1)首先利用粒子群优化算法计算水利信息、管网属性和经步骤二修正后的监测数据之间的关系,分析管网中污染物浓度随时间、空间的变化的规律,设计模型参数,建立水力水质模型,并确保模型能较好地吻合管网中实际水力水质情况,所述利用粒子群优化算法分析管网中污染物浓度随时间、空间的变化的具体过程为:(1) First, use the particle swarm optimization algorithm to calculate the relationship between water conservancy information, pipe network attributes and the monitoring data corrected in step 2, analyze the change law of pollutant concentration in the pipe network with time and space, and design model parameters. Establish a hydraulic water quality model and ensure that the model can better match the actual hydraulic water quality in the pipeline network. The specific process of using the particle swarm optimization algorithm to analyze the changes of pollutant concentration in the pipeline network with time and space is as follows:
a.首先在污染源可行解空间中初始化一群粒子,每个粒子的特征用位置、速度和适应度值三项指标表示,其中粒子位置代表一个污染源的潜在解信息,粒子速度表示个体位置的变化幅度,适应度值的好坏表示粒子位置所代表污染源潜在解的优劣,以模型目标函数式作为适应度函数;a. First, initialize a group of particles in the feasible solution space of the pollution source. The characteristics of each particle are represented by three indicators: position, velocity and fitness value. The particle position represents the potential solution information of a pollution source, and the particle velocity represents the variation range of the individual position. , the fitness value indicates the quality of the potential solution of the pollution source represented by the particle position, and the model objective function is used as the fitness function;
b.粒子在解空间中运动时,通过跟踪单个粒子潜在污染源历史最优解位置和群体中潜在污染源历史最优解位置更新个体位置,粒子每更新一次位置,表示污染源潜在解进行一次更新,通过粒子此时的适应度值与个体先前最优适应度值、群体最优适应度值的大小比较,更新粒子潜在污染源最优解位置和群体潜在污染源最优解位置,反复迭代计算,搜索污染源最优解:b. When the particle moves in the solution space, the individual position is updated by tracking the historical optimal solution position of the potential pollution source of a single particle and the historical optimal solution position of the potential pollution source in the group. Each time the particle updates its position, it means that the potential solution of the pollution source is updated once. The fitness value of the particle at this time is compared with the previous optimal fitness value of the individual and the optimal fitness value of the group, and the optimal solution position of the particle's potential pollution source and the optimal solution position of the group's potential pollution source are updated. Optimal solution:
首先定义X=(X1,X2,...,Xn)T First define X=(X 1 ,X 2 ,...,X n ) T
Xi=(xi1,xi2,...,xi(3m-2),xi(3m-1),xi(3m))T X i =(x i1 ,x i2 ,...,x i(3m-2) ,x i(3m-1) ,x i(3m) ) T
V=(V1,V2,...,Vn)T V=(V 1 ,V 2 ,...,V n ) T
vi=(vi1,vi2,...,vi(3m-2),vi(3m-1),vi(3m))T v i =(v i1 ,v i2 ,...,v i(3m-2) ,v i(3m-1) ,v i(3m) ) T
其中:X是种群中n个粒子位置组成的矩阵,表示含有n个污染源潜在解的矩阵;Xi为第i个粒子的位置,即污染源的一个潜在解,其中xi1代表污染源的节点编号,xi2代表污染物的开始侵入时间,xi3代表污染物的侵入速度;xi(3m-2),xi(3m-1),xi(3m)则表示管网中有多个污染源时第m个污染源的信息;V是种群中n个粒子速度组成的矩阵;vi是第i个粒子的速度;其中,vi1代表污染源节点编号变化速度,vi2代表污染物开始侵入时间变化速度,vi3代表污染物侵入速度的变化速度;vi(3m-2),vi(3m-1),vi(3m)则表示管网中有多个污染源时第m个污染源的信息变化速度;Among them: X is a matrix composed of n particle positions in the population, representing a matrix containing n potential solutions of pollution sources; X i is the position of the ith particle, that is, a potential solution of the pollution source, where x i1 represents the node number of the pollution source, xi2 represents the start time of pollutants intrusion , xi3 represents the intrusion speed of pollutants; The information of the mth pollution source; V is the matrix composed of the velocity of n particles in the population; vi is the velocity of the ith particle; among them, v i1 represents the change speed of the node number of the pollution source, and v i2 represents the change speed of the time when the pollutant starts to invade , v i3 represents the change rate of the intrusion rate of pollutants; v i(3m-2) , v i(3m-1) , v i(3m) represent the information change of the mth pollution source when there are multiple pollution sources in the pipe network speed;
(2)根据水力水质模型构建管网中污染源的模拟,建立污染源反向追踪模型,污染源反向追踪模型以模拟优化时段内各水质监测点的模拟污染物浓度与实际浓度的差的平方和作为模型目标函数,内嵌EPANET工具箱作为模拟引擎,利用粒子群优化算法求解污染物的侵入位置、开始侵入时间和侵入速度,所述的利用群优化算法求解污染物的侵入位置、开始侵入时间和侵入速度的具体过程包括:(2) According to the hydraulic water quality model, the simulation of the pollution sources in the pipeline network is constructed, and the pollution source reverse tracking model is established. The objective function of the model, the embedded EPANET toolbox is used as a simulation engine, and the particle swarm optimization algorithm is used to solve the intrusion position, intrusion start time and intrusion speed of pollutants. The specific process of intrusion speed includes:
a.设置算法参数a. Set the algorithm parameters
为防止粒子的盲目搜索,将污染源潜在解Xi和粒子速度vi限制在一定空间,即[Xmin,Xmax],[vmin,vmax];设定迭代次数上限N和预设精度ε,迭代次数达到上限q或适应度值f(x)<ε时,优化计算结束;In order to prevent the blind search of particles, the potential solution X i of the pollution source and the particle velocity v i are limited to a certain space, namely [X min , X max ], [v min , v max ]; set the upper limit of the number of iterations N and the preset precision ε, when the number of iterations reaches the upper limit q or the fitness value f(x)<ε, the optimization calculation ends;
b.粒子种群的初始化与初始极值b. Initialization and initial extreme value of particle population
随机产生含有多个污染源潜在解信息的粒子种群矩阵X和速度矩阵V,以模型目标函数式作为适应度函数,计算每个初始粒子的适应度值;根据适应度值寻找每个粒子的污染源潜在最优解Pi和群体中所有粒子的最优解Pg;Randomly generate the particle population matrix X and velocity matrix V containing the potential solution information of multiple pollution sources, and use the model objective function as the fitness function to calculate the fitness value of each initial particle; find the potential pollution source of each particle according to the fitness value. the optimal solution P i and the optimal solution P g of all particles in the population;
c.迭代寻优c. Iterative optimization
粒子通过个体极值位置(个体污染源最优解)Pi和群体极值位置(群体污染源最优解)Pg,更新自身的速度和位置,第i个粒子在第k+1次迭代时的速度和位置如下:The particle updates its own speed and position through the individual extreme value position (the optimal solution of individual pollution sources) P i and the group extreme value position (the optimal solution of the group pollution source) P g . speed and location as follows:
式中,ω是惯性权重,惯性权重,体现粒子继承先前速度的能力;c1,c2是加速度因子,为非负常数;r1,r2是分布于[0,1]区间的随机数;更新粒子潜在污染源最优解、群体潜在污染源最优解和相应适应度值;反复迭代,直到迭代次数达到上限或适应度值达到预设精度,迭代结束并输出群体中潜在污染源的最优解(其具体流程如图3所示)。In the formula, ω is the inertia weight, which reflects the ability of the particle to inherit the previous speed; c 1 , c 2 are the acceleration factors, which are non-negative constants; r 1 , r 2 are random numbers distributed in the [0,1] interval ; Update the optimal solution of particle potential pollution sources, the optimal solution of group potential pollution sources and the corresponding fitness value; iterate repeatedly until the number of iterations reaches the upper limit or the fitness value reaches the preset accuracy, the iteration ends and the optimal solution of the potential pollution sources in the group is output (The specific process is shown in Figure 3).
步骤二所述的构建水质监测管理平台的具体过程为:The specific process of constructing the water quality monitoring and management platform described in step 2 is as follows:
S1.利用面向对象的方法分别建立用户管理模块、数据采集模块、数据查询模块等功能单元,然后利用系统开发的面向对象技术分别建立模型层、视图层和控制层,形成水质监测管理平台的软件控制部分;其中模型层使用JavaBean技术实现、视图层使用JSP技术实现、控制层使用Servlet技术实现;S1. Use the object-oriented method to establish user management module, data acquisition module, data query module and other functional units respectively, and then use the object-oriented technology developed by the system to establish the model layer, view layer and control layer respectively, forming the software of the water quality monitoring management platform The control part; the model layer is realized by JavaBean technology, the view layer is realized by JSP technology, and the control layer is realized by Servlet technology;
S2.基于WEB的B/S结构将搭建的水质监测管理平台的软件控制部分与Web服务器联通,使水质监测管理平台的管理数据通过Web服务器上传到网络控制端;其中所述B/S架构(browser/server),即浏览器/服务器结构1气客户端只需采用浏览器,向Web服务器发送请求,由Web服务器进行处理,并将处理结果返回至客户端;S2. WEB-based B/S structure will connect the software control part of the built water quality monitoring and management platform with the Web server, so that the management data of the water quality monitoring and management platform is uploaded to the network control terminal through the Web server; wherein the B/S structure ( browser/server), that is, the browser/server structure 1. The client only needs to use the browser to send a request to the Web server, which will be processed by the Web server, and the processing result will be returned to the client;
S3.利用基于MVC模式H层框架的设计技术设计水质监测管理平台的模型层、视图层和控制层,得到可以随时间在线实时监测水质的水质监测管理平台。S3. Design the model layer, view layer and control layer of the water quality monitoring management platform using the design technology based on the MVC model H layer framework, and obtain a water quality monitoring management platform that can monitor water quality online and in real time over time.
其中:所述MVC(model view controller)程序设计理念H层框架技术,将软件分成3层结构,分别是模型层、视图层和控制层;Among them: the MVC (model view controller) programming concept H-layer framework technology divides the software into 3-layer structure, namely model layer, view layer and control layer;
(1)模型层:模型层主要处理真正的业务操作,对来自控制层的请求进行相应的处理,并读取数据库数据,完成业务操作;(1) Model layer: The model layer mainly deals with real business operations, handles requests from the control layer accordingly, reads database data, and completes business operations;
(2)视图层:视图层是用户与系统交互的页面,对用户呈现出视图,但不包含业务逻辑,对用户的请求进行处理,传谨用户填写的表单信息,通过控制层调用对应的业务,并将结果展现给用户;(2) View layer: The view layer is the page where the user interacts with the system. It presents a view to the user, but does not contain business logic. It processes the user's request, transmits the form information filled in by the user, and invokes the corresponding business through the control layer. , and display the results to the user;
(3)控制层:控制层控制整个业务的流程,使视图层和模型层的共同工作,处理用户请求,调用模型层的业务還辑方法,通过视图层显示结果。(3) Control layer: The control layer controls the entire business process, makes the view layer and the model layer work together, handles user requests, calls the business return method of the model layer, and displays the results through the view layer.
步骤三所述的基于物联网的水质监测系统硬件架构的建立过程包括:The process of establishing the hardware architecture of the Internet of Things-based water quality monitoring system described in step 3 includes:
S1.根据纳氏试剂分光光度法检测水质参数的原理设计水质传感器的参数,保证水质传感器能够快速、准确的检测到水质信息;S1. Design the parameters of the water quality sensor according to the principle of detecting water quality parameters by Nessler reagent spectrophotometry to ensure that the water quality sensor can detect water quality information quickly and accurately;
S2.选择西门子PLC作为控制器的控制部分,减小检测设备体积;S2. Select Siemens PLC as the control part of the controller to reduce the size of the testing equipment;
S3.选择4G无线网关作为数据传输模块,缩短信息传输周期,进而缩短检测周期;S3. Select the 4G wireless gateway as the data transmission module to shorten the information transmission cycle, thereby shortening the detection cycle;
S4.建立信息服务端,实现数据的远程传送。S4. Establish an information server to realize remote transmission of data.
其中,所述基于物联网的水质监测系统硬件架构的建立过程即物联网的水质监测系统的搭建过程,所述物联网的水质监测系统包括移动终端、服务器、无线网关、控制器和水质传感器;本基于物联网的水质监测系统硬件架构的总体结构设计流程如图4所示,水质传感器检测到水质信息后发送给控制器,控制器通过通信方式接入无线网关,进而将水质信息上传到服务器存储到数据库中,显示终端通过互联网访问服务器,然后获取数据库中的水质和水量参数信息,再依据城市污水再生利用标准对所测水质做出是否符合标准的判断,最后将具体参数信息及判断结果显示在终端上,从而实现水质的远程监测;Wherein, the establishment process of the hardware architecture of the water quality monitoring system based on the Internet of Things is the construction process of the water quality monitoring system of the Internet of Things, and the water quality monitoring system of the Internet of Things includes a mobile terminal, a server, a wireless gateway, a controller and a water quality sensor; The overall structure design process of the hardware architecture of the water quality monitoring system based on the Internet of Things is shown in Figure 4. After the water quality sensor detects the water quality information, it sends it to the controller. The controller connects to the wireless gateway through communication, and then uploads the water quality information to the server. Stored in the database, the display terminal accesses the server through the Internet, and then obtains the water quality and water quantity parameter information in the database, and then judges whether the measured water quality meets the standard according to the urban sewage recycling standard, and finally the specific parameter information and judgment results. Display on the terminal, so as to realize remote monitoring of water quality;
步骤三所建立的基于物联网的水质监测系统硬件架构包括:The hardware architecture of the IoT-based water quality monitoring system established in step 3 includes:
(1)传感层:由控制模块、蠕动泵、多通电磁阀、流量计、检测装置和步进电机构成,步进电机控制蠕动泵抽取和排出液体,控制器将传感层传感器釆集到的水质参数发送给主控制器,主控制器根据水质参数和检测池的水位信息操纵执行层的水泵和电磁阀实现进、出水自动控制;同时,主控制器将水质参数和流量传感器采集的二次利用水量实时上传到服务器,其作用是配合水质检测装置抽取检测样品和测试剂,以及排出检测后的废液;(1) Sensing layer: It consists of a control module, a peristaltic pump, a multi-way solenoid valve, a flow meter, a detection device and a stepping motor. The stepping motor controls the peristaltic pump to pump and discharge liquid, and the controller collects the sensors of the sensing layer. The received water quality parameters are sent to the main controller, and the main controller operates the water pump and solenoid valve of the execution layer to realize automatic control of water inlet and outlet according to the water quality parameters and the water level information of the detection pool; The secondary utilization water is uploaded to the server in real time, and its function is to cooperate with the water quality testing device to extract testing samples and testing agents, and to discharge the waste liquid after testing;
(2)传输层使用移动通信网络连接,由WIFI和4G网络及DTU传输模块构成,该层主控制器通过连接WIFI无线模块将传感层采集到的水质和水量信息上传到服务器存储在数据库中,显示终端再通过互联网访问服务器上的数据,将实时水质参数进行显示;(2) The transmission layer is connected by a mobile communication network and is composed of WIFI and 4G networks and DTU transmission modules. The main controller of this layer uploads the water quality and water quantity information collected by the sensing layer to the server and stores it in the database by connecting the WIFI wireless module. , the display terminal then accesses the data on the server through the Internet, and displays the real-time water quality parameters;
(3)应用层由数据中心、远程监控中心构成,该部分采用Internet网络实现,应用层将数据中心、远程监控中心反馈的实时数据通过基于FCM和BP算法的水质监控平台实现水质实时监控,并通过粒子群算法实现水质污染时污染源反向追踪,结构通过显示终端反馈;(3) The application layer is composed of the data center and the remote monitoring center, which is realized by the Internet network. The application layer realizes the real-time monitoring of water quality through the water quality monitoring platform based on the FCM and BP algorithm through the real-time data fed back by the data center and the remote monitoring center. The particle swarm algorithm is used to realize the reverse tracking of the pollution source when the water is polluted, and the structure is fed back through the display terminal;
所述基于物联网的水质监测系统硬件架构的工作原理为:当水质传感器检测到水质信息后发送给控制器,控制器通过通信方式接入无线网关,进而将水质信息上传到服务器存储到数据库中,显示终端通过互联网访问服务器,然后获取数据库中的水质和水量参数信息,再依据城市污水再生利用标准对所测水质做出是否符合标准的判断,最后将具体参数信息及判断结果显示在终端上,从而实现水质的远程监测。The working principle of the hardware architecture of the water quality monitoring system based on the Internet of Things is: when the water quality sensor detects the water quality information and sends it to the controller, the controller connects to the wireless gateway through communication, and then uploads the water quality information to the server and stores it in the database. , the display terminal accesses the server through the Internet, then obtains the water quality and water quantity parameter information in the database, and then judges whether the measured water quality meets the standard according to the urban sewage recycling standard, and finally displays the specific parameter information and judgment results on the terminal. , so as to realize remote monitoring of water quality.
步骤四所述基于物联网的污水监测系统的建立过程包括:The establishment process of the IoT-based sewage monitoring system described in step 4 includes:
S1.选择传感器和微控制器,所述传感器包括水质传感器、水位传感器和流量传感器,其中水质传感器选用DPS400A数字型PH传感器、DLS400A数字型余氯传感器和DS18B20数字温度传感器,水位传感器选用投入式液位计,流量传感器选用霍尔流量传感器;根据传感器的型号选择匹配的微控制器,利用微控制器控制水质传感器采集水质的数据信息;S1. Select a sensor and a microcontroller, the sensors include a water quality sensor, a water level sensor and a flow sensor, wherein the water quality sensor selects DPS400A digital pH sensor, DLS400A digital residual chlorine sensor and DS18B20 digital temperature sensor, and the water level sensor selects the submerged liquid sensor Potentiometer and flow sensor use Hall flow sensor; select the matching microcontroller according to the model of the sensor, and use the microcontroller to control the water quality sensor to collect water quality data information;
S2.无线模块选择CZ80DTD模拟量无线传输装置;S2. Select CZ80DTD analog wireless transmission device for wireless module;
S3.选择两块12V可充电蓄电池串联作为污水监测系统的电力供应单元;S3. Select two 12V rechargeable batteries in series as the power supply unit of the sewage monitoring system;
S4.电压管理模块采用LM2576芯片将24V电压降至12V,采用LM2940芯片将12V电压降至5V,通过AMS11173.3芯片将5V电压降至3.3V,保证稳定输出系统各部分电路所需电压;S4. The voltage management module uses the LM2576 chip to reduce the 24V voltage to 12V, uses the LM2940 chip to reduce the 12V voltage to 5V, and uses the AMS11173.3 chip to reduce the 5V voltage to 3.3V to ensure stable output of the voltage required by each part of the system;
其中:DPS-600A数字型PH传感器,工作电压DC24V,PH理论测量范围为0-14,对应模拟电压输出为0-5V;DLS>600A数字型余氯传感器,工作电压DC24V,理论测量范围为0-20.00mg/L,对应模拟电压输出为0-5V;DS18B20数字温度传感器探头为不锈钢防水封装,工作电压为DC5V,采用单总线的接口方式与从控制器连接,仅需要一条线即可实现从控制器与DS18B20的双向通信;所述投入式液位计的工作电压DC24V,测量范围为0-50m,对应模拟电压输出为0-5V;所述霍尔流量传感器的工作电压为DC5,输出形式是高电平为4.8V的脉冲信号;Among them: DPS-600A digital PH sensor, working voltage DC24V, PH theoretical measurement range is 0-14, corresponding analog voltage output is 0-5V; DLS>600A digital residual chlorine sensor, working voltage DC24V, theoretical measurement range is 0 -20.00mg/L, the corresponding analog voltage output is 0-5V; the DS18B20 digital temperature sensor probe is a stainless steel waterproof package, the working voltage is DC5V, and the single bus interface is used to connect with the slave controller, only one line is needed to realize the slave controller. Two-way communication between the controller and DS18B20; the working voltage of the submersible level gauge is DC24V, the measurement range is 0-50m, and the corresponding analog voltage output is 0-5V; the working voltage of the Hall flow sensor is DC5, and the output form It is a pulse signal with a high level of 4.8V;
所述基于物联网的污水监测系统的工作原理为:应用层硬件电路依据主控制器传达的命令操纵水泵和电磁阀完成进、出水自动控制,主控制器通过连接WIFI无线模块将水质和水量信息上传到服务器;由于水泵和电磁阀均为DC24V驱动,设计了由ULN2003和PC817组成的24V驱动电路。主控制器相应I/O口产生低电平信号,使PC817光耦电路导通,经过高耐压ULN2003反相器取反后,由OUT4输出使5V继电器吸合,最后达到驱动24V水栗和电磁阀的目的;水位传感器检测到检测池中水位达到低水位时,驱动进水泵将处理过的水打入检测池中,水位达到高水位时,停止进水。此时开始参数上传和水质达标判断,若检测到水质不符合标准,则打开电磁阀将水排人下水道;反之,则驱动出水栗将水排出进行二次利用。当水位再次达到低水位时,开始下一轮抽水,从而实现进、出水自动控制。The working principle of the sewage monitoring system based on the Internet of Things is as follows: the hardware circuit of the application layer controls the water pump and the solenoid valve according to the command transmitted by the main controller to complete the automatic control of water inlet and outlet, and the main controller connects the WIFI wireless module to the water quality and water quantity information. Upload to the server; since the water pump and solenoid valve are both driven by DC24V, a 24V drive circuit composed of ULN2003 and PC817 is designed. The corresponding I/O port of the main controller generates a low-level signal, which makes the PC817 optocoupler circuit conductive. After the high-voltage ULN2003 inverter is reversed, the 5V relay is output by OUT4 to pull in, and finally drives the 24V water pump and The purpose of the solenoid valve; when the water level sensor detects that the water level in the detection tank reaches a low water level, it drives the water inlet pump to drive the treated water into the detection tank, and when the water level reaches a high water level, the water inlet is stopped. At this time, parameter uploading and water quality compliance judgment are started. If it is detected that the water quality does not meet the standard, the solenoid valve will be opened to discharge the water into the sewer; otherwise, the water pump will be driven to discharge the water for secondary use. When the water level reaches the low water level again, the next round of pumping starts, so as to realize the automatic control of water inlet and outlet.
利用上述建立方法建立了一种基于FCM和BP算法的污水监测系统(如图5所示),所述污水监测系统包括数据采集模块、水质监测管理平台和PC控制端:A sewage monitoring system based on FCM and BP algorithm is established by the above-mentioned establishment method (as shown in Figure 5). The sewage monitoring system includes a data acquisition module, a water quality monitoring management platform and a PC control terminal:
所述数据采集模块包括水质传感器、微控制器和无线传输单元,微控制器控制水质传感器采集水质的数据信息,并通过无线传输单元传输给水质监测管理平台;The data acquisition module includes a water quality sensor, a microcontroller and a wireless transmission unit, and the microcontroller controls the water quality sensor to collect water quality data information, and transmits it to the water quality monitoring and management platform through the wireless transmission unit;
所述水质监测管理平台包括废水资源管理模块、数据编辑模块、数据查询模块、染源解析模块、用户管理模块和若干通信协议模块,染源解析模块的控制输入端接收数据采集模块的数据信息,并分配到污染源解析模块进行分析处理,得到处理结果后通过通信协议模块送到数据编辑模块,数据编辑模块对数据处理后,形成数据包,再通过通信协议模块送到数据查询模块的数据库中进行储存和查询;The water quality monitoring and management platform includes a wastewater resource management module, a data editing module, a data query module, a dye source analysis module, a user management module and several communication protocol modules, and the control input end of the dye source analysis module receives the data information of the data acquisition module, It is assigned to the pollution source analysis module for analysis and processing, and the processing results are sent to the data editing module through the communication protocol module. After the data editing module processes the data, a data packet is formed, and then sent to the database of the data query module through the communication protocol module. storage and query;
所述PC控制端内置上位机软件,通过4G移动通信网络与水质监测管理平台和数据采集模块连接,污染源解析模块解析得到的水污染物的侵入位置、开始侵入时间和侵入速度结果进行显示,同时根据需要对通信协议模块数据库中的数据进行查询调用,还可以根据用户需要对数据采集模块发布命令,控制数据采集模块采集数据。The PC control terminal has built-in host computer software, and is connected to the water quality monitoring and management platform and the data acquisition module through the 4G mobile communication network. The pollution source analysis module analyzes the intrusion position, start time and intrusion speed of water pollutants. The results are displayed, and at the same time The data in the communication protocol module database can be queried and called as needed, and commands can also be issued to the data acquisition module according to user needs to control the data acquisition module to collect data.
以上显示和描述了本发明的基本原理、主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。The foregoing has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above-mentioned embodiments, and the descriptions in the above-mentioned embodiments and the description are only to illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have Various changes and modifications fall within the scope of the claimed invention. The claimed scope of the present invention is defined by the appended claims and their equivalents.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010196075.7A CN111414694A (en) | 2020-03-19 | 2020-03-19 | A sewage monitoring system based on FCM and BP algorithm and its establishment method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010196075.7A CN111414694A (en) | 2020-03-19 | 2020-03-19 | A sewage monitoring system based on FCM and BP algorithm and its establishment method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111414694A true CN111414694A (en) | 2020-07-14 |
Family
ID=71493102
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010196075.7A Pending CN111414694A (en) | 2020-03-19 | 2020-03-19 | A sewage monitoring system based on FCM and BP algorithm and its establishment method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111414694A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111881596A (en) * | 2020-08-06 | 2020-11-03 | 重庆交通大学 | A Reverse Time Tracking Simulation Method of Oil Spill Pollution Source Based on Lagrangian Interpolation |
CN112101796A (en) * | 2020-09-16 | 2020-12-18 | 清华大学合肥公共安全研究院 | Water environment pollution risk comprehensive perception and recognition system |
CN112505254A (en) * | 2020-12-03 | 2021-03-16 | 中科三清科技有限公司 | Method and device for analyzing atmospheric pollution source, storage medium and terminal |
CN112939246A (en) * | 2021-04-22 | 2021-06-11 | 广西科技大学 | Hospital sewage online treatment platform based on Internet of things |
CN113015120A (en) * | 2021-01-28 | 2021-06-22 | 深圳市协润科技有限公司 | Pollution treatment monitoring system and method based on neural network |
CN113139584A (en) * | 2021-03-29 | 2021-07-20 | 长江水利委员会长江科学院 | Sensor optimal arrangement method for water supply pipe network pollutant invasion point identification |
CN113282065A (en) * | 2021-05-18 | 2021-08-20 | 西安热工研究院有限公司 | Clustering extreme value real-time calculation method based on graph configuration |
CN113746822A (en) * | 2021-08-25 | 2021-12-03 | 安徽创变信息科技有限公司 | Teleconference management method and system |
CN114280262A (en) * | 2021-12-29 | 2022-04-05 | 北京建工环境修复股份有限公司 | Permeable reactive grid monitoring method, device and system and computer equipment |
CN114841469A (en) * | 2022-06-14 | 2022-08-02 | 中国水利水电科学研究院 | Water quality change trend prediction system and method based on source flow model |
CN116881749A (en) * | 2023-09-01 | 2023-10-13 | 北京建工环境修复股份有限公司 | Pollution site construction monitoring method and system |
CN117807382A (en) * | 2024-02-29 | 2024-04-02 | 广东慧航天唯科技有限公司 | Intelligent processing method for pollution monitoring data of drainage pipe network based on intelligent Internet of things |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103513599A (en) * | 2013-10-21 | 2014-01-15 | 南通德科物联网技术有限公司 | Pollution source on-line monitoring system based on internet of things |
CN107170219A (en) * | 2017-04-24 | 2017-09-15 | 杭州电子科技大学 | A kind of mobile pollution source on-line monitoring system and method |
-
2020
- 2020-03-19 CN CN202010196075.7A patent/CN111414694A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103513599A (en) * | 2013-10-21 | 2014-01-15 | 南通德科物联网技术有限公司 | Pollution source on-line monitoring system based on internet of things |
CN107170219A (en) * | 2017-04-24 | 2017-09-15 | 杭州电子科技大学 | A kind of mobile pollution source on-line monitoring system and method |
Non-Patent Citations (4)
Title |
---|
任贵召: "基于数据挖掘的环境污染源数据智能审核技术系统的设计与实现", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》 * |
王久振: "基于粒子群优化算法的供水管网污染源识别研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 * |
王冠利,郑哲: "一种全时无人化水质监测管理综合系统", 《电脑编程技巧与维护》 * |
贺青: "基于模糊聚类与BP神经网络的环境污染源数据的异常检测研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111881596A (en) * | 2020-08-06 | 2020-11-03 | 重庆交通大学 | A Reverse Time Tracking Simulation Method of Oil Spill Pollution Source Based on Lagrangian Interpolation |
CN112101796A (en) * | 2020-09-16 | 2020-12-18 | 清华大学合肥公共安全研究院 | Water environment pollution risk comprehensive perception and recognition system |
CN112101796B (en) * | 2020-09-16 | 2024-03-15 | 清华大学合肥公共安全研究院 | Comprehensive perception and identification system for water environment pollution risk |
CN112505254A (en) * | 2020-12-03 | 2021-03-16 | 中科三清科技有限公司 | Method and device for analyzing atmospheric pollution source, storage medium and terminal |
CN113015120B (en) * | 2021-01-28 | 2023-10-13 | 深圳市协润科技有限公司 | Pollution control monitoring system and method based on neural network |
CN113015120A (en) * | 2021-01-28 | 2021-06-22 | 深圳市协润科技有限公司 | Pollution treatment monitoring system and method based on neural network |
CN113139584A (en) * | 2021-03-29 | 2021-07-20 | 长江水利委员会长江科学院 | Sensor optimal arrangement method for water supply pipe network pollutant invasion point identification |
CN113139584B (en) * | 2021-03-29 | 2022-04-22 | 长江水利委员会长江科学院 | Sensor optimal arrangement method for water supply pipe network pollutant invasion point identification |
CN112939246A (en) * | 2021-04-22 | 2021-06-11 | 广西科技大学 | Hospital sewage online treatment platform based on Internet of things |
CN113282065A (en) * | 2021-05-18 | 2021-08-20 | 西安热工研究院有限公司 | Clustering extreme value real-time calculation method based on graph configuration |
CN113282065B (en) * | 2021-05-18 | 2023-01-31 | 西安热工研究院有限公司 | Clustering extreme value real-time calculation method based on graph configuration |
CN113746822A (en) * | 2021-08-25 | 2021-12-03 | 安徽创变信息科技有限公司 | Teleconference management method and system |
CN113746822B (en) * | 2021-08-25 | 2023-07-21 | 广州市昇博电子科技有限公司 | Remote conference management method and system |
CN114280262A (en) * | 2021-12-29 | 2022-04-05 | 北京建工环境修复股份有限公司 | Permeable reactive grid monitoring method, device and system and computer equipment |
CN114280262B (en) * | 2021-12-29 | 2023-08-22 | 北京建工环境修复股份有限公司 | Permeable reaction grid monitoring method and device and computer equipment |
CN114841469A (en) * | 2022-06-14 | 2022-08-02 | 中国水利水电科学研究院 | Water quality change trend prediction system and method based on source flow model |
CN116881749B (en) * | 2023-09-01 | 2023-11-17 | 北京建工环境修复股份有限公司 | Pollution site construction monitoring method and system |
CN116881749A (en) * | 2023-09-01 | 2023-10-13 | 北京建工环境修复股份有限公司 | Pollution site construction monitoring method and system |
CN117807382A (en) * | 2024-02-29 | 2024-04-02 | 广东慧航天唯科技有限公司 | Intelligent processing method for pollution monitoring data of drainage pipe network based on intelligent Internet of things |
CN117807382B (en) * | 2024-02-29 | 2024-05-10 | 广东慧航天唯科技有限公司 | Intelligent processing method for pollution monitoring data of drainage pipe network based on intelligent Internet of things |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111414694A (en) | A sewage monitoring system based on FCM and BP algorithm and its establishment method | |
CN111553468B (en) | A method for accurately predicting the effluent quality of sewage treatment plants | |
CN117170221B (en) | An artificial intelligence control system for sewage treatment | |
CN118210237B (en) | Intelligent dosing control system of integrated sewage treatment equipment | |
CN106779069A (en) | A kind of abnormal electricity consumption detection method based on neutral net | |
CN113205203A (en) | CNN-LSTM-based building energy consumption prediction method and system | |
CN112651665A (en) | Surface water quality index prediction method and device based on graph neural network | |
CN107402586A (en) | Dissolved Oxygen concentration Control method and system based on deep neural network | |
CN109975366B (en) | Soft measurement method and device for COD concentration in effluent of rural domestic sewage A2O treatment terminal | |
CN111126658A (en) | Coal mine gas prediction method based on deep learning | |
CN108562709A (en) | A kind of sewage disposal system water quality monitoring method for early warning based on convolution self-encoding encoder extreme learning machine | |
CN113156074B (en) | A prediction method of effluent total nitrogen based on fuzzy migration | |
CN116029612A (en) | A precise control method for external carbon sources in urban sewage plants based on deep learning | |
CN113838542B (en) | Intelligent prediction method and system for chemical oxygen demand | |
CN117235595A (en) | LSTM-Attention-based sewage treatment dosing prediction method and system | |
CN111754034A (en) | A Time Series Forecasting Method Based on Chaos Optimization Neural Network Model | |
CN116929454A (en) | A river water quality pollution monitoring method, medium and system | |
CN114119277A (en) | Artificial intelligent neural network-based flocculation dosing decision analysis method | |
CN117192063B (en) | Water quality prediction method and system based on coupled Kalman filtering data assimilation | |
CN110045771B (en) | An intelligent monitoring system for fish pond water quality | |
CN112786119A (en) | Method, device and medium for predicting TN (twisted nematic) treatment effect of multi-process type agricultural sewage facility | |
CN110222916B (en) | Rural domestic sewage A2Soft measurement method and device for total nitrogen concentration of effluent from O treatment terminal | |
CN106706491A (en) | Intelligent detection method for water permeation rate of membrane bioreactor MBR | |
CN117196883A (en) | Sewage treatment decision optimization method and system based on artificial intelligence | |
CN106769748A (en) | The intelligent checking system of membrane bioreactor MBR water outlet permeability rates |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200714 |