Method for predicting water quality COD (chemical oxygen demand) by combining fuzzy neural network with spectrophotometry

文档序号:33088 发布日期:2021-09-24 浏览:18次 中文

阅读说明:本技术 一种模糊神经网络结合分光光度法预测水质cod的方法 (Method for predicting water quality COD (chemical oxygen demand) by combining fuzzy neural network with spectrophotometry ) 是由 瞿燕 于银山 季仁东 邵明振 蒋令杰 王晓燕 蒋青松 韩汶锦 于 2021-06-28 设计创作,主要内容包括:本发明公开了一种模糊神经网络结合分光光度法预测水质COD的方法,多参数水质测定仪使用分光光度法的原理测量水质参数,使用它和便携式温度pH测定仪测量湖泊水质的COD、总磷、总氮、氨氮、高锰酸盐指数、温度、pH这七种参数,用皮尔逊相关系数的方法筛选水质指标,利用归一化方法和平滑方法对数据进行预处理。将得到的数据集随机分为训练数据和预测数据建立模糊神经网络模型。利用训练好的模型预测训练数据集的COD含量,比较预测值和真实值的误差,再使用模型预测预测数据集COD含量,比较预测值和真实值的误差。本发明方法有效预测水质COD,具有广泛的应用前景和实用价值。(The invention discloses a method for predicting water quality COD by combining a fuzzy neural network with a spectrophotometry, wherein a multi-parameter water quality tester measures water quality parameters by using the principle of the spectrophotometry, the multi-parameter water quality tester measures seven parameters of COD, total phosphorus, total nitrogen, ammonia nitrogen, permanganate index, temperature and pH of lake water quality by using the multi-parameter water quality tester and a portable temperature and pH tester, a Pearson correlation coefficient method is used for screening water quality indexes, and a normalization method and a smoothing method are used for preprocessing data. And randomly dividing the obtained data set into training data and prediction data to establish a fuzzy neural network model. And predicting the COD content of the training data set by using the trained model, comparing errors of the predicted value and the true value, predicting the COD content of the prediction data set by using the model, and comparing errors of the predicted value and the true value. The method of the invention can effectively predict the COD of the water quality and has wide application prospect and practical value.)

1. A method for predicting water quality COD by combining a fuzzy neural network with a spectrophotometry is characterized by comprising the following steps:

step 1: determining sampling points and sampling frequency, and collecting characteristic water sample information;

step 2: measuring the temperature and the pH of a water sample by using a portable temperature and pH measuring instrument, and sequentially measuring COD (chemical oxygen demand), total phosphorus, total nitrogen, ammonia nitrogen and permanganate index content of the water sample by using a multi-parameter water quality measuring instrument by using a spectrophotometry;

and step 3: carrying out correlation sequencing on the measured indexes and COD, selecting the index with high correlation number of the first five indexes as prediction input, and carrying out pretreatment, namely smoothing treatment and normalization treatment, on the five water quality parameters with high correlation;

and 4, step 4: establishing a proper fuzzy neural network model, randomly selecting a part of water quality parameters as a training part of the network, using the other part of the water quality parameters as prediction data of the network, using the five water quality parameters in the step 3 as input data of the network, and using the COD content as output data of the network to establish a network model training network;

and 5: predicting random training data by using the trained network model, and comparing the true value with the predicted value;

step 6: and predicting the rest prediction data for many times by using the trained fuzzy neural network model, and comparing the true value with the predicted value.

2. The method for predicting water quality COD by combining the fuzzy neural network with the spectrophotometry according to claim 1, wherein the step 2 specifically comprises the following steps:

step 2.1: measuring the COD content in the water, measuring a quantitative COD digestion reagent by using a rapid digestion spectrophotometry, mixing the COD digestion reagent with the lake water sample, uniformly mixing the COD digestion reagent and the lake water sample, putting the solution after digestion into a digestion instrument for timed digestion, and sequentially putting the solution after digestion into a multi-parameter water quality tester to measure the COD content;

step 2.2: measuring the content of total phosphorus in water, measuring a quantitative total phosphorus digestion reagent by using an ammonium molybdate spectrophotometry, mixing with a lake water sample, uniformly mixing, putting into a digestion instrument for timed digestion, and sequentially putting the digested solution into a multi-parameter water quality tester to measure the content of the total phosphorus;

