Science topic

Kalman Filtering - Science topic

Explore the latest questions and answers in Kalman Filtering, and find Kalman Filtering experts.
Questions related to Kalman Filtering
  • asked a question related to Kalman Filtering
Question
1 answer
Dear all, the relation between the discrete measurement noise matrix, Rk, and the continuous measurement noise matrix,R(t), of the Kalman filter is given in the book (Optimal and Robust Estimation With an Introduction to Stochastic Control Theory, 2008, page 87) as Rk=R(t)/T, where T is the sampling time. In this equation there is unbalance in the units because the units of Rk are R(t) /unit time. Could anyone help to explain how this comes because the units of Rk should be the same as R(t).
Relevant answer
Answer
Dear Tamer,
The formula you provide for Rk is meaningless until you specify the value of t. Maybe you mean Rk = R(T)/T (where T, as you said, is the sampling time)?
Anyway, your formula seems to imply a linear growth of the noise covariance with time. This is not inherent to the Kalman filter, but to the assumptions you make on the time evolution of noise. Different stochastic models lead to different relations between R(t) and Rk. In your case, it seems that the noise is modelled as a diffusion process (a continuous-time version of a random walk, something known as a Wiener process when the differential steps are Gaussian). In this kind of processes, the error grows as the square root of time, and hence its variance (or covariance) grows linearly with time. Thus, R(t) = R1*t for some R1 (note that R1 equals R(t) at t = 1). If you now take T (your sampling time) as the time unit, you get Rk = R1. Thus R(t) = Rk*t, where t is given in multiples of T. In particular, Rk = R(T)/T. Actually Rk = R(t)/t for any t (which allows to regard Rk as the time derivative of R(t)).
If, instead of a diffusion process, you modelled noise as a stationary Gauss-Markov process, for instance, then you'd have that R(t) would not depend on time (hence R(t) = Rk regardless of the value of t). So, you see that the relation between Rk and R(t) depends on you underlying stochastic model (the fact that you're using a Kalman filter has nothing to do with it). The choice of the stochastic model depends on the physical process you're trying to model. Making the right choice for your filter is not an easy task, and is often the key to success.
By the way, the same considerations apply to the process noise of the Kalman filter, not only to the measurement noise.
Hope this helps...
  • asked a question related to Kalman Filtering
Question
4 answers
I am working on implementing a Kalman filter integrated with ARMA parameters, as described in the article "Predicting Time Series Using an Automatic New Algorithm of the Kalman Filter" (Mathematics, 2022). In the proposed method, the authors assume no observation error, effectively setting the observation variance to zero. However, when I applied this approach using the pykalman library in Python, the estimated values matched the real data exactly, which appears unrealistic and not practical.
Relevant answer
Answer
Hi Jorge, you can see in the equation 13. They set v_t = 0
  • asked a question related to Kalman Filtering
Question
1 answer
What is meant by the convergence of the Kalman Filter and to what does it converge? What is the mathematical formulation for convergence in terms of solving a Riccati equation?
Relevant answer
Answer
Hallo Mr. Bacha,
I would like to send you this file and I hope that you could find some of explain about your questions. this file was very benefit for me.
  • asked a question related to Kalman Filtering
Question
2 answers
Hello, has anyone worked with the CKF filter? How does it perform compared to other non-linear Kalman filters?
Relevant answer
Answer
CKF, EKF, and UKF are all non-linear Kalman filter variants with different approaches to handling non-linear systems. on the other hand, CKF is a specific implementation of a non-linear Kalman filter. It is designed to address the limitations of traditional Kalman filters in handling non-linear system dynamics. The CKF's use of the cubature rule offers a potentially more accurate approximation but at the cost of increased computational complexity. The choice between these filters depends on the specific requirements of the application, the degree of non-linearity, and the trade-off between accuracy and computational efficiency.
  • asked a question related to Kalman Filtering
Question
3 answers
Hello who interested with my question,
Firstly, I want to thanks you for spending your time to read this topic!
So I have 3 questions that need some advice in Unscented Kalman Filter about the 3 DoFs Mass-Damping-Stiffness System. Right now, i'm modifying my UKF code in MATLAB for a new project but some problems seem to occur again. Below there are 2 Code files - one was the UKF test and one was an UKF function that I've writen in my graduated thesis and here are the problems I incurred:
1/ The Cholesky Decomposition: I used the chol() function from library of MATLAB. However in my test, from the loop k=3, the covariance matrix was starting to fail in excuting chol() because it was not completely positive definited!
My solution: First, I used a function name "nearestSPD" of Mr. John D'Errico and this function have helped my covariance matrix pass the chol() but the output (state vector) I received was full of 0 from the loop k=3. Second approach was plusing (1e-6)*eye() into the covariance matrix but MATLAB code stopped from the loop 3 and said that matrix wasn't positive definited!
2/ Kalman Gain: since the equation of Kalman Gain has the inverse matrix, some value of Kalman Gain of my code in some loop can't be calculate because the covariance matrix is singularity and it doesn't have the inverse version!
My solution: in MATLAB, I've used pinv() (Moore-Penrose Inverse matrix) instead of the regular inverse inv()
3/ Choosing the workable Initial Covariance Matrix (P): How can we choose the suitable Initial Covariance Matrix for UKF?
My solution: Usually, I always choose the values of P corresponding to the error between the initial state vector and true parameter. For example, true k1 = 10000 N/m and in my initial state, I choose k1 = 8000 N/m -> value error of k1 in P will be chosen equal to 1e6.
If you have any suggestions, please feel free to repsonse! I would love to hear your idea!
My code is free and as long as you seem interested, you can use it freely! However, my code seems to fail due to 3 reasons above!
Thanks you!
  • asked a question related to Kalman Filtering
Question
9 answers
I want to use Kalman filter to estimate battery parameter and observer for state estimation together (SOC)
Relevant answer
Answer
You may try graphical state space model solved by factor graph optimization.
  • asked a question related to Kalman Filtering
Question
5 answers
I use the Kalman filter to estimate the stator and rotor currents for a 2MW doubly fed induction generator, I used the state model in the alpha beta reference, How to calculate the initial matrix P_0, Q_0, R_0 for a extended Kalman filter?
Relevant answer
Answer
Mohammed Abbas In an extended Kalman filter (EKF), the starting matrices P 0, Q 0, and R 0 play a significant role in the estimating process. They are, in order, the starting values of the state covariance matrix P, the process noise covariance matrix Q, and the measurement noise covariance matrix R. These matrices are used to represent the uncertainty in the state estimation, process dynamics, and measurement noise, in that order.
You must consider the following factors while calculating these matrices:
1. P 0 state covariance matrix: This matrix captures the state estimate's starting uncertainty. To represent the fact that the initial state estimate is unknown, it is commonly set to a big number for the diagonal elements and zeros for the off-diagonal elements.
2. Q 0: Process noise covariance matrix This matrix illustrates the process dynamics' uncertainty. It is often determined based on a prior understanding of process dynamics and how they evolve over time.
3. R 0 is the measurement noise covariance matrix. This matrix displays the measurement uncertainty. It is often set based on measurement noise characteristics such as sensor accuracy.
P 0, Q 0, and R 0 values can be derived by tuning or previous knowledge of the system. As the EKF converges to a more accurate estimate, the values can be changed over time. Finding the proper values for these matrices, on the other hand, may be difficult, as estimation success is largely dependent on the choice of these.
  • asked a question related to Kalman Filtering
Question
6 answers
Hello researchers,
Could you give your recommendation for a good book that explains the Kalman filter in a practical way?
Thanks in advance
MAnsour
Relevant answer
Answer
Please read:
1. Brown, R. G. and Hwang, P. Y. C., Intro. to Random Signals and Applied Kalman Filtering, 4th ed, John Wiley
2. Bar-Shalom, Y., Rong Li, X., Kirubarajan, T., Estimation with Applications to Tracking and Navigation, John Wiley
There are many more, but these are plenty to begin with.
Enjoy.
Regards
Hari Hablani
IIT Indore
  • asked a question related to Kalman Filtering
Question
4 answers
We combine data from different sensors like the Inertial Measurement Unit (IMU) and Global Positioning System (GPS) to estimate the state of a robot e.g. position using Kalman Filter. My question is why do we need to estimate the position if we are getting it from GPS and IMU?
Relevant answer
Answer
Raw GPS data only provides 4 measurements of pseudo range. You need an estimator to extract the 3D position measurement and clock bias. The GPS data is then used to estimate the errors in the IMU to provide improved short-term stability for any autopilots (or a navigation capability should the GPS signals be intermittent)
  • asked a question related to Kalman Filtering
Question
4 answers
In kalman filter for state variable estimation we take initial zeros but in ensemble especially for harmonic analysis, which values to take ?
  • asked a question related to Kalman Filtering
Question
6 answers
How could we detrmine Fixed-Gain values of the Extended Kalman Filter gain matrix without solving Riccati equation? Is there a simple way?
Relevant answer
Answer
There are sections in different books that address this topic. For a simple treatment, see Sec. 7.7 Estimator Design, in
Franklin, G. F., Powell, J. D., and Emami-Naeini, A., Feedback Control of Dynamic Systems, Prentice-Hall, 6th ed.
For sampled system (with a sampling period, digital control systems), see Sec. 8.2 Estimator Design, in
Franklin, G. F., Powell, J. D., and Workman, M., Digital Control of Dynamic Systems, 3rd ed, Addison Wesley
For a more complete treatment, see Chapter 8 Time-Invariant Filters, in
Bryson, A. E., Applied Linear Optimal Control, Cambridge University Press 2002
There are yet more books on the subject. See
Stengel, R. F., Optimal Control and Estimation, Dover edition
and yet more.
Hari Hablani
IIT Indore, India
  • asked a question related to Kalman Filtering
