Science topic

Extended Kalman Filters - Science topic

Explore the latest questions and answers in Extended Kalman Filters, and find Extended Kalman Filters experts.
Questions related to Extended Kalman Filters
  • asked a question related to Extended Kalman Filters
Question
5 answers
I'm studying the topic from Probabilistic Robotics by Thrun Burgard and Fox.
In the Extended Kalman Filter algorithm, we linearized the action model in the following way.
𝑔(𝑢(𝑡),𝑥(𝑡-1)) = 𝑔(𝑢(𝑡),𝜇(𝑡−1)) + 𝐺(𝑡)⋅(𝑥(𝑡−1)−𝜇(𝑡−1))
𝑔(𝑢(𝑡),𝑥(𝑡-1)) is the action model and 𝐺(𝑡) is its Jacobian matrix with respect to the state 𝑥(𝑡−1).
I don't see how this guarantees linearity because 𝑔 could be nonlinear in 𝑢(𝑡). The authors don't mention anything about why this is the case.
In other words, I imagined that the multivariate Taylor expansion for this where we get a linear function in both 𝑢(𝑡) and 𝑥(𝑡−1)
Relevant answer
Answer
Hi,
It should be noted that the Kalman filter is part of the theory of estimation of states of a system represented by a linear model. It is therefore an algorithm that provides estimates of some unknown variables from observed measurements over time. The filter uses as input the command u(t) and the output of the model y(t) and as output it provides an estimate of the output, in other words an estimate of the states of the system. For non-linear systems there is an extension that can deal with these cases: the extended Kalman filter. In my opinion there is no particular requirement on the control when applying this algorithm.
Also please take a look at the links.
Best regards
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
2 answers
I’ve linearised about my current state estimate with my equations that relate my measured variables to the states. But I think I must be missing an equation or setting it up wrong because the dimensions of my matrices being concatenated are not consistent
Relevant answer
Answer
To obtain matrix C by linearization in discrete-time EKF, you need to consider the Jacobian matrix of the measurement equation with respect to the state variable at the current state estimate. A real-valued function 'f(.)' from 'n'-dimensional state variable to 'm'-dimensional observations has a 'm X n'-dimensional Jacobian matrix with the (i,j)-th element being first-order derivative of the 'i'-th observation with respect to the 'j'-th state variable. This will result in appropriate dimensions for implementing EKF.
You can look up more about Jacobian matrices.
Hope it helps.
Regards,
Himali
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
3 answers
if possible please send me to mahe.nani64@gmail.com.
thank you
Relevant answer
Answer
If you want to program it in Matlab, you may have a view in the Matlab Global Optimization Toolbox which actually covers the mentioned optimization algorithms.
You may also find the following papers interesting which actually performed the discussed task on a real-world drive system:
  • asked a question related to Extended Kalman Filters
Question
4 answers
Sensorless Control of a Doubly Fed Induction Machine Based
on an Extended Kalman Filter
Improved Sensorless Control of Doubly Fed Induction Motor
Drive Based on Full Order Extended Kalman Filter Observer
  • asked a question related to Extended Kalman Filters
Question
3 answers
I am doing a project on Development of Control and Protection techniques in AC Microgrid . So I need simulink model of PMU to measure positive sequence components of three phase voltage and current.
Relevant answer
Answer
Look the link, maybe useful.
Regards,
Shafagat
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
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 Extended Kalman Filters
Question
3 answers
I am working on a project wherein I need to implement a combination of a deterministic algorithm such as TRIAD or QUEST along with EKF to determine the attitude of a Satellite in Space. Any good papers/thesis that explains and lists out the steps to implement the EKF?
Thanks!
Relevant answer
Answer
This is well established problem and people solved in different abstracts. Plz try to read the papers published by these authors
Yevgeny Somov,
Iskandar
Sergey Somov
Kyuman Lee
Do-Seob Ahn
Jun Wang
Sergey Butyrin
Jaesung Lim
F. Cuccoli
L. Facheris
Jong-Min Park
F. Dovis,
Takayoshi Yokota
This list is limited. You can find more authors who contributed to this field. Moreover I would suggest you to understand the basic ekf framework from . Bar-Shalom, X.R. Li and T. Kirubarajan, Estimation, Tracking and Navigation: Theory, Algorithms and Software, John Wiley & Sons, New York, June 2001. If you want to get hands on with code, try " tracker component library " . Hope this is helpful
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
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 Extended Kalman Filters
Question
3 answers
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.
Relevant answer
Answer
With code matlab:
Speech-Enhancement-Kalman-Filter
  • asked a question related to Extended Kalman Filters
