I want to track an object in a global Cartesian frame, denoted $G$. The object has a local frame, denoted $L$. The object is controlled by a velocity command $v$, defined in its local frame. This "world" is a 2D space as below:
In this world, the object can only translate (no rotation), and the local axes and global axes are aligned. Therefore, I can track the object using a regular Kalman filter.
I define the state as $x_t = \begin{bmatrix}x_t\\y_t\end{bmatrix}$ where $x$ and $y$ are the positions in the global frame. The control velocity is defined as $v_t = \begin{bmatrix}a_t\\b_t\end{bmatrix}$, where $a$ and $b$ are the local velocities defined in the local frame. The state transition matrix is defined as $A = \begin{bmatrix}1&0\\0&1\end{bmatrix}$ and the input matrix is defined as $B = \begin{bmatrix}\Delta t&0\\0&\Delta t\end{bmatrix}$, where $\Delta t$ is the time step.
So overall, my prediction stage of the Kalman filter is:
$\begin{bmatrix}x_{t+1}\\y_{t+1}\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}x_t\\y_t\end{bmatrix} + \begin{bmatrix}\Delta t&0\\0&\Delta t\end{bmatrix} \begin{bmatrix}a_t\\b_t\end{bmatrix}$
But now I want to allow the object to rotate, about the axis going into the screen. So, my "world" now looks like this:
And now, the axes of the two frames are not aligned, so I cannot use the state transition model I defined above. So, to account for this in the Kalman filter, I do the following.
I take the current estimate of the object's pose, and create a transformation matrix to represent this frame. Let us denote this $T_{GL}$, which transforms a vector from the object's local frame to the global frame. Then, I take the velocity vector $v_L$, which is currently defined in the local frame, and transform to the global frame as follows: $v_G = T_{GL} v_L$.
Once this is done, I have the control velocity defined in the global frame, instead of the local frame. And so then I just use this velocity in the Kalman filter defined in the first example above. My intuition is that once the velocity is transformed to the global frame, I can use the simple state transformation model defined above, because the axes of the velocity and the global frame are now aligned.
But I am rather confused now. It seems like I have effectively implemented the Extended Kalman Filter (EKF), because the relationship between the local velocity and the state update is actually non-linear, due to the rotation. The EKF involves linearising around the current estimate, and I am effectively doing this by computing the transformation matrix for the current estimation of the object's pose. However, when I read about the EKF, the maths is much more complex. It involves Taylor series expansions and partial derivatives, whereas all I am doing is transforming a vector from the estimated local frame to the global frame.
Have I actually implemented an EKF, unknowingly? Or is there something about my implementation that is fundamentally wrong?
Thank you!