Machine olfaction is the automated simulation of the sense of smell. An emerging application in modern engineering, it involves the use of robots or other automated systems to analyze air-borne chemicals. Such an apparatus is often called an electronic nose or e-nose.  The development of machine olfaction is complicated by the fact that e-nose devices to date have responded to a limited number of chemicals, whereas odors are produced by unique sets of (potentially numerous) odorant compounds. The technology, though still in the early stages of development, promises many applications, such as:
quality control in food processing, detection and diagnosis in medicine, detection of drugs, explosives and other dangerous or illegal substances, disaster response, and environmental monitoring.
 One type of proposed machine olfaction technology is via gas sensor array instruments capable of detecting, identifying, and measuring volatile compounds. However, a critical element in the development of these instruments is pattern analysis, and the successful design of a pattern analysis system for machine olfaction requires a careful consideration of the various issues involved in processing multivariate data: signal-preprocessing, feature extraction, feature selection, classification, regression, clustering, and validation. Another challenge in current research on machine olfaction is the need to predict or estimate the sensor response to aroma mixtures. Some pattern recognition problems in machine olfaction such as odor classification and odor localization can be solved by using time series kernel methods.
 There are three basic detection techniques using conductive-polymer odor sensors (polypyrrole), tin-oxide gas sensors, and quartz-crystal micro-balance sensors.[citation needed] They generally comprise (1) an array of sensors of some type, (2) the electronics to interrogate those sensors and produce digital signals, and (3) data processing and user interface software.
 The entire system is a means of converting complex sensor responses into a qualitative profile of the volatile (or complex mixture of chemical volatiles) that make up a smell, in the form of an output.
 Conventional electronic noses are not analytical instruments in the classical sense and very few claim to be able to quantify an odor. These instruments are first 'trained' with the target odor and then used to 'recognize' smells so that future samples can be identified as 'good' or 'bad'.
 Research into alternative pattern recognition methods for chemical sensor arrays has proposed solutions to differentiate between artificial and biological olfaction related to dimensionality. This biologically-inspired approach involves creating unique algorithms for information processing.
 Electronic noses are able to discriminate between odors and volatiles from a wide range of sources. The list below shows just some of the typical applications for electronic nose technology – many are backed by research studies and published technical papers.
 Odor localization is a combination of quantitative chemical odor analysis and path-searching algorithms, and environmental conditions play a vital role in localization quality. Different methods are being researched for various purposes and in different real-world conditions.
 Odor localization is the technique and process of locating a volatile chemical source in an environment containing one or several odors. It is vitally important for all living beings for both finding sustenance and avoiding danger. Unlike the other basic human senses, the sense of smell is entirely chemical-based. However, in comparison with the other dimensions of perception, detection of odor faces additional problems due to the complex dynamic equations of odor and unpredictable external disturbances such as wind.
 Odor localization technology shows promise in many applications, including:
 The earliest instrument for specific odor detection was a mechanical nose developed in 1961 by Robert Wighton Moncrieff. The first electronic nose was created by W. F. Wilkens and J. D. Hartman in 1964. Larcome and Halsall discussed the use of robots for odor sensing in the nuclear industry in the early 1980s, and research on odor localization was started in the early 1990s. Odor localization is now a fast-growing field. Various sensors have been developed and a variety of algorithms have been proposed for diverse environments and conditions.
 Mechanical odor localization can be executed via the following three steps, (1) search for the presence of a volatile chemical (2) search for the position of the source with an array of odor sensors and certain algorithms, and (3) identify the tracked odor source (odor recognition).
 Odor localization methods are often classified according to odor dispersal modes in a range of environmental conditions. These modes can generally be divided into two categories: diffusion-dominated fluid flow and turbulence-dominated fluid flow. These have different algorithms for odor localization, discussed below.
 Tracking and localization methods for diffusion-dominated fluid flow – which is mostly used in underground odor localization – must be designed so that olfaction machinery can operate in environments in which fluid motion is dominated by viscosity. This means that diffusion leads to the dispersal of odor flow, and the concentration of odor decreases from the source as a Gaussian distribution.
 The diffusion of chemical vapor through soil without external pressure gradient is often modeled by Fick's second law:
 where D is the diffusion constant, d is distance in the diffusion direction, C is chemical concentration and t is time.
 Assuming the chemical odor flow only disperses in one direction with a uniform cross-section profile, the relationship of odor concentration at a certain distance and certain time point between odor source concentrations is modeled as
 where 
  
    
      
        
          C
          
            s
          
        
      
    
    {\displaystyle C_{s}}
  
 is the odor source concentration. This is the simplest dynamic equation in odor detection modeling, ignoring external wind or other interruptions. Under the diffusion-dominated propagation model, different algorithms were developed by simply tracking chemical concentration gradients to locate an odor source.
 A simple tracking method is the E. coli algorithm. In this process, the odor sensor simply compares concentration information from different locations. The robot moves along repeated straight lines in random directions. When the current state odor information is improved compared to the previous reading, the robot will continue on the current path. However, when the current state condition is worse than the previous one, the robot will backtrack then move in another random direction. This method is simple and efficient, however, the length of the path is highly variable and missteps increase with proximity to the source.[further explanation needed]
 Another method based on the diffusion model is the hex-path algorithm, developed by R. Andrew Russel for underground chemical odor localization with a buried probe controlled by a robotic manipulator. The probe moves at a certain depth along the edges of a closely packed hexagonal grid. At each state junction n, there are two paths (left and right) for choosing, and the robot will take the path that leads to higher concentration of the odor based on the previous two junction states odor concentration information n−1, n−2. In the 3D version of the hex-path algorithm, the dodecahedron algorithm, the probe moves in a path that corresponds to a closely packed dodecahedra, so that at each state point there are three possible path choices.
 In turbulence-dominated fluid flow, localization methods are designed to deal with background fluid (wind or water) flow as turbulence interruption. Most of the algorithms under this category are based on plume modeling (Figure 1).
 Plume dynamics are based on Gaussian models, which are based on Navier–Stokes equations. The simplified boundary condition of the Gaussian-based model is:
 
  
    
      
        
          
            
              ∂
              C
            
            
              ∂
              t
            
          
        
        =
        
          D
          
            x
          
        
        
          
            
              
                ∂
                
                  2
                
              
              C
            
            
              ∂
              
                x
                
                  2
                
              
            
          
        
        +
        
          D
          
            y
          
        
        
          
            
              
                ∂
                
                  2
                
              
              C
            
            
              ∂
              
                y
                
                  2
                
              
            
          
        
        +
        α
        
          
            
              ∂
              C
            
            
              ∂
              x
            
          
        
        +
        β
        
          
            
              ∂
              C
            
            
              ∂
              x
            
          
        
      
    
    {\displaystyle {\frac {\partial C}{\partial t}}=D_{x}{\frac {\partial ^{2}C}{\partial x^{2}}}+D_{y}{\frac {\partial ^{2}C}{\partial y^{2}}}+\alpha {\frac {\partial C}{\partial x}}+\beta {\frac {\partial C}{\partial x}}}
  

 where Dx and Dy are diffusion constants;  
  
    
      
        α
      
    
    {\displaystyle \alpha }
  
 is the linear wind velocity in the x direction,  
  
    
      
        β
      
    
    {\displaystyle \beta }
  
 is the linear wind velocity in the y direction. Additionally assuming that the environment is uniform and the plume source is constant, the equation for odor detection in each robot sensor at each detection time point t−th is
 
  
    
      
        
          R
          
            i
          
        
        =
        
          γ
          
            i
          
        
        
          ∑
          
            k
            =
            1
          
          
            K
          
        
        
          
            
              C
              
                k
              
            
            
              ‖
              
                
                  ρ
                  
                    k
                  
                
                −
                
                  r
                  
                    k
                  
                
              
              
                ‖
                
                  α
                
              
            
          
        
        +
        
          ω
          
            i
          
        
      
    
    {\displaystyle R_{i}=\gamma _{i}\sum _{k=1}^{K}{\frac {C_{k}}{\|{\rho _{k}-r_{k}}\|^{\alpha }}}+\omega _{i}}
  

 where 
  
    
      
        
          R
          
            i
          
        
      
    
    {\displaystyle R_{i}}
  
 is the t−th sample of i−th sensor, 
  
    
      
        
          γ
          
            i
          
        
      
    
    {\displaystyle \gamma _{i}}
  
 is gain factor, 
  
    
      
        
          C
          
            k
          
        
      
    
    {\displaystyle C_{k}}
  
 is k−th source intensity, 
  
    
      
        
          ρ
          
            k
          
        
      
    
    {\displaystyle \rho _{k}}
  
 is the location of k−th source,  
  
    
      
        α
      
    
    {\displaystyle \alpha }
  
 is plume attenuation parameter, 
  
    
      
        
          ω
          
            i
          
        
      
    
    {\displaystyle \omega _{i}}
  
 is background noise that satisfies 
  
    
      
        N
        (
        μ
        ,
        
          σ
          
            2
          
        
        )
      
    
    {\displaystyle N(\mu ,\sigma ^{2})}
  