Question
5 answers
What is the importance of representing the frequency normalized of digital filter design with an optimization algorithm?
Most of the time, the reviewers state that there is no need for these shapes (like Frequency Normalized, Magnitude response, ele. )and what is important is only the Paul-Zero diagram.
Relevant answer
Answer
Abbas Thajeel Alsahlanee The magnitude response of a linear time-invariant system, irrespective of whether the frequency is normalized or not, depends on the positions of the poles and zeros of the system. In the case of a digital filter (a discrete-time system), if we evaluate the system transfer function around the unit circle (centered at the origin) once in the z-plane, the result is the frequency response (both magnitude and phase responses) in radians per sample. The shape of the frequency response depends on the proximity of the poles (inversely related) and zeros (directly related) to the unit circle.
The pole-zero representation highlights not only the stability of the filter but also the stable invertibility of the filter. Note that FIR filters are inherently stable, but they are stably invertible if and only if all the zeros are inside the unit circle. For an IIR digital filter, all the poles and zeros must be inside the unit circle for the filter to be stably invertible. Further, a digital filter having a pole on the unit circle is not stable.
We can normalize the frequencies with respect to half the sampling frequency. This half-sampling frequency is also called the Nyquist frequency in filter design problems. We use normalized frequencies to avoid including the system sample rate as an additional input argument.
Perhaps, the reviewers of your paper expected the stability of the filters designed.
Hope it helps.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
1 answer
This is just a novice question from somebody who just got into this topic. Can the application of Scale-Invariant Feature Transform be combined with extended Kalman Filter?
Relevant answer
Answer
Dear Yopi Prabowo Oktiovan,
I think so because the Kalman filter is used with David Lowe's SIFT algorithm and EKF is an extended form of KF taking into account the nonlinearity of the image scale process.
For more information about this subject i suggest you to see links and attached files on topic.
Best regards
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
6 answers
I'm trying to control the rotor speed of an induction machine using indirect rotor flux orientation of vector control.
I am using a Recurrent Neural Network trained with Extended Kalman filter algorithm to estimate the rotor speed in order for the reference speed to track the estimated speed.
Please I'll be glad for your assitance.
Relevant answer
Answer
Mohamed-Mourad Lafifi can you please share the LSTM_Kalman filter matlab code?
Thanks
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
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 Extended Kalman Filters
Question
12 answers
Hello
Good Day and Happy New Year !!!
I am facing problem to write MATLAB code for estimation of SOC (state of charge) of lithium-ion battery cell of 3.7 V_nominal and 15.5 Ah in real time using EKF(Extended Kalman Filter) with the covariance, and other measurement and observation noises terms. Could anyone please guide me how to solve my problem in estimating SOC of li-ion battery.
Thanks.
Relevant answer
Answer
Hi Monali Gandhi please follow my paper as you may find an equation of the voltage-SOC relationship of a particular Li-Ion battery that might be used for OCV method. thanks
  • asked a question related to Extended Kalman Filters
Question
3 answers
I am currently working on the SOC estimation model. I am simulating the model but it is showing the error in the Extended Kalman Filter block
Error in default port dimensions function of S-function 'trial_16march/EKF'. This function does not fully set the dimensions of output port 2.
Relevant answer
Answer
You should select the port dimensions manually. I hope this will help. Furthermore, also check if the matlab file you are using is designed for the version you are working on.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
9 answers
I’m trying to implement EKF in my Real-time hand motion capturing algorithm. I have surveyed some paper or source code, but I can’t understand how to define a correct x state. Someone define [velocity(X);position(X);velocity(Y);position(Y)] or [acceleration(X); acceleration(Y)]in X state matrix. However I can't confirm if they are suitable for my system.
Could anyone tell me how to choose a correct X state matrix?
Some information
Input data: 3D acceleration (x,y,z).
State model:
Xk = AXk-1 + wk-1
Zk = HXk + vk
wk-1 and vk are Gaussian white noise.
Relevant answer
Answer
Useful answers, thank you for all
  • asked a question related to Extended Kalman Filters
Question
6 answers
I want to know how to compute estimated and true state and how to update these two parameters at each step. I am a bit confuse about parameters.
Relevant answer
Answer
One of best tutorial for applying Kalman filter algorithm in labview by finn aakre
https://home.usn.no/finnh/. You should visit on there. His colleague Halverson also explain very well kalman filter algorithm implementation in labview.
  • asked a question related to Extended Kalman Filters
Question
3 answers
I am implementing the extended kalman filter for battery soc estimation using a state space model in simulink. The output equation has the open circuit voltage as one of the terms. This open circuit voltage is a function of battery SOC. So I want to understand how can we calculate the derivative of OCV with respect to SOC
Relevant answer
Answer
Dear Arpita Rathee,
Please Take a look at attached file on topic.
Best regards
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
3 answers
Dear friend
I want to design software for measuring the valuable information (pressure and flow) of the pipeline to detect faults like corrosion and leakage.
I'm working on the algorithm that used for extended kalman filter for pipeline leak detection systems.
I follow the low-priced method to design this kind of hardware for pipeline fault detection. Could you tell me some approaches to designing? Which instrument need for fabrication which doesn’t need expensive devices?
Thank you for your consideration
Relevant answer
Answer
I am engaged in modeling of computer central processing papeline. Problems of pape in other spheres are not my area.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
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 Extended Kalman Filters
Question
4 answers
I do need an open-source software to validate my (extended kalman filter) EKF code results in GPS/INS integration. Please help me. “Waypoint inertial explorer” is an excellent choice. Unfortunately, it is too expensive to buy.
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 Extended Kalman Filters
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
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.
  • asked a question related to Extended Kalman Filters