Question
5 answers
Look into the book
Y. S. Shmaliy and S. Zhao, Optimal and Robust State Estimation: Finite Impulse Response (FIR) and Kalman Approaches, Wiley & Sons, 2022.
This is the first systematic investigation and description of convolution-based (FIR and IIR) state estimation (filtering, smoothing, and prediction) with practical algorithms. In this framework, the Bayesian Kalman filter serves as a recursive computational algorithm for batch optimal FIR and IIF filters. The unbiased FIR filter is shown to be the most robust among other linear estimators. Various robust approaches for disturbed and uncertain systems are also discussed.
Relevant answer
Answer
Yes, I got a copy of your book recently. Very interesting approach!
  • asked a question related to Kalman Filtering
Question
2 answers
I am trying to implement the sliding window Extended Kalman Filter as in the paper "Automated Controller Calibration by Kalman Filtering" ( https://doi.org/10.48550/arXiv.2111.10832 ) but there are several things that are unclear to me and thus I would like to get some clarification.
The first is that I do not understand the idea of a sliding window for a Kalman Filter. Does a Kalman Filter not operate on a sequential manner? How does one operate a KF using a sliding window?
Can someone provide a Matlab script or preferably a Simulink model of such a system?
Relevant answer
Answer
Marnel Altius I suggest reading this aricle https://arxiv.org/pdf/2111.10832
  • asked a question related to Kalman Filtering
Question
7 answers
The Unscented Kalman Filter (UKF) algorithm requires a Cholesky factorization of the prediction error covariance matrix. The problem is that during the iterations, this matrix is not always positive definite and so, the MATLAB code risks tobe stopped.
Could someone tell me how to make this covariance matrix positive definite in order to ensure the running of the code until the end of the iterations?
Thank you
Relevant answer
Answer
try this every iteration
P=(P+PT)/2
  • asked a question related to Kalman Filtering
Question
1 answer
Dear all,
I have been doing research on the leak detection of pipelines for some time. I did the simulations with simcenter software. But unfortunately, I tried to detect the location of the leak using Kalman filter in different ways, but it is not possible. Is it possible to guide me? Is it possible to send me the MATLAB code so that I can try on my own water pipelines and simulations?
Relevant answer
Answer
Richard Fenner and Steve Mounce have done work using Kalman filters for leak detection in water distribution networks Seyed.
  • asked a question related to Kalman Filtering
Question
15 answers
We are trying to optimize the values of DEM of a particular catchment with a view of identifying outliers and predict future values. Thanks
  • asked a question related to Kalman Filtering
Question
2 answers
Hello researchers!
I want to fit Gaussian Mixture Model to a data set where the number of mixture components is known. The weights of the mixture, the means and variances of the gaussian distributions have known priors attached to them. Can someone please enlighten me on how to use Kalman filter for this problem? Goal is to estimate the weights of the GMM and also the parameters of the gaussian distributions.
Relevant answer
  • asked a question related to Kalman Filtering
Question
2 answers
I need to estimate a set of 15 constant parameters, which are not directly measured. My state vector is therefore fixed and is made up of these constants so the Kalman filter equations rearrange to those of the Recursive Least Squares. Only 3 quantities, different from the state, can be measured and from these I have to estimate the state vector. Results indicates that the state vector is estimated well but the rank of the observation matrix used in the calculations is much less than 15 because the equations(measures) are less than the constants to be estimated. Is it normal? Must the rank be equal to the number of parameters? Thank you
Relevant answer
Answer
Dear Michel Crimeni,
The rank of the measurement matrix H is less than or equal to the rank of the system (process) matrix F.
For more detail and information about this subject, I suggest you see links on the topic.
Best regards
  • asked a question related to Kalman Filtering
Question
16 answers
I'm simulating the process of measuring the positions of the end-effector of a robotic arm but I haven't yet specifications about the measuring device that will be used in actual experiments. Let's suppose the device will be a laser tracking system whose data sheet reports a measurement uncertainty of 15 micrometers = 0.015 mm. The measurement uncertainty is defined as the deviation between a measured coordinate and the nominal coordinate of a point. Can I assume it as the accuracy of the instrument? Can I use it as the standard deviation and then square it to initialize R?
Relevant answer
Answer
Michel Crimeni, those parameters are knobs you turn to tune the system so you should experiment with a range of values. But that's probably a good assumption to start with.
Best!!
AN
  • asked a question related to Kalman Filtering
Question
3 answers
I know I should be using the concept of Dead Reckoning. But how do I use prediction algorithms to determine/estimate the 2D coordinates and yaw angle, if I can get the gyroscope data, wheel encoder data, and global system time or timestamp of each input?
  • asked a question related to Kalman Filtering
Question
1 answer
I was wondering how could I implement Kalman filter in Mircoprocessors to caculate position in MPU6050 sensor. Is there anyone here that already had done this project?
Relevant answer
Answer
You do not need a Kalman filter to compute position from measured angular velocities and translational accelerations:
1. Compute rotation by means of angular velocity
2. Transform measured accelerations into the initial (inertial) frame utilizing the latter rotation matrices
3. Double time integration of accelerations (in initial frame) to derive positions w.r.t. the initial frame.
However, Kalman filtering could be used to improve the derived position. Most popular approaches are multi sensor fusion (e.g., IMU+GPS) or IMU sensor fusion (orientation from magnetometer/accelerometer investigations). IMU sensor fusion would be possible using the MPU9250, which has a magnetometer.
Best regards
Rene
  • asked a question related to Kalman Filtering
Question
4 answers
My question refers to the following papers:
  1. S. J. Julier and J. J. LaViola, "On Kalman Filtering With Nonlinear Equality Constraints," in IEEE Transactions on Signal Processing, vol. 55, no. 6, pp. 2774-2784, June 2007, doi: 10.1109/TSP.2007.893949
  2. A. T. Alouani and W. D. Blair, "Use of a kinematic constraint in tracking constant speed, maneuvering targets," in IEEE Transactions on Automatic Control, vol. 38, no. 7, pp. 1107-1111, July 1993, doi: 10.1109/9.231465.
In particular, my concerns are about the Fig. 1 of [1], the statements at the end of the left column in the page 2 of [1], and the statements in the middle of the left column in the page 2 of [2]. In both papers, it is suggested to apply the constraints only after the update of the state through the measurements. Should be possible to obtain better results projecting the state on the constraining surface both after the prediction and update steps?
Relevant answer
Answer
  • asked a question related to Kalman Filtering
Question
5 answers
Hi,
I face the following problem:
I want to use a measured quaternion (from an AHRS) for the update within an UKF to update the attitude.
My state vector contains a quaternion, therefore I want to know, if I could calculate the Kalman innovation with the quaternion directly or do I need an alternative representation (Euler angles, orientation vector...)?
The problem with Euler angles is, that for the +-180° (South) direction, an UKF would spread its sigma points around a discontinuity. This does not sound harmless from my point of view.
Is there an elegant way to solve my problem?
Best regards
Maximilian
Relevant answer
Answer
This is a strange question. You must use the measurement model, which relates your measurment to the state you want to observe.
  • asked a question related to Kalman Filtering
Question
3 answers
I am using a linear Kalman filter for estimating the position using multiple IMUs. My model is adding the accelerometer readings' double integration onto the previous positions. The state vector is the positions of the IMUs and the input vector is the IMU accelerometer measurements.
Also, I have some constraints in the positions and I am using those constraints in the correction step of the Kalman filter.
So in the tuning step, I set the R matrix zero so that the Kalman filter relies on the measurement only (so not use the aprior estimate at all). It works fine unless there is no input. However, if I introduce some acceleration to the system, even if I set the R=0 and Q very high, the Kalman filter still takes the contribution from the aprior estimate. The question comes at that point: what is the functionality to set R=0 if it does not disregard the model error?
Another approach to satisfy this behaviour comes from the Kalman gain calculation. As R goes to zero, the Kalman gain should approach to the inverse of the observation matrix (H or C) and so that the a posterior estimate approaches to the measurement. Since the H matrix is not a square and full rank matrix in my case, I cannot intuitively check where exactly the contribution of the aprior estimates take place even though I set the R=0. If anyone has any comments, I would really appreciate.
Relevant answer
Answer
Theoretically, it is fine to have zero measurement noise. Even in R.E. Kalman's original paper (Kalman, R. E. (1960). A new approach to linear filtering and prediction problems), the algorithm is stated without restrictions on possible singularities of the measurement noise covariance. However, for practical applications, a singular noise covariance for the measurements can cause numerical problems concerning the invitation carried out for computing the Kalman gain. When considering anything besides a very simple academic example I would consider introducing noise on each measurement, hence prevent the measurement noise covariance matrix from being singular.
Hope this helps
  • asked a question related to Kalman Filtering
Question
2 answers
In a seminal paper titled "Posterior Cramer Rao bounds for discrete-time non-linear filtering" (Link: https://ieeexplore.ieee.org/abstract/document/668800/?casa_token=Ecgr8cQF6RUAAAAA:JtZ8OuUkQLyphtnQnot1ZPGlifREbS393Pg0TJ58J98IilZuIw6xSjS1Af1XDlLchlKMi8LoRfxfmAg), Tichavsky et al. have developed a recursive way to calculate the Cramer Rao bounds for non-linear filtering problems. However, in the paper, the state xk at time 'k' is a non-linear function of the previous state xk-1only and not on other previous states. Are there any similar works on CR bounds for filtering problems where the current state depends on all the previous states up to the given time instants i.e. xk is a function of x1, x2, and so on up to xk-1?
  • asked a question related to Kalman Filtering
Question
3 answers
I have seen an example of tracking position in one dimension using an alpha beta filter, and I have a similar problem in a different field. In the example the position is first updated via dead reckoning: New position = old position+ velocity times delta t. Then the new measurement is used to update both the position estimate and the velocity estimate using the alpha and beta weights. I would like to see this problem formulated using a Kalman filter. I think I can come up with the variance estimates required and prefer this to somewhat arbitrarily selecting alpha and beta weights. The change in velocity is a drift, i.e. not driven by any known input.
  • asked a question related to Kalman Filtering
Question
2 answers
I am familiar with the equations of basic kalman filter. I was reading a paper where the author's proposed a variant of kalman filter and in the prediction step they had more terms than standard kalman filter. I am referring to equation 10 of the paper "Vehicular Node Localization Using Received-Signal-Strength Indicator" where author has added a term gamma multiplied with dt^2
https://www.comm.utoronto.ca/~valaee/Publications/07-Parker-TVT.pdf. I understand the idea behind term. I do not how to justify the factor one can add new terms affecting the uncertainty of prediction step of kalman filter.
My specific question how can I justify or prove that the new terms in error covariance equation equation 10 (inside attachment as well is correct)
Relevant answer
Answer
Hello Varun Garg,
Equation (10) is a result of the non-additive noise formulation for the EKF:
The usual simplification is to add noise to the state after the dynamic/prediction step. Often, we have a better knowledge where noise in the system is present (in the paper example the noise on the velocity measurement ist known). In such cases, you can use the non-additive noise formulation.
If you want to prove/check covariance equations in general you can refer to covariance computation rules:
The equations (9) and (10) of the paper calculate the expected value and covariance of the distribution propagated through the dynamic model (2).
Solving:
A_k|k-1=E(A_{k-1|k-1}+Ts * u_{k-1}+Ts w_{k-1})
P_k|k-1 = Cov(A_{k-1|k-1}+Ts * u_{k-1}+Ts w_{k-1})
, where E(...) computes the expected value results in (9) and (10).
  • asked a question related to Kalman Filtering
Question
3 answers
I was reading a IEEE transaction paper on how to calculate Measurement and Process noise matrix of the Kalman filter when they are unknown. The title of the paper was "On the identification of variances and adaptive Kalman filtering" by Mehra.
As shown in the attached image, In equation 4 of the paper, the term M0 exist on the both sides L.H.S and R.H.S sides of the equations. I do not understand why it is written in such a manner. Do I need to simiplify it to find the value of M0 or my understanding of the equation is incorrect. phi in the equation is a non singular transition matrix,
  • asked a question related to Kalman Filtering
Question
4 answers
I am researching UKF, and I would like to know where can I find performance measures of this. The system is a Chemical Process Plant.
Relevant answer
Answer
Maybe you can consider the recursive least squares algorithm (RLS). RLS is the recursive application of the well-known least squares (LS) regression algorithm, so that each new data point is taken in account to modify (correct) a previous estimate of the parameters from some linear (or linearized) correlation thought to model the observed system. The method allows for the dynamical application of LS to time series acquired in real-time. As with LS, there may be several correlation equations with the corresponding set of dependent (observed) variables. For the recursive least squares algorithm with forgetting factor (RLS-FF), adquired data is weighted according to its age, with increased weight given to the most recent data.
Years ago, while investigating adaptive control and energetic optimization of aerobic fermenters, I have applied the RLS-FF algorithm to estimate the parameters from the KLa correlation, used to predict the O2 gas-liquid mass-transfer, hence giving increased weight to most recent data. Estimates were improved by imposing sinusoidal disturbance to air flow and agitation speed (manipulated variables). Simulations assessed the effect of numerically generated white Gaussian noise (2-sigma truncated) and of first order delay. This investigation was reported at (MSc Thesis):
  • asked a question related to Kalman Filtering
Question
3 answers
For the discrete-time Extended Kalman filter (EKF), a stochastic stability analysis is discussed by Reif et al. in their paper "Stochastic stability of the discrete-time extended Kalman filter" (https://ieeexplore.ieee.org/abstract/document/754809). Recently, there have been works on EKF with unknown inputs, in particular, for arbitrary unknown inputs. Are there any works providing such stability analysis similar to Reif's work available for these EKF with unknown input filters?
  • asked a question related to Kalman Filtering
Question
4 answers
Online model updating can improve the prediction ability of the model. Unscented Kalman filter is used to update model parameters. I know it can be used when parameters are constant. Can I also use it to solve time-varying parameters? What's the alternative and what's the difference between online recursive least squares estimation.
Relevant answer
Answer
The recursive least squares algorithm (RLS) which allows for (real-time) dynamical application of least squares (LS) regression to a time series of time-stamped continuously acquired data points. As with LS, there may be several correlation equations and a set of dependent (observed) variables. RLS is the recursive application of the well-known LS regression algorithm, so that each new data point is taken in account to modify (correct) a previous estimate of the parameters from some linear (or linearized) correlation thought to model the observed system. For RLS with forgetting factor (RLS-FF), adquired data is weighted according to its age, with increased weight given to the most recent data. This is often convenient for adaptive control and/or real-time optimization purposes. A particularly clear introduction to RLS/RLS-FF is found at: Karl J. Åström, Björn Wittenmark, "Computer-Controlled Systems: Theory and Design", Prentice-Hall, 3rd ed., 1997.
Application example ― While investigating adaptive control and energetic optimization of aerobic fermenters, I have applied the RLS algorithm with forgetting factor (RLS-FF) to estimate the parameters from the KLa correlation, used to predict the O2 gas-liquid mass-transfer, while giving increased weight to most recent data. Estimates were improved by imposing sinusoidal disturbance to air flow and agitation speed (manipulated variables). The proposed (adaptive) control algorithm compared favourably with PID. Simulations assessed the effect of numerically generated white Gaussian noise (2-sigma truncated) and of first order delay. This investigation was reported at (MSc Thesis):
  • asked a question related to Kalman Filtering
Question
7 answers
I want to use a EKF for parameter (p) and state (x) estimation.
I am currently not understanding the difference between (1) the formulation of the parameters as states:
x_new=[x,p] and using a normal EKF for estimating x_new
and (2) the formulation with a dual extended Kalman filter, where x and p are estimated individually.
Which of them provides more benefits?
I am very thankful for your tips.
Relevant answer
Answer
The Kalman filter (KF) is a method based on recursive Bayesian filtering where the noise in your system is assumed Gaussian. The Extended Kalman Filter (EKF) is an extension of the classic Kalman Filter for non-linear systems where non-linearity are approximated using the first or second order derivative.
  • asked a question related to Kalman Filtering
Question
4 answers
I am implementing an unscented kalman filter for parameter estimation and I found its performances strongly related to the initialization of the parameter to estimate.
In particular, I don't understand why if I initialize the parameter below the reference value (the actual value to estimate) I get good performances, but if the parameter initialization is above the reference value, performances are very low and the estimation does not converge but continues increasing.
In other words, it seems that the estimation can only make the parameter increase. Is there any mathematical reason behind this?
Relevant answer
Answer
Dear Mr. Magnani,
I agree with Janez Podobnik. I assume you are using the Joint Unscented Kalman Filter for this purpose. In this case, the parameter is considered as a state and all the initial conditions, noise and measurement covariances will affect the estimation of the parameter. In 2019, I have proposed a different approach for this purpose and I am attaching the article link below:
The main advantage of this approach is you can determine weights for the measurements (a Jacobian approach) for parameter estimation. If one of the measurements significantly affects the parameter estimation, then, you can increase the weight of that measurement. The only drawback of this approach is that the estimated parameter must be linear in terms of measurements. The system itself can be a nonlinear system, but parameter(s) must be linear in terms of measurements. For frequency estimation, we have modified this approach with my colleagues (link below). In this case, the parameter is no longer linear in terms of measurements. However, we haven't tested this approach for other nonlinear systems in which the parameter(s) is nonlinear in terms of measurements.
You may try this approach and it can be useful for your aim.
Best regards,
Altan
  • asked a question related to Kalman Filtering
Question
13 answers
The Nyquist-Shannon theorem provides an upper bound for the sampling period when designing a Kalman filter. Leaving apart the computational cost, are there any other reasons, e.g., noise-related issues, to set a lower bound for the sampling period? And, if so, is there an optimal value between these bounds?
Relevant answer
Answer
More samples are generally better until such point as the difference in the real signal between samples is smaller than the quantization or other noise. At that point, especially with quantization, it may be a point of diminishing returns.
The other thing that nobody mentions is that faster sampling means less real-time processing time. In many systems, it's not really an issue as the time constants of the physical system are so slow as to never challenge the processing. In others, say high speed flexible meachatronic systems, the required sample rates may challenge the number of processing cycles available to complete the task.
Generally, the best bet is to return to the physical system's time constants and (if possible) sample 20-100x as fast as them.
  • asked a question related to Kalman Filtering
Question
10 answers
Consider a digital control loop which consists of a controller C and Kalman filter K, which is used to fuse and/or filter multiple sensor inputs from the plant and feed the filtered output to the controller. The prediction (or also called time-update) step of the KF, and the analysis and tuning of the control loop utilize a discretized state-space model of the plant, defined as
x_{k+1} = F * x_k + G * u_k,
y_k = H * x_k
where F is a transition matrix, G is the input gain matrix and H the measurement output matrix. For now I will ignore the process and measurement noise variables.
According to many text books about digital control and state estimation (for example "Digital Control of Dynamic Systems" by Franklin et al.), u_k = u(t_k), x_k = x(t_k) and y_k = y(t_k) are the control input, state and measurement output of the plant, which seem to available at the same point in time, t_k. This would mean that the output from the DAC of u_k, and sampling of y_k happen at the same moment in time, t_k. However this does not seem to hold for some classical implementations. Consider a typical pseudocode of a control loop below:
for iteration k = 1:inf
  sample y_k from ADC
  measurement update of KF x_k
  compute u_k
  output u_k through DAC
  time update of KF x_{k+1}
  wait for next sampling moment t_{k+1}
 end for
Ignoring the time durations of the DAC and ADC processes, the description above will introduce error in the prediction step of the KF, because it is assumed that the value u_k is actuated at the same moment of time that y_k is sampled - t_k. However due to the time delay introduced from computations of the update step of the KF, and the controller this is not the case. If we define s_k to be the time when the value u_k is actuated, then clearly t_{k+1} - s_k < T, where T is the sampling period. It is clear that the prediction step no longer computes the predicted state correctly because it either a) uses the old actuation value u_{k-1} or b) uses the newly actuated u_k, and in both cases the time between actuation and sampling is equal to the sampling period, assumed in the model.
This leads me to believe that the control value u_k should be actuated at time t_{k+1}, to keep consistency white the sampling period and the prediction model.
Also consider the case when the KF's prediction and update steps are executed before the controller during iteration k. Then the prediction step clearly makes use of u_{k-1} to compute a time update x_{k+1} of the state. This also seems to contradict the original definitions.
So with all these assumptions laid forward, I would like to know what are the correct sampling and actuation times, and why such ambiguity exists in modern literature about such hybrid systems.
NOTE: Some of you may say that the definition holds for small sampling periods and when the computations are fast. However I consider the general case where sampling periods may be very large due to the computations involved in the control loop.
Relevant answer
Answer
nice question.
  • asked a question related to Kalman Filtering
Question
3 answers
Hi,
I am doing a project related to estimate a state variable from different sensing channels, and these two channels contain different measurement sampling rates and delays. I would like to use a modified Kalman filter like sequential processing first proposed by Alexander, but I did not how to do the Lyapunov-method-based convergence analysis. Could anyone give me some suggestions for this proof?
Also, I try to combine this observer with an adaptive impedance controller and analyze the hybrid stability, but I am not sure how to do the proof.
Thanks a lot for any suggestions.
Best regards,
Qiang
Relevant answer
Answer
You need to distinguish between different sampling rates and delays. Regarding the sampling rate, you may be interested in the following paper:
However, regarding delays, it might break the Gauss-Markov process assumption of the Kalman filter. Hence, I'd check the observability rank and find conditions to promise it is a full-rank (or any defined rank).
  • asked a question related to Kalman Filtering
Question
8 answers
Hello,
using Cholesky decomposition in the UKF induces the possibility, that the UKF fails, if the covariance matrix P is not positiv definite.
Is this a irrevocable fact? Or is there any method to completely bypass that problem?
I know there are some computationally more stable algorithms, like the Square Root UKF, but they can even fail.
Can I say, that problem of failing the Cholesky decomposition occurs only for bad estimates during my filtering, when even an EKF would fail/diverge?
I want to understand if the UKF is not only advantagous to the EKF in terms of accuarcy, but also in terms of stability/robustness.
Best regards,
Max
Relevant answer
Answer
If I understand your question correctly, it concerns not the initial covariance matrix rather the updated covariance matrix you get at the end of each Kalman iteration.
If such a condition arises you may use Higham's method to find an approximate positive-definite covariance matrix.
Reference:
Computing a nearest symmetric positive semidefinite matrix - ScienceDirect
  • asked a question related to Kalman Filtering
Question
4 answers
Hello,
I'm currently working with a system consisting of an accelerometer, that samples in bursts of 10 seconds with a sample frequency of 3.9 Hz, before going into deep sleep for an extended (and yet undetermined) time period, then waking up again and sampling for 10 seconds and so on.
I've recently taken over this project from someone else and I can see that this person has implemented a Kalman filter to smooth the noise from the accelerometer. I don't know much about Kalman filters, but to me it seems that the long deep sleep period would make the previous states too outdated to be useful in predicting the new ones.
So my question is: can the previous states become outdated?
Relevant answer
Answer
The application of a Kalman Filter requires four models:
1. Measurement model, expressed by the Jacobian of the measurement variables in respect to the state variables. (H)
2. The measurement error model (R)
3. The state model, which allows to extrapolate the state to the future (F)
4. The state error model which allows to model the unpredictability of the state extrapolation. (The degree of a deviation of the state from the prediction for whatever reason) (Q)
For the exact mathematical meaning of H,R,F,Q refer to Wikipedia: Kalman Filter.
  • asked a question related to Kalman Filtering
Question
4 answers
Hello everybody , I'm looking for a method able to create a transition matrix for my linear kalman filter. I need to work on the heading of a Pedestrian Dead Reckoning experiment. in my state vector I thought to insert the angular displacement referred only to the last sample . In my mesurement vector instead I thought to insert the gyro data. Somone can help me?
Relevant answer
Answer
You can record GPD data through OSM tracker application. For Transition matrix study https://www.youtube.com/watch?v=CaCcOwJPytQ&list=PLX2gX-ftPVXU3oUFNATxGXY90AULiqnWT&ab_channel=MichelvanBiezen
  • asked a question related to Kalman Filtering
Question
7 answers
As all of us know Kalman Filter is designed for LTV (Linear Time Variant) systems. But no body in the literature applies that on Hybrid systems. In my opinion Linear Hybrid systems are a subset of Linear Time Variant (LTV) systems, So my question is why don't people use Kalman Filter for Hybrid systems with linear modes and resort to robust estimation approaches?
Relevant answer
Answer
Dear Navid Hashemi,
There are works that consider this application to be a Hybrid system thus taking into account the robustness aspect, here is a references :
In my opinion one can consider the LTV system as an LPV system and have several models and then deal with the issue with a De Kalman filter bank.
Please check links and attached files on topic.
Best regards
  • asked a question related to Kalman Filtering
Question
4 answers
I would like to implement a Kalman filter for tracking applications for IoT nodes. I cannot do floating point on our nodes but only fixed point.
Could you recommend some good references?
Relevant answer
Answer
Hello. Your question lacks detail. If you are implementing a Kalman filter in a multi-sensor network, then it probably is not a Kalman filter, but some form of information fusion across mulitiple sensor nodes. The fact that you wish to use fixed point arithmetic suggests that you are seeking to create local state and covariance estimates at each node and share these estimates. Possibly you wish to fuse them into a global state estimate. These are all design decisions that impact overall system performance and local/global processor requirements.
If you really are doing local (node-based) state estimation, rather than just transmitting raw measurements to a central processor, make sure you use a square root filter or you will lose a lot of numerical precision. The original reference for square root filtering and smoothing is G. J. Bierman's 1977 book "Factorization methods for discrete sequentiall estimation." There are other books that deal with specific multi-sensor tracking problems. Have a look at the Artech House library catalogue.
Please recommend this answer if you find it useful.
  • asked a question related to Kalman Filtering
Question
11 answers
Hi community,
I am new in the domain of Data Assimilation. I am trying to understand the process of Joint state and parameter estimation using Kalman Filtering approach; especially how the parameter(s) is estimated.
I understand that state variables are updated ta each time step using an updated Covar. matrix and Kalman Gain and then doing some matrix operation. However, what about the parameters. Is it affected by Kalman gain and/or Covar. matrix? I know that parameter at a new time step is calculated = previous time step parameter+ some noise. So, how does this noise evolves/changes/affacted by Kalman gain as scuh. I have tried to read different other papers, but couldn't find a definite answer.
To summarize my question, I guess I am looking for the detailed steps to estimate parameter.
Thanks in advance for your cooperation.
Relevant answer
Answer
Dear Shah Mahmood,
You should augment your states vector with the parameter you need to estimate. Then your EKF/UKF will deal with this augmented parameter as a state, and the estimation-prediction process is kept unchanged (I mean the steps are still the same). However, you need to linearize your A and C matrices with the new augmented model, at each iteration... You should also update your SS matrices in the case of the joint states-parameters estimation.
For more details, you can check my work.
Regards,
  • asked a question related to Kalman Filtering
Question
4 answers
I currently have the assignment to make a small demo for a specific algorithm, here we want to explain the Kalman Filter in its basic form. Sadly we havent really found any " noob friendly " examples and are trying to just jump ahead in other peoples code and trying to reverse engineer it.
Here in the dlm package on R, we've found the variables GG, FF, c0, CO etc. being used in the dlm function. Altought reading page 7 ( https://cran.r-project.org/web/packages/dlm/dlm.pdf ) these variables arent really explained and i would like to know what these mean. Or are these random variable names to use the algoritm with. This is the first day of the assignment, if anyone has any tips how to approach this or a easy "noob " friendly R language based example please do reffer this to me.
Many thanks!
Relevant answer
Answer
The DLM part of the Kalman filter isn't a big deal, because the estimator can accommodate linear time-varying systems. To interpret the variables is to look at what is happening with their covariances. If one is concerned with position and velocity, then error ellipsoids are also useful.
The idea of the Kalman filter is easy: One models the physical process with an equation that propagates the covariances (second moments) over time. Then one applies Baye's rule to obtain the conditional mean given the measurements to correct the estimate for a measurement. That's it !
  • asked a question related to Kalman Filtering
Question
4 answers
I am trying to implement Kalman filter to get rid of multipath error points on GPS data while my data contains Latitude, Longitude, accuracy, altitude, speed and time. I am using python but unable to figure out how can I choose parameters for solving this issue.
Guidence will be very much apreciated.
Thanks in advance
Relevant answer
Answer
Why not learn the parameters from some training data
  • asked a question related to Kalman Filtering
Question
6 answers
Is it theoretically possible, that after discretization by using Talyor Series Expansion, a non-observable nonlinear system will became an observable?
It was proved, that used continuous model of PMSM is non-observable (see attached). I want to know, if resulting discrete system is observable or not. Any comment appreciated. Thanks.
  • asked a question related to Kalman Filtering
Question
3 answers
LMMSE estimator and kalman filter
which of this estimator achieve more performance in FBMC?
Relevant answer
Answer
For Gaussian noise and linear models, the Kalman filter is optimal in the sense that it correctly calculates the posterior distribution and attains the minimum achievable matrix mse. For non-Gaussian noise, but linear models, the Kalman filter (and the lmmse approach) achieve the matrix mse given by. However, calculating the conditional mean would yield an error smaller than, or equal to, the matrix mse. For nonlinear models, the Kalman filter cannot be used. Nevertheless, the lmmse approach can be used; it gives the best estimate linear in data and achieves the matrix mse given by.
I hope this help you Alaa Alhanbali
  • asked a question related to Kalman Filtering
Question
5 answers
I want to understand the overview of Kalman filters and what purpose do they serve. I am trying to leverage this platform as I am not sure about other authentic sources on the internet to get this information. Please suggest one if you know. On another note, if I have a signal that is a mixture of various frequencies; can Kalman filter be used to extract the DC or average value of this signal? Please let me know how does it work. Thanks in advance.
Relevant answer
Answer
Early literature of Kalman filtering refferes to two steps of Kalman filtering as predicition and correction step. Using wording “prediction step” has led to a common misunderstanding among engineers and researchers that Kalman filter can also be used for prediction. Hence, in recent literature the term “prediction step” was replaced with term “process update step” and “correction step” was replaced with “measurement update step”, which is more correct.
The point of Kalman filter is not that it can remove high-frequency noise, the point of Kalman filter is that you can estimate quantities that you cannot measure directly, but you can measure other quantities that are affected by the quantity that you would like to estimate, but cannot be measured directly. Or maybe you can measure it directly by using different sensors and you would like to combine all the measurements to get better estimate. You can also have situation where you can measure on quantity directly, but the measurements are inaccurate (drift, noise, random errors), and you can also measure other quantities that that are affected by the quantity that you would like to estimate and have other sources of errors. Then you can combine all the measurements and get estimate that is less affected by the errors, because you have available a lot of information from various sources.
  • asked a question related to Kalman Filtering
Question
3 answers
In case of blind equalization, information about reference input is not available. Thus channel modeling using NLMS, RLS or even Kalman filter is really difficult. Because weight update needs the information about desired or reference input.
Relevant answer
Answer
you can take the simplest one NLMS combined with a Blind Source Separation, it give a better performances, instead of using only Adaptive filter.
  • asked a question related to Kalman Filtering
Question
3 answers
the error convergence matrix in Kalman Filter provides the convergence of the filter. In similar war, how the convergence of the Complementary Filter can be obtained?
Thanks in advance.
Relevant answer
Answer
Compute the white-noise gain (WNG) of the filter. Do this in either: In the (discrete) time domain, as an infinite summation of the squared impulse response, over m = 0...Inf; or in the (continuous) frequency domain, as an integral of the squared magnitude of the filter's frequency response, over -pi...+pi. They give the same result (the WNG). In the latter case, you will need to divide the result by 2*pi. Assuming the steady-state bias is zero (because you have matched your filter model to the signal) WNG*var_mes is the variance of the estimate output by your filter at steady-state, i.e. after the filter has converged, for an input signal that is corrupted by additive white noise, with a variance of var_mes. It need not be Gaussian noise.
  • asked a question related to Kalman Filtering
Question
4 answers
Dual control in Stochastic optimal control suggests that control input has probing action that would generate with non zero probability the uncertainty in measurement of state.
It means we have a Covariance error matrix at each state.
The same matrix is also deployed by Kalman filter so how it is different from Dual Control
Relevant answer
Answer
Dear Sandeep,
These are the dual objectives to be achieved in particular, a major difficulty consists in resolving the Exploration / Exploitation (E / E) compromise.
Best regards
  • asked a question related to Kalman Filtering
Question
5 answers
In the paper "Magnetometer-Only Attitude Determination Using
Novel Two-Step Kalman Filter Approach" in equation 19 do I need to complete quaternion multiplication first and then do simple mathematical finite differencing or it is in other way?
Relevant answer
Answer
Hi,
In fact the matrix H is not explicit in equation (19), it is present in the equation giving the estimate and the covariance which are then updated using equations (5).
Best regards
  • asked a question related to Kalman Filtering
Question
4 answers
Hi.
I'm modelling OFDM rayleigh fading channel, and I want to trace channel state information with Unscented Kalman Filter through MATLAB. I'm using autoregressive model to construct the filter.
I have no problem with creating state transition function for first order autoregressive model (AR(1)). But when it comes to second order AR(2) , I don't know how the create state transition function.
I can create state transition matrix A as shown in the picture. Kalman filter needs to reach 2 previous state at once. So how do I construct the filter?
By the way, I edited the example in the link below:
  • asked a question related to Kalman Filtering
Question
3 answers
I am looking for a MATLAB code to implement channel prediction or channel state information (CSI) using a Kalman filter-based approach. Specifically, for a MIMO environment.
Relevant answer
  • asked a question related to Kalman Filtering
Question
13 answers
suggest me literature regarding this topic and the gaudiness to start my thesis
please.....!
hope for good response...
  • asked a question related to Kalman Filtering
Question
5 answers
Hi everyone,
I have implemented an EKF in a power systems application. When I run a simulation in Matlab, in some iterations of the filter I get a Kalman gain matrix (K) with negative values and/or absolute values greater than 1. In some books I have read that the Kalman gain is a real value between 0 an1.
Is this correct ? Or is it an indication that something wrong with the Kalman filter?
Relevant answer
Answer
I have another opinion though I am not certain and welcome any corrections.
I think only the Kalman gains that correspond to measurable states are between [0 1]. Those states that are not directly measurable could have Kalman gains beyond [0 1].
  • asked a question related to Kalman Filtering
Question
6 answers
I started to learn the Kalman filter. However, I couldn't understand its' difference with the feedback/feedforward control system. Ultimately both systems are used to minimize the errors between the measurement and estimated state.
Relevant answer
Answer
Kalman filter is an optimum observer. It is not a controller itself. Think about a feedback control system. You have five state variables and you are getting the measurement of only two variables. You can use the Kalman filter to estimate the whole states. It is a model that measured outputs and control enters into filter and the estimated states computed.
  • asked a question related to Kalman Filtering
Question
5 answers
Hi,
I have an implementation of Kalman filter for a tracking problem, with constant acceleration model. In this model:
My State Matrix is:
x = [x, y , Vx, Vy, ax, ay] ;
My measurement Matrix is:
Y = [x' , y', Vx', Vy'];
I am putting the following as my Measurement Covariance matrix:
R = [r11, r12, 0, 0
r21, r22, 0, 0
0, 0 , r33, r34
0, 0, r43, r44];
Sometimes I have my measurement Position (x',y') that is not sometimes not so perfect. One solution is that:
- if I put a high Measurement Covariance on Position [r11, r12, r21, r22] then I can avoid a big effect on my filtered output, but it will effect both Position and Velocity.
What my problem is, that: I want to separate the Position and Velocity under certain conditions, which essentially means that I want my Position measurement (x',y') to not effect my Filter velocity. The filter should be updating the Position and Velocity Separately.
Is there a good way to do that?
I am trying to put the measurement covariance matrix on "Top Right" and "Bottom Left" but that ultimately makes my filter more unstable. Any ideas here?
Relevant answer
Answer
Please read the book
Bar-Shalom, Y., Rong Li, X., and Kirubarajan, T., Estimation with Applications to Tracking and Navigation, John Wiley 2001.
Hari Hablani
IIT Indore, Indore, India
  • asked a question related to Kalman Filtering
Question
3 answers
I am using Kalman filter to filter out noise from PMU data for load parameter estimation. I am successfully able to filter out noise by hit and trial (Tuning values of R and Q). I am interested in knowing if there is anyway I can automatically tune the parameters of Kalman filter once I get a window of PMU measurements.
  • asked a question related to Kalman Filtering
Question
3 answers
Dear friend,
These days, I'm trying to finish my Ph.D. in electrical engineering (control engineering). I'm specialized in Extended-Kalman fitter application, fault detection, neural network, digital transportation, digital twins and machine learning respectively. It is necessary to say that, my thesis about industry 4.0 at pipeline performance management (software). I'm enthusiastic to join a team for my postdoc. And I struggle to study at the edge of science topics for my postdoc.
Would you help me please to join in the on the team for my postdoc, study abroad or a way to join in this kind of program?
Relevant answer
Answer
Post doc is for those whose Phd is weak.
I suggest to look for some Entrepreneurship in your domains of interest
  • asked a question related to Kalman Filtering
Question
2 answers
I have a human skeletal data for 25 different joints from a depth sensor camera (Kinect) while performing a lifting work. But the data has some noise and inferred data due to occlusion. I am trying to use Tobit-Kalman Filter for data processing but could not figure out how to get the co-variance of process and observation noise for my data? I read multiple papers regarding the use of Tobit-Kalman Filter for processing Kinect data but could not find an in-depth explanation of the process involved. Can anyone help me out with my problem?
Thank you.
Relevant answer
Answer
Mohamed-Mourad Lafifi Thank you so much for your suggestions. These are very helpful links.
  • asked a question related to Kalman Filtering
Question
4 answers
Hi. I have read in several articles that it is possible to improve the performance of the Kalman Filter using neural networks to dynamically change the filter model, thus adapting it to the non-modeled variations of the system with greater efficiency.
   I have the Kalman filter working correctly, but I don't know how to incorporate the information provided by the neural networks, nor with what parameters to train them.
  I am a beginner in the subject and would appreciate some advice on how to implement this at a simulation level in matlab.
  • asked a question related to Kalman Filtering
Question
4 answers
How to design the Kalman filter for closed-loop boost converter?
Relevant answer
Answer
Hello dear
Please check below link, it seem was useful:
  • asked a question related to Kalman Filtering
Question
4 answers
Dear friend,
These days, I'm trying to finish my Ph.D. in electrical engineering (control engineering). I'm specialized in Extended-Kalman fitter application, fault detection, neural network, digital transportation, digital twins and machine learning respectively. It is necessary to say that, my thesis about Industry 4.0 at pipeline performance management (software). I'm enthusiastic to join a team for my postdoc. And I struggle to study at the edge of science topics for my postdoc.
Would you help me please to join in the on the team for my postdoc, study abroad or a way to join in this kind of program?
Relevant answer
Answer
Hi Syed Ali,
You may follow: https://www.timeshighereducation.com/ which for all PostDoc jobs and my be helpful for you.
Good Luck
Ali
  • asked a question related to Kalman Filtering
Question
9 answers
Dear Community, I am wondering if there are articles/books/references proposing implementations of Kalman Filters for positioning based on a single accelerometer ? (no GPS, no camera, no gyro, no odometery...)
Relevant answer
Answer
thank you Mohammed Aftatah
  • asked a question related to Kalman Filtering
Question
7 answers
For example, I need to estimate the state (position, speed, acceleration) of a vehicle, but I can only observe the its position inaccurately. The problem is, without knowing the speed, I cannot update the state for the next time point. If I calculate the speed using the position difference between 2 time points i.e. v_t=(p_t-p_(t-1))/(delta t), the estimation becomes very unstable: if one estimation has a large deviation, the speed would also deviate from the real one, so the forecast of the next time point is even more inaccurate.
Does any one have any good ideas? Thanks in advance!
Relevant answer
Answer
Do you try using another version of Kalman filter?
  • asked a question related to Kalman Filtering
Question
2 answers
Hello all,
I have a question regarding the implementation presented in paper titled "Real-Time Metric State Estimation for Modular Vision-Inertial Systems" by Stephan Weiss.
at Epoch 1: The monocular visual odometry starts at origin like IMU (both are aligned with world coordinate system). 
Epoch 2 is shown below, where visual odometry moves along Z-axis (in world frame), IMU moves along X-axis (in world frame) and the position of Camera (in world)
The update & correction will be visual frame (which moves along Z-axis).  For fusion to be successful, If we transform the visual odometry to IMU frame then they will be pointing in the same direction. 
Then our measurement vector Zp would also change or we use the same formula as in the paper?
Thank you very much for your suggestions and answers in advance.
  
Relevant answer
Answer
consult this work: Filtre de Kalman discret à la modélisation HydrologiqueFebruary 2019
Publisher: Editions universitaires européennes
ISBN: ISBN13: 978-613-8-46494-5 ISBN-10:613846494X
Project:
Multi-site modeling and prediction of annual and monthly precipitation
📷Samra Harkat
  • asked a question related to Kalman Filtering
Question
3 answers
I have a basic doubt in statistics.(I am working with kalman filter)
Lets say i get a state variable 'Xt' for each time instance t as the kalman filter output.And for each time step, i also have a ground truth 'Yt' from an expensive sensor.
So,
Yt=Xt+ Nt , where Nt is the noise with covariance P.
I have the complete csv data of Yt and Xt measured for every time stamp. How can i evaluate the covariance P from the data?
Relevant answer
Answer
Chris Morris Thank you for the answer! But I think we cannot calculate it using usual way. And the method I found to estimate the covariance from the given equation is through reduced chi-suquared stastics which is used for OLS Estimation: https://en.wikipedia.org/wiki/Ordinary_least_squares#Estimation
Ahmed K. Jameil Thank you Sir.
  • asked a question related to Kalman Filtering
Question
3 answers
Square root cubature Kalman filter gain K_k directly without the need for a matrix inversion:
Efficient least-squares: The least-squares method is used to compute the Kalman filter gain. If we substitute the innovation covariance matrix by its square-root representation we get the following expression:
Kk (Syy,k|k-1Syy,k|k-1T) = Pxy,k|k-1
The square root cubature Kalman filter use the symbol / (as it is a common notation in Matlab), to represent the matrix right divide operator. When we perform the operation A/B, it applies the back substitution algorithm for an upper triangular matrix B and the forward sub- stitution algorithm for a lower triangular matrix B:
Kk= (Pxy,k|k-1/Syy,k|k-1T )/Syy,k|k-1
Now the it seems that the problem of matrix inversion is overcome, but I still get in this message in the Matlab command for some state estimation problems:
Warning: Matrix is singular to working precision
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate
Is this expression of the Kalman gain can hold even when Syy,k|k-1 or Syy,k|k-1T are singular or nearly singular?
Relevant answer
Answer
Dear Mohammed,
This is just a quick answer to your last question. If matrix S is singular, you still have a problem and the formula does not work. So for nearly singular S you get a MATLAB warning message. Square root implementation procedure helps to solve algorithmic issue, not to cope with singularity. ( roughly - you still can not divide by zero even you use (P*S^T)/S formula).
Regards
Vladimir
  • asked a question related to Kalman Filtering
Question
3 answers
I recently started working on MEMS. I am calculating the orientation for now using 6DOF (gyroscope + accelerometer )
However, because the yaw can not be corrected using the accelerometer , it is common to use the Magnetometer to correct the heading. However, there will be a lot of metals in the envoirnment, so Maybe there would be an alternative for this ? ( cameras can be integerated to the System)
Relevant answer
Answer
Cameras can be used to track stars. This may require a lot of information stored aboard, but the calculations should not strain the available computing power.
  • asked a question related to Kalman Filtering
Question
4 answers
I try to use a Kalman filter on the sensor output data. The measurement is a differential value that represents a difference between two states at time t and t-\tau, y(t) = x(t) - x(t-\tau).
In that case, how to use Kalman filter to optimize the state x(t)?
Relevant answer
Answer
If tau is a multiple of your sampling time, you can simply augment the state vector, e.g. if y(kk)=x(k)-x(k-1). you can define a new state vector z(k)=[x(k);x(k-1)], write the state transition equation for it, y(k) is then [1 -1] z(k) and you can use the KF for the augmented system.
  • asked a question related to Kalman Filtering
Question
4 answers
If the elements of state co-variance matrix are negative and its a semi-deinite matrix, then how do we solve Unscented Kalman Filter...
Relevant answer
Answer
Dear Kiran:
I do not know the answer nor do I think there is a simple answer, but if you refer to the following excellent textbooks and recreate their illustrations, you will likely get the answer and much more.
1. Brown, R. G. and Hwang, P. Y. C., Intro. to Random Signals and Applied Kalman Filtering, 4th ed, John Wiley 2012, Sec. 7.5
2. Gibbs, B. P., Advanced Kalman Filtering, Least-Squares and Modeling, Wiley 2011, Sec. 11.7
3. Crassidis, J. L., and Junkins, J. L., Optimal Estimation of Dynamic Systems, 2nd ed, CRC Press 2012, Sec. 3.7
4. Ristic, B., Arulampalam, S., and Gordon, N., Beyond the Kalman Filter, Artech House 2004
These references should suffice to begin with. I am at IIT Indore. For further communication, please contact me at hbhablani@iiti.ac.in.
Regards
Hari Hablani
  • asked a question related to Kalman Filtering
Question
11 answers
Kalman filter for state estimation is well known. I wanted to have a glimpse of how one uses Kalman filter for parameter estimation.
Relevant answer
Answer
Hello Dr. Rofatto!
Last year I found a interesting material about Kalman Filter, very basic to us, but very good to teach in a course based on applications.
Since we've a slight modified KF related to notation, to our applications, the method is only one, an heritage of Electric Engineering.
Glad to find you here with good questions about concepts that we have to face every day : )
Kind regards
Guilherme Poleszuk
  • asked a question related to Kalman Filtering