step 2.3: measuring the content of total nitrogen in water, accurately measuring and mixing a quantitative total phosphorus digestion reagent and a lake water sample by using a color-changing acid spectrophotometry, and sequentially putting each reaction tube into a digestion instrument for digestion after uniformly mixing; after digestion, adding prepared reagents into each reaction tube in sequence and shaking up; measuring prepared reagents and adding the reagents into a prepared sealed colorimetric tube, respectively measuring each processed water sample and adding the water sample into the colorimetric tube added with the prepared reagents along a wall tube, uniformly mixing, and then putting into a water quality tester to measure the total nitrogen content;

step 2.4: measuring the content of ammonia nitrogen in water, measuring a certain amount of ammonia nitrogen digestion reagent by using a nano reagent spectrophotometry, mixing with a lake water sample, shaking uniformly, standing, and sequentially putting into a multi-parameter water quality tester to measure the content of ammonia nitrogen;

step 2.5: measuring the permanganate index content in the water, measuring a quantitative permanganate index digestion reagent by using a spectrophotometry method, mixing the permanganate index digestion reagent with the lake water sample, uniformly mixing, and putting the mixture into a digestion instrument for timed digestion; after digestion, adding prepared reagents into the reaction tubes in sequence, mixing uniformly, standing, and then putting the reaction tubes into a multi-parameter water quality tester in sequence to measure the content of the permanganate index.

3. The method for predicting water quality COD by combining the fuzzy neural network with the spectrophotometry according to claim 1, wherein the step 3 specifically comprises the following steps:

and analyzing and sequencing the correlation between the six indexes and COD by using a Pearson correlation coefficient, and sequencing the correlation of input data in a prediction model, wherein the Pearson correlation coefficient expression is as follows:

wherein X and Y are two variables respectively;

normalizing the data to [0,1], wherein the normalized corresponding equation and the inverse normalized equation are as follows:

Xi=(Xmax-Xmin)·X′i+Xmin

smoothing data by adopting a lowess smoothing method, wherein the main method is to enable y to beiAnd xiFor two variables and assuming that the data is ordered from small to large, for each yiCalculating its smoothed valueThe expression is as follows:

wherein the content of the first and second substances,xiis a calculated variable, xjIs xiAdjacent points contained within the span, wjIs xiAnd the weight, smoothed value, of all neighboring points contained within the spanIs xiWeighted average or weighted regression prediction.

4. The method for predicting water quality COD by combining the fuzzy neural network with the spectrophotometry according to claim 3, wherein the step 4 of establishing a suitable fuzzy neural network model comprises the following steps:

step 4.1: determining a network structure of a network according to the input and output dimensions of the sample, determining the iteration times, initializing the fuzzy neural network, and randomly initializing the fuzzy membership function center, the width and the parameters;

step 4.2: calculating each input variable x according to fuzzy rulejDegree of membership of;

step 4.3: fuzzy calculation is carried out on each membership degree to be used for matching fuzzy rules;

step 4.4: calculating an output value of the fuzzy model according to the fuzzy calculation result;

step 4.5: calculating an error;

step 4.6: correcting the neural network coefficient;

step 4.7: the center and width of the membership function are modified.

5. The method for predicting water quality COD by combining the fuzzy neural network with the spectrophotometry according to claim 3, wherein the step 5 specifically comprises the following steps:

predicting COD content in the training set by using the training set, and comparing the true value y and the predicted value of CODUsing mean square error valuesThe relative error value and the correlation coefficient compare the magnitude of the error between the actual value and the predicted value.

6. The method for predicting water quality COD by combining the fuzzy neural network with the spectrophotometry according to claim 1, wherein the step 6 specifically comprises the following steps:

predicting COD content in the prediction set by using the prediction set for 8 times, and comparing the true value y of COD with the predicted valueUsing mean square error valuesThe relative error value and the correlation coefficient compare the magnitude of the error between the actual value and the predicted value.

Technical Field

The invention relates to water quality detection, in particular to a method for predicting water quality COD by combining a fuzzy neural network with a spectrophotometry.

Background

With the rapid development of industrialized agriculture and urbanization in China, water pollution becomes increasingly serious, and social development and daily life of people are damaged to a certain extent, so that the monitoring and treatment of water quality are dedicated in the current stage of China, and the aims of relieving water resource shortage and protecting human health are fulfilled.