Question
7 answers
For extended Kalman filter, we need to do matrix differentiation for converting the non linear system to a linear system using first order Taylor approximation
Relevant answer
Answer
Thank you so much.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
2 answers
The problem's objective is to estimate the current flowing through a transformer. In the ekf block, when I add my jacobian files , the values are reaching infinity and when i switch jacobian selector off and let the computer compute the jacobian numerically, the ekf block is just tracing the measurements that are being fed to it. What might be the problem. any solution??? Will doing it in matlab be more comfortable than simulink
Relevant answer
Answer
Will doing it in matlab be more comfortable than simulink ?
Matlab M-file is better than simulink I think.
You have to be careful while giving Co variance matrix and initial conditions.
Please check Jacobian matrix parameters again.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
Question
5 answers
I'm designing an extended Kalman filter observer in a control system. In the control system, there is an MPC controller.
Do states, inputs, and outputs used in observer have to be the same as states, inputs, and outputs used in controller in the same control system?
And, should I choose the inputs from variables that I can control only? Or can I choose any variables from state equations that is not a state to be the input?
Thank you in advance.
Relevant answer
Answer
Adding on to what Daniel said, once you are using EKF, you can also use in your MPC scheme the linearized state matrices computed by the EKF, which reduces the computational burden.
  • asked a question related to Extended Kalman Filters
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 Extended Kalman Filters
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 Extended Kalman Filters
Question
3 answers
Hi, my Extended kalman filter (EKF) program works well, my estimated state vector is same as real state vector when I give any positive definite number to measurement noise R, even though I gives 10^ -14 to R. But I want to make covariance analysis and one part of covariance analysis I need to set zero measurement noise. When I do this, I get singularity warning from K= (H*P*H'+R)^-1 (kalman gain part of measurement correction part of EKF). I checked eigenvalues and rank. When I get R=0, some eigenvalues becomes negative a few seconds later and rank is decrease from 15 to 1. When I get R>0, all eigenvalues are positive definite and rank goes to 15 to 7. How can I solve problem, I can not detect cause of this problem. Could you help me please?
Relevant answer
Answer
When you set R=0 and you measure y_m=h(x) where y_m denotes the measured value, in theory this means you have deterministic information. Right after this measurement is made, two consequences should follow. First, your Kalman estimate \hat x should actually satisfy y_m=h(\hat x) and secondly you should have H*P*H'=0 indicating the certainty (no variance) in the corresponding directions. And you see this means if P is initially full rank its rank loses as many dimensions as the dimension of y.
In practice, though, the first condition is not met due to nonlinearities (this would be guaranteed with a linear system and a KF but this is not guaranteed for the EKF in a nonlinear context). What happens in practice is the second condition since you can easily check that HPH'=0 after P has been updated, i.e. P<- P-PH'(HPH'+0)^{-1}HP. This implies a decrease in the rank.
If you measure again right after that, this measurement is useless as the filter already knows y_m=h(x) for certain. And you see that indeed H*P*H'+R is not invertible for R=0 but remember you apply anyway the gain to (y_m-h(\hat x)) and this is null in theory (see first consequence above). Now, if you move between two measurements and update the EKF again, normally in a nonlinear context H is different since it is linearized at a different point. This implies further rank decrease and so on.
Numerical issues may also creep in when dealing with rank deficient matrices and trying to inverse matrices that are not invertible of course.
  • asked a question related to Extended Kalman Filters
Question
6 answers
Currently i am working on tracking the pose of a 3D object. I applied linear kalman filter and it works fine but not very good so i am working with extended kalman. According to many literature i need some non linear functions f(.) and h(.) but it is not very clear on how to model those functions. i want to track 6 dof with ekf.
Does anyone have an idea on how to model those functions ?
On what basis should i model it ?
I need non linear state transition function. x has variables: X, Y, Z, velocity_x, vel_y, vel_z, acceleration_x, acc_y, acc_z, roll, pitch, yaw, angular_vel_roll, ang_vel_pitch, ang_vel_yaw, ang_acc_roll, ang_acc_pitch, ang_acc_yaw.
Thank you for your recommendations and solutions.
Relevant answer
Answer
Hello again,
I'm not sure that your problem is observable. You have to have sufficient sensor measurements to be able to estimate the state (in your case pose and required derivatives). If you simulate a dynamic system with process noise, the state rapidly diverges from its initial state.
Maybe you have noisy measurements pose from video or other sensors? If you do not have an "observable system" (in the control theoretic sense), you cannot construct a state estimator, including an EKF.
  • asked a question related to Extended Kalman Filters
Question
5 answers
I have implemented an EKF to estimate the dynamic state of a synchronous generator in Matlab/Simulink. The model of the generator is a 6th order sub-transient dynamic model. Ignoring the effects of saturation in the machine, I can achieve a good performance of the EKF. However, when I simulate the behavior of the machine including saturation, it results in an steady state error in my estimates.
How could I account for the effects of saturation in the estimation process? Or how could I reduce the steady state error when including saturation in the machine.
Relevant answer
Answer
Check the initial setting.
  • asked a question related to Extended Kalman Filters
Question
6 answers
Hi,
working with extended and unscented Kalman filter brings me to the question, how I can compare them in simulations as fair as possible.
My first intent was to choose the process noise matrix Q and measurement noise matrix R for both filters in the same way.
I found out, that my UKF works much better for 10*R, while the EKF is more accurate for 1*R. I do offline simulations for a navigation problem, using measured IMU and GNSS data.
My feelings says me, that even for same noise matrices, the comparison is not as easy as I thought, because of the sigma points building procedure and so on...
I found that paper:
which says that EKF can perform better covariance estimations in certain regions (higher mean estimates).
Has somebody some tips for me, regarding that topic?
Best regards,
Max
Relevant answer
For nonlinear estimation, both the EKF and the UKF are approximate strategies. The propagation of the error covariance matrix P is simplified by the use of Jacobian in the EKF and the choice of sigma points in the UKF.
Though Q and R matrices generally refer to the process noise covariance and measurement noise covariance respectively, they can also compensate for the errors in the approximation of the propagation of the error covariance P. That is, in the EKF Q can be tuned such that it compensates for the loss of higher order information that result from linearization. The same holds for the UKF too.
To sum up, Q and R can be tuned to represent a little more than process noise and measurement noise for nonlinear Kalman-based estimation schemes. This gives rise to difficulty in tuning for some applications. Since you work with simulated data, you can easily verify if your tuning is reasonably correct by checking if the actual error covariance is approximately close to the one obtained by the filter. This implies that the estimation scheme works reasonably well. In the absence of the true state value as happens in real-world situations, the innovations can be compared.
Coming to the specific case, if you want to do the fair comparison tune both the estimation schemes separately to obtain the best results. Then compare them as pointed out early.
  • asked a question related to Extended Kalman Filters
Question
3 answers
Hi to everybody
I'm new about this topic and i want know how i can implement a extended kalman filter in simulink to estimate the state of charge of a, for the moment, generic battery.
If you can send me some steps that i have to follow or an easy example.
thank you
Relevant answer
Answer
You can use sfuntion builder for both simulations and real time experiments. However, if you only want to implement in simulation, choose maylab coded sfunction block. Good luck.
  • asked a question related to Extended Kalman Filters
Question
18 answers
Trying to understand the Kalman filtering with all these example of the EKF and is it properly done ?
Relevant answer
Answer
I advise you to read the book "KALMAN FILTERING. Theory and Practice Using MATLAB. Fourth Edition" by M.S. GREWAL and A.P. ANDREWS
A very useful book for those interested in the Kalman filter.
  • asked a question related to Extended Kalman Filters
Question
5 answers
I ntend to work on fault detection of robotic systems with kalman filter implementaion how difficult will it be for me to complete the task?
Regards
Relevant answer
Answer
It will be not be easy. Designing, developing and implementing a practical working Kalman filter has a number of pitfalls. Here are a few tips derived from a good deal of experience with extended Kalman filters in all sorts of aerospace applications:
1. Make sure that the partials with respect to state variables are right.
2. Check that the observation errors are close to Gaussian and independent from one measurement time to the next
3. Pay much attention to the differential equations of motion and their numerical solution method. Best to use a self-starting Runge-Kutta method.
4. Approximate the state transition matrix by differentiating the integration formula----an old, very practical aerospace engineering trick.
5. Devote a good deal of attention to Process Noise in the state transition---a good practical method is to numerically integrate the equations of motion with the operational RK method along the baseline trajectory along with a higher order method, and difference resultant state vectors at each integration point and average the first and second order statistics of the vector differences. The first average of the first difference will give you some notion of bias while the averaged second order statistics will be your process noise matrix.
6. Avoid using the noxious notion of covariance error analysis in which your run the filter along the baseline trajectory without processing observations, just updating the state error covariance matrix. This can be very misleading.
7. Construct the entire filter first and run the observations through it----that's the sine qua non.
8. Be sure to compute chi-square of the prediction-observation. This statistic will tell you whether your extended KF is working---It should average to the dimension of the measurement.
I hope you find these tips helpful. Let me know how things work out , if you need help, and best of luck.
Roy Danchick
  • asked a question related to Extended Kalman Filters
Question
11 answers
Hello,
I am making a simulation to determine Orbit determination for Space Objects so that I am changing the parameters in simulation by automatical and I need to validate the filter is worked and the estimation result is ok. I know state vector of object and covariance so that I need to establish a relationship between state vector and covariance result. Normally, we expect state vector result should be under the covariance( 3-sigma). For example, I have 100 step filter result for state vector and covariance and I want to print only one value to give a decision for the estimation worked fine. I have one idea but How much is correct I dont know! I can take average of state vector and covariance and ....RESULT= sqrt(X^t*inv(P)*X).... X=> state vector average, P is covariance average.
EDITED:
I dont have reference state because I have real data and other thing is if I am working on Weighted Least square Filter, How can I find (HPH'+R)?
Yours Sincerely
Relevant answer
Answer
I suggest read this paper about estimators performance tests:
  • asked a question related to Extended Kalman Filters
Question
7 answers
I found out, that the linearized (error-state space, indirect...) Kalman filter estimates the error, made by linearization.
Furthermore it linearizes also the state itself and not only the Covariance matrices as the extended Kalman filter does.
What is the benefit of using a linearized Kalman filter compared to the usage of an extended Kalman filter? Does this "error-state space" formulation comes with advantages or is it just an alternative representation?
Regards,
Max
Relevant answer
Answer
Dear Maximilian,
In Linearized Kalman Filter nominal estimate of state is used to define Jacobian matrix of the dynamic model function f as F and Jacobian matrix of the measurement function h as H. But in EKF, corrected state estimate is used in each step for linearization.
With the time, error due to linearization will grow in LKF. Using updated state estimates in each step it is likely to obtain more accurate results.
I drew a simple representation of both.
Hope it helps,
Good Luck
  • asked a question related to Extended Kalman Filters
Question
2 answers
I am trying to find Optimum data interval for orbit determination. Because in Leo, Geo orbit update measurement data can be different so that I want to implement optimum data interval algorithm for Orbit determination. I found one thing for that LUPI algorithm but haven't still found more details about LUPI algorithm. Which kind of algorithm can use in Geo, MEO, Low orbit? Because Atmospheric drag and solar radiation is really important sometimes not need to update frequently the measurements. LUPI algorithm is mentioned in 'Conjunction Assessment Risk Analysis M.D. Hejduk NASA CARA Collision Avoidance “Short Course” Part I: Theory'
EDITED: I reached the author so that not possible to see LUPI algorithm. If you have experience about ODI(Orbit determination Interval), please, give an idea.
Relevant answer
Answer
Dear Mohamed,
These papers are not explaining the LUPI algorithm.Thanks for effort but I have checked these papers before.
  • asked a question related to Extended Kalman Filters
Question
4 answers
Are there any conditions under which the EKF performs better than the EKF or do both have a comparable performance?
Relevant answer
Answer
If the system is linear or linear nearly, and if the numerical condition is bad, like the state is small floating value: 1e-3, ukf will lose precision in square root computation seriously. In this condition, I think EKF performs better (just based on my experience :) ).
  • asked a question related to Extended Kalman Filters
Question
3 answers
Hello everyone,
I am a little stuck with my Extended Kalman Filter. I try to estimate the attitude of a satellite based on the angular rate and quaternion. I also have the magnetic field values in body and ECEF frame.
The problem is my measurements (angular rate, quaterninon, magnetic field)) are available every 60 sec. and I would like to reconstruct the state every second.
However, I can have the position at every seconds.
Do you have any advice on how estimate the attitude please ?
Thanks a lot :)
Relevant answer
Answer
Use position measurement to estimate states at each second. Further at 60th second when other measurements are available use all other measurement to estimate the states.
  • asked a question related to Extended Kalman Filters
