I have a non-linear system described by a collection of first-order, non-linear difference equations:
x(k) = f(x(k-1)) + u(k-1)
y(k) = h(x(k)) + v(k)
where u(k-1)
and v(k)
are independent, zero-mean Gaussian noise processes with covariances Q
and R
, respectively.
I would like to use the kalman
function in matlab to estimate x
given y
. However, the interface in the matlab control system toolbox is:
[K,L,P]= kalman(sys, Q, R, N)
where sys
is the state-space model. My question is: how do I define sys
for my system of first-order, non-linear difference equations in matlab?
As mentioned by others, the kalman
function is only for linear systems. However, for highly non-linear systems, the extended kalman filter (EKF) may be a poor estimator. In these cases, the unscented kalman filter (UKF) may be better. So, you may want to try both.
Matlab code for either (EKF or UKF) may be found in the EKF/UKF Toolbox for Matlab here. Another UKF implementation that is suited for your additive noise model can be found at Matlab Central.
Hope this helps.