0
$\begingroup$

So I have built code for an Unscented Kalman filter that can take any specified state and measurement dynamics. I have tested it on various linear problems and it works well, as expected. The main concerns I have is applying this filter to nonlinear parameter estimation problems.

When I have applied it to problems where I give a pretty good guess, it tends to do fine. However, more often when I don't have a good guess and make the covariance matrix elements larger, it tends to lose its positive definiteness and in turn fails to work.

Does anyone have tips on helping avoid these problems other than trial and error tuning of the various covariance matrices?

I have read papers about using the EKF/UKF for parameter estimation of weights in Neural Networks, for example. However, whenever I try to do this, I lose positive definiteness and it's frustrating because I struggle to reproduce the stellar results I see in the literature with respect to using the UKF for machine learning. Due to my failed attempts, I am questioning if it's really as useful as the literature appears to imply.

Note that I tend to formulate the problem like so for the parameter estimation problems I am looking at:

$$ \begin{align} \textbf{w}_{i+1} &= \textbf{w}_{i} + \mathbf{\eta}_w\\ \textbf{e}_{i} &= \text{H}(\textbf{w}_{i}) + \mathbf{\eta}_e \end{align} $$

where $\textbf{w}$ is the parameters being estimated and $\textbf{e}$ is some error generated by the parameters, where the expected value for $\textbf{e}$ is always $\textbf{0}$ (since I'm trying to find $\textbf{w}$ such that the error is as close to 0 as possible). $\text{H}(\cdot)$ also tends to represent a cost function that the underlying model is scored against as a function of the current parameters $\textbf{w}$.

$\endgroup$
  • $\begingroup$ If you are doing parameter estimation only, and not combined parameter and state estimation, you are probably better off with recursive least squares and similar methods (i.e. only parameter estimation). $\endgroup$ – Arnfinn Aug 7 '16 at 23:16
  • $\begingroup$ @Arnfinn Well technically, the way I formulated the problem, the parameters I estimate are the state. Obviously the state dynamics are linear, but the measurement function is nonlinear wrt the state being estimated, hence why I want to use the UKF. I don't even know if the recursive least square applies well here. $\endgroup$ – spektr Aug 8 '16 at 0:44
  • $\begingroup$ I believe the EKF yields the standard RLS expressions when there is no dynamics... $\endgroup$ – Arnfinn Aug 8 '16 at 0:52
  • $\begingroup$ At any rate, RLS or EKF, some common parameter tips and tricks for convergence are: 1) Make sure you have persistent excitation 2) It can be difficult to estimate parameters that are not affine with state or input 3) Use a forgetting factor to avoid covariance wind-up and increase the local region of attraction $\endgroup$ – Arnfinn Aug 8 '16 at 1:03
  • $\begingroup$ @Arnfinn I wouldn't know if you're correct about EKF reproducing RLS in special cases, I would have to try to derive that. But in terms of your tips, maybe you could write an answer explaining some of these comments in detail with some math to help make them more precise? Or if you know of some papers that could help articulate what you're referring to, that would be useful as well. $\endgroup$ – spektr Aug 8 '16 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.