Question
3 answers
Hello,
I am working on Square Root Information Filter. My question is about process noise because I have already known the process noise for SRIF but I am not using Gamma*u for state propagation.But I can assume Gamma is 1 because I know the process noise. The question is, How can I determine 'zu'. Process noise(Q)=R^-1u*R^-Tu
Also, How can I determine initial 'zu'? In my opinion, I will accept the 'zu=0'. Is it correct?
I attach a pdf for information but I think the equation 7 is not correct in chapter 2.1.4.
Covariance Propagation=> P(k+1)=Phi*Pk*Phi^T
| Ru 0 zu,k | | Ru,k+1 Rux Zuk_bar |
| -Rk+1Gamma Rk+1 zk_hat | | 0 Rk+1 zk+1_bar|
Relevant answer
Answer
Thanks for answers, I solved the problem. I accept Zu is zero and working!
  • asked a question related to Extended Kalman Filters
Question
4 answers
I have written the code for Extended Kalman FIlter in Matlab for SOC estimation of a battery.
The problem is that the state estimation is not working, and the filter takes a constant value through out the number of iterations.
So far, I have made certain modifications but the filter just seems to be unresponsive.
I am attaching the corresponding .m file and excel files.
Any leads would be appreciated.
Relevant answer
Answer
Start with a simple filter and get that working.
  • asked a question related to Extended Kalman Filters