Due to the complexity and uncertainty of biochemical processes in natural water, water quality change is a dynamic process with typical non-linear and time-varying characteristics, and predicting water quality change is a challenging problem in environmental research. The artificial neural network is a powerful tool for processing complex interaction problems, is considered as a standard nonlinear estimator, and is used for establishing a model to predict water quality parameters, so that high-precision prediction data can be obtained, the maintenance and development cost can be saved, and the artificial neural network is very important for monitoring and controlling water pollution in time.

At present, the water quality prediction methods mainly include a grey prediction method, an artificial neural network, a support vector machine and the like. The grey prediction model is mainly used for short-term water quality prediction with strong tendency and small fluctuation, and can obtain a more accurate prediction result under the condition of less data. The SVM algorithm is difficult to implement on a large-scale training sample and sensitive to parameter adjustment and selection of a sum function. Neural networks have the advantage of simulating dynamic, nonlinear systems and are therefore particularly suitable for simulating reaction systems involving complex physics, chemistry and biology, which are not fully understood.

Disclosure of Invention

The purpose of the invention is as follows: aiming at the problems, the invention provides a method for predicting water quality COD by combining a fuzzy neural network with a spectrophotometry, and improves the prediction precision of the water quality COD.

The technical scheme is as follows: a method for predicting water quality COD by combining a fuzzy neural network with a spectrophotometry comprises the following steps:

step 1: determining sampling points and sampling frequency, and collecting characteristic water sample information;

step 2: measuring the temperature and the pH of a water sample by using a portable temperature and pH measuring instrument, and sequentially measuring COD (chemical oxygen demand), total phosphorus, total nitrogen, ammonia nitrogen and permanganate index content of the water sample by using a multi-parameter water quality measuring instrument by using a spectrophotometry;

and step 3: carrying out correlation sequencing on the measured indexes and COD, selecting the index with high correlation number of the first five indexes as prediction input, and carrying out pretreatment, namely smoothing treatment and normalization treatment, on the five water quality parameters with high correlation;

and 4, step 4: establishing a proper fuzzy neural network model, randomly selecting a part of water quality parameters as a training part of the network, using the other part of the water quality parameters as prediction data of the network, using the five water quality parameters as input data of the network, and using COD content as output data of the network to establish a network model training network;

and 5: predicting random training data by using the trained network model, and comparing the true value with the predicted value;

step 6: and predicting the rest prediction data for many times by using the trained fuzzy neural network model, and comparing the true value with the predicted value.

Further, step 2 specifically includes:

step 2.1: measuring the COD content in the water, measuring a quantitative COD digestion reagent by using a rapid digestion spectrophotometry, mixing the COD digestion reagent with the lake water sample, uniformly mixing the COD digestion reagent and the lake water sample, putting the solution after digestion into a digestion instrument for timed digestion, and sequentially putting the solution after digestion into a multi-parameter water quality tester to measure the COD content;

step 2.2: measuring the content of total phosphorus in water, measuring a quantitative total phosphorus digestion reagent by using an ammonium molybdate spectrophotometry, mixing with a lake water sample, uniformly mixing, putting into a digestion instrument for timed digestion, and sequentially putting the digested solution into a multi-parameter water quality tester to measure the content of the total phosphorus;

step 2.3: measuring the content of total nitrogen in water, accurately measuring and mixing a quantitative total phosphorus digestion reagent and a lake water sample by using a color-changing acid spectrophotometry, and sequentially putting each reaction tube into a digestion instrument for digestion after uniformly mixing; after digestion, adding prepared reagents into each reaction tube in sequence and shaking up; measuring prepared reagents and adding the reagents into a prepared sealed colorimetric tube, respectively measuring each processed water sample and adding the water sample into the colorimetric tube added with the prepared reagents along a wall tube, uniformly mixing, and then putting into a water quality tester to measure the total nitrogen content;

step 2.4: measuring the content of ammonia nitrogen in water, measuring a certain amount of ammonia nitrogen digestion reagent by using a nano reagent spectrophotometry, mixing with a lake water sample, shaking uniformly, standing, and sequentially putting into a multi-parameter water quality tester to measure the content of ammonia nitrogen;

