If is not linear or a linear relationship between and cannot be written down, the so-called Extended Kalman Filter (EKF for abbreviation) can be applied.
The EKF approach is to apply the standard Kalman filter (for linear systems) to nonlinear systems with additive white noise by continually updating a linearization around the previous state estimate, starting with an initial guess. In other words, we only consider a linear Taylor approximation of the system function at the previous state estimate and that of the observation function at the corresponding predicted position. This approach gives a simple and efficient algorithm to handle a nonlinear model. However, convergence to a reasonable estimate may not be obtained if the initial guess is poor or if the disturbances are so large that the linearization is inadequate to describe the system.
We expand into a Taylor series about :
By ignoring the second order terms, we get a linearized measurement equation:
where is the new measurement vector, is the noise vector of the new measurement, and is the linearized transformation matrix. They are given by
Clearly, we have , and .
The extended Kalman filter equations are given in the following algorithm, where the derivative is computed at .