Question
6 answers
Do you have any SRIF example code or Can you send any link about that?
Relevant answer
Answer
You can find SRIF C++ code in GPS Toolkit Library (in application to the processing the GNSS measurements) http://www.gpstk.org/doxygen/classgpstk_1_1SRIFilter.html
Actually the classical book on SRIF is G.J. Bierman "Factorization Methods for Discrete Sequential Estimation", the reprint is available on amazon for a reasonable price.
  • asked a question related to Extended Kalman Filters
Question
4 answers
hello sir,
i am estimating state of charge of lithium-ion battery. i am using 2RC electrical equivalent model in Simulink and extended kalman filter model. i am facing problem in state function and measurement function. kindly help
Relevant answer
Answer
What toolbox are you using? I worked with Simscape Power Systems, and I had a lof of troubles because of it. Basically the process variables might change depending on the rest of the Simulink schematic. Basically, I would use the EKF to estimate the output of a generator. Changes I would do in the EKF would affect the process (it was a wind turbine) without being any link between the EKF and the process, except some from blocks to get the inputs and measurements from the wind turbine. I found that changing the solver to a fix step continous one (some Power Systems blocks have numerical problems when using discrete solvers) like ode1, with a fix step size of 1e-9 made the simulation more stable (and more slower).
Can you please describe your problem in greater detail? What is the exact problem that you face?
  • asked a question related to Extended Kalman Filters
Question
6 answers
I am currently working on a research where I can apply Kalman Filter in optimizing Ecognition's Multiresolution Segmentation results. By finding the right weights / parameters, I think. However, I find it hard to find a guiding reference where I could apply Kalman Filter.
Now, I am currently working with table consisting of sets of parameters / weights run through the multiresolution segmentation algorithm, and with a column of their specific error rates (with a certain reference). Do you think it's valid to use linear regression to find an equation to represent these results / data? in order to find weights where the error will be near zero?
Can I apply Kalman filter before or after linear regression? May it be a help for finding coefficients for linear regression? Or for finding optimal weights with the equation after linear regression?
*note: I will use the Multiresolution Segmentation in Trimble's eCognition Developer software. Not in matlab / python.
Any response is highly appreciated. Thank you!
Relevant answer
Answer
There is a really good toolbox which allows you to do this sort of thing, written br James Taylor and colleagues. It includes some examples that may help get you started. You can download it here http://www.lancaster.ac.uk/staff/taylorcj/tdc/download.php
Hope you find it useful.
  • asked a question related to Extended Kalman Filters