Question
3 answers
Dear colleagues,
the majority of EKF/UKF implementations for speed sensorless control of PMSM are in alpha,beta frame (i.e. observer is implemented in stationary frame). I wonder why? Equations in dq fame are much more simpler, so the computational requirements should be lower. Is there any evidence that observer doesn't work implemented in dq frame?
Relevant answer
Answer
In fact , the simplified EKF reduced state dimention( in dq frame) is used for only speed estimation, and without rotor position estimation .... the resons resides mainly in the abc/dq cordinate transformation.... .
Elsewhere, you can read carfully this research paper.
best regards,
  • asked a question related to Kalman Filtering
Question
8 answers
Which Kalman Filters I can use for vehicle navigation
Relevant answer
Answer
Dear Oluwatobi:
It appears that you are not familiar with Kalman filter at all. So I suggest you start with basic textbooks (and take a course if available at your institute). A few excellent textbooks that I have followed for decades and benefited from are:
Brown, R. G. and Hwang, P. Y. C., Intro. to Random Signals and Applied Kalman Filtering, 4th ed, John Wiley 2012
Farrell, Jay A., Aided Navigation: GPS with High Rate Sensors, McGraw Hill 2008
Bar-Shalom, Y., Rong Li, X., and Kirubarajan, T., Estimation with Applications to Tracking and Navigation, John Wiley 2001
Rogers, R. M., Applied Mathematics in Integrated Navigation Systems, 3rd ed, AIAA Education Series, 2007
These books consider vehicle navigation. There are vehicles of various kind: land vehicles, ocean vehicles, atmospheric vehicles, space vehicles. But I assume you meant land vehicles which are considered in the above books.
There are several other books; for instance, by the authors: Grewal, James Farrell, and yet others.
For further correspondence with me, if needed, please write to me at hbhablani@iiti.ac.in.
Hari Hablani
Indian Institute of Technology, Indore, India
  • asked a question related to Kalman Filtering