. Under plume modeling, different algorithms can be used to localize the odor source.
 A simple algorithm that can be used for location estimation is the triangulation method (Figure 2). Consider the odor detection equation above, the position of the odor source can be estimated by organizing sensor distances on one side of the equation and ignoring the noise. The source position can be estimated using the following equations:
 
  
    
      
        (
        
          x
          
            1
          
        
        −
        
          x
          
            s
          
        
        
          )
          
            2
          
        
        +
        (
        
          y
          
            1
          
        
        −
        
          y
          
            s
          
        
        
          )
          
            2
          
        
        =
        
          R
          
            1
          
        
        
          /
        
        (
        
          γ
          
            1
          
        
        C
        )
      
    
    {\displaystyle (x_{1}-x_{s})^{2}+(y_{1}-y_{s})^{2}=R_{1}/(\gamma _{1}C)}
  

 
  
    
      
        (
        
          x
          
            2
          
        
        −
        
          x
          
            s
          
        
        
          )
          
            2
          
        
        +
        (
        
          y
          
            2
          
        
        −
        
          y
          
            s
          
        
        
          )
          
            2
          
        
        =
        
          R
          
            2
          
        
        
          /
        
        (
        
          γ
          
            2
          
        
        C
        )
      
    
    {\displaystyle (x_{2}-x_{s})^{2}+(y_{2}-y_{s})^{2}=R_{2}/(\gamma _{2}C)}
  

 
  
    
      
        (
        
          x
          
            3
          
        
        −
        
          x
          
            s
          
        
        
          )
          
            2
          
        
        +
        (
        
          y
          
            3
          
        
        −
        
          y
          
            s
          
        
        
          )
          
            2
          
        
        =
        
          R
          
            3
          
        
        
          /
        
        (
        
          γ
          
            3
          
        
        C
        )
      
    
    {\displaystyle (x_{3}-x_{s})^{2}+(y_{3}-y_{s})^{2}=R_{3}/(\gamma _{3}C)}
  

 The least square method (LSM) is a slightly complicated algorithm for odor localization. The LSM version of the odor tracking model is given by:
 
  
    
      
        
          R
          
            i
          
        
        
          ,
          
            t
          
        
        =
        
          γ
          
            i
          
        
        
          
            C
            
              ‖
              
                
                  ρ
                  
                    k
                  
                
                −
                
                  r
                  
                    i
                  
                
              
              
                ‖
                
                  2
                
              
            
          
        
        +
        
          ω
          
            i
          
        
        =
        
          γ
          
            i
          
        
        
          
            C
            
              d
              
                2
              
            
          
        
        +
        
          ω
          
            i
          
        
      
    
    {\displaystyle R_{i},_{t}=\gamma _{i}{\frac {C}{\|{\rho _{k}-r_{i}}\|^{2}}}+\omega _{i}=\gamma _{i}{\frac {C}{d^{2}}}+\omega _{i}}
  

 where  
  
    
      
        
          d
          
            i
          
        
      
    
    {\displaystyle d_{i}}
  
 is the Euclidean distance between the sensor node and the plume source, given by:
 
  
    
      
        
          d
          
            i
          
        
        =
        
          
            (
            
              x
              
                i
              
            
            −
            x
            −
            s
            
              )
              
                2
              
            
            +
            (
            
              y
              
                i
              
            
            +
            
              y
              
                s
              
            
            
              )
              
                2
              
            
          
        
      
    
    {\displaystyle d_{i}={\sqrt {(x_{i}-x-s)^{2}+(y_{i}+y_{s})^{2}}}}
  

 The main difference between the LSM algorithm and the direct triangulation method is the noise. In LSM, noise is considered, and the odor source location is estimated by minimizing the squared error. The nonlinear least square problem is given by:
 
  
    
      
        J
        =
        
          ∑
          
            i
            =
            1
          
          
            N
          
        
        (
        
          
            
              C
              
                (
                
                  x
                  
                    i
                  
                
                −
                
                  
                    
                      
                        x
                        
                          s
                        
                      
                      ^
                    
                  
                
                
                  )
                  
                    2
                  
                
                (
                
                  y
                  
                    i
                  
                
                −
                
                  
                    
                      
                        y
                        
                          s
                        
                      
                      ^
                    
                  
                
                
                  )
                  
                    2
                  
                
              
            
          
          −
          
            
              
                z
                
                  l
                
              
              ¯
            
          
          )
        
      
    
    {\displaystyle J=\sum _{i=1}^{N}({{\frac {C}{\sqrt {(x_{i}-{\widehat {x_{s}}})^{2}(y_{i}-{\widehat {y_{s}}})^{2}}}}-{\overline {z_{l}}})}}
  

 where 
  
    
      
        (
        
          
            
              
                x
                
                  s
                
              
              ^
            
          
        
        ,
        
          
            
              
                y
                
                  s
                
              
              ^
            
          
        
        )
      
    
    {\displaystyle ({\widehat {x_{s}}},{\widehat {y_{s}}})}
  
 is the estimated source location and 
  
    
      
        
          
            
              z
              
                l
              
            
            ¯
          
        
      
    
    {\displaystyle {\overline {z_{l}}}}
  
 is the average of multiple measurements at the sensors, given by:
 
  
    
      
        
          
            
              z
              
                l
              
            
            ¯
          
        
        =
        
          
            1
            M
          
        
        
          ∑
          
            i
            =
            1
          
          
            M
          
        
        
          
            z
            
              i
            
          
        
      
    
    {\displaystyle {\overline {z_{l}}}={\frac {1}{M}}\sum _{i=1}^{M}{z_{i}}}
  

 Another method based on plume modeling is maximum likelihood estimation (MLE). In this odor localization method, several matrices are defined as follows:
 
  
    
      
        Z
        =
        [
        
          
            
              
                R
                
                  1
                
              
              −
              
                μ
                
                  1
                
              
            
            
              σ
              
                1
              
            
          
        
        ,
        
          
            
              
                R
                
                  2
                
              
              −
              
                μ
                
                  2
                
              
            
            
              σ
              
                2
              
            
          
        
        ,
        .
        .
        .
        
          
            
              
                R
                
                  N
                
              
              −
              
                μ
                
                  N
                
              
            
            
              σ
              
                N
              
            
          
        
        ]
      
    
    {\displaystyle Z=[{\frac {R_{1}-\mu _{1}}{\sigma _{1}}},{\frac {R_{2}-\mu _{2}}{\sigma _{2}}},...{\frac {R_{N}-\mu _{N}}{\sigma _{N}}}]}
  

 
  
    
      
        G
        =
        d
        i
        a
        g
        [
        
          
            
              γ
              
                1
              
            
            
              σ
              
                1
              
            
          
        
        ,
        
          
            
              γ
              
                2
              
            
            
              σ
              
                2
              
            
          
        
        ,
        .
        .
        .
        
          
            
              γ
              
                N
              
            
            
              σ
              
                N
              
            
          
        
        ]
      
    
    {\displaystyle G=diag[{\frac {\gamma _{1}}{\sigma _{1}}},{\frac {\gamma _{2}}{\sigma _{2}}},...{\frac {\gamma _{N}}{\sigma _{N}}}]}
  

 
  
    
      
        D
        =
        [
        
          
            1
            
              d
              
                1
              
              
                2
              
            
          
        
        ,
        
          
            1
            
              d
              
                2
              
              
                2
              
            
          
        
        ,
        .
        .
        .
        
          
            1
            
              d
              
                N
              
              
                2
              
            
          
        
        ]
      
    
    {\displaystyle D=[{\frac {1}{d_{1}^{2}}},{\frac {1}{d_{2}^{2}}},...{\frac {1}{d_{N}^{2}}}]}
  

 
  
    
      
        ζ
        =
        [
        
          ζ
          
            1
          
        
        ,
        
          ζ
          
            2
          
        
        ,
        .
        .
        .
        
          ζ
          
            N
          
        
        ]
      
    
    {\displaystyle \zeta =[\zeta _{1},\zeta _{2},...\zeta _{N}]}
  

 
  
    
      
        
          ζ
          
            i
          
        
        =
        (
        
          ω
          
            i
          
        
        −
        
          μ
          
            i
          
        
        )
        
          /
        
        
          σ
          
            i
          
        
        ∼
        N
        (
        0
        ,
        1
        )
      
    
    {\displaystyle \zeta _{i}=(\omega _{i}-\mu _{i})/\sigma _{i}\sim N(0,1)}
  

 
  
    
      
        
          
            
              
                R
                
                  i
                
              
              −
              
                μ
                
                  i
                
              
            
            
              σ
              
                i
              
            
          
        
        ∼
        N
        (
        
          
            
              γ
              
                i
              
            
            
              σ
              
                i
              
            
          
        
        
          
            C
            
              d
              
                i
              
              
                2
              
            
          
        
        ,
        1
        )
      
    
    {\displaystyle {\frac {R_{i}-\mu _{i}}{\sigma _{i}}}\sim N({\frac {\gamma _{i}}{\sigma _{i}}}{\frac {C}{d_{i}^{2}}},1)}
  

 With these matrices, the plume-based odor detection model can be expressed with the following equation:
 
  
    
      
        Z
        =
        G
        D
        C
        +
        ζ
      
    
    {\displaystyle Z=GDC+\zeta }
  

 Then the MLE can be applied to the modeling and form the probability density function
 
  
    
      
        f
        (
        Z
        ,
        θ
        )
        =
        2
        
          π
          
            −
            (
            N
            
              /
            
            2
            )
          
        
        
          e
          
            −
            
              
                1
                2
              
            
            (
            Z
            −
            G
            D
            C
            
              )
              
                T
              
            
            (
            Z
            −
            G
            D
            C
            )
          
        
      
    
    {\displaystyle f(Z,\theta )=2\pi ^{-(N/2)}e^{-{\frac {1}{2}}(Z-GDC)^{T}(Z-GDC)}}
  

 where 
  
    
      
        θ
      
    
    {\displaystyle \theta }
  
 is the estimated odor source position, and the log likelihood function is
 
  
    
      
        L
        (
        θ
        )
        ∼
        
          
            1
            2
          
        
        
          ∑
          
            i
            =
            1
          
          
            N
          
        
        
          ‖
          
            Z
            
              i
            
          
          −
          
            γ
            
              i
            
          
          
            
              c
              
                d
                
                  i
                
                
                  2
                
              
            
          
          ‖
        
        =
        
          
            1
            2
          
        
        
          ∑
          
            i
            =
            1
          
          
            N
          
        
        
          (
          
            
              
                R
                i
                −
                
                  μ
                  
                    i
                  
                
              
              
                σ
                
                  i
                
              
            
          
          −
          
            γ
            
              i
            
          
          
            
              c
              
                d
                
                  i
                
                
                  2
                
              
            
          
          
            )
            
              2
            
          
        
      
    
    {\displaystyle L(\theta )\sim {\frac {1}{2}}\sum _{i=1}^{N}{\|Z_{i}-\gamma _{i}{\frac {c}{d_{i}^{2}}}\|}={\frac {1}{2}}\sum _{i=1}^{N}{({\frac {Ri-\mu _{i}}{\sigma _{i}}}-\gamma _{i}{\frac {c}{d_{i}^{2}}})^{2}}}
  

 The maximum likelihood parameter estimation of 
  
    
      
        θ
      
    
    {\displaystyle \theta }
  
 can be calculated by minimizing
 
  
    
      
        I
        (
        θ
        )
        =
        
          ∑
          
            i
            =
            1
          
          
            N
          
        
        
          (
          
            
              
                R
                i
                −
                
                  μ
                  
                    i
                  
                
              
              
                σ
                
                  i
                
              
            
          
          −
          
            γ
            
              i
            
          
          
            
              c
              
                d
                
                  i
                
                
                  2
                
              
            
          
          
            )
            
              2
            
          
        
      
    
    {\displaystyle I(\theta )=\sum _{i=1}^{N}{({\frac {Ri-\mu _{i}}{\sigma _{i}}}-\gamma _{i}{\frac {c}{d_{i}^{2}}})^{2}}}
  

 and the accurate position of the odor source can be estimated by solving:
 
  
    
      
        
          
            
              ∂
              
                I
                (
                θ
                )
              
            
            
              ∂
              (
              x
              )
            
          
        
        =
        0
        ,
        
          
            
              ∂
              
                I
                (
                θ
                )
              
            
            
              ∂
              (
              y
              )
            
          
        
        =
        0
      
    
    {\displaystyle {\frac {\partial {I(\theta )}}{\partial (x)}}=0,{\frac {\partial {I(\theta )}}{\partial (y)}}=0}
  

 In 2007, a strategy called infotaxis was proposed in which a mental model is created utilizing previously collected information about where a smell's source is likely to be. The robot moves in a direction that maximizes information.
Infotaxis is designed for tracking in turbulent environments.  It has been implemented as a partially observable Markov decision process with a stationary target in a two-dimensional grid.