# Driver Clustering Based on Individual Curve Path Selection Preference
## 2 Methods and Materials
### Online Parameter Identification  
In order to use parameter calculation (20) all data points must be stored priorly. This hinders the algorithms from being used in embedded vehicle controllers, as the memory consumption is too high. Therefore, methods are sought to estimate the model parameter vector without the need to use too much memory. One of the most widely used parameter identification algorithms is the Kalman filter [16]. This filter was originally designed for linear systems, but has been extended to handle non-linear systems [23]. The modified structure is called the Extended Kalman Filter (EKF). Using EKF for parameter identification is a widely accepted technique. Papers propose to use the filter in the field of polymer technique [24], bioengineering [25], and radar technology [26]. Even though the model proposed in (17) is linear, the estimation of system parameters requires the augmentation of the model with the parameters as state variables, which hence becomes non-linear. The LDM model equations from (17) are rewritten in the form of (29). \[\hat{f}_{1}: \hat{\delta}_{1}=u_{1}^{\mathrm{left}}\hat{P}_{11}+u_{2}^{\mathrm{ left}}\hat{P}_{21}+\cdots+u_{3  
Then, the augmented state vector is given by (32)  
\[x^{\prime}=\left[\delta_{1}\quad\delta_{2}\quad\delta_{3}\quad\hat{P}_{11}\quad \hat{P}_{12}\quad\cdots\qquad\hat{P}_{63}\right]^{\top}\in\mathbb{R}^{21} \tag{32}\]  
where \(\hat{P}\) qualifies as the estimated parameter vector. The augmented system is non-linear, as \(\hat{f}_{1}\) -- \(\hat{f}_{3}\) contains the multiplication of state variables \(\hat{P}_{11}\) -- \(\hat{P}_{61}\) and the input variables \(u_{1}\) -- \(u_{6}\). Therefore, the usage of EKF is necessary, linearizing the system at cycle \(k\) around the augmented state \(x^{\prime}_{k}\) and the input \(u^{\text{left}}_{k}\) and \(u^{\text{right}}_{k}\). The system and the input matrices are given by (33). \[F_{k}=\left[\frac{\partial_{\hat{f}_{1}}^{2}}{\partial x^{\prime}_{j}}\right]_ {x^{\prime}_{k},u^{\text{left}}_{k},u^{\text{right}}_{k}}\in\mathbb{R}^{21 \times 21}\quad G_{k}=\left[\frac{\partial_{\hat{f}_{1}}^{2}}{\partial u_{j}} \right]_{x^{\prime}_{k},u^{\text{left}}_{k},u^{\text{right}}_{k}}\in\mathbb{ R}^{21\times 3} \tag{33}\]  
The system output equations \(\hat{h}(x^{\prime})\) are given by (34). \[\hat{h}_{1}: \quad\delta_{1}=\delta_{1}\] \[\hat{h}_{2}: \quad\delta_{2}=\delta_{2}\] \[\hat{h}_{3}: \quad\delta_{3}=\delta_{3} \tag{34}\]  
The linearized system output matrix is given by (35). \[H_{k}=\left[\frac{\partial\hat{h}_{i}}{\partial x^{\prime}_{j}}\right]_{x^{ \prime}_{k},u^{\text{left}}_{k},u^{\text{right}}_{k}}\in\mathbb{R}^{3\times 21} \tag{35}\]  
The EKF uses the linearized system to predict the expected value of the states and their covariance. The filtering steps are given in Table 1, where \(\Sigma\) is the state covariance matrix, \(I\in\mathbb{R}^{21\times 21}\) is a unity matrix, \(z\) is the observed output vector. \(K\) is the Kalman gain. \(Q\) and \(R\) are the covariance matrix of the state model and the observation, respectively. It is noted that notation \(k\) is exchanged to \(k|k\) and \(k|k-1\). This is performed as the Kalman filter includes the calculation of the conditional probability of the state values; therefore, the previous estimates are considered to give the prior estimates in the prediction step, while the predicted estimates are used to calculate the correction, to give the posterior estimates. For simplification \(x^{\prime}\equiv x\), \(\hat{f}\equiv f\) and \(\hat{h}\equiv h\). The model and observation covariance matrices \(Q\) and \(R\) are to be tuned to yield the optimal estimation performance of the filter. The covariance matrices are simplified so that they would become diagonal, as given in (36).