# Developing Occupancy Grid with Automotive Simulation Environment
## 2 Materials and Methods
### Occupancy Grid Framework
#### 2.4.3 Fusing the Probability  
The probability fusion methodology can be diversified in three ways:  
1. The first diversification comes from the Low and High Level architectures. 2. The second diversification comes from the mathematical method used for the calculation of the output probability of occupancy. Grid-level fusion, distinguished the updated method from the fusion method, as it creates a sensor (domain) grid and then fuses them together. This results in the fact that a different method can be building the domain grid and different one can be fusing domains. The following section details methods identified in the literature, implemented in the framework and used for testing [8]. 3. The third diversification addresses the use of time filtering in building the input grid or use of instantaneous (single snapshot of one set of measurements--e.g., a list of radar detections from one scan) grid. This approach applies only to the High Level approach, where separate grids are created for sensors or domains. The Low Level grid, by nature, is a time filtered grid. Figure 8: Confidence ellipse around the detection with semi-major axis \(a\), semi-minor axis \(b\), and center coordinates \(x_{i},y_{j}\) of the cell \(S_{ij}\). Figure 9: Computed result of the probability density function integrated on the grid. A detailed description of the fusion methods used in this study is given below. * Bayesian Inference Filter (Bayes) The default approach for filtering in the presented case is the Bayes filter, since the occupancy grid in most prior work is based on Bayesian probability theory. The Bayesian filter is an extension of the Bayes estimator applied in cases where the observed values change over time [9]. Originally, the method finds application in the field of radar tracking to estimate beliefs about the recent position of targets [10]. The equation's general form is (11), where \(p(m_{t}|z_{1:t},x_{1:t})\) is the posterior probability of occupancy given, \(z_{1:t}\) are measurements and \(x_{1:t}\) are host poses on the grid. \[p(m_{t}|z_{1:t},x_{1:t})=\frac{p(z_{t}|m_{t},x_{1:t},z_{1:t-1})\cdot p(m_{t}|z_ {1:t-1},x_{1:t-1})}{p(z_{t}|z_{1:t-1},x_{1:t-1})}\] (11) However, with respect to future optimized software implementations, a logarithmic approach presented by [PERSON] is used where the given probability value \(p(m)\) is converted to the log-odds representation \(l(m)\) by means of Equation (12) [8]. \[l(m)=log\frac{p(m)}{1-p(m)}\] (12) With the log-odds representation of both \(l(m_{1})\) inverse sensor model output and \(l(m_{2})\) the occupancy grid, fusion is performed by summing the log-odds values (13). \[l(m)=l(m_{2})+l(m_{1})\] (13) The Bayes filter is then applied to every updated cell in the occupancy grid in the form of a log-odds ratio, which corresponds to performing a recursive Binary Bayes Filtering using the probability from the ISM. This approach tends to increase the a prior probability when the values exceed a 0.5 threshold and performs oppositely for values below that threshold. The issue is a correct effect from the statistics point of view, but it is causing problems in real applications of the methods, \"dead locking\" in the case of one input (grid cell or inverse sensor model output) reaching 0 or 1. To prevent this situation, a minimum and maximum probability saturation is set for the complete grid by a tuneable parameter. This parameter is used to offset the minimum and maximum values from 0 to, for instance, 0.1 and from 1 to 0.9. * Dempster-Shafer (D-S) The Dempster-Shafer evidence theory is the second major mathematical apparatus employed in the task of building the occupancy grid. This method finds application in the area of tracking paths of moving targets for the estimation of both belief of existence and non-existence of false targets [10]. The primary advantage of this method over the Bayesian approach is the capability for explicit handling of the absence of information--e.g., an unknown state.