CN103743867B - Kalman filtering formaldehyde detection method based on neural network - Google Patents

Kalman filtering formaldehyde detection method based on neural network Download PDF

Info

Publication number
CN103743867B
CN103743867B CN201310740484.9A CN201310740484A CN103743867B CN 103743867 B CN103743867 B CN 103743867B CN 201310740484 A CN201310740484 A CN 201310740484A CN 103743867 B CN103743867 B CN 103743867B
Authority
CN
China
Prior art keywords
neural network
formaldehyde
value
detection
kalman filtering
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.)
Active
Application number
CN201310740484.9A
Other languages
Chinese (zh)
Other versions
CN103743867A (en
Inventor
徐沛
楼群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhenjiang College
Original Assignee
Zhenjiang College
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhenjiang College filed Critical Zhenjiang College
Priority to CN201310740484.9A priority Critical patent/CN103743867B/en
Publication of CN103743867A publication Critical patent/CN103743867A/en
Application granted granted Critical
Publication of CN103743867B publication Critical patent/CN103743867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a Kalman filtering formaldehyde detection method based on a neural network. The method comprises the following steps: (1) initializing a detection environment and determining environmental parameters; (2) simulating data in the detection process to obtain training data of the neural network; (3) establishing the neural network with a two input-one output structure, and by adopting a BP (Back-Propagation) neural network and adding a momentum learning rule, training the neural network; (4) carrying out first detection evaluation; (5) judging whether detection is stopped or not; and (6) if detection is stopped, carrying out dormancy for waiting, and if not, evaluating formaldehyde content by Kalman filtering. According to the method disclosed by the invention, the relationship between detectable quantity and state transfer quantity is established by an offline neural network training method, so that the problem that when conventional Kalman filtering is used to detect formaldehyde, a state equation, particularly state transfer quantity, is hard to determine is solved, and the speed, precision and reliability of formaldehyde detection are greatly improved.

Description

Based on the Kalman filtering Analysis Methods for Formaldehyde of neural network
Technical field
The present invention relates to a kind of Analysis Methods for Formaldehyde, particularly relate to a kind of Kalman filtering Analysis Methods for Formaldehyde based on neural network, belong to detection technique field.
Background technology
Formaldehyde is a kind of colourless, gas of having intense stimulus smell, there is severe toxicity, it mainly applies in timber industry and textile industry, a kind of important industrial chemicals and organic solvent, be widely used in now in the material of house decoration, this makes formaldehyde pollution problem in new decorating house very serious.Prior art mainly contains for the detection method of formaldehyde: spectrophotometric method, electrochemical assay, vapor-phase chromatography, liquid phase chromatography, sensor method etc., although these methods possibility accuracy of detection are higher, but owing to lacking analysis for metrical error and filtering, thus metrical error is larger, accuracy is not high, can not effectively detect the real content of Formaldehyde in Environment.
Kalman filter method is a kind of numerical filter method proposed by R.E.Kalman nineteen sixty, the representative instance of its process is limited from one group, comprise noise, go out the virtual condition of object to predicted estimate in the observation data of object state, therefore reasonable employment Kalman filtering can solve the error filtration problem in formaldehyde examination well.For formaldehyde examination problem, the state equation of content of formaldehyde can be expressed as:
X(t+1)=Φ(t)X(t)
Wherein X (t) the formaldehyde actual content value that is t, the state transfer amount that Φ (t) is t, it represents the relation between t and t+1 moment formaldehyde actual content.
Observation (detection) equation of formaldehyde examination can be expressed as:
Z(t)=X(t)+v(t)
Wherein Z (t) detected value that is t, X (t) is t formaldehyde actual content value, the metrical error that v (t) is t, and by law of great number, obeying average is zero, and variance is the Gauss normal distribution of definite value.For formaldehyde examination problem, parameter Φ (t) in state equation and metrical error v (t) are all determined by actual detection case, be difficult to obtain clear and definite expression formula, therefore the Kalman filtering of prior art is difficult to directly be used among formaldehyde examination.
Summary of the invention
The object of the present invention is to provide a kind of Kalman filtering Analysis Methods for Formaldehyde based on neural network, the state equation difficult parameters run in formaldehyde examination problem by neural network solution Kalman filtering is with the problem determined, and be used in formaldehyde examination error filtration, to improve the accuracy of existing Analysis Methods for Formaldehyde.
Object of the present invention is achieved by the following technical programs:
Based on a Kalman filtering Analysis Methods for Formaldehyde for neural network, comprise the following steps:
1) initialization testing environment, determines environmental parameter: use the content of formaldehyde in sensors towards ambient repeatedly to sample, draw one group of sampled data; Maximum for sampled data detected value is designated as Zmax, and minimum detection value is designated as Zmin, asks this to organize data mean square deviation and obtains the approximating variances G of metrical error divided by 2;
2) set metrical error as G, zero moment state value X (0) is made to be respectively Zmin and Zmax, to different state transfer amount Φ, use formula X (t+1)=Φ (t) X (t) and Z (t)=X (t)+v (t) analog detection process, v (t) for the obedience average that Numerical-Mode is drawn up be zero, variance is the metrical error of G, draws one group of detection data Z that different state transfer amount Φ is corresponding;
3) set up the neural network of two input one export structures, two are input as the analog detection data often detected value in adjacent two moment in group, export the Φ value into correspondence, adopt BP neural network, additional momentum learning rules, neural network training;
4) testing process is started: set initial formaldehyde examination value Z (0) for (Zmax+Zmin)/2, the formaldehyde examination value that now sensor obtains is designated as Z (1), by Z (0), Z (1) input neural network, draw Φ (1) value that neural network prediction is estimated, determine the state equation in this moment, iteration Kalman Filter Estimation equation, draws formaldehyde estimated value now output display result;
5) judge whether to stop detecting, if do not stopped, then go to step 6); If stop detecting, then enter dormant state;
6) remember that the formaldehyde examination amount that last sensor obtains is Z (t-1), the formaldehyde examination amount that current time sensor obtains is Z (t), by Z (t-1) and Z (t) input neural network, draw the value of state transfer amount Φ (t) of current time, determine the state equation of current time, the formaldehyde estimated value of note last time is iteration Kalman Filter Estimation equation, draws the formaldehyde estimated value of current time output display structure;
7) judge whether to want initialization context, if so, go to step 1), if not, then go to step 6).
Object of the present invention can also be realized further by following technical measures:
The aforementioned Kalman filtering Analysis Methods for Formaldehyde based on neural network, wherein kalman filter method is as follows:
1) pre-estimation:
wherein for estimated value, for estimating evaluation, Φ (t) is state transfer amount;
2) pre-estimation covariance matrix is calculated:
wherein P (t) is estimate covariance, for pre-estimation covariance, Φ (t) is state transfer amount, the transposition that Φ ' (t) is Φ (t);
3) kalman gain matrix is calculated:
wherein K (t) is kalman gain, and G is the approximating variances of metrical error;
4) more new estimation:
X ^ ( t + 1 ) = X ~ ( t + 1 ) + K ( t + 1 ) [ Z ( t + 1 ) - X ~ ( t + 1 ) X ] ;
5) more new estimation covariance matrix:
P ( t + 1 ) = [ 1 - K ( t + 1 ) ] P ~ ( t + 1 ) [ 1 - K ( t + 1 ) ] + K ( t + 1 ) · G · K ( t + 1 ) ;
6) often obtain one-time detection value, iteration above-mentioned steps once.
The aforementioned Kalman filtering Analysis Methods for Formaldehyde based on neural network, wherein additional momentum learning rules are as follows:
ω ( t + 1 ) = ω ( t ) - ( 1 - a ) η ∂ E T ∂ ω ( t ) + αΔω ( t )
Wherein Δ ω (t)=ω (t)-ω (t-1), ω (t) are the weight of each node of neural network, and ET is the training error of neural network, and η is weight, and α is factor of momentum, gets 0.95.
Compared with prior art, the invention has the beneficial effects as follows: the present invention is by the method for off-line training neural network, establish the relation between detection limit and state transfer amount, and then solve legacy card Kalman Filtering when formaldehyde examination, state equation particularly state transfer amount is difficult to the problem determined, this makes Kalman filtering can be useful among formaldehyde examination, compared to existing technology, present invention uses substantially negligible calculated amount, greatly improve the speed of formaldehyde examination, precision and reliability.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is building-block of logic of the present invention;
Fig. 3 is the building-block of logic of kalman filter method.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
The state equation of formaldehyde examination problem and observation (detection) equation can be written as following form:
X(t+1)=Φ(t)X(t)
Z(t)=X(t)+v(t)
Wherein, the formaldehyde actual content value that X (t) is t, the state transfer amount that Φ (t) is t, it represents the relation between t and t+1 moment formaldehyde actual content, X (t) is t formaldehyde actual content value, the Gauss normal distribution of to be zero variance be definite value that metrical error that v (t) is t obeys average.
Show as Fig. 1 carves, be the Kalman filtering Analysis Methods for Formaldehyde process flow diagram based on neural network of the present invention, comprise the following steps:
1) sample initialization detected parameters, use sensor to carry out real time sample, the content of formaldehyde in environment is repeatedly sampled, draws one group of sampled data; To these group data, its maximum detected value is designated as Zmax, and minimum detection value is designated as Zmin, asks this group data mean square deviation and is the approximating variances G of metrical error divided by 2;
2) simulative neural network training data, use Computer Numerical Simulation, if metrical error is G, Φ gets not the value of t change in time, it presses the every 0.01 one step value of 0.5-1.5 101 values, for 101 Φ values, zero moment state value X (0) is made to be Zmin, use formula X (t+1)=Φ (t) X (t) and Z (t)=X (t)+v (t) analog detection process, v (t) for the obedience average that Numerical-Mode is drawn up be zero, variance is the metrical error of G, draw the detection data of one group of Z that different Φ is corresponding, zero moment state value X (0) is made to be Zmax equally, analog detection process draws the detection data of one group of Z that different Φ is corresponding respectively again,
3) neural network training, set up the neural network of two input one export structures, as shown in Figure 2, two are input as the analog detection data often detected value in adjacent two moment in group, namely Z (t+1) and Z (t), exports the Φ value into correspondence, adopts BP neural network, additional momentum learning rules, neural network training;
Additional momentum learning rules are on traditional BP learning method basis, when weighting regulates give upgrade momentum, the locally optimal solution of training can be recalled like this, concrete update rule as shown in the formula:
ω ( t + 1 ) = ω ( t ) - ( 1 - a ) η ∂ E T ∂ ω ( t ) + αΔω ( t )
It is the training error of neural network that the weight that wherein Δ ω (t)=ω (t)-ω (t-1), ω (t) are each node of neural network carves ET, and η is weight, and α is factor of momentum, gets 0.95.
4) testing process is started, set initial formaldehyde examination amount Z (0) for (Zmax+Zmin)/2, the formaldehyde examination amount that now sensor obtains is designated as Z (1), by Z (0), Z (1) input neural network, draw Φ (1) value that neural network prediction is estimated, determine the state equation in this moment, iteration Kalman Filter Estimation equation, draw formaldehyde estimated value now output to detecting instrument and show;
As shown in Figure 3, Kalman Filter Estimation is by the form being expressed as Equation Iterative of traditional least mean-square estimate, carries out filtering estimation, because its real-time, robustness and required storage space are less, therefore very applicable formaldehyde examination problem, its steps flow chart is:
1, pre-estimation:
X ~ ( t + 1 ) = Φ ( t ) X ^ ( t )
2, pre-estimation covariance matrix is calculated:
P ~ ( t + 1 ) = Φ ( t ) P ( t ) Φ ′ ( t )
3, kalman gain matrix is calculated:
K ( t + 1 ) = P ~ ( t + 1 ) [ P ~ ( t + 1 ) + G ] - 1
4, more new estimation:
X ^ ( t + 1 ) = X ~ ( t + 1 ) + K ( t + 1 ) [ Z ( t + 1 ) - X ~ ( t + 1 ) X ] ;
5, more new estimation covariance matrix:
P ( t + 1 ) = [ 1 - K ( t + 1 ) ] P ~ ( t + 1 ) [ 1 - K ( t + 1 ) ] + K ( t + 1 ) · G · K ( t + 1 ) ;
6, often obtain one-time detection value, iteration above-mentioned steps once;
Wherein, for estimated value, for estimating evaluation, P (t) is estimate covariance, for pre-estimation covariance, Φ (t) is state transfer amount, the transposition that Φ ' (t) is Φ (t), equal with Φ (t) in this problem, K (t) is kalman gain, G is step 1) in the approximating variances that obtains, Z (t) is for detecting data.
5) according to the operation of user to detecting instrument, judge whether to stop detecting, if do not stopped, then go to step 6); If stop detecting, then enter dormancy waiting status;
6) remember that the formaldehyde examination amount that last sensor obtains is Z (t-1), the formaldehyde examination amount that now sensor obtains is Z (t), by Z (t-1) and Z (t) input neural network, draw the value of state transfer amount Φ (t) now, determine the state equation in this moment, the formaldehyde estimated value of note last time is iteration Kalman Filter Estimation equation, draws formaldehyde estimated value now output to instrument and show;
7) judge whether detecting instrument initialization button is pressed, and if so, goes to step 1), if not, then go to step 6).
The present invention is based on the Kalman filtering Analysis Methods for Formaldehyde of neural network, can be used for the intelligent instrument that environment content of formaldehyde is detected, data acquisition is carried out by formaldehyde quantity detection sensor, pass to the microprocessor of detecting instrument, microprocessor uses method of the present invention, obtains accurate and effective content of formaldehyde.
In addition to the implementation, the present invention can also have other embodiments, and all employings are equal to the technical scheme of replacement or equivalent transformation formation, all drop in the protection domain of application claims.