Question
5 answers
I'm working on this research where I should find optimal segmentation results from eCognition's Multiresolution Segmentation. Is there a way for Kalman Filter to be able to help with this objective of mine? May it be for identifying parameters? Or converge error to zero? Thank you!
I'm currently working on table of errors vs. weights
Relevant answer
Answer
I am currently working with table consisting of sets of parameters / weights run through the multiresolution segmentation algorithm, and with a column of their specific error rates (with a certain reference).
Do you think it's valid to use linear regression to find an equation to represent these results / data? in order to find weights where the error will be near zero? Can I apply Kalman filter before or after linear regression?
  • asked a question related to Extended Kalman Filters
Question
4 answers
Hello,
I am fusing a certain sensor into an Unscented Kalman Filter (UKF).
This sensor reports a certain measurement including an SNR metric for each measurement.
I am wondering if it is a good idea to keep changing R for this sensor based on the SNR values. However, this would mean too frequent updates of R. or I could adapt R at a lower frequency, like 1Hz or slower.
Or should R be rather kept constant and I simply make use of the sensor's SNR metric to decide whether to use or throw out certain measurements.
Thanks for the advice.
Robert
Relevant answer
Answer
Dear Robert,
I suggest you to see links and attached files in topics.
- The Joint Adaptive Kalman Filter (JAKF) for Vehicle Motion State ...
- New Insights Into the Noise Reduction Wiener Filter
ftp://ftp.esat.kuleuven.be/sista/doclo/reports/04-239.pdf -Measuring Indoor Mobile Wireless Link Quality
- Observer Design and Model Augmentation for Bias ... - DiVA
Best regards
  • asked a question related to Extended Kalman Filters
Question
3 answers
I generated a trajectory for a point target by using coordianted turn model with a turn rate w = 0.08 rad/s ~ 4.6 degrees/s. When i use extended kalman filter with coordinated turn model, the estimated turn rate converges to 3.8 (~ 0.066 rad/s if estimate is in degrees). If I accept estimated turn rate is in degrees, my filter is OK. I just need to convert deg2rad. Any ideas?
Relevant answer
Answer
Dear Aykut,
I suggest you to see links and attached files in subject.
- Interacting Multiple Model Extended Kalman Filter for Tracking Target ...
- An Improved Interacting Multiple Model Filtering Algorithm ... - MDPI
- Models and Algorithms for Tracking Target with Coordinated Turn Motion
- Bearing only Tracking of Maneuvering Targets ... - Semantic Scholar
- MS Thesis - UPCommons
Best regards
  • asked a question related to Extended Kalman Filters
Question
10 answers
The double integration of acceleration gives the position of an object. However, how should the position of an object fitted with accelerometer and gyroscope be determined using the data from the two sensors.
Relevant answer
Answer
Hello,
the problem you are referring to usually receives the name of "inertial navigation" or "dead reckoning". It is something I am currently working on, and is a problem whose solution is not direct.
The method I am using is:
1. Obtain a good "orientation estimation" or "attitude estimation". This is, find the best guess of the rotation transformation that relates two reference frames: the one attached to your sensor, and other one usually taken to be an inertial reference frame (or approximately inertial) as one whose z-axis points in a direction orthogonal with the Earth surface. The accelerometers sense the gravity accelerations, so it gives you information about "where it is down". Gyroscopes help predict orientation. A common approach is to use a Kalman filter:
although others use gradient descent techniques and also obtain good results:
2. Transform the acceleration measurements (taken in a non inertial reference frame: the one attached to your sensor) to the inertial reference frame using the rotation transformation obtained with orientation estimation.
3. Subtract the acceleration due to gravity.
4. Integrate the resulting acceleration twice to obtain position.
This is what you usually obtain when you perform this process:
If you have seen those videos you will have begun to think that it is not possible. However, in certain scenarios you can use pseudo-measurements to improve your estimation:
I would conclude that depending on your application, you should use pseudo-measurements, or include more sensors to estimate the position. In other case, as far as I know, it is not possible to obtain a good position estimation.
  • asked a question related to Extended Kalman Filters
Question
9 answers
We know that Kalman filter is not available for nonlinear systems, hence, extended Kalman filter (EKF) was developed as an alternative.
Similarly, unscented Kalman filter (UKF) is an alternative to EKF, due to some restrictions of EKF.
Please let me know, if any, what are negative points (deficiencies) of UKF?
Relevant answer
Answer
In my opinion; no body can say UKF is the endpoint of Kalman filtering. Form time to time we read some new researches in this field. But we can simply distinguish between the "Kalman family" that suppose the Gaussian function as a probabilistic distribution in the state space and the other filters like particle filters who are applicable for any p.d.f. in the state space. In my opinion; the main draw back of the family of Kalman filters is the heavy computational burden because of the "big matrix" which have been initialized at the beginning of our model.
You can also read the first and second chapters of the following book:
Beyond the Kalman Filter: Particle Filters for Tracking Applications.
  • asked a question related to Extended Kalman Filters
Question
2 answers
I am trying to integrate a GPS and IMU via a loosely coupled integration. My state is the position and velocity vector. I am using the following equations for the nav frame mechanization.
I am trying to use the kalman filter and for this I need:
the state transition matrix φ
the system noise covariance matrix Q.
I assume the measurement matrix H is the identity matrix because the outputs of the IMU and GPS are in the same frame
The measurement noise matrix R.
How do I initialize the initial covariance matrix
I am assuming that I have perfect sensors. Although I would like to know how not having perfect sensors would change these matrices.
my questions are the following:
For the state transition matrix. Is it derived from the IMU mechanization above? If so how do you deal with the fact that the future latitude is a function of the of the future altitude?
Would the system noise co variance be 0 since I am assuming a perfect model?
Is the H matrix the identity?
How is the initial covariance matrix usually initialized?
 
