Extended Kalman Filter converges to wrong values (super simple model)
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to implement an Extended Kalman Filter for an hydraulic/electric circuit that has a resistance (R) and a Capacitor (C) both are connected in parallel. Pressure and flow (voltage and current) are measured. Aim is to estimate R and C. The estimation of the EKF for C is with in the expected range, but the R is always of by a constant factor.
the ODE is: dp/dt = -p/CR + q/C (p is pressure (or voltage), q is flow (or current))
in discrete time the pressure for the next time step is: p = p + T(q/C-p/CR)
I tried two implementations that differ in the state selection:
1. x = [p, 1/C, 1/(C*R)] <-- off by factor 2
2. x = [p, 1/C, 1/R] <-- off by factor 3
for both the input is q and the output is p.
I double checked the equations, and played with different implementations for some days now, but R is always off. and i dont understand why. So it would be great to get some advice because i am running out of ideas.
The jacobians are:
1. state: [1 - Tx3, T u, -T x1 0, 1, 0 0, 0, 1]
2. state [1 - T*x3*x2, T(u-x1x3), -T x1x2 0, 1, 0 0, 0, 1]
It is implemented in simulink and the model is attached if anybody wants to have a look. (packed as zip because slx is not supported)
Thanks!
0 Commenti
Risposta accettata
John Petersen
il 2 Gen 2015
You have a constant dt used in the filter, but the simulation is variable step. This will cause problems with your predictor. Fix this and then see how it goes.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!