Question
4 answers
I’m trying to implement Real-time hand motion capturing algorithm. Currently, I use Kalman filter to filter the acceleration data, but the acceleration still has white noise. The noise make ZUPT can’t detect accurately. How can I improve the Kalman filter?
Some information
Sensor: MPU9250
Sample Period: 18/1000
Relevant answer
Answer
The Kalman filter is based on linearization, and can be used for systems that have behavior close to linear.
To improve the Kalman filter and useing this filter to nonlinear system many approaches are proposed. This approches are the Extended Kalman Filter (EKF), Unscented Kalman Filter (UKF) and State Dependent Riccati Equation (SDRE) filter.
The extended Kalman filter is a type of nonlinear Kalman filter, and the difference between KF and EKF is that in KF the linearization is done around the nominal path, and in the EKF the linearization is done around the estimated point at each time step.
The SDRE technique is a comprehensive design methodology, which provides an efficient and systematic method for designing the observers and controllers.
The SDREF approach is similar to the steady-state linear KF proposed by Kalman in 1960. Compared to the linear KF and EKF approach that is based on linearization, the SDREF is based on the parameterization. Also, in KF, the gain coefficient is constant but in the SDREF the gain coefficient can be variant.
The SDRE method has many abilities not found in the other nonlinear estimator methods.
Additional information in the case of these filters are expressed in below links:
  • asked a question related to Kalman Filtering
