I am implementing a kalman filter based on a paper. The state-space vector has 6 variables, as the state variable changes with the evaluation of time, and the paper also provides the differential equations of the variables with the evaluation of time (dt). My question is that when implementing this concept in python, how I should use the differential equation with the dt. I was wondering to simply multiply the equation with dt but I think that this is not the solution as it is a differential equation. Kindly guide me in this respect. Also, I want to ask that as these equations will estimate the new states, so they should be added in the update step? Thanks!
Asked
Active
Viewed 240 times
0
-
What have you tired, show us a sample of your code? reading the code of filterpy or pyKalman may be more instructive. – Paul Brennan Dec 16 '20 at 15:15
-
@PaulBrennan, This is the sample of my code, I can not copy the whole code as it is very long. dt is time step, u is input and y is the measurement `class KF: def predict(self, dt, u) x = [a b c d e f] # predict equations of kalman filter def update(self, y) # update equation of kalman filter # Equation for a variable in state space model a = (V * np.sin(sigma + beta)) # V is velocity, sigma is angle, and beta is float angle` In this,I am confused where to add equation 'a' which is one of the variables in state space vector for estimating the state of variable in next time step – jaz Dec 16 '20 at 22:21
1 Answers
0
There are two different useful functions for solving ODEs in scipy.integrate
- scipy.integrate.odeint()
and scipy.integrate.solve_ivp()
for initial value problems. I don't know enough about your system to answer your last question.

MattDMo
- 100,794
- 21
- 241
- 231
-
Thank you very much for your response. As per my understanding, I need to make functions of all 6 variables in order to use them in the described functions for solving ODE? I mean if I have 6 state variables: yaw angle, float angle, curvature etc., then I have to make functions for these as well in order to differentiate them? And for second question, my system estimates the ego-motion of vehicle and road estimation, so in order to estimate new states using the measurements in the update step, I am not sure where to use these differential equations. Could you please guide me in this respect? – jaz Dec 16 '20 at 15:16
-
@jaz Again, I don't know enough about your system to answer those questions. I would suggest visiting [math.se] and asking there. – MattDMo Dec 16 '20 at 15:29