step 2.5: measuring the permanganate index content in the water, measuring a quantitative permanganate index digestion reagent by using a spectrophotometry method, mixing the permanganate index digestion reagent with the lake water sample, uniformly mixing, and putting the mixture into a digestion instrument for timed digestion; after digestion, adding prepared reagents into the reaction tubes in sequence, mixing uniformly, standing, and then putting the reaction tubes into a multi-parameter water quality tester in sequence to measure the content of the permanganate index.

Further, step 3 specifically includes:

the correlation between the six indexes and COD is analyzed and sequenced by using the Pearson correlation coefficient, the input data in the prediction model is subjected to correlation sequencing, the indexes which are high in correlation and effective to the model can be effectively screened out, the prediction model is simplified, the redundancy index in the model is eliminated, the Pearson correlation coefficient is a statistical method which can reflect the correlation degree between the two variables, is the quotient between the covariance and the standard deviation between the two variables, and the Pearson correlation coefficient expression is as follows:

wherein X and Y are two variables respectively.

The data are normalized to [0,1], the training speed of the neural network model can be greatly improved by the data normalization processing, the good performance of the network is ensured, and a normalization corresponding equation and an inverse normalization equation are as follows:

Xi=(Xmax-Xmin)·X'i+Xmin

and smoothing data by adopting a lowess smoothing method, and reducing the interference of experimental errors on the neural network model. The method is a smoothing method for performing local regression by using a weighted linear least square method and a first-order polynomial model, and the expression is as follows:

wherein the content of the first and second substances,xiis a calculated variable, xjIs xiAdjacent points contained within the span, wjIs xiAnd the weight, smoothed value, of all neighboring points contained within the spanIs xiWeighted average or weighted regression prediction.

Further, the step 4 of establishing a suitable fuzzy neural network model comprises the following steps:

step 4.1: determining a network structure of a network according to the input and output dimensions of the sample, determining the iteration times, initializing the fuzzy neural network, and randomly initializing the fuzzy membership function center, the width and the parameters;

step 4.2: according to fuzzy rule calculationEach input variable xjDegree of membership of;

step 4.3: fuzzy calculation is carried out on each membership degree to be used for matching fuzzy rules;

step 4.4: calculating an output value of the fuzzy model according to the fuzzy calculation result;

step 4.5: calculating an error;

step 4.6: correcting the neural network coefficient;

step 4.7: the center and width of the membership function are modified.

Further, step 5 specifically includes:

predicting COD content in the training set by using the training set, and comparing the true value y and the predicted value of CODUsing mean square error valuesThe relative error value and the correlation coefficient compare the magnitude of the error between the actual value and the predicted value.

Further, step 6 specifically includes:

predicting COD content in the prediction set by using the prediction set for 8 times, and comparing the true value y of COD with the predicted valueUsing mean square error valuesThe relative error value and the correlation coefficient compare the magnitude of the error between the actual value and the predicted value.

Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: the method has the advantages that the method detects various parameters of the lake water quality by using a spectrophotometry, and is more efficient and accurate in measurement; the machine learning method of the neural network is utilized, so that the complex nonlinear relation between each factor and the water quality can be embodied; the COD content in the water quality of the surface lake can continuously float, the complex relation between each water quality and the COD can be effectively obtained by using the fuzzy neural network model, the COD content of the lake is predicted by the rest water quality parameters, the accuracy is high, the prediction result is better, and the correlation coefficient of the model for predicting the data is high, and the relative error is small.

Drawings

FIG. 1 is a flow chart of predicting water quality COD by using a fuzzy neural network in the invention;

FIG. 2 is a flow chart of predicting lake water quality by using fuzzy neural network in the present invention;

FIG. 3 is a flow chart of the fuzzy neural network algorithm of the present invention.

Detailed Description

The invention is further elucidated with reference to the drawings and the embodiments.

A water quality COD prediction method based on a fuzzy neural network is shown in figures 1 and 2 and comprises the following steps:

step 1: collecting lake water samples, determining proper sampling points and sampling frequency, collecting the lake water samples at five fixed positions of the lake at 8 am every day, storing the lake water samples by using transparent plastic cups and respectively sticking labels, wherein the storage time of the water samples is not more than 24 hours;