Question
1 answer
I am trying to use the Kalman filter to monitor project progress and forecast future performance.
In project management, the Kalman filter forecasting model uses a baseline plan and accounts for the cumulative progress curve that represents the amount of work to be completed at a time point. The forecasting technique focuses on the estimation of the deviation between the planned performance and the actual performance throughout the execution of the project. To perform the forecasting calculation, it requires the actual performance data, as well as the information regarding the budget at completion, the baseline progress curve, the planned duration (PD), and the prior probability distribution of the project duration at a current time.
Therefore, I’m having difficulty understanding how exactly this is done and am wondering if someone could help me understand how this model is applied with the aid of an example or provide any reading material that can help me understand this.
Relevant answer
Answer
As you correctly pointed out, you should know the underlying model and the statistical information (covariance matrices), since KF is optimal only when you know these information otherwise it may not converge.
For further detail you can read Simon's book.
" Optimal state estimation: Kalman, H infinity, and nonlinear approaches "
Besides, KF is normally applied for filtering (i.e. you estimate the current state using prior information and current measurements) not prediction.
I recommend you to consider Machine learning methods e.g., Neural Network or statistical learning methods, e.g., regression models.
  • asked a question related to Kalman Filtering
Question
6 answers
I am trying to create a Kalman Filter for estimating the acceleration and angular velocity from the IMU.
Relevant answer
Answer
Dear David,
I think the Kalman filter is really simple, and you can follow formulae to implement it. However, I am not sure the Kalman filter is suitable or not, since I guess the noise is probably not white in your case. Perhaps, you need to rewrite the state space model and based on the noise, derive the updata formulae.
By the way, what is IMU?
  • asked a question related to Kalman Filtering