Relevant answer
Answer
Hi Ariel,
As Graham mentioned, that you will need to add process noise in order for the filter to converge. Also assuming H as identity can lead to bad results as you always assume that the GNSS and IMU are bias-free (which is real life is not the case). I would suggest adding the bias in the GNSS and IMU data as state variables for the filter to estimate them as well. 
You can have a look at our work regarding the same. If you want I can also attach you c++ implementation of the same.
Regards.
  • asked a question related to Extended Kalman Filters
Question
3 answers
i am working on hardware implementation on the RT-LAB and my application is EKF based induction motor for that  i am facing the issue on s function matrix code in c language in 5*5 matrix
Relevant answer
Answer
Hi Savarapu,
I provide you a ROS and C++ implementation of an EKF filter that I made. Its very similar to a C code. The main EKF logic for the S function can be found in the run function.
Let me know if it helps.
  • asked a question related to Extended Kalman Filters
Question
4 answers
Detailed Description :
I am working on steering wheel angle sensor that measures absolute angle of steering wheel. As steering angle sensors uses gears and several joints which is totally hardware related so in spite of calibration in start with the passage of time due to usage of mechanical parts and also due to some environmental and road conditions some errors occurs in the values of sensors (e.g. offset, phase change, flattening of signal, delay).
In short due to these errors in the measurements our aim gets distracted means If I am viewing velocity vs time curve so if in the original or calibrated sensor in short close to ideal condition sensor my velocity shows a peak in amplitude but due to error (hysteresis) in measured signal I am not getting peak in velocity curve or I am getting flattening of curve so it will affect my final task.
I have a tolerance let say 1.20 degree for hysteresis so that’s why I am having detailed idea about my signal and want to observe my signal if some changes means offset, delay, lowering has occurred in my signal or not. This will not only provide me an idea that whether to lessen the amount of sensors used for my task or made some changes in hardware of sensor to lessen the amount of hysteresis or do some other actions to reduce it.
What I have done uptill now in which uptill now I am not sure that whether I am right or wrong. I am getting some values for hysteresis but I have few questions regarding those techniques. If someone provides me an idea about it how to improve these techniques or provide me a better approach then it will be nice and great guidance.
I have an ideal sensor signal (under ideal conditions which we want) and values from 1 sensor I have data of 6 different drives from car. I am explaining just 1 example of my first drive and its relation with my reference sensor data.
Given the data reference signal and sensor signal data of size 1x1626100 and 1 x 1626100 double for one reading from sensor but in all readings values from Ideal and measured signal w.r.t to time are same.
In short I want to find out the Hysteresis difference of sensor signal from measured signal.
I have applied few data estimation techniques to accomplish my goals.
1-      I have applied Gaussian Technique to estimate error in my data but I am not satisfied with it as I am not getting some good values or expected values with it may be due to outliers or some other errors.
I have subtracted (Ref – measured value of signal). Calculated mean of difference signal after applying my limitations, Standard Deviation of difference signal after applying my limitations, then make a Gaussian Curve along with mean and standard deviation. Made 2 lines one for mean+ standard deviation and 2nd one is with Mean – Standard Deviation and distance between +ve Mean_std and –ve Mead_std is called Hysteresis (Loss).
Please have a look at the attached figure. I have attached figure for 3 modal Gaussian curve but in some diagrams just like picture 3 my data is shifted. Can anyone tell me the reason why it is so and how to erase it because it is occurring in all diagrams but in this figure 3 it was clear.
2- In this method I have applied Regression lines Technique (On upper and lower values of difference signal).
I took difference of my signals (Ref – measured value of signal after applying my limitation on signal).
Applied regression technique above and below the difference signal means on upper values and on lower values separately and difference between upper and lower values regression lines is called as Hysteresis (Loss). Please have a look at figure 3 and 4 for clear view.
The Problem here with this technique is that I define the values for upper and lower regression line by myself after looking into data like up= 0.08  , low= -0.08.
3-      I have also applied RMSE technique but have few questions that are confusing me.
As I am dealing with static data so I considered my Reference signal as actual valued signal and my measured valued signal from sensor as measured values and apply RMSE formula on that.
    RMSE=    square_error = (sig_diff_lim).^2;
    mse =  mean(square_error)
    msedivided = mse/numel(drv(2))
    rmse = sqrt(mse)
4-      I have also applied correlation function but I think it is not working well with my data.
But it gave me some good insight about data.
Some Questions that also need clarification if possible:
1-      What is difference between RMSE and MSE means I know basic stuffs but I want to know that what are the applications where we use RMSE or MSE and which will work in my case for my data.
2-      I have now explained Gaussian, Regression technique, RMSE. Just one Request .Can someone explain me which Technique is the best to use because I have mentioned my issues in Gaussian and Regression Technique above. Just some explanation will work for me .Means Pros and cons of above mentioned technique.
I hope that I remained able to provide you the clear idea and detailed review what I want to do and what I am expecting and I hope to get some positive and valuable response from people.
Sorry for providing a long story but As I am not too expert in these as I am still learning so if I will get some useful responses it will improve my knowledge and also help me to accomplish my task/Goal.
Thanks for cooperation in advance.
Relevant answer
What type of hysteresis sensor are you studying?
Magnetic?
  • asked a question related to Extended Kalman Filters
