<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">Sensors</journal-id>
<journal-title>Sensors</journal-title>
<issn pub-type="epub">1424-8220</issn>
<publisher>
<publisher-name>Molecular Diversity Preservation International (MDPI)</publisher-name></publisher></journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3390/s90200895</article-id>
<article-id pub-id-type="publisher-id">sensors-09-00895</article-id>
<article-categories>
<subj-group>
<subject>Article</subject></subj-group></article-categories>
<title-group>
<article-title>A Real-Time De-Noising Algorithm for E-Noses in a Wireless Sensor Network</article-title></title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Qu</surname><given-names>Jianfeng</given-names></name><xref ref-type="aff" rid="af1-sensors-09-00895"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Chai</surname><given-names>Yi</given-names></name><xref ref-type="aff" rid="af1-sensors-09-00895"><sup>1</sup></xref></contrib>
<contrib contrib-type="author">
<name><surname>Yang</surname><given-names>Simon X.</given-names></name><xref ref-type="aff" rid="af2-sensors-09-00895"><sup>2</sup></xref><xref ref-type="corresp" rid="c1-sensors-09-00895"><sup>*</sup></xref></contrib></contrib-group>
<aff id="af1-sensors-09-00895">
<label>1</label> College of Automation, Chongqing University, Chongqing, P.R. China 400030; E-Mails: <email>sxbjq@163.com</email>; <email>chaiyi@cqu.edu.cn</email></aff>
<aff id="af2-sensors-09-00895">
<label>2</label> School of Engineering, University of Guelph, Guelph, ON, Canada, N1G 2W1</aff>
<author-notes>
<corresp id="c1-sensors-09-00895">
<label>*</label>Author to whom all correspondence should be addressed; E-Mail: <email>syang@uoguelph.ca</email></corresp></author-notes>
<pub-date pub-type="collection">
<year>2009</year></pub-date>
<pub-date pub-type="epub">
<day>11</day>
<month>2</month>
<year>2009</year></pub-date>
<volume>9</volume>
<issue>02</issue>
<fpage>895</fpage>
<lpage>908</lpage>
<history>
<date date-type="received">
<day>3</day>
<month>12</month>
<year>2008</year></date>
<date date-type="rev-recd">
<day>15</day>
<month>1</month>
<year>2009</year></date>
<date date-type="accepted">
<day>9</day>
<month>2</month>
<year>2009</year></date></history>
<permissions>
<copyright-statement>© 2009 by the authors; licensee Molecular Diversity Preservation International, Basel, Switzerland.</copyright-statement>
<copyright-year>2009</copyright-year>
<license>
<p>This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).</p></license></permissions>
<abstract>
<p>A wireless e-nose network system is developed for the special purpose of monitoring odorant gases and accurately estimating odor strength in and around livestock farms. This system is to simultaneously acquire accurate odor strength values remotely at various locations, where each node is an e-nose that includes four metal-oxide semiconductor (MOS) gas sensors. A modified Kalman filtering technique is proposed for collecting raw data and de-noising based on the output noise characteristics of those gas sensors. The measurement noise variance is obtained in real time by data analysis using the proposed slip windows average method. The optimal system noise variance of the filter is obtained by using the experiments data. The Kalman filter theory on how to acquire MOS gas sensors data is discussed. Simulation results demonstrate that the proposed method can adjust the Kalman filter parameters and significantly reduce the noise from the gas sensors.</p></abstract>
<kwd-group>
<kwd>Kalman filter</kwd>
<kwd>MOS gas sensor</kwd>
<kwd>noise reduction</kwd>
<kwd>data analysis</kwd></kwd-group></article-meta></front>
<body>
<sec sec-type="intro">
<label>1.</label>
<title>Introduction</title>
<p>The environment is being affected more and more by the release of odorant pollutants in the atmosphere. These odors may discomfort the olfaction system and can even be harmful to human health. Electronic noses (e-noses) have been widely investigated [<xref ref-type="bibr" rid="b1-sensors-09-00895">1</xref>,<xref ref-type="bibr" rid="b2-sensors-09-00895">2</xref>], and are used for real-time environmental monitoring to prevent poison gas attacks by terrorists and gas leaks in chemical plants [<xref ref-type="bibr" rid="b3-sensors-09-00895">3</xref>-<xref ref-type="bibr" rid="b5-sensors-09-00895">5</xref>]. A single e-nose can only measures the odor strength at one location, and cannot evaluate the overall odor plume map around the monitored environment. The proposed wireless e-nose network system is able to collect remote odor data in real time and conduct further analysis for effective odor management.</p>
<p>In environment monitoring using a wireless e-nose network [<xref ref-type="bibr" rid="b3-sensors-09-00895">3</xref>,<xref ref-type="bibr" rid="b5-sensors-09-00895">5</xref>,<xref ref-type="bibr" rid="b6-sensors-09-00895">6</xref>], accurate odor measurement is essential for many applications such as development of odor dispersion models and estimation of odor source location based on the odor data [<xref ref-type="bibr" rid="b7-sensors-09-00895">7</xref>]. A wireless e-nose network system is composed of many e-nose nodes that are deployed in a monitoring region. These e-nose nodes are composed of an array of Metal-Oxide Semiconductor (MOS) gas sensors. The output signals from the MOS gas sensors contain not only gas signals, but also noise. The noise results in inaccuracies in analyzing data and estimating the odor strength. In a previous study, an e-nose consisted of a sensor array and an intelligent analysis system was developed, but the noise reduction of gas sensors was not well investigated [<xref ref-type="bibr" rid="b8-sensors-09-00895">8</xref>,<xref ref-type="bibr" rid="b9-sensors-09-00895">9</xref>].</p>
<p>The Kalman filtering algorithm is a recursive algorithm to solve the state estimation problems of known systems based on certain mathematical models and the observation of noisy measurements. Many modified filtering schemes have been developed to tackle the problems in various applications [<xref ref-type="bibr" rid="b10-sensors-09-00895">10</xref>], e.g., a decentralized Kalman filtering algorithm to estimate collaborative information in wireless sensor networks [<xref ref-type="bibr" rid="b11-sensors-09-00895">11</xref>], an adaptive Kalman filtering algorithm to reduce the noise for GPS and INS systems [<xref ref-type="bibr" rid="b12-sensors-09-00895">12</xref>].</p>
<p>In this paper, a wireless e-nose prototype is developed to acquire MOS gas sensor output signals and send them to a remote server. A modified Kalman filtering technique is developed for improving the sensor sensitivity and precision of odor strength measurement. It can adapt in real time to adjust the measurement noise variance of the filter parameters. In addition, the optimal parameter of system noise variance is obtained by using the experimental data. Application of Kalman filter theory to the acquired MOS gas sensors data is discussed.</p></sec>
<sec>
<label>2.</label>
<title>Hardware Development</title>
<p>The block diagram of the proposed e-nose prototype is presented in <xref ref-type="fig" rid="f1-sensors-09-00895">Figure 1</xref>. It is mainly composed of two parts: the odorant gas measurement chamber unit, and the signal processing and wireless communication unit.</p>
<sec>
<label>2.1.</label>
<title>Development of the e-nose prototype</title>
<p>The odorant gas measurement chamber unit is shown in <xref ref-type="fig" rid="f2-sensors-09-00895">Figure 2</xref>. Based on previous extensive investigation and experiments, four MOS gas sensors (listed in <xref ref-type="table" rid="t1-sensors-09-00895">Table 1</xref>) were adopted [<xref ref-type="bibr" rid="b13-sensors-09-00895">13</xref>]. These four gas sensors can measure most of the major odorant gas compounds found in livestock farm odors. An electrical board is perforated with some holes and the four sensor pedestals are placed circularly; these pedestals have good compatibility, and can easily be replaced by different gas sensors. This electrical board is fixed on a plastic material chamber by using screws and nuts. A suction micro air pump is placed on the outlet of this chamber to ensure sufficient flow rate for the measurements.</p>
<p>The signal processing and wireless communication unit is shown in <xref ref-type="fig" rid="f3-sensors-09-00895">Figure 3</xref>, which is the brain of the e-nose prototype. The MicaZ node (from Crossbow Technology Inc., USA) is used and a voltage following circuit is situated on the data acquisition board. This unit is in charge of data acquisition, data processing and data transfer. The interface circuit uses only a voltage follower as a buffer between the sensor output and the A/D converter, which makes the system less sensitive to external disturbance. The MicaZ has advantages of the small physical size, low cost and low power consumption, making it ideal for this odor monitoring application. The MicaZ includes a processor and radio. The processor on the MicaZ primary consists of Atmegal-128L, which is in charge of data acquisition control, data processor control and data transfer control. The radio on the MicaZ primarily consists of a Chipcon CC2420, a basic 2,400 MHz ISM band transceiver compliant to IEEE 802.15.4/ZigBee protocol. Therefore, this unit of data acquisition, data processing, and data transfer ensures continuous data measurement.</p></sec>
<sec sec-type="methods">
<label>2.2.</label>
<title>Circuit design for the gas sensors</title>
<p>A MOS gas sensor circuit and its interface diagram are shown in <xref ref-type="fig" rid="f4-sensors-09-00895">Figure 4</xref>, where <italic>R<sub>H</sub></italic> is the gas sensor heater; R<sub>s</sub> is the output resistance of the gas sensor, which changes with the variation of odor strength due to the presence of detectable odors. The voltage <italic>V<sub>out</sub></italic> on the resistor <italic>R<sub>L</sub></italic> will be changed as <italic>R<sub>S</sub></italic> changes, the voltage <italic>V<sub>out</sub></italic> can be measured, and then output resistance <italic>R<sub>s</sub></italic> can be calculated as:
<disp-formula id="FD1">
<label>(1)</label>
<mml:math id="mm1" display="block">
<mml:semantics id="sm1">
<mml:mrow>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>s</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>V</mml:mi>
<mml:mi>c</mml:mi>
<mml:mo>×</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>L</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>V</mml:mi>
<mml:mrow>
<mml:mi mathvariant="italic">out</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>L</mml:mi></mml:msub></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>The odor strength can be obtained from the table of sensor sensitivity characteristics curve by using the calculated <italic>R<sub>s</sub></italic> value.</p></sec></sec>
<sec sec-type="methods">
<label>3.</label>
<title>MOS gas sensor noise analysis</title>
<p>Noise unavoidably appears at all times in an odor sensing system. The two most common forms of noise are the circuit factor noise and environmental factor noise (see <xref ref-type="fig" rid="f5-sensors-09-00895">Figure 5</xref>).</p>
<sec>
<label>3.1.</label>
<title>Circuit factors noise</title>
<p>Circuit noise appears in the odor strength measurement process because the MOS gas sensors must work at the temperature of about 300°C, resulting in high resistor thermoelectric noise. Every semiconductor component of the interface circuit, such as voltage follower and regulated resistor, has its own circuit noise. Random movement of electrons and other charge carriers in resistors and semiconductors variation at random speed will result in random noise. Some noise also comes from factors related to the MOS gas sensors themselves. These factors include MOS gas sensor age, exposure to water and excess voltage, the bulk dissolution of surface atoms, mechanical wear and fatigue, self-heating, poisoning, and oxidation.</p></sec>
<sec>
<label>3.2.</label>
<title>Environmental factors noise</title>
<p>In the actual odor strength measurement process, environmental factors such as ambient humidity, pressure variation and ambient temperature can all affect the output signals from the electronic gas sensors. Since MOS type gas sensors rely on the absorption and desorption of the odorant particles on their surface to generate signals, environmental factors can cause obvious changes in the response and the speed of the sensor response by altering the rate of the chemical reactions involved. The resistance of MOS gas sensors falls significantly as the humidity increases, but it will increase as the temperature increases. Furthermore, the impact on various gas sensors from environmental factors is not uniform, therefore, system parameters should be properly adjusted in the de-noise process as the environmental factors.</p></sec></sec>
<sec>
<label>4.</label>
<title>Kalman filter model for odor strength measurements</title>
<p>The Kalman filtering model is based on two sources of uncertainties: measurement noise introduced by the sensor and circuit noise, and the true strength variability; odor strength optimal estimation problem is modeled by a linear stochastic system. The system state vector <italic>x<sub>k</sub></italic> and the measurement vector <italic>y<sub>k</sub></italic> are described as:
<disp-formula id="FD2">
<label>(2)</label>
<mml:math id="mm2" display="block">
<mml:semantics id="sm2">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>A</mml:mi>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>u</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>ω</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>ω</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD3">
<label>(3)</label>
<mml:math id="mm3" display="block">
<mml:semantics id="sm3">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>ν</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where, <italic>x<sub>k</sub></italic> is the system state vector; <italic>y<sub>k</sub></italic> is the measurement vector; <italic>u<sub>k</sub></italic> is the input vector (there is no input, <italic>u<sub>k</sub></italic> =0); <italic>ω<sub>k</sub></italic> is the process noise vector; and <italic>v<sub>k</sub></italic> is the measurement noise vector. Pa rameter <italic>A</italic> is an identity matrix, which denotes the system matrix, and <italic>C</italic> is the measurement matrix, which transforms measurement voltage value to resistor value using <xref ref-type="disp-formula" rid="FD1">Equation (1)</xref>.</p>
<p>The noise covariance of <italic>ω<sub>k</sub></italic> and <italic>v<sub>k</sub></italic> are given as:
<disp-formula id="FD4">
<label>(4)</label>
<mml:math id="mm4" display="block">
<mml:semantics id="sm4">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:msub>
<mml:mi>ω</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>ω</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>=</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD5">
<label>(5)</label>
<mml:math id="mm5" display="block">
<mml:semantics id="sm5">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:msub>
<mml:mi>ν</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>ν</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD6">
<label>(6)</label>
<mml:math id="mm6" display="block">
<mml:semantics id="sm6">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:msub>
<mml:mi>ω</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>ν</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>the <italic>a priori</italic> estimation error and estimation error variance are defined as:
<disp-formula id="FD7">
<label>(7)</label>
<mml:math id="mm7" display="block">
<mml:semantics id="sm7">
<mml:mrow>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>K</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD8">
<label>(8)</label>
<mml:math id="mm8" display="block">
<mml:semantics id="sm8">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>and, the <italic>a posteriori</italic> estimation error and estimation error variance are defined as:
<disp-formula id="FD9">
<label>(9)</label>
<mml:math id="mm9" display="block">
<mml:semantics id="sm9">
<mml:mrow>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>K</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD10">
<label>(10)</label>
<mml:math id="mm10" display="block">
<mml:semantics id="sm10">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msubsup>
<mml:mi>e</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>The system state prediction at step <italic>k</italic>+1 can be denoted by the <italic>a posteriori</italic> estimation at step <italic>k</italic> as:
<disp-formula id="FD11">
<label>(11)</label>
<mml:math id="mm11" display="block">
<mml:semantics id="sm11">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>The <italic>a posteriori</italic> estimation can be denoted by a linear combination of the <italic>a priori</italic> estimate and a weighted difference between actual measurement and the <italic>a priori</italic> estimate as [<xref ref-type="bibr" rid="b10-sensors-09-00895">10</xref>]:
<disp-formula id="FD12">
<label>(12)</label>
<mml:math id="mm12" display="block">
<mml:semantics id="sm12">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>In practice, 
<inline-formula>
<mml:math id="mm13">
<mml:semantics id="sm13">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> is the strength estimation at step <italic>k</italic>; 
<inline-formula>
<mml:math id="mm14">
<mml:semantics id="sm14">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> is the predicted strength estimation at step; <italic>k</italic> + 1 
<inline-formula>
<mml:math id="mm15">
<mml:semantics id="sm15">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> is the <italic>a posteriori</italic> strength estimation at step; <italic>k</italic> + 1; y<sub>k+1</sub> is the actual strength measurement value at step <italic>k</italic>+1; the difference 
<inline-formula>
<mml:math id="mm16">
<mml:semantics id="sm16">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:semantics></mml:math></inline-formula> is called the measurement innovation, which reflects the discrepancy between the system state prediction and the actual measurement quantity; and the weighted value <italic>k</italic>+1 is the Kalman gain at step <italic>k</italic>+1. The Kalman gain <italic>k<sub>k</sub></italic> is defined as:
<disp-formula id="FD13">
<label>(13)</label>
<mml:math id="mm17" display="block">
<mml:semantics id="sm17">
<mml:mrow>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfrac>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where 
<inline-formula>
<mml:math id="mm18">
<mml:semantics id="sm18">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and <italic>R<sub>k</sub></italic> are from <xref ref-type="disp-formula" rid="FD8">Equations (8)</xref> and <xref ref-type="disp-formula" rid="FD5">(5)</xref>, respectively.</p>
<p>The Kalman gain reflects the relationship between measurement and estimation. It indicates which one would be more reliable and should be “accepted” by the final estimation. The sensor is more reliable and the samples have lower variability, then the measurement error variance <italic>R<sub>k</sub></italic> will be smaller, and the Kalman gain, which can be obtained from <xref ref-type="disp-formula" rid="FD13">Equation (13)</xref>, will be larger, because the Kalman gain is the weight factor of the measurement innovation in <xref ref-type="disp-formula" rid="FD12">Equation (12)</xref>; if the Kalman gain increases, then the weight factor of the measurement innovation will increase, and the <italic>a posteriori</italic> strength estimate quantity 
<inline-formula>
<mml:math id="mm19">
<mml:semantics id="sm19">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> will have more from the actual measurement value and less from the predicted value.</p>
<p>The <italic>a posteriori</italic> estimate error variance 
<inline-formula>
<mml:math id="mm20">
<mml:semantics id="sm20">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> is defined as a function of the weight factor <italic>k<sub>k</sub></italic> and the <italic>a priori</italic> estimation error variance. Thus the <italic>a priori</italic> and <italic>posteriori</italic> estimates 
<inline-formula>
<mml:math id="mm21">
<mml:semantics id="sm21">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and 
<inline-formula>
<mml:math id="mm22">
<mml:semantics id="sm22">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> are defined as:
<disp-formula id="FD14">
<label>(14)</label>
<mml:math id="mm23" display="block">
<mml:semantics id="sm23">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD15">
<label>(15)</label>
<mml:math id="mm24" display="block">
<mml:semantics id="sm24">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">[</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>I</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p></sec>
<sec>
<label>5.</label>
<title>Modified Kalman filter</title>
<p>Tian <italic>et al.</italic> [<xref ref-type="bibr" rid="b8-sensors-09-00895">8</xref>] analyzed the circuit and noise of MOS gas sensors in an e-nose; they concluded that the noise of these resistive type MOS gas sensors can be treated as Gaussian white noise plus some stronger low frequency direct current components. A standard Kalman filter solves the state estimation problems based on some certain assumptions in a system mathematical model, obtaining complete information about noise statistics as a Gaussian white noise; however, if there is uncertainty about the noise characteristics, the filter may not be robust enough. In this section, a modified filter algorithm based on the standard Kalman filter is proposed, which can adjust measurement noise covariance by using a slip windows average to reduce the noises, even if the sensor noise characteristics is unknown in advance.</p>
<sec>
<label>5.1.</label>
<title>Modified the measurement equation</title>
<p>The new odor strength measurement equation based on the noise analysis of MOS gas sensors can be modeled by:
<disp-formula id="FD16">
<label>(16)</label>
<mml:math id="mm25" display="block">
<mml:semantics id="sm25">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>d</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where <italic>d<sub>k</sub></italic> is the direct current noise component with the same frequency as the signal; <italic>s<sub>k</sub></italic> is the white noise, <italic>y<sub>k</sub></italic> is the measurement vector; and <italic>C</italic>is a measurement matrix.</p>
<p>A slip window average algorithm is proposed that is robust in estimating of the measurement average error. Given the window size <italic>m</italic>, the estimation of measurement average error is defined as:
<disp-formula id="FD17">
<label>(17)</label>
<mml:math id="mm26" display="block">
<mml:semantics id="sm26">
<mml:mrow>
<mml:msub>
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mi>m</mml:mi></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>k</mml:mi></mml:munderover>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>i</mml:mi></mml:msub></mml:mrow>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>From <xref ref-type="disp-formula" rid="FD16">Equation (16)</xref>, the white noise <italic>s<sub>k</sub></italic> is given as <italic>s<sub>k</sub></italic> = <italic>y<sub>k</sub></italic> − <italic>Cx<sub>k</sub></italic> − <italic>d<sub>k</sub></italic>; if replace <italic>x<sub>k</sub></italic> by the estimated value of odor strength <italic>x</italic>̂<sub>k</sub>, and replace <italic>d<sub>k</sub></italic> by the measurement average error <italic>d</italic>̂<sub>k</sub>, then the measurement error can be defined as:
<disp-formula id="FD18">
<label>(18)</label>
<mml:math id="mm27" display="block">
<mml:semantics id="sm27">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="italic">ɛ</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>which includes all the measurement errors and white noise.</p>
<p>In <xref ref-type="disp-formula" rid="FD16">Equation (16)</xref>, replacing <italic>d<sub>k</sub></italic> with the estimated measurement average error, <italic>d</italic>̂<sub>k</sub> then have:
<disp-formula id="FD19">
<label>(19)</label>
<mml:math id="mm28" display="block">
<mml:semantics id="sm28">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>and, the new measurement vector <italic>z<sub>k</sub></italic> can be defined as:
<disp-formula id="FD20">
<label>(20)</label>
<mml:math id="mm29" display="block">
<mml:semantics id="sm29">
<mml:mrow>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>From <xref ref-type="disp-formula" rid="FD19">Equations (19)</xref> and <xref ref-type="disp-formula" rid="FD20">(20)</xref>, the new measurement equations can be expressed as a Gaussian white noise skplus the system state <italic>x<sub>k</sub></italic>:
<disp-formula id="FD21">
<label>(21)</label>
<mml:math id="mm30" display="block">
<mml:semantics id="sm30">
<mml:mrow>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Plugging <xref ref-type="disp-formula" rid="FD20">(20)</xref> into <xref ref-type="disp-formula" rid="FD18">Equation (18)</xref>, then have:
<disp-formula id="FD22">
<label>(22)</label>
<mml:math id="mm31" display="block">
<mml:semantics id="sm31">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="italic">ɛ</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>Replacing x̂<italic><sub>k</sub></italic> with the predicted strength estimation 
<inline-formula>
<mml:math id="mm32">
<mml:semantics id="sm32">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>, then the new innovation <italic>I<sub>k</sub></italic> is defined as:
<disp-formula id="FD23">
<label>(23)</label>
<mml:math id="mm33" display="block">
<mml:semantics id="sm33">
<mml:mrow>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p></sec>
<sec>
<label>5.2.</label>
<title>Adaptive estimation of the measurement error covariance</title>
<p>The noise from the sensors and environment will shift dynamically during the odor strength measurement process. The measurement error variance should therefore also be adjusted dynamically in the actual filter implementation process, so an algorithm for adaptive estimation of the measurement error variance is proposed.</p>
<p>From <xref ref-type="disp-formula" rid="FD6">Equation (6)</xref> <italic>v<sub>k</sub></italic> is orthogonal to ω and ω is in parallel with every vector in <italic>x<sub>k</sub></italic>, thus <italic>v<sub>k</sub></italic> is orthogonal to every vector in, <italic>x<sub>k</sub></italic> in particular to 
<inline-formula>
<mml:math id="mm34">
<mml:semantics id="sm34">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>, that is:
<disp-formula id="FD24">
<label>(24)</label>
<mml:math id="mm35" display="block">
<mml:semantics id="sm35">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>From <xref ref-type="disp-formula" rid="FD7">Equations (7)</xref>, <xref ref-type="disp-formula" rid="FD8">(8)</xref> and <xref ref-type="disp-formula" rid="FD24">(24)</xref>, the covariance of innovation can be obtained as:
<disp-formula id="FD25">
<label>(25)</label>
<mml:math id="mm36" display="block">
<mml:semantics id="sm36">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo stretchy="false">)</mml:mo>
<mml:msubsup>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD26">
<label>(26)</label>
<mml:math id="mm37" display="block">
<mml:semantics id="sm37">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>P</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msubsup>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>where <italic>P</italic>̂<italic><sub>k</sub></italic> is the estimation of. <italic>P<sub>k</sub></italic> Using the slip window average algorithm the covariance of innovation can be calculated as:
<disp-formula id="FD27">
<label>(27)</label>
<mml:math id="mm38" display="block">
<mml:semantics id="sm38">
<mml:mrow>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>I</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mi>n</mml:mi></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>n</mml:mi></mml:munderover>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>so the measurement noise covariance can be estimated as:
<disp-formula id="FD28">
<label>(28)</label>
<mml:math id="mm39" display="block">
<mml:semantics id="sm39">
<mml:mrow>
<mml:msub>
<mml:mover accent="true">
<mml:mi>R</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mi>n</mml:mi></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>n</mml:mi></mml:munderover>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>P</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msubsup>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p></sec>
<sec>
<label>5.3.</label>
<title>Error variance ratio factor λ</title>
<p>The measurement error variance represents how much noise the sensor is introduced into the measured strength from one measurement to the next one, and the process error covariance represents how much the true strength would vary from one measurement to the next one. In real-time estimation, the measurement error variance and process error covariance vary with the strength changes. Generally, determining the measurement noise variance in the actual implementation of the Kalman filter is possible. It can be determined by using the slip window algorithm proposed in this paper. Determining the system noise variance, however, is more difficult and complicated, as in practice the actual process value can only be estimated and it is impossible to obtain the accurate values. In the proposed algorithm, the process error covariance is estimated by using the error variance ratio factor, and the error variance ratio factor optimal range of each gas sensor is determined in the experiment, as given in Section 6.2. Thus, the error variance ratio can be defined as:
<disp-formula id="FD29">
<label>(29)</label>
<mml:math id="mm40" display="block">
<mml:semantics id="sm40">
<mml:mrow>
<mml:mi>λ</mml:mi>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>Q</mml:mi>
<mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfrac>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p></sec></sec>
<sec>
<label>5.4.</label>
<title>Modified Kalman filter algorithm</title>
<p>The modified Kalman filter reduced the noise in the strength measurement process by using feedback control. The filter estimates the strength from the odor strength at a previous time step and the sensor measurement with the noise component. The equations for the modified Kalman filter fall into two groups: time updating equations and measurement updating equations. The time updating equations are responsible for projecting forward the time, obtaining an <italic>a priori</italic> estimation and error covariance estimation of the next time step. The measurement updating equations are responsible for the feedback, incorporating a new measurement into the <italic>a priori</italic> strength estimation, in order to obtain an improved <italic>a posteriori</italic> estimation.</p>
<p>The time updating equations from time step <italic>k−1</italic> to step <italic>k</italic>, the previous state 
<inline-formula>
<mml:math id="mm41">
<mml:semantics id="sm41">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and previous error covariance estimates 
<inline-formula>
<mml:math id="mm42">
<mml:semantics id="sm42">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> are used to obtain the next time <italic>a priori</italic> estimations s 
<inline-formula>
<mml:math id="mm43">
<mml:semantics id="sm43">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and 
<inline-formula>
<mml:math id="mm44">
<mml:semantics id="sm44">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>, which are given as:
<disp-formula id="FD30">
<label>(30)</label>
<mml:math id="mm45" display="block">
<mml:semantics id="sm45">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD31">
<label>(31)</label>
<mml:math id="mm46" display="block">
<mml:semantics id="sm46">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>The measurement updating equations incorporate a new observation <italic>y<sub>k</sub></italic> into an <italic>a priori</italic> estimation 
<inline-formula>
<mml:math id="mm47">
<mml:semantics id="sm47">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> from the time updating equations to obtain an improved <italic>a posteriori</italic> estimation 
<inline-formula>
<mml:math id="mm48">
<mml:semantics id="sm48">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>, which are given as:
<disp-formula id="FD32">
<label>(32)</label>
<mml:math id="mm49" display="block">
<mml:semantics id="sm49">
<mml:mrow>
<mml:msub>
<mml:mover accent="true">
<mml:mi>d</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mi>j</mml:mi></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>=</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>k</mml:mi></mml:munderover>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="italic">ɛ</mml:mi>
<mml:mi>n</mml:mi></mml:msub></mml:mrow>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD33">
<label>(33)</label>
<mml:math id="mm50" display="block">
<mml:semantics id="sm50">
<mml:mrow>
<mml:msub>
<mml:mover accent="true">
<mml:mi>R</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>v</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mi>n</mml:mi></mml:mfrac>
<mml:munderover>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn></mml:mrow>
<mml:mi>n</mml:mi></mml:munderover>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub></mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msub>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>T</mml:mi></mml:msup>
<mml:mo>−</mml:mo>
<mml:msub>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msubsup>
<mml:mi>H</mml:mi>
<mml:mi>k</mml:mi>
<mml:mi>T</mml:mi></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD34">
<label>(34)</label>
<mml:math id="mm51" display="block">
<mml:semantics id="sm51">
<mml:mrow>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mrow>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msup>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup></mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfrac>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD35">
<label>(35)</label>
<mml:math id="mm52" display="block">
<mml:semantics id="sm52">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>I</mml:mi>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD36">
<label>(36)</label>
<mml:math id="mm53" display="block">
<mml:semantics id="sm53">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup>
<mml:mo>=</mml:mo>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>k</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>z</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>−</mml:mo>
<mml:mi>C</mml:mi>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>−</mml:mo></mml:msubsup>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula>
<disp-formula id="FD37">
<label>(37)</label>
<mml:math id="mm54" display="block">
<mml:semantics id="sm54">
<mml:mrow>
<mml:msub>
<mml:mi>Q</mml:mi>
<mml:mi>k</mml:mi></mml:msub>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mi>R</mml:mi>
<mml:mi>k</mml:mi></mml:msub></mml:mrow>
<mml:mi>λ</mml:mi></mml:mfrac>
<mml:mo>.</mml:mo></mml:mrow></mml:semantics></mml:math></disp-formula></p>
<p>The first step is to select an initial <italic>a priori</italic> value 
<inline-formula>
<mml:math id="mm55">
<mml:semantics id="sm55">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mn>0</mml:mn>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and the error variance. <italic>p<sub>0</sub></italic> The selection of these values has no constraints, since the filter will converge to an appropriate value automatically; however, if they are chosen in the dynamic range of the expected odor strength then the errors will converge rapidly.</p>
<p>Subsequently, the sensor performs a strength measurement to obtain <italic>y<sub>k</sub></italic>, using the proposed slip window average method to estimate the direct current components <italic>d</italic>̂<italic><sub>k</sub></italic> and. <italic>R</italic>̂<italic><sub>k</sub></italic> The next step involves taking those estimations to compute the Kalman gain, <italic>k<sub>k</sub> a posteriori</italic> error variance 
<inline-formula>
<mml:math id="mm56">
<mml:semantics id="sm56">
<mml:mrow>
<mml:msubsup>
<mml:mi>p</mml:mi>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula> and <italic>a posteriori</italic> estimation 
<inline-formula>
<mml:math id="mm57">
<mml:semantics id="sm57">
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>x</mml:mi>
<mml:mo>^</mml:mo></mml:mover>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo></mml:msubsup></mml:mrow></mml:semantics></mml:math></inline-formula>. The following step is to calculate the system error variance <italic>Q<sub>k</sub></italic> using the measurement variance and variance ratio factor. A loop cycle of the modified Kalman filter algorithm is thus finished. The filter will use the new <italic>a posteriori</italic> estimation and system variance in the time updating equations.</p></sec>
<sec sec-type="results">
<label>6.</label>
<title>Results</title>
<p>The developed e-nose prototype was used in a livestock research farm at the University of Guelph in Canada. In the experiments, the four MOS gas sensors in <xref ref-type="table" rid="t1-sensors-09-00895">Table 1</xref> were installed in every e-nose node. In addition, the continuous heat regime was used in the experiments. By running the e-nose prototype to collect odor data for approximately 500 minutes in this period, each sensor acquired 500 simultaneous odor measurements data. A laptop computer running Matlab 7.0 software was used to process the data and to determine the optimal error variance ratio factor. These optimal values were then used in the noise reduction for the e-nose gas sensors.</p>
<sec>
<label>6.1.</label>
<title>Determination of variance ratio factor</title>
<p>A series of experiments were conducted with different values of <italic>λ</italic> in the de-noising process, in order to ascertain optimal range of this parameter. For simplicity without losing generality, the parameter determination for Sensor 1 is used as an example to exlpain the process. In the following figures, the thin line indicates the measured raw data, and the thick lines indicate the filtered data.</p>
<p>As shown in <xref ref-type="fig" rid="f6-sensors-09-00895">Figure 6(a)</xref>, the filtered data fluctuate tempestuously like the raw data when <italic>λ</italic> =0.1; the filter result is inaccurate, it cannot be used for actual real-time estimation of odor strength. The filtered results are shown in <xref ref-type="fig" rid="f6-sensors-09-00895">Figure 6(b)</xref> when <italic>λ</italic>=1 and in <xref ref-type="fig" rid="f6-sensors-09-00895">Figure 6(c)</xref> when <italic>λ</italic>=10; the filtered data is significantly smoother than the raw data, nevertheless, in some sections the filtered data still fluctuate sharply.</p>
<p>The filtered result when the optimal variance ratio <italic>λ</italic> increases from the range of approximately 100 is shown in <xref ref-type="fig" rid="f6-sensors-09-00895">Figure 6(d)</xref>. It shows that the filter is effective, and the noise is reduced by using the filter. The performance of the filter is improved to an acceptable level when <italic>λ</italic> =100, and the parameter <italic>λ</italic> can be continued increasing to ascertain its optimal range. As shown in <xref ref-type="fig" rid="f6-sensors-09-00895">Figure 6(e)</xref>, when <italic>λ</italic> increases to 1,000, the filter performance is more effective and the filtered line is smoother; however, in sections A and B in the filtered data line, the filtered line is lagged behind the true changes; the filtered line cannot denote the dynamic characteristics of odor strength changes.</p>
<p>Continuing the simulations using various <italic>λ</italic> values (including 50, 100, 150, 200, and 250) for the collection data, the results with all of these values were observed. The optimal parameter value of the variance ratio factor for the gas sensor 1 is 100. Fluctuations will appear tempestuously when the parameter value is too small, and lags will appear in the filtered line when the parameter is too large. Furthermore, gas sensor outputs will change with the sensors type, service time and manufacture.</p>
<p>For a more accurate result, the measurement error variance and the ratio need to be properly tuned. The optimal variance ratio <italic>λ</italic> for the four sensors in the e-nose prototype is obtained by the experiments, which are listed in <xref ref-type="table" rid="t2-sensors-09-00895">Table 2</xref>.</p></sec>
<sec>
<label>6.2.</label>
<title>Filtered results of the four gas sensors</title>
<p>The noise of the gas sensors is reduced by using the proposed adaptive filtering technique. The results are shown in <xref ref-type="fig" rid="f7-sensors-09-00895">Figure 7</xref>. In the initialization transient periods (sections A, B, C, D in the figure), the filtered lines lag behind the raw data lines; meanwhile, the algorithm adjusts the parameters of the filters. After completing the adjustment to the parameter, the filters reduce the noise of the raw data, and estimate the optimal odor strength data. With the filter time prolonged, the parameter of the filter will adjust to the optimal value.</p></sec>
<sec>
<label>6.3.</label>
<title>Comparison to the conventional Kalman filter algorithm</title>
<p>A standard Kalman filter solves the noise reduction problems based on assumptions that the measurement noise variance is a determined value; however, the measurement noise variance will fluctuate constantly with the filter step prolonged. Therefore, it is improper to assume that the measurement noise variance is a determined value. The measurement noise variances are shown in <xref ref-type="fig" rid="f8-sensors-09-00895">Figure 8(a)</xref>. The filtered results by using the modified Kalman filter algorithm and the conventional Kalman filter algorithm are shown in <xref ref-type="fig" rid="f8-sensors-09-00895">Figure 8(b)</xref>. Compared to the conventional Kalman filter algorithm, the modified one can estimate the measurement noise variance adaptively. Moreover, except for the initialization transient periods, the filtered results show considerable improvement in comparison to those using the conventional methods.</p></sec></sec>
<sec sec-type="conclusions">
<label>7.</label>
<title>Conclusions</title>
<p>In this paper, a wireless e-nose prototype for a wireless sensor network that can accurately measure odorant gases and estimate odor strengths has been designed and implemented. The advantages of the e-nose prototype are its light weight, very small size, and flexibility in applications. Four commercial gas sensors are used. An interface circuit and a MicaZ are used for data acquisition, data analysis, and data transfer. Using the developed wireless e-nose network, remote and real-time odor measurements become possible.</p>
<p>Based on the output noise from gas sensor circuits, a real-time odor strength estimation model and a modified Kalman filter algorithm are proposed, which can improve the prediction capability and the accuracy of measurement. Using the proposed model and algorithm, the direct current component and Gaussian white noise are reduced considerably at the sensor outputs. In addition, even if the sensor noise characteristics is unknown in advance, the variance of measurement error can be changed adaptively. The experiments demonstrate that the modified Kalman algorithm is effective in the measurement of real-time odor strength of livestock farms odors.</p></sec></body>
<back>
<ack>
<p>This work is supported by Ontario Pork, and Natural Sciences and Engineering Research Council of Canada (NSERC). Jianfeng Qu gratefully acknowledges the financial support from the China Scholarship Council.</p></ack>
<ref-list>
<title>References and Notes</title>
<ref id="b1-sensors-09-00895"><label>1.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nawaf</surname><given-names>A.K.</given-names></name><name><surname>Jens</surname><given-names>J.L.I.</given-names></name></person-group><article-title>Classification of mixtures of odorants from livestock buildings by a sensor array (an electronic tongue)</article-title><source>Sensors</source><year>2007</year><volume>7</volume><fpage>129</fpage><lpage>143</lpage><pub-id pub-id-type="doi">10.3390/s7010129</pub-id></citation></ref>
<ref id="b2-sensors-09-00895"><label>2.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Casalinuovo</surname><given-names>I.A.</given-names></name><name><surname>Pierro</surname><given-names>D.D.</given-names></name><name><surname>Coletta</surname><given-names>M</given-names></name><name><surname>Francesco</surname><given-names>D.P.</given-names></name></person-group><article-title>Application of electronic noses for disease diagnosis and food spoilage detection</article-title><source>Sensors</source><year>2006</year><volume>6</volume><fpage>1428</fpage><lpage>1439</lpage><pub-id pub-id-type="doi">10.3390/s6111428</pub-id></citation></ref>
<ref id="b3-sensors-09-00895"><label>3.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Pan</surname><given-names>L.L.</given-names></name><name><surname>Liu</surname><given-names>R.</given-names></name><name><surname>Peng</surname><given-names>S.H.</given-names></name><name><surname>Yang</surname><given-names>S.X.</given-names></name><name><surname>Gregori</surname><given-names>S.</given-names></name></person-group><article-title>Real-time monitoring system for odours around livestock farms</article-title><conf-name>Proceedings of the 2007 IEEE International Conference on Networking, Sensing and Control</conf-name><conf-loc>London</conf-loc><year>2007</year><fpage>883</fpage><lpage>888</lpage></citation></ref>
<ref id="b4-sensors-09-00895"><label>4.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gao</surname><given-names>D.Q.</given-names></name><name><surname>Chen</surname><given-names>W.</given-names></name></person-group><article-title>Simultaneous estimation of odor classes and concentrations using an electronic nose with function approximation model ensembles</article-title><source>Sens. Actuat.</source><year>2007</year><volume>2</volume><fpage>584</fpage><lpage>594</lpage></citation></ref>
<ref id="b5-sensors-09-00895"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Szczurek</surname><given-names>A.</given-names></name><name><surname>Maciejewska</surname><given-names>M.</given-names></name></person-group><article-title>Relationship between odour intensity assessed by human assessor and TGS sensor array response</article-title><source>Sens. Actuat. B: Chem.</source><year>2005</year><volume>1</volume><fpage>13</fpage><lpage>19</lpage></citation></ref>
<ref id="b6-sensors-09-00895"><label>6.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>N.</given-names></name><name><surname>Wang</surname><given-names>M.H.</given-names></name><name><surname>Zhang</surname><given-names>N.Q.</given-names></name></person-group><article-title>Wireless sensors in agriculture and food industry-recent development and future perspective</article-title><source>Comput. Electron. Agric.</source><year>2006</year><volume>1</volume><fpage>1</fpage><lpage>14</lpage></citation></ref>
<ref id="b7-sensors-09-00895"><label>7.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>L.</given-names></name><name><surname>Su</surname><given-names>S.W.</given-names></name><name><surname>Celler</surname><given-names>B.G.</given-names></name><name><surname>Savkin</surname><given-names>A.V.</given-names></name></person-group><article-title>Modeling of a gas concentration measurement system</article-title><conf-name>Proceedings of the 27th Annual International Conference of the IEEE EMBS</conf-name><conf-loc>Shanghai</conf-loc><year>2005</year><fpage>6695</fpage><lpage>6698</lpage></citation></ref>
<ref id="b8-sensors-09-00895"><label>8.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tian</surname><given-names>F.</given-names></name><name><surname>Yang</surname><given-names>S.X.</given-names></name><name><surname>Dong</surname><given-names>K.</given-names></name></person-group><article-title>Circuit and noise analysis of odorant gas sensors in an e-nose</article-title><source>Sensors</source><year>2005</year><volume>5</volume><fpage>85</fpage><lpage>96</lpage><pub-id pub-id-type="doi">10.3390/s5010085</pub-id></citation></ref>
<ref id="b9-sensors-09-00895"><label>9.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Huang</surname><given-names>Q.</given-names></name><name><surname>Liu</surname><given-names>J.</given-names></name><name><surname>Li</surname><given-names>H.W.</given-names></name></person-group><article-title>A modified adaptive stochastic resonance for detecting faint signal in sensors</article-title><source>Sensors</source><year>2007</year><volume>7</volume><fpage>157</fpage><lpage>165</lpage><pub-id pub-id-type="doi">10.3390/s7020157</pub-id></citation></ref>
<ref id="b10-sensors-09-00895"><label>10.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Leleux</surname><given-names>D.P.</given-names></name><name><surname>Claps</surname><given-names>R.</given-names></name><name><surname>Chen</surname><given-names>W.</given-names></name><name><surname>Tittel</surname><given-names>F.K.</given-names></name><name><surname>Harman</surname><given-names>T.L.</given-names></name></person-group><article-title>Applications of Kalman filtering to real-time trace gas concentration measurements</article-title><source>Appl. Phys. B: Lasers Opt.</source><year>2002</year><volume>74</volume><fpage>85</fpage><lpage>93</lpage><pub-id pub-id-type="doi">10.1007/s003400100751</pub-id></citation></ref>
<ref id="b11-sensors-09-00895"><label>11.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Olfati-Saber</surname><given-names>R.</given-names></name></person-group><article-title>Distributed Kalman filtering for sensor networks</article-title><conf-name>Proceedings of the 46th IEEE Conference on Decision and Control</conf-name><conf-loc>New Orleans</conf-loc><year>2007</year><fpage>5492</fpage><lpage>5498</lpage></citation></ref>
<ref id="b12-sensors-09-00895"><label>12.</label><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Hide</surname><given-names>C.</given-names></name><name><surname>Moore</surname><given-names>T.</given-names></name><name><surname>Smith</surname><given-names>M.</given-names></name></person-group><article-title>Adaptive Kalman filtering algorithms for integrating GPS and low cost INS</article-title><conf-name>Position Location and Navigation Symposium</conf-name><year>2004</year><fpage>227</fpage><lpage>233</lpage></citation></ref>
<ref id="b13-sensors-09-00895"><label>13.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pan</surname><given-names>L.L.</given-names></name><name><surname>Yang</surname><given-names>S.X.</given-names></name></person-group><article-title>An electronic nose network system for online monitoring livestock farm odors</article-title><source>IEEE Trans. Mechatron.</source><comment>In press</comment></citation></ref></ref-list>
<sec sec-type="display-objects">
<title>Figures and Tables</title>
<fig id="f1-sensors-09-00895" position="float">
<label>Figure 1.</label>
<caption>
<p>Block diagram of the e-nose prototype.</p></caption>
<graphic xlink:href="sensors-09-00895f1.gif"/></fig>
<fig id="f2-sensors-09-00895" position="float">
<label>Figure 2.</label>
<caption>
<p>The gas chamber, pump and sensor array in the e-nose.</p></caption>
<graphic xlink:href="sensors-09-00895f2.gif"/></fig>
<fig id="f3-sensors-09-00895" position="float">
<label>Figure 3.</label>
<caption>
<p>The interface board and the MicaZ for the e-nose.</p></caption>
<graphic xlink:href="sensors-09-00895f3.gif"/></fig>
<fig id="f4-sensors-09-00895" position="float">
<label>Figure 4.</label>
<caption>
<p>Block diagram of the data acquisition circuit.</p></caption>
<graphic xlink:href="sensors-09-00895f4.gif"/></fig>
<fig id="f5-sensors-09-00895" position="float">
<label>Figure 5.</label>
<caption>
<p>Block diagram of the inputs and outputs of an MOS gas sensor.</p></caption>
<graphic xlink:href="sensors-09-00895f5.gif"/></fig>
<fig id="f6-sensors-09-00895" position="float">
<label>Figure 6.</label>
<caption>
<p>Filter results at different variance ratio factors <italic>λ</italic>. (a) <italic>λ</italic>=0.1, the filtered result fluctuates like the raw data; (b), <italic>λ</italic>=1 the filtered result is still fluctuating in some sections; (c) <italic>λ</italic>=10, the filtered result is still fluctuating in some sections; (d) <italic>λ</italic>=100, the filter result is robust for all the filtered ranges and sensitive to the changes in odor strength; (e) <bold><italic>λ</italic></bold> =1,000, a lag phenomenon appears in sections A and B in the filtered result.</p></caption>
<graphic xlink:href="sensors-09-00895f6.gif"/></fig>
<fig id="f7-sensors-09-00895" position="float">
<label>Figure 7.</label>
<caption>
<p>Filter results of the four sensors. (a) Sensor 1 at variance ratio factor <italic>λ</italic>=100; (b) Sensor 2 at variance ratio factor <italic>λ</italic>=70; (c) Sensor 3 at variance ratio factor <italic>λ</italic>=65; (d) Sensor 4 at variance ratio factor <italic>λ</italic>=120.</p></caption>
<graphic xlink:href="sensors-09-00895f7.gif"/></fig>
<fig id="f8-sensors-09-00895" position="float">
<label>Figure 8.</label>
<caption>
<p>Comparison results between the conventional and the modified Kalman filter algorithm. (a) Estimated value of measurement noise variance; (b) The filtered results.</p></caption>
<graphic xlink:href="sensors-09-00895f8.gif"/></fig>
<table-wrap id="t1-sensors-09-00895" position="float">
<label>Table 1.</label>
<caption>
<p>Sensors used for the e-nose prototype.</p></caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="right" valign="top"><bold><italic>Sensors</italic></bold></th>
<th align="center" valign="top"><italic>Sensor 1</italic></th>
<th align="center" valign="top"><italic>Sensor 2</italic></th>
<th align="center" valign="top"><italic>Sensor 3</italic></th>
<th align="center" valign="top"><italic>Sensor 4</italic></th></tr></thead>
<tbody>
<tr>
<td align="right" valign="top"><bold><italic>Sensitive to gases</italic></bold></td>
<td align="center" valign="top">Butane</td>
<td align="center" valign="top">Hydrogen-sulfide</td>
<td align="center" valign="top">Amine compounds</td>
<td align="center" valign="top">Air contaminants</td></tr>
<tr>
<td align="right" valign="top"><bold><italic>Concentration range</italic></bold></td>
<td align="center" valign="top">2K-5K ppm</td>
<td align="center" valign="top">5-100 ppm</td>
<td align="center" valign="top">30-300 ppm</td>
<td align="center" valign="top">1-30 ppm of H2</td></tr></tbody></table></table-wrap>
<table-wrap id="t2-sensors-09-00895" position="float">
<label>Table 2.</label>
<caption>
<p>The optimal variance ratio factor. <italic>λ</italic> for sensors in the e-nose.</p></caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="center" valign="top"><bold><italic>Name</italic></bold></th>
<th align="center" valign="top"><italic>Sensor 1</italic></th>
<th align="center" valign="top"><italic>Sensor 2</italic></th>
<th align="center" valign="top"><italic>Sensor 3</italic></th>
<th align="center" valign="top"><italic>Sensor 4</italic></th></tr></thead>
<tbody>
<tr>
<td align="center" valign="top"><italic>λ</italic></td>
<td align="center" valign="top">100</td>
<td align="center" valign="top">70</td>
<td align="center" valign="top">65</td>
<td align="center" valign="top">120</td></tr></tbody></table></table-wrap></sec></back></article>
