## 5 Extended Kalman Filter Tracking
### Tracking Preliminaries  
In the previous section, we demonstrated that the timestamps from two successive frames \(\{(n-1),(n)\}\) contain enough information to estimate \(T\) and \(\tau\) (see Equations (1) and (2)). Therefore, we employ tracking once every cycle, producing state space estimates at a resolution of 1 cycle = two frames. Kalman filters inherently assume Gaussian processes, which nonlinear problems fails to preserve. Extended Kalman Filters (EKF) [38] counter this issue by linearizing the nonlinear transformations, thus preserving Gaussianity. The algorithm can be visualized in two steps: a) prediction and b) correction. The state space parameters \(\hat{\mathbf{x}}\) at time instance \((n-1)\) are predicted using estimates from the previous cycle \(\hat{\mathbf{x}}^{(n-3)}\) using the standard transition model given by  
\[\hat{\mathbf{x}}^{(n-1)}_{(-)}=\mathbf{F}\Big{(}L_{A}^{(n-1)}\Big{)}\;\hat{ \mathbf{x}}^{(n-3)}+\mathbf{w}^{(n-1)}, \tag{25}\]  
where \(\mathbf{F}(\cdot)\) is the state transition, \(L_{A}\) is the cycle length defined in Equation (5), and \(\mathbf{w}^{(\cdot)}\sim\mathcal{N}(0,\mathbf{Q}^{(\cdot)})\) is the process noise, assumed to be drawn from a zero-mean multivariate normal distribution. The standard error covariance matrix \(\hat{\mathbf{P}}\) in predicting state space parameters can be written as a function of the state transition \(\mathbf{F}(\cdot)\) and the process noise covariance matrix \(\mathbf{Q}\), given by:  
\[\hat{\mathbf{P}}^{(n-1)}_{(-)}=\mathbf{F}^{(n-1)}\hat{\mathbf{P}}^{(n-3)} \mathbf{F}^{(n-1)}{}^{T}+\mathbf{Q}^{(n-1)}, \tag{26}\]  
where \(\hat{\mathbf{P}}^{(n-3)}\) is the covariance matrix from the previous cycle. The standard measurement prediction \(\hat{\mathbf{z}}\) is estimated using  
\[\hat{\mathbf{z}}^{(n-1)}_{(-)}=\mathbf{u}^{(n-1)}+\mathbf{h}\Big{(}\hat{ \mathbf{x}}^{(n-1)}_{(-)}\Big{)}+\mathbf{v}^{(n-1)}, \tag{27}\]  
where \(\hat{\mathbf{u}}\) represents the control parameters, \(\mathbf{h}(\cdot)\) is the nonlinear measurement transition function, and \(\mathbf{v}^{(\cdot)}\sim\mathcal{N}(0,\mathbf{R}^{(\cdot)})\) is the measurement noise assumed to be drawn from a zero-mean multivariate normal distribution. We use the measurement Jacobian \(\mathbf{H}\), defined as  
\[\mathbf{H}^{(n-1)}=\left.\frac{\partial\mathbf{h}(\hat{\mathbf{x}})}{\partial \hat{\mathbf{x}}}\right|_{\hat{\mathbf{x}}^{(n-1)}_{(-)}}\,, \tag{28}\] \begin{table}
\begin{tabular}{l l} \hline \hline \(\hat{\mathbf{x}}_{(-)}\), \(\hat{\mathbf{x}}\) & Predicted and estimated state parameters \\ \(|\mathbf{x}|\) & Cardinality of state space \\ \(\mathbf{F}\) & State transition matrix \\ \(\hat{\mathbf{z}}_{(-)}\), \(\hat{\mathbf{z}}\) & Predicted and observed measurements \\ \(\mathbf{u}\) & Control parameters \\ \(\mathbf{h}\), \(\mathbf{H}\) & Measurement transition and Jacobian \\ \(\mathbf{w}\), \(\mathbf{v}\) & State and measurement noise \\ \(\mathbf{Q}\), \(\mathbf{R}\) & State and measurement noise covariance matrix \\ \(\hat{\mathbf{P}}_{(-)}\), \(\hat{\mathbf{P}}\) & Predicted and estimated state covariance matrix \\ \(\mathbf{S}\) & Measurement covariance matrix \\ \(\mathbf{K}\) & Kalman gain \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Extended Kalman Filter Notation. as the _acting_ measurement transition function. The error covariance matrix in predicting measurements \(\mathbf{S}\) is also typically written as a function of the acting measurement transition function \(\mathbf{H}\) and the measurement noise covariance matrix \(\mathbf{R}\), which takes the same form as Equation (26):  
\[\mathbf{S}^{(n-1)}=\mathbf{H}^{(n-1)}\hat{\mathbf{p}}^{(n-1)}_{(-)}{\mathbf{H}^ {(n-1)}}^{T}+\mathbf{R}^{(n-1)}. \tag{29}\]  
Using these predictions, we correct for the state space variables by evaluating a _weighted sum_ of the state predictions and deviation in measurement predictions from observations.