Question
10 answers
Hello all, 
I have a question regarding the square-root Kalman Filter section of the Wikipedia article about Kalman filters (https://en.wikipedia.org/wiki/Kalman_filter).
The text reads as follows: 
"Between the two (regular square-root implementation), the U-D factorization uses the same amount of storage, and somewhat less computation, and is the most commonly used square root form."
I see that they need the same amount of storage, but I don't understand why the U-D should is computationally more efficient (in which step do we same computations?). 
Furthermore, is the U-D form really the most commonly used from? I mostly saw papers using the standard Cholesky decomposition.
And last but not least, what properties does the state space model need to have (I guess badly conditioned covariance matrices among others) in order 
for standard Kalman filters and smoothers to fail? 
For which type of concrete problems (examples?) are those square-root filters used?
Thanks a lot in advance!
Relevant answer
Answer
The first "square root" implementation of the Kalman filter was derived by the late James Potter at what was then the MIT Instrumentation Laboratory. It enabled the Apollo computer to implement the space navigation problem for the moon missions in 15-bit fixed-point arithmetic. The late Gerald Bierman, co-developer of the U-D filter (along with Catherine Thornton), characterized square-root implementations as "achieving the same accuracy with half as many bits." All the square-root implementations use a square-root factorization of the covariance matrix of estimation, the condition number of which (a metric for digital inversion accuracy) is the square root of the condition number of the covariance matrix. Otherwise, relative performances of the various square-root implementations are not predominantly application-dependent.
  • asked a question related to Kalman Filtering
Question
9 answers
Given a nonlinear dynamical system
\dot{x} = f(x)
y = h(x)
whose output y has dimension larger than the state vector x. Is the system necessarily observable? What are the other necessary or sufficient conditions?
Relevant answer
Answer
While for integrable systems the initial conditions determine everything, since they define the values of the conserved charges, that define the dynamics completely, for deterministic chaotic systems, the initial conditions are irrelevant, since the attractor doesn't depend on them. The exponential sensitivity to the initial conditions, that has been promoted as a defining feature of deterministic chaos, in fact, is a transient effect, until the attractor has been reached.
The fact that the attractor has measure zero doesn't imply that it can't be observed, however!
  • asked a question related to Kalman Filtering
Question
3 answers
I need to know how to estimate friction coefficient between car tire and road instantly and using it for improving collision avoidance systems . I have vehicle dynamic model and but i don't know how can use Kalman filter and Car-Sim data for this goal.
vehicle dynamic model is extracted from bellow.
Relevant answer
Answer
  • asked a question related to Kalman Filtering
Question
8 answers
Assume you have a time series data set of the cloud cover over an area. Understandably this will undergo change over time. Can the Kalman Filter be used in some way to predict the future shape or structure of the cloud cover at some definite point of time? Same applies for swarms like fish shoals, bird flocks etc. I have only seen it being applied to predict point locations so far..
Relevant answer
Answer
Dear Altan Onat Alcy Rodolfo dos Santos Carrara Nesrine Amor and Michael Short thank you so much for your wonderful insights! The Kalman Filter was a new concept for me (coming from more of a CSE background) and from what little I have understood about it, I got the idea that it works well in the presence of noise but even without a noisy input, it could work for linear estimation of parameters. That is something I wish to try out. I am still trying to figure out a proper formulation of the problem and its parameters. Pretty sure that as I proceed with the work, I will be able to understand the whole picture better and be in a much better position to provide more clarity/responses to your replies. Many thanks to you all :)
  • asked a question related to Kalman Filtering
