# Developing Occupancy Grid with Automotive Simulation Environment
## 2 Materials and Methods
### Occupancy Grid Framework
#### 2.4.2 Occupancy Probability Calculation  
The concept used in this experimental evaluation assumes that the probability of the existence of an obstacle is described by a Gaussian distribution. The ISMs presented for this application are required to operate for a 2D occupancy grid. This imposes a need to use a Bi-variate Normal Distribution function as the probability density function for the calculation of the occupancy probability of the affected cells. The second one is imposed by the sensors that supply the detection points (radar or lidar) with information about the position in 2D with respect to the Sensor Coordinate System (SCS) \(x_{\text{scs}}\) and \(y_{\text{scs}}\) and a covariance matrix \(\Sigma_{\text{scs}}\) for the detection. The ellipse simplification of a banana shape distribution is used due to the fact of relatively good azimuth resolution of evaluated sensors with respect to the detection range. Additionally, the detection contains information, such as existence probabilities \(e_{p}\). The general formula used for the Probability Density Function (PDF) (2) requires a covariance matrix \(\Sigma_{\text{\emph{o}}gcs}\) which describes variances and covariances with respect to the Occupancy Grid Coordinate System (OGCS). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Variant** & **Variant** & **Architecture** & **Filtering** & **Method** \\ \cline{1-1}
**Abbreviation** & **Full Name** & **Variant** & **Mode** & **Abs** \\ \hline \hline \multirow{2}{*}{LL-B} & Low Level & & & \\  & Bayes & Low & Accumulated & Bayes \\ \hline \multirow{2}{*}{LL-DS} & Low Level & & & \\  & Dempster-Shafer & Low & Accumulated & D-S \\ \hline \multirow{2}{*}{HL-B} & High Level & & & \\  & Bayes & High & Instantaneous & Bayes \\ \hline \multirow{2}{*}{HL-M} & High Level & & & \\  & Max & High & Instantaneous & Max \\ \hline \multirow{2}{*}{HL-LI} & High Level & & & \\  & Logarithmic Independent & High & Instantaneous & LIOP \\  & Opinion Pool & & & \\ \hline \multirow{2}{*}{HL-L} & High Level & & & \\  & Logarithmic Opinion & High & Instantaneous & LOP \\  & Pool & & & \\ \hline \multirow{2}{*}{HL-I} & High Level & & & \\  & Independent Opinion & High & Instantaneous & IOP \\  & Pool & & & \\ \hline \multirow{2}{*}{HL-De} & High Level & & & \\  & DeMorgan & High & Instantaneous & DeMorgan \\ \hline \multirow{2}{*}{HL-S} & High Level & & & \\  & Sum & High & Instantaneous & Sum \\ \hline \multirow{2}{*}{FHL-B} & Fused High Level & & & \\  & Bayes & High & Accumulated & Bayes \\ \hline \multirow{2}{*}{FHL-LI} & Fused High Level & & & \\  & Independent Opinion & High & Accumulated & LIOP \\  & Pool & & & \\ \hline \multirow{2}{*}{FHL-L} & Fused High Level & & & \\  & Logarithmic Opinion & High & Accumulated & LOP \\  & Pool & & & \\ \hline \multirow{2}{*}{FHL-I} & Fused High Level & & & \\  & Independent Opinion & High & Accumulated & IOP \\  & Pool & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Tested configurations and their naming. \[\mathrm{PDF}(X;\mu,\Sigma_{qgcs})=\frac{1}{2\pi\sqrt{|\Sigma_{qgcs}|}}\exp\left[- \frac{1}{2}\cdot(X-\mu)\Sigma_{qgcs}^{-1}(X-\mu)^{T}\right] \tag{2}\]  
where \(X\) contains a position in \(x_{i}\) and \(y_{j}\) (3) for the PDF values to be calculated. \[X= \begin{bmatrix}x_{i}&y_{j}\end{bmatrix}  \tag{3}\]  
Following \(\mu\), which in the general formula is the mean value of the distribution, in this case, \(\mu\) determines the position of the detection in OGCS. \[\mu= \begin{bmatrix}x_{det_{qgcs}}&y_{det_{qgcs}}\end{bmatrix}  \tag{4}\]  
in addition to the co-variance matrix,  
\[\Sigma_{qgcs}= \begin{bmatrix}\sigma_{xxgcs}&\sigma_{xygcs}\\ \sigma_{yxgcs}&\sigma_{yygcs}\end{bmatrix}  \tag{5}\]  
The sensors report data with respect to SCS. The position of SCS with respect to OGCS is known due to the fact that the sensor is mounted in a known location on the vehicle chassis and the vehicle position is tracked with respect to OGCS.