step 2: firstly, a portable temperature pH tester is used for measuring the temperature and the pH of a water sample, then a multi-parameter water quality tester is used for measuring the COD, the total phosphorus, the total nitrogen, the ammonia nitrogen and the permanganate index content of the water sample in turn to obtain 89 group data set D,

D={(DCOD1,DTP1,DTN1,DNH3-N1,DCODMN1,Dtemp1,DpH1),...,(DCODn,DTP1n,DTNn,DNH3-Nn,DCODMNn,Dtempn,DpHn)}

and step 3: performing correlation sequencing on several measured indexes and COD, selecting five indexes with higher correlation coefficients (ammonia nitrogen, pH, temperature, total nitrogen and permanganate index) as prediction input, and taking a prediction set Dp

Then, five water quality parameters with high correlation are preprocessed, namely smoothed and normalized, and finally, the obtained data set is Dp *

And 4, step 4: establishing a proper fuzzy neural network model, and randomly collecting a data set Dp *Dividing the system into 73 groups of training sets and 16 groups of prediction sets, taking five water quality parameters as input data of a network, taking COD content as output data of the network to establish a model training network, and repeatedly iterating the network by 105Secondly;

and 5: predicting random training data by using the trained network model, predicting COD content in the training set by using the training set, and comparing the true value y and the predicted value of CODUsing mean square error valuesThe relative error value and the correlation coefficient compare the magnitude of the error between the actual value and the predicted value. The model is used for predicting the training set, the relative error is controlled within 6%, and the network obtained by training has very good fitting degree on the training data and has no over-fitting phenomenon. The mean square error value between the actual output of the network and the true value for the training set is 0.1050, and the correlation coefficient is 0.9669. (ii) a

Step 6: predicting the rest prediction data by using the trained fuzzy neural network model, predicting the COD content in the prediction set by using the prediction set for 8 times in total, and comparing the true value y of the COD with the predicted valueUsing mean square error valuesThe relative error value and the correlation coefficient are comparedThe magnitude of the error between the value and the predicted value. The model is used for carrying out 8 times of experiments on the prediction data, and the correlation coefficient of the model is basically between 0.8 and 0.95, the relative error is almost controlled within 15 percent, and the phenomenon of overfitting does not occur according to the experimental data of 8 times.

In the step 1, a proper sampling point and a sampling frequency are determined, and a most time representative sample is obtained by the lowest sampling frequency, so that the requirement of reflecting the water quality condition is met and the method is feasible.

The multi-parameter measurement in step 2 needs the equipment that uses to have multi-parameter water quality apparatus, intelligence multi-parameter to clear up appearance, portable temperature pH apparatus, beaker, 30mm cell a plurality of, 10mm cell a plurality of, 150mm sealed test tube a plurality of, 100mm sealed test tube a plurality of, uncovered test tube a plurality of, big or small pipetting gun two, supporting reagent. The experiment included the following steps:

step 2.1: measuring the content of COD in water, carrying out rapid oxidation-reduction reaction on a water sample and a matched reagent in a digestion device by using a rapid digestion spectrophotometry, generating trivalent chromium ions after the reaction, and measuring the concentration of the trivalent chromium ions by using the spectrophotometry. Firstly, opening a digestion instrument and a water quality tester, selecting a COD digestion mode and a COD low-range dish mode, and preparing a plurality of open reaction tubes to be arranged on an air cooling tank of a cooling rack. Accurately measuring 2.5mL of distilled water, adding the distilled water into a No. 0 reaction tube, respectively measuring 2.5mL of each water sample, sequentially adding the water samples into other reaction tubes, sequentially adding 0.7mL of potassium dichromate reagent into each reaction tube, sequentially adding 4.8mL of silver sulfate reagent into the reaction tubes, uniformly mixing, and putting the mixture into a digestion hole for digestion at 165 ℃ for 10 minutes. After the digestion is completed, the reaction mixture is taken out and placed on a cooling tank to be cooled for 2 minutes by air, 2.5mL of distilled water is sequentially added into each reaction tube and is uniformly mixed, and the reaction tubes are cooled by water for 2 minutes. Pouring the water-cooled solution into 30mm cuvettes with corresponding numbers in sequence, putting the cuvette No. 0 as a blank solution into a cuvette, covering the cuvette with a cover, pressing a blank key, and then putting the rest solutions into the cuvette in sequence to measure the COD content;