Question
2 answers
I am trying to understand error terms involved in the ensemble Kaman filter. I found that while assimilating state variable is it important to have proper model error term in forecast step but I am not able to understand the impact of the model error term on the parameter estimation problem. If one could suggest some recent article discussing this issue, it is much appreciated.
Relevant answer
Answer
Thanks!
  • asked a question related to Kalman Filtering
Question
2 answers
I am searching specifically for a model for detecting voltage dip using kalman filter (or extended type). if someone has experience related to the most effective method (fast, selective, immune and accurate) please let us discuss.
Relevant answer
Answer
Thanks for your replay. The state is the volatge wave and immunity means it should not reapond to harmonics contenet as it may be seen as a dip also in voltage amplitude.
  • asked a question related to Kalman Filtering
Question
4 answers
I need to apply a Kalman Filter for System Identification. The function can be of the forme.g. A*cos(omega*t-phi)1. I was not able to fit the data by a Kalman Filter while something like A*((t-tau)/T)^alpha*exp(-(t-tau)/T) seems to be managable (it just requires sometimes lots of iterations). Is there a criterion/rule of thumb/etc. that states for these kind of nonlinear functions it works/likely works, ...
Thanks in advance.
Relevant answer
Answer
Hi Oliver. I may explain what I would do for solving the problem you have mentioned (under assumption that I got it right) having Kalman filter in mind, but not only it.
You have some data, you suppose that they are generated by the black box in the form A*cos(omega*t-phi) and need to identify A, omega, phi.
First I would apply Fourier transform and check that the spectrum is localized in some small area plus inevitable noise. If it is not the case, it seems that approximating the data by a simple harmonic wave is not a good idea.
If it is indeed the case let take the middle of spectrum as an approximation for omega`.
Next we need to find A and phi and Kalman filter may be used for that.
Namely A *cos(omega *t- phi) is a solution of the second order linear system d/dt(X) = A*X with A= ( 0 1; -omega ^2 0) or
dot( x_1 ) =x_2 dot(x_2) = - omega^2 x_1
with observation y= x_1 ( in matrix form y= C*X =(1 0 ) * (x_1 x2)’ )
You need to add some noise and set its statistical characteristics than use standard Kalman filter As a result, you will get a smooth function that can be easily approximated by a*cos(omega*t) + b*sin (omega*t) ( using least square – for example) , and finally A and phi - can be easily computed from a,b.
Hope it may help.
  • asked a question related to Kalman Filtering
Question
6 answers
In my project for SOC determination, I am introducing kalman filter as a simple filter i.e to filter current from the battery. My doubt is that whether battery model is necessary for kalman filter in order to filter current? Can a basic kalman filter program( avaliable on internet) can do the same process?
Relevant answer
Dear Heinz,
I will give a conceptual answer that you can apply it on your problem. If you are interested in the current and its fluctuations then you have to model the battery and the load such that you can calculate the current. After calculating the current as a function of time you can sample it and filter it using Kalaman filter.
Best wishes
  • asked a question related to Kalman Filtering
Question
5 answers
I want to know if it is possible to estimate coefficients of Marini-Murray mapping function from GNSS data in PPP processing. Or there will be a strong correlation with ZTD?
Relevant answer
Answer
of course*
  • asked a question related to Kalman Filtering
Question
2 answers
iam looking to apply particle or kalman filter to apply on ecg signal,but when i am studying these filters,i come to know that there is an estimate,prediction terms and all.iam not able to understand te concept.please tell me how can i really know about these filters and to apply on ECG signal.
Relevant answer
Answer
Start with understanding how Kalman filter works. There are plenty of resources online, I personally found this article to be a good start: https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/
Particle filters are useful in estimating parameters with a unknown distribution in a non-linear, non-gaussian system. To understand particle filters, you need to first understand Kalman filter and its variations such as EKF and UKF. Some preliminary codes and concepts of particle filters can be found in this excellent blog: http://studentdavestutorials.weebly.com/particle-filter-with-matlab-code.html .
After you get familiar with the fundamentals, if you really want to dive deep into the mathematics of particle filters, then I would suggest this great (but exhaustive) tutorial paper: https://www.irisa.fr/aspi/legland/ensta/ref/arulampalam02a.pdf .
However, I am sure that for ECG denoising simpler models can give sufficiently good performance. Surface ECG denoising has been well addressed in the literature since there are only a handful types of noise present in them.
  • asked a question related to Kalman Filtering
Question
4 answers
In the Kalman filter method, the posterior estimate will be calculated based on a-priori state estimate and the ratio of current measurement error (Kalman gain). Now if the forward model is not accurate, for example we change the input matrix by multiplying a gain, why the Kalman gain remains the same for all values of the gain?
Relevant answer
Answer
Kalman Filtering is based on the assumption that the error on the state prediction is just a vector generated following Gaussian white noise, and that this noise vector is simply added to the prediction itself. This noise is called usually process noise, and is simply parametrized with a positive semi definite covariance matrix.
Therefore the error does not depend on B matrix at all, since we assume that the input itself is perfectly known, it is only the model of its influence on the state that could be wrong. If you think your input model is wrong then you should increase the process noise covariance matrix accordingly.
  • asked a question related to Kalman Filtering
Question
2 answers
I want to improve the specification performance of my MEMS Gyro, As we know, the measurement errors of a MEMS gyroscope usually contain deterministic errors and stochastic errors. I just focus on stochastic part and so we have:
y(t) = w(t)+b(t)+n(t)
where:
{w(t) is "True Angular Rate"}
{b(t) is "Bias Drift"}
{n(t) is "Measurement Noise"}
The bias drift and other noises are usually modeled in a filtering system to compensate for the outputs of gyroscope to improve accuracy. In order to achieve a considerable noise reduction, there's another solution that the true angular rate and bias drift are both modeled to set as the system state vector to design a KF.
Now if I want model the true angular rate, How could I do this? I just have a real dynamic test of gyro that includes above terms and I don't know how can I determine parameters required by the different models (such as Random Walk, 1st Gauss Markov or AR) for modeling ture angular rate from an unknown true angular rate signal!
Relevant answer
Answer
You can also model the scaling errors and angular displacement, so the full model would be
y(t) = S R w(t) + b(t) + n(t),
where matrix S is matrix of scaling factors, and R is matrix for angular displacement. However in practice the biggest contributor of error is bias b(t). Errors due to scaling error and angular displacements are nowday usually low, because manufacturing quality of gyro sensors is quite good now.
  • asked a question related to Kalman Filtering
Question
3 answers
Hello,
I am using a Kalman-Filter for a System with a watertank . Theres a known voltage input signal U_pump, that is used to control a waterpump. The waterpumps flowrate is proportional to the voltage U_Pump, so the relationship between U_Pump and the flowrate Q is Q = K * U_Pump.
As you can see, this is just a very easy model and probably not very accurate. So I have a Sensor, and want to decrease the uncertainty in this model by using the sensor to update the flowrate Q.
Therefore I have set Q as a state.
So the Differential Equation for the Flowrate Q is.
Q_dot = 0* Q + 0*U_Pump;
with A = 0; B = 0;
Because Q_dot is just the Rate at which Q changes over time, I cant put the K * U_Pump in there.
This means, in the discrete form:
Q_k = Q_k-1, which is a static model for the Flowrate Q, although I have the model Q = K*U_Pump
So my predicted Measurement of Q with the Kalman-Filter is just
Q_k_predicted = 1 * Q_k-1; which is not correct when I am adjusting the Voltage U at this timestep, therefore I can only use this for a static Voltage.
So is there a way to update U_Pump with the sensor value, or is there non?
Relevant answer
Answer
Hi Michael Short Thank you a lot for your answer. This is exactly what I was looking for and you understood my question perfectly. I will try to implement this soon. Again, thanks for your time investment and the detailed answer.
  • asked a question related to Kalman Filtering
Question
3 answers
R and DEM (pysical model )?
Relevant answer
Answer
Obviously there is difference between R and DEM (physical model).
  • asked a question related to Kalman Filtering
Question
6 answers
I am implementing kalman filter using accelerometer and GPS sensor. I wanted to know how to obtain the value of Q which is the process noise model for kalman filter.
Relevant answer
  • asked a question related to Kalman Filtering
Question
4 answers
Please suggest more articles on non constant turn model (kalman filter )and its simulation...
Relevant answer
  • asked a question related to Kalman Filtering
Question
1 answer
Hello,
I'm currently trying to implement a Kalman Filter for the state estimation for an LSTM, the only thing is how can I be sure the state is observable? I managed to separate the state update equation and the measurement equation, retrieving the network written in state-space form:
x(k+1) = f(x(k), u(k))
y(k) = g(x(k))
I already implemented an Unscented Kalman Filter, it yields good results, but I have no proof about if the filter is safely working or not, I have no guaranties about the state observability. I'm worried about the fact that currently is working well because is not exploring unobservable states, hiding the possible instability of the observer.
Does anyone know how to proceed?
Thank you all.
Simone Pozzoli
Relevant answer
Answer
Dear Simone,
I suggest you to see links and attached files on topic.
solving partially observable reinforcement learning ... - CiteSeerX
Simple Reinforcement Learning with Tensorflow Part 6: Partial ...
Partial observability - Approximate Value Based Methods | Coursera
Memory-based control with recurrent neural networks
Best regards
  • asked a question related to Kalman Filtering
Question
7 answers
Hello, well, I want to get the linear and angular velocity of a vehicle based on the data of IMU and GPS. all the exemples I saw so far in the internet do a sensor fusion using Kalman filter to get the position not the velocity. Also we can get the transformation matrices between two set of points from the roll, pitch and Yaw angles, but I wonder if I can get the linear velocity taken t0 position as [0,0,0] and then devided the distance between two points over the timestamp. Actually the probleme here is the linear velocity because the angular velocity is already provided from the gyro. Pease any help will be appreciated.
Relevant answer
Answer
Sensor fusion - GPS+ IMU by Isaac Skog