Claims (3)

1., based on a Kalman filtering Analysis Methods for Formaldehyde for neural network, it is characterized in that, comprise the following steps:
1) initialization testing environment, determines environmental parameter: use the content of formaldehyde in sensors towards ambient repeatedly to sample, draw one group of sampled data; Maximum for sampled data detected value is designated as Zmax, and minimum detection value is designated as Zmin, asks this to organize data mean square deviation and obtains the approximating variances G of metrical error divided by 2;
2) set metrical error as G, zero moment state value X (0) is made to be respectively Zmin and Zmax, to different state transfer amount Φ, use formula X (t+1)=Φ (t) X (t) and Z (t)=X (t)+v (t) analog detection process, v (t) for the obedience average that Numerical-Mode is drawn up be zero, variance is the metrical error of G, draws one group of detection data Z that different state transfer amount Φ is corresponding;
3) neural network of two input one export structures is set up, two are input as analog detection data often detected value Z (t), the Z (t+1) in t, t+1 moment in group, export Φ (t) value for t, adopt BP neural network, additional momentum learning rules, neural network training;
4) testing process is started: set initial formaldehyde examination value Z (0) for (Zmax+Zmin)/2, the formaldehyde examination value that now sensor obtains is designated as Z (1), by Z (0), Z (1) input neural network, draw Φ (1) value that neural network prediction is estimated, determine the state equation in this moment, iteration Kalman Filter Estimation equation, draws formaldehyde estimated value now output display result;
5) judge whether to stop detecting, if do not stopped, then go to step 6); If stop detecting, then enter dormant state;
6) remember that the formaldehyde examination amount that last sensor obtains is Z (t-1), the formaldehyde examination amount that current time sensor obtains is Z (t), by Z (t-1) and Z (t) input neural network, draw the value of state transfer amount Φ (t) of current time, determine the state equation of current time, the formaldehyde estimated value of note last time is iteration Kalman Filter Estimation equation, draws the formaldehyde estimated value of current time output display structure;
7) judge whether to want initialization context, if so, go to step 1), if not, then go to step 6).
2., as claimed in claim 1 based on the Kalman filtering Analysis Methods for Formaldehyde of neural network, it is characterized in that, comprise the following steps:
1) pre-estimation:
wherein for estimated value, for estimating evaluation, Φ (t) is state transfer amount;
2) pre-estimation covariance matrix is calculated:
wherein P (t) is estimate covariance, for pre-estimation covariance, Φ (t) is state transfer amount, the transposition that Φ ' (t) is Φ (t);
3) kalman gain matrix is calculated:
wherein K (t) is kalman gain, and G is the approximating variances of metrical error;
4) more new estimation:
X ^ ( t + 1 ) = X ~ ( t + ) + K ( t + 1 ) [ Z ( t + 1 ) - X ~ ( t + 1 ) ] ;
5) more new estimation covariance matrix:
P ( t + 1 ) = [ 1 - K ( t + 1 ) ] P ~ ( t + 1 ) [ 1 - K ( t + 1 ) ] + K ( t + 1 ) · G · K ( t + 1 ) ;
6) often obtain one-time detection value, iteration above-mentioned steps once.
3., as claimed in claim 1 based on the Kalman filtering Analysis Methods for Formaldehyde of neural network, it is characterized in that, described additional momentum learning rules are as follows:
ω ( t + 1 ) = ω ( t ) - ( 1 - a ) η ∂ E T ∂ ω ( t ) + aΔω ( t )
Wherein △ ω (t)=ω (t)-ω (t-1), ω (t) are the weight of each node of neural network, E tfor the training error of neural network, η is weight, and a is factor of momentum, gets 0.95.
CN201310740484.9A 2013-12-30 2013-12-30 Kalman filtering formaldehyde detection method based on neural network Active CN103743867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310740484.9A CN103743867B (en) 2013-12-30 2013-12-30 Kalman filtering formaldehyde detection method based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310740484.9A CN103743867B (en) 2013-12-30 2013-12-30 Kalman filtering formaldehyde detection method based on neural network