Question
2 answers
How to detect bad data in inputs of system dynamic equations?
Relevant answer
Answer
Dear Mr. Bhui,
You can still detect any kind of faulty input to the UKF system equations using the innovation sequence and an appropriate chi-square test applied to the innovation covariance of the filter.
For such detection your filter must be sensitive to the faults in the inputs (e.g. a filter with low process noise covariance, Q).
If there is a possibility for both measurement and input faults then you may need also a fault isolation process as you need to detect two types of faults both from the innovatiaon sequence. I suggest you to check the following publication in this case for the details of a fault isolation process
We applied the same isolation process for an estimation problem with the UKF in
If you have trouble accessing the full texts I can send them via e-mail.
Best regards
  • asked a question related to Extended Kalman Filters
Question
6 answers
Hi 
please, i want to know if i can use a classic kalman filter to estimate the states of a linear system with a variable state matrix A.
Thank you 
Relevant answer
Answer
Hello. Jose Fernando provided a good answer above. I think I can clarify a bit further.
The "classical" Kalman filter is posed in continuous time for a system of the form dx/dt=Ax(t)+Bu(t)+Gw(t), z(t)=Hx(t)+v(t) where w(t) and v(t) are white Gaussian noise (WGN) with zero mean and known covariance Q and R, respectively, x(0) is Gaussian with known mean and covariance and all three of x(0), v(t) and w(t) are uncorrelated. It is a simple matter to proceed from the constant-coefficient continuous time linear stochastic system to a discrete time equivalent system by "discretizing" the continuous time system via the "variation of constants" formula. This involves integrating the dynamical equation and assuming x(t) is constant between sampling times. The process noise covariance Q(k) of the discrete time system can also be obtained this way. The classical Kalman filter for the discrete time system can then be written down quite easily. In general, the coefficient matrices for the discrete-time KF depend on the time, but this is not a problem.
Now when the continuous time system is not time invariant (in terms of its coefficient matrices), it is not generally possible to discretize the continuous time system to obtain the discrete time equivalent and hence the KF. However, the discrete-time KF is general in the sense that the equations hold even when the coefficient matrices are time varying. You just have to know what they are at each time instant.
So I think this answers your question: if the continuous time system is time varying, you can't easily write down the KF, but you can for a time-varying discrete-time stochastic linear system.
  • asked a question related to Extended Kalman Filters
Question
10 answers
Hi everyone!
I spent lots of time to implement DEKF for battery state and parameters estimation simultaneously. However, I need your help! I will be grateful for any your advice.
I use the standard Li-ion battery model with the following state parameters: SOC and two voltages (V1 and V2) corresponding to two RC-branches. The observe equation is
y(k) = OCV(SOC(k)) - V1 - V2 - R0*i(k).
I use current as control.
Parameters are R0, exp(-deltat/R1*C1), R1*(1-exp(-deltat/R1*C1)), exp(-deltat/R2*C2), R2*(1-exp(-deltat/R2*C2)).
I calculated derivatives (Jacobian matrix) for parameters estimation recursively.
Unfortunately, I did not obtain good estimation results for R0 estimation.The problems that I managed to find: parameters covariance matrix updated noticeably during prediction step only; when current is equal to zero, estimated Rhas big noises in these iterations (please, see attached pictures).
The only solution that I found now: predict parameters not in the form of
theta(k+1)- = theta(k)
but in the form of
theta(k+1)- = alpha*theta(k)+ + (1-alpha)*p, where p is expected parameter value based on mathematical model, alpha is tuning coefficient, unfortunately, I do not understand, how to obtain p in my model or any other because we do not have the explicit mathematical model for params estimation.
Could anyone help me find mistake in my inferences, please? Or provide useful articles where this problem is already solved? I will be very grateful for any advice which will help to find a solution.
Relevant answer
Answer
idea is good, hard to realize I suppose, I can only set it emprically for now
  • asked a question related to Extended Kalman Filters
Question
6 answers
Hey,
I am trying to develop and implement a model to estimate the angular velocity, angular acceleration, path length from the roll,pitch,yaw data that I have (Obtained from Inertial Measurement Unit).
Sol 1. Filter the attitude data (LPF around 100Hz) and then do the differentiation of attitude or the sum of total angle (path length). But I feel that, this will results in large errors
Sol 2. Some adaptive filter, Kalman
In the case of Kalman, the state space model is, 
Ȧ (A dot) = A𝜔 ⊗ (angular velocity) 
𝜔⊗=
[0 −𝜔z 𝜔y
𝜔x 0 −𝜔x
−𝜔y 𝜔x 0]
𝜔̇ (𝜔 dot)= 𝛼 (angular acceleration)
ΣA = l (path length)
If I am right, how should I proceed from here ? 
Please suggest a method to minimize the errors.
Thanks :)
Relevant answer
Answer
Hello Noel,
Thanks for your suggestion. 
Hope you are doing good.
The MARG (IMU) sensor has a 3-axis accelro, 3-axis gyro and a 3-axis compass and I am calculating joint angle using a filter designed by Madgwick (quaternion form). Now I have attached the MARG sensor on a joint to measure the rotation of joint and I am recording the required parameters on PC. 
Now I would like to calculate angular acceleration, angular jerk and path length from the joint angle reading. So I though of developing a model and calculate the parameters of interest.
Best Regards,
Akhil