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
Question
We are trying to optimize the values of DEM of a particular catchment with a view of identifying outliers and predict future values. Thanks
Question
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.
Question
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
Question
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
Dear Michel Crimeni,
The rank of the measurement matrix H is less than or equal to the rank of the system (process) matrix F.
Best regards
Question
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?
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
Question
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?
Question
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?
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
Question
Hello,
I am a research assistant on hydrology and fluid dynamics, with a background in Civil Engineering, Currently, our research team have been working on evaluating Data Assimilation techniques for rainfall-runoff predictions.
I would like to know if you have suggestions of studies or books about data assimilation especially focused on the applications in hydrology and hydraulics. Are there any similar studies to recommend? Does anyone have a solved numerical example of rainfall-runoff predictions by means of data assimilation techniques?
You might look at some of the papers by Dr. Dong-Jun Seo. See:
Question
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 , the statements at the end of the left column in the page 2 of , and the statements in the middle of the left column in the page 2 of . 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?
These articles might be useful, have a look:
Kind Regards
Qamar Ul Islam
Question
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
This is a strange question. You must use the measurement model, which relates your measurment to the state you want to observe.
Question
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.
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
Question
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?
Question
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.
These links might be useful, have a look:
Kind Regards
Qamar Ul Islam
Question
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)
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).
Question
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,
Dear Varun Garg,
I suggest you to see links and attached file on subject.
Question
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.
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):
Question
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?
Yes, these articles might be useful to connect all the dots together, have a look:
Kind Regards
Qamar Ul Islam
Question
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.
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. Åström, Bjö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):
Question
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.
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.
Question
Hi, I am currently doing a project which requires me to use Kalman filter to remove the noise in the speech. Now I am using 1D Kalman filter. Can I use Extended Kalman Filter or Unscented Kalman Filter for my application? Thanks.
With code matlab:
Speech-Enhancement-Kalman-Filter
Question
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?
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
Question
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?
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.
Question
I am looking for a complete solution for 10-DOF IMU Kalman Filtering (acceleration x-y-z, gyro x-y-z,magnetometer x-y-z,altitude).
I am interested in all example ,codes
Thanks for helping
Question
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
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.
nice question.
Question
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
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).
Question
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
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
Question
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?
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.
Question
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?
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
Question
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?
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.
Best regards
Question
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?
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.
Question
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!
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 !
Question
I am trying to create a Kalman Filter for estimating the acceleration and angular velocity from the IMU.
Xiliang Zhang IMU is inertial measurements unit (acceleration, gyro, magnitude sensor)
Question
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.
Why not learn the parameters from some training data
Question
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.
Question
LMMSE estimator and kalman filter
which of this estimator achieve more performance in FBMC?
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.
Question
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.
Dear Mr. Mahmood,
Joint Kalman Filter is similar to the standard one for state estimation. As you indicated, the only difference is that you should consider parameter(s) as states along with the other states. I have recently proposed a modified Joint Unscented Kalman Filter in an open-access journal:
You can find answers to your questions in this manuscript. Furthermore, I have shared the Matlab scripts on my Github page. You can access these scripts from:
With my best regards,
Altan
Question
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.
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.
Question
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.
you can take the simplest one NLMS combined with a Blind Source Separation, it give a better performances, instead of using only Adaptive filter.
Question
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?
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.
Question
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
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
Question
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?
Check out CSIRO website :
Question
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?
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
Question
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:
Question
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.
Question
suggest me literature regarding this topic and the gaudiness to start my thesis
hope for good response...
Question
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?
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].
Question
I control my system with a LQR . My input (u) is torque produced by 3 reaction wheels. These wheels are connected to DC Motors. Reaction wheels inertias are already added as a B matrix without motors. I want to integrate the wheel's DC Motor's dynamic model into the system. But I am confused a lot. You can see my system's Simulink diagram below.
Sincerely.
Most likely you have solved this problem few months ago. I guess you were confused because the flywheel is driven by the DC motor and both have different inertias. So, you were unsure of how to unify the dynamics for the LQR design. I have uploaded a method. If you are interested, you can find it here:
Question
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.
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.
Question
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?
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
Question
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.
Dear Hur Rizvi,
I suggest you to see link and attached files on topic.
Best regards
Question
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.
Question
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.
Question
How to design the Kalman filter for closed-loop boost converter?
Hello dear
Question
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?
Hi Syed Ali,
You may follow: https://www.timeshighereducation.com/ which for all PostDoc jobs and my be helpful for you.
Good Luck
Ali
Question
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...)
thank you Mohammed Aftatah
Question
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!
Do you try using another version of Kalman filter?
Question
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?

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
Question
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?
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.
Question
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?
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
Question
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?
To transform in the d-q frame for PMSM we need the rotor position which is being estimated. In general, calculating the estimates from the stationary frame measurements in somewhat easier because it is independent of the parameter being estimated.
If you have an incorrect rotor position estimate for vector control it will result in axis misalignment and the operation will tend to be unstable due to the electromagnetic torque which is a function of the q-axis current.
Question
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)
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.
Question
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)?
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.
Question
If the elements of state co-variance matrix are negative and its a semi-deinite matrix, then how do we solve Unscented Kalman Filter...
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
Question
i could'nt understand the basic difference of these term
Dear all,
Let me expand the answer with an example. Consider for example the (Extended) Kalman Filter in your mobile phone responsible for providing you with the phone's location. The true state would be your actual position. The measurement could be for example a linearized pseudo-range measurement from a GPS satellite in a form of a 2D plane. The estimate of the state at the current time step would be then the position the Kalman Filter calculates based on the measurement(s) (and the predicted state estimate based on the state estimate of the previous time step). Hope this helps.
Best regards
Question
Kalman filter for state estimation is well known. I wanted to have a glimpse of how one uses Kalman filter for parameter estimation.
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
Question
Which Kalman Filters I can use for vehicle navigation
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
Question
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
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:
Question
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.
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.
Question