Publications (2)

Publication Number Publication Date
CN103743867A CN103743867A (en) 2014-04-23
CN103743867B true CN103743867B (en) 2015-06-10

Family

ID=50500904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310740484.9A Active CN103743867B (en) 2013-12-30 2013-12-30 Kalman filtering formaldehyde detection method based on neural network

Country Status (1)

Country Link
CN (1) CN103743867B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108828170B (en) * 2018-04-26 2021-05-28 青岛黄海学院 Mariculture dissolved oxygen concentration acquisition device and method with multi-protocol output
CN109238358B (en) * 2018-09-12 2020-11-27 国网福建省电力有限公司 Distributed electric energy metering box multi-sensor data acquisition and anti-interference processing method
CN109781809B (en) * 2019-02-23 2020-11-20 苏州市智汇易联科技有限公司 Artificial intelligent calculating method for formaldehyde concentration
CN110675006A (en) * 2019-11-07 2020-01-10 桂林理工大学 Indoor air quality real-time monitoring and formaldehyde attenuation prediction system
CN117192063B (en) * 2023-11-06 2024-03-15 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786413A (en) * 2005-11-17 2006-06-14 孟江 Method for porecasting water upwelling amount of mine well based on nerve network model
CN102737153A (en) * 2011-04-07 2012-10-17 中国人民解放军第三〇二医院 Neural network hepatofibrosis diagnosis method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7853392B2 (en) * 2007-01-26 2010-12-14 General Electric Company Systems and methods for initializing dynamic model states using a Kalman filter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786413A (en) * 2005-11-17 2006-06-14 孟江 Method for porecasting water upwelling amount of mine well based on nerve network model
CN102737153A (en) * 2011-04-07 2012-10-17 中国人民解放军第三〇二医院 Neural network hepatofibrosis diagnosis method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于传感器阵列与神经网络的气体检测系统􀀁;马戎等;《传感技术学报》;20091231(第3期);第395-398页 *
基于卡尔曼滤波理论的气体浓度反演算法;沈小燕等;《光电工程》;20081231;第35卷(第12期);第54-58页 *
基于状态空间理论的气体浓度定量分析;毕智慧;《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》;20070815(第02期);第22-57页 *