step 2.2: the total phosphorus content in the water was measured and the phosphorus-containing compounds in the water were converted to orthophosphate by potassium persulfate using ammonium molybdate spectrophotometry. The orthophosphate can react with ammonium molybdate and antimony potassium tartrate in an acidic medium to generate phosphomolybdic heteropoly acid. Phosphomolybdic acid can be reduced by ascorbic acid to generate dark phosphomolybdic blue, and the absorbance of the sample is measured at the wavelength of 700nm to obtain the concentration of the sample. Firstly, a switch of a digestion instrument is turned on to select a total phosphorus digestion mode, a water quality tester is turned on to select a total phosphorus low-range vessel mode, and a plurality of 150mm sealed reaction tubes are arranged on an air cooling tank of a cooling frame. Accurately measuring 8mL of distilled water and other water samples, sequentially adding the distilled water and other water samples into the reaction tubes, sequentially adding 1mL of potassium persulfate reagent into each reaction tube, screwing the bottle caps, shaking the water samples uniformly, and putting each reaction tube into a digestion instrument for digestion at 120 ℃ for 30 minutes. After the digestion is completed, the mixture is taken out and placed on a cooling tank to be cooled by air for 2 minutes, and then is cooled by water for 2 minutes. Then, 1mL of ascorbic acid solution and 1mL of molybdate solution were added in this order, mixed uniformly and allowed to stand for 10 minutes. Pouring the solution 0 into a cuvette with the diameter of 30mm, then placing the cuvette into a determinator for measurement, placing a blank sample in the determinator for measurement, and then sequentially measuring the rest solutions;

step 2.3: measuring the content of total nitrogen in water, using a chromotropic acid spectrophotometry, taking potassium persulfate as an oxidant in a water sample under an alkaline condition, digesting at high temperature and high pressure, converting all nitrogen-containing compounds into a nitrate nitrogen form, adding excessive sodium metabisulfite into the potassium persulfate to react and eliminate the residual potassium persulfate, reacting the nitrate-nitrogen with chromic acid under a strong acid condition to generate a yellow compound, wherein the absorbance value of the chromotropic liquid is in direct proportion to the total nitrogen content in the water sample. Firstly, a switch of a digestion instrument is turned on to select a total nitrogen digestion mode, a water quality tester is turned on to select the total nitrogen mode, and a plurality of 150mm sealed reaction tubes are arranged on an air cooling tank of a cooling frame. Accurately measuring distilled water and 5mL of each water sample, putting the distilled water and the water samples into reaction tubes, sequentially adding 2mL of special reagent NTA into the reaction tubes, screwing a bottle cap, shaking the water samples uniformly, and sequentially putting the reaction tubes into a digestion instrument for digestion at 122 ℃ for 40 minutes. After digestion, the samples were placed on a cooling rack and first air-cooled for 2 minutes and then water-cooled for 2 minutes. After cooling, 1mL of NTB reagent was added to each reaction tube in sequence and shaken up. Preparing a plurality of 100mm sealed colorimetric tubes, placing the 100mm sealed colorimetric tubes on a test tube rack, accurately measuring 4mL of NTC reagent, adding the NTC reagent into the prepared sealed colorimetric tubes, respectively measuring 1mL of each processed water sample, adding the water sample into the colorimetric tubes added with the NTC reagent along a wall tube, immediately screwing a bottle cap, overturning and shaking the bottle cap for 10 times after the water sample is added, placing the bottle cap into a cooling tank, and cooling the bottle for 10 minutes by water. After the water cooling is finished, taking out each reaction tube from the cooling tank, wiping the tube wall clean, and then putting the tube wall clean into a water quality tester to measure the total nitrogen content;

step 2.4: measuring the content of ammonia nitrogen in water, reacting ammonia nitrogen in the form of free ammonia or ammonium ions with a nano reagent to generate a light red brown complex by using a nano reagent spectrophotometry, and measuring the absorbance at the wavelength of 420 nm. Firstly, a water quality tester is opened to select an ammonia nitrogen mode. Several open reaction tubes are set on the air cooling tank of the cooling rack. Accurately measuring 10mL of anhydrous ammonia and other water samples, adding the anhydrous ammonia and other water samples into each reaction tube, adding 1mL of N3 reagent and 1mL of N2 reagent into each reaction tube, shaking up, and standing for 10 minutes. Then pouring the solution into a 10mm cuvette in sequence, and putting the cuvette into a water quality tester to measure the ammonia nitrogen concentration of each water sample;

step 2.5: measuring the permanganate index content in the water, oxidizing reducing substances in the water by using excess potassium permanganate under an acidic heating condition by using a spectrophotometric method, and measuring the amount of the residual potassium permanganate at a wavelength of 525nm to obtain the permanganate index concentration. Firstly, the digestion instrument and the water quality tester are opened, and a plurality of 150mm sealed reaction tubes are arranged on an air cooling tank of a cooling rack. Accurately measuring 5mL of distilled water and each water sample, putting the distilled water and each water sample into a reaction tube, sequentially adding 1mL of CM1 reagent into each reaction tube, uniformly mixing, adding 1mL of CM2 reagent, and uniformly mixing. And (3) screwing the bottle mouths of the reaction tubes, sequentially putting the reaction tubes into a digestion instrument for digesting for 32 minutes at 105 ℃, putting the samples on a cooling rack for air cooling for 2 minutes after digestion, and then cooling with water for 2 minutes. Adding 1mL of CM3 reagent into each reaction tube in sequence, mixing uniformly, standing for 2 minutes, pouring the solution into a 30mm cuvette, and placing the cuvette into a water quality tester to measure the permanganate index concentration.

The parameter preprocessing in the step 3 comprises the following steps:

the correlation between the indexes and the COD is analyzed and sequenced by using the Pearson correlation coefficient, the input data in the prediction model is subjected to correlation sequencing, the indexes which are high in correlation and effective to the model can be effectively screened out, the prediction model is simplified, and the redundant indexes in the model are eliminated. The pearson correlation coefficient is a statistical method reflecting the magnitude of the correlation between two variables, and is the quotient between the covariance and the standard deviation between the two variables, and is calculated by the formula:

the absolute value of the correlation coefficient between the finally obtained ammonia nitrogen and the COD is 0.3734, the absolute value of the correlation coefficient between the pH value and the COD is 0.1595, the absolute value of the correlation coefficient between the temperature and the COD is 0.1498, the absolute value of the correlation coefficient between the total nitrogen and the COD is 0.1393, the absolute value of the correlation coefficient between the permanganate index and the COD is 0.1272, and the absolute value of the correlation coefficient between the total phosphorus and the COD is 0.0295. Five indexes which show higher correlation with COD content are ammonia nitrogen, pH, temperature, total nitrogen and permanganate index.

The data are normalized to [0,1], the training speed of the neural network model can be greatly improved by the data normalization processing, the good performance of the network is ensured, and the normalization corresponding equation and the inverse normalization equation are as follows:

Xi=(Xmax-Xmin)·X'i+Xmin

and smoothing data by adopting a lowess smoothing method, and reducing the interference of experimental errors on the neural network model. The method is a smoothing method for local regression by using a weighted linear least square method and a first-order polynomial model, and the corresponding equation is as follows:

whereinSmoothed valueIs xiA (weighted) average or a (weighted) regression prediction.

As shown in fig. 3, the establishment of a suitable fuzzy neural network model in step 4 includes the following steps:

step 4.1: determining the network structure of the network according to the input and output dimensions of the sample, determining the number of input nodes of the model to be 5 according to the input dimension of the sample to be 5, determining the number of output nodes of the model to be 1 according to the output dimension of the sample to be 1, artificially determining the number of membership function to be 8 according to the number of the input nodes and the output nodes, namely, the number of hidden nodes to be 8, and determining the network structure to be 5-8-1. Determining the number of iterations to be 105Initializing the fuzzy neural network, randomly initializing the center c, the width b and the parameter p of the fuzzy membership function0~p6

Step 4.2: calculating each input variable x according to fuzzy rulejDegree of membership of;

step three: fuzzy calculation is carried out on each membership degree to be used for matching fuzzy rules;

step four: calculating an output value of the fuzzy model according to the fuzzy calculation result;

step five: calculating an error;

step six: correcting the neural network coefficient;

step seven: the center and width of the membership function are modified.

Details not described herein are well within the skill of those in the art.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种尿素浓度快速检测方法及检测传感器和应用

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!