Also Published As

Publication number Publication date
CN103743867A (en) 2014-04-23

Similar Documents

Publication Publication Date Title
CN103743867B (en) Kalman filtering formaldehyde detection method based on neural network
CN104376380B (en) A kind of ammonia nitrogen concentration Forecasting Methodology based on recurrence self organizing neural network
Bernal et al. Financial market time series prediction with recurrent neural networks
CN103983453A (en) Differentiating method of fault diagnosis of executing mechanism of aeroengine and sensor
CN107202750A (en) A kind of satellite-ground integrated monitoring quantitative remote sensing method for amalgamation processing of Atmospheric particulates
CN105205224A (en) Modeling method for soft measurement of time difference gaussian process regression based on fuzzy curve analysis
CN103773900B (en) Based on the solid state fermentation control method of neural network and particle cluster algorithm
CN111308979B (en) U control system based on multi-rate delay state space model
CN111381498B (en) Expectation maximization identification method of multi-sensor based on multi-rate variable time-lag state space model
CN103278343B (en) A kind of recognition methods of key structural fatigue component
CN106650170A (en) Method for evaluating reliability of hydraulic servo actuator
CN102004444A (en) Multi-model predictive control method for component content in process of extracting rare earth
CN110231447A (en) The method, apparatus and terminal device of water quality abnormality detection
CN107547067A (en) A kind of multi-model self calibration EKF method
Keith-Roach et al. Seasonal changes in the microbial community of a salt marsh, measured by phospholipid fatty acid analysis
CN101916394A (en) Knowledge fusion-based online soft measurement method
CN103399134B (en) Sewage COD soft measurement method based on output observer
CN111274630A (en) Physical mode extraction method for engineering structure flexibility recognition
CN104462022A (en) Aircraft dynamics system parameter identifiability analitical method
CN106706491A (en) Intelligent detection method for water permeation rate of membrane bioreactor MBR
CN107561934B (en) Output-only structure modal parameter identification method based on multi-reference time domain transfer rate
Field Efficient hydrologic tracer-test design for tracer-mass estimation and sample-collection frequency, 1, method development
CN102253663B (en) Leakage fault diagnose method and system thereof for networked three-container water tank system
Shao et al. An improved multisensor self-adaptive weighted fusion algorithm based on discrete Kalman filtering
CN110929809A (en) Soft measurement method for key water quality index of sewage by using characteristic self-enhanced circulating neural network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 212028 No. 518, Chang Xiang Road, University Park, Zhenjiang, Jiangsu

Patentee after: Zhenjiang College

Address before: Zhenjiang City, Jiangsu Province, 212003 Jingkou District Road No. 61

Patentee before: Zhenjiang College