Questions tagged [kalman-filters]

The Kalman filter is a mathematical method using noisy measurements observed over time to produce values that tend to be closer to the true values of the measurements and their associated calculated values.

Filter by
Sorted by
Tagged with
31 votes
1 answer
72k views

Kalman filter for position and velocity: introducing speed estimates

Thanks to everyone who posted comments/answers to my query yesterday (Implementing a Kalman filter for position, velocity, acceleration ). I've been looking at what was recommended, and in particular ...
Stochastically's user avatar
9 votes
3 answers
13k views

Estimating velocity from known position and acceleration

I am stuck at modeling a system model, i.e. getting my state vector and input vector. My guess is that position and velocity are state vector and acceleration is input vector. My 2nd guess is that all ...
c0dehunter's user avatar
7 votes
1 answer
2k views

Estimate and Track the Amplitude, Frequency and Phase of a Sine Signal Using a Kalman Filter

There is sinusoidally controlled signal, which other than being noisy, can change values for amplitude, frequency, phase and offset. At every new sample a new sine is fitted for the last N samples. ...
user3761419's user avatar
1 vote
1 answer
4k views

Kalman Filter - Velocity [Matlab]

I have a quite typical Kalman filter to design. I really read a lot of articles about the design of this filter but the performances of my filter are still quite bad. Here is my situation. I have a ...
Hosh's user avatar
  • 15
19 votes
1 answer
8k views

Kalman filter in practice

I have read the description of the Kalman filter, but I am not clear on how it comes together in practice. It appears to be primarily targeted at mechanical or electrical systems since it wants linear ...
John Robertson's user avatar
17 votes
2 answers
10k views

Is a Kalman filter suitable to filter projected points positions, given Euler angles of the capturing device?

My system is the following. I use the camera of a mobile device to track an object. From this tracking, I get four 3D points that I project on the screen, to get four 2D points. These 8 values are ...
Stéphane Péchard's user avatar
17 votes
4 answers
10k views

Intuitive explanation of tracking with Kalman filters

I would much appreciate an intuitive explanation for (visual) tracking with Kalman filters. what I know: Prediction step: Dynamic system state $\mathbf x_t$: target location at time $t$ Measurement $...
matlabit's user avatar
  • 877
13 votes
2 answers
22k views

Given Position Measurements, How to Estimate Velocity and Acceleration

This is simple i thought, but my naive approach led to a very noisy result. I have this sample times and positions in a file named t_angle.txt: ...
lgwest's user avatar
  • 233
8 votes
2 answers
5k views

Extended Kalman Filter (EKF) for Non Linear (Coordinate Conversion - Polar to Cartesian) Measurements and Linear Predictions

I'm new to Kalman filtering and state estimation and I'd like some guidance on EKFs. Currently, I'm trying to use a linear prediction model coupled with nonlinear measurements to estimate the state ...
bparikh's user avatar
  • 83
6 votes
4 answers
32k views

Question About $ Q $ Matrix (Model Process Covariance) in Kalman Filter

I am implementing my own discrete Kalman filter to estimate velocity from acceleration and position measurements (using Matlab ). I think I managed to deal with the $R$ matrix (measurements noise ...
Rhei's user avatar
  • 413
5 votes
1 answer
6k views

Tracking a Sine Wave with Kalman Filter - How to Account for Offset (DC Signal)?

I am attempting to create a Kalman filter to track a sine wave (I am using a linear Kalman filter example assuming I already know the frequency of the sine wave) - the example I am using is derived on ...
SomeRandomPhysicist's user avatar
4 votes
1 answer
1k views

How to include phase in a sinusoidal Kalman Filter

I start with the equation for sinusoidal motion with an offset and differentiate to get the 2nd order ODE describing the motion of the object. \begin{align} x &= A\sin(\omega t + \phi) + O\\ \dot{...
SomeRandomPhysicist's user avatar
3 votes
0 answers
469 views

Unscented Kalman Filter for Parameter Estimation (Tracking) of Amplitude Frequency and Phase of a Multi Component Harmonic Signal

I'm trying to implement an Unscented Kalman Filter that tracks the amplitude, frequency, and phase of a multi-component oscillatory signal. Below is an attempt using the ...
SuperCodeBrah's user avatar
2 votes
1 answer
370 views

Estimate smartphone accelerometer bias

I was planning to develop Android / iOS applications that enable users to measure 3D length using their smartphones. According to this question, you need to know at least the time-varying bias that ...
HsnVahedi's user avatar
  • 163
61 votes
6 answers
22k views

What Is the Relationship Between a Kalman Filter and Polynomial Regression?

What is the relationship, if any, between Kalman filtering and (repeated, if necessary) least squares polynomial regression?
hotpaw2's user avatar
  • 35.2k
19 votes
3 answers
1k views

Should the input of a Kalman filter always be a signal and its derivative?

I always see the Kalman filter used with such input data. For example, the inputs are commonly a position and the correspondent velocity: $$ (x, \dfrac{dx}{dt}) $$ In my case, I only have 2D ...
Stéphane Péchard's user avatar
14 votes
1 answer
3k views

How to derive the stationary Kalman filter predictor?

In its chapter on Kalman filters, my DSP book states, seemingly out of the blue, that the stationary Kalman filter for a system $$\begin{cases} x(t+1) &= Ax(t) + w(t) \\ y(t) &= Cx(t) + v(t) ...
Andreas's user avatar
  • 1,968
11 votes
1 answer
30k views

Implementing a Kalman filter for position, velocity, acceleration

I've used Kalman filters for various things in the past, but I'm now interested in using one to track position, speed and acceleration in the context of tracking position for smartphone apps. It ...
Stochastically's user avatar
11 votes
3 answers
15k views

When Is a Kalman Filter Different from a Moving Average?

this thread asks when a discrete time Kalman filter is better/different from a simple moving average of the observations: Why use a Kalman filter instead of keeping a running average? there's no ...
user24823's user avatar
  • 233
7 votes
2 answers
3k views

Kalman Filter Covariance

I've recently started playing with the Kalman filter for a simple 2D (x,y,dx,dy) tracking toy problem. But I seem to have some misunderstanding on what I can expect from the filter. I'm interested in ...
Nghia's user avatar
  • 73
7 votes
2 answers
1k views

Deriving the Matrix Inversion Lemma for RLS Equations vs the Woodbury Derivation

Can any one help me in deriving the matrix inversion lemma rule for RLS algorithm? I don't know how to start with. Many books have just stated but they haven't derived it.
Abhi's user avatar
  • 83
6 votes
1 answer
655 views

Extended Kalman Filter for Linear Systems with Non Linear Measurements

I'm successfully using an Extended Kalman Filter for object tracking. My state vector ($x, y, v_x, v_y$) needs to be in cartesian coordinates. The measurement data is transmitted in polar coordinates. ...
c-a's user avatar
  • 95
6 votes
2 answers
8k views

Using the Kalman filter given acceleration to estimate position and velocity

I am reading data from an accelerometer. I want to use this data to estimate velocity and position. Originally, I performed a double integration of acceleration to read this data, and as confirmed by ...
angryip's user avatar
  • 283
6 votes
3 answers
874 views

Question on Wiener Filtering

I have read that a Wiener filter is a filter used to produce an estimate of a desired or target random process by linear time-invariant (LTI) filtering of an observed noisy process. Now, my doubt ...
Curiosity's user avatar
  • 357
6 votes
2 answers
423 views

Estimating a Signal Given a Noisy Measurement of the Signal and Its Derivative (Denoising)

I have a signal and its derivative simultaneously measured, both including additive noise. The measurement is completed before the analysis, so it can be looked ahead. Now I want to reconstruct a less ...
Mav's user avatar
  • 63
5 votes
1 answer
462 views

Kalman Filter on Sensor Fusion

Assume I have 2 sensors capable of measuring distance to an object of known distance. If I apply a Kalman filter to these 2 sensors, I would have 2 correction and prediction equations. If I have 2 ...
6900HS's user avatar
  • 61
5 votes
2 answers
6k views

How to model the noise in Kalman Filter?

Background: I am a newbie in DSP. I am implementing a simple Kalman Filter that estimates the heading direction of a robot. The robot is equipped with a compass and a gyroscope. My Understanding: I ...
Sibbs Gambling's user avatar
4 votes
1 answer
877 views

Kalman Filter | Difference Between Minimizing the Mean Square Error (MMSE) & Maximizing Likelihood Value in Bayesian Estimation

I am going through data assimilation slides on Multi Sensor Data Fusion by Hugh Durrant Whyte and it mentions: The Kalman Filter, and indeed any mean-squared-error estimator, computes an estimate ...
GENIVI-LEARNER's user avatar
3 votes
2 answers
2k views

Kalman Filter with Accelerometer with DC Offset

Goal: For a particle moving uniaxially, to estimate position ($d$) and velocity ($v$) from noisy acceleration ($a$) and very noisy position (GPS) measurements using a Kalman filter. Catch: The ...
Diego's user avatar
  • 51
3 votes
0 answers
885 views

Optimal measurement model for Kalman in Augmented Reality

I am developing an augmented reality SDK that uses Kalman for tracking a planar marker. My state is composed of 3D position, a quaternion, velocity and angular velocity. \begin{bmatrix}{\vec{p}}\\{\...
Jav_Rock's user avatar
  • 1,213
3 votes
1 answer
124 views

Interpreting sensor noise data

Introduction :I am trying to create an EKF for an autonomous vehicle, and i need to model the error of the sensors. (I am a mechanical engineer so my knowledge on electric signals is limited). The ...
MIKE PAPADAKIS's user avatar
3 votes
1 answer
952 views

Capture legitimate huge increase/drop in fuel level from noisy measurements

I have a fuel sensor installed in a lorry fuel tank. The sensor measures the current fuel level (in percentage) of the tank. However, due to the fact that the fuel is sloshing in the tank, the fuel ...
Hasyimi Bahrudin's user avatar
2 votes
1 answer
968 views

Error in using Kalman Filter for 2D Position Estimation in Python

This is my first question on DSP Stack exchange, so I apologise if it is poorly worded. I have some positioning data from a vehicle (GPX Format, collected through Strava) and want to use a Kalman ...
surajr's user avatar
  • 53
2 votes
0 answers
404 views

Kalman Filter: continuous state space, discrete observations

This is just an idea. How can we model the kalman filter to get the state representation in continuous space when the observations to the system are actually from the discrete space. The discrete ...
Rex Roy's user avatar
  • 21
2 votes
1 answer
120 views

Approaches to work around differing signal lengths when using Kalman filter

I have a set of vector valued signals $\boldsymbol{y}_{1:T}$ where each $\boldsymbol{y}_k \in \mathbb{R}^{v_k}$. Each signal is potentially of different dimensionality. I'd like to apply filtering and ...
FakeBrain's user avatar
2 votes
1 answer
6k views

Kalman Filter to estimate 3D position of a node

Code given on this link works for 1D: Kalman filter for position and velocity: introducing speed estimates In my problem I need to estimate 3D position.What is the criteria ? How F, G ,H,Q and R ...
Haider's user avatar
  • 97
2 votes
2 answers
2k views

Q matrix and updating times in a Kalman filter

The context of the problem is that I have several robots located remotely which give their position (x,y coordinates) every x seconds and send it to a centralized remote server. The value of the ...
YisasL's user avatar
  • 121
2 votes
1 answer
52 views

How to simulate the synthetic data for 2 pole low pass filter for Kalman application?

I was trying to simulate data for a 2 pole low pass filter inorder to solve with kalman filter to estimate the true states. With the below code I was unable to generate true states that look like sin ...
Sagar's user avatar
  • 61
2 votes
1 answer
199 views

Where to get transtion matrix for Kalman filter?

I am trying to understand the Kalman filter, and I am struggling to find out how to choose the transition matrix (denoted as $\mathbf F(k)$ or $\mathbf A(k)$. This matrix is used to update the weight ...
matousc's user avatar
  • 657
2 votes
1 answer
272 views

estimation of the position of the magnetic source

I have a flying robot with magnetic coil as a sensor. An output from the coil is measured every second in different position. I know the position of the coil and its angles. I need to estimate the ...
Mus's user avatar
  • 123
2 votes
1 answer
2k views

Applying Kalman filter to a data set

I went through the answer Kalman filter in practice and it seems we must know all the first and second order properties of random variables to apply the Kalman filter. But when I only have a set of ...
triomphe's user avatar
  • 195
2 votes
3 answers
4k views

How to use Kalman filter for altitude prediction based on barometer data?

I have barometer noisy data with known variance. I studied Kalman filter but I did not find an answer to this problem: My process model is: altitude is changed because of velocity that is changed ...
user1853472's user avatar
1 vote
0 answers
1k views

Help with Kalman Filter implementation for estimating 3D position

I wrote a kalman Filter implementation using the Eigen Library in C++ and also using the implementation at this link to test my filter: My prediction step looks like this: ...
MaskedAfrican's user avatar
1 vote
1 answer
1k views

Kalman filter, defining the measurement model

I would like to implement a Kalman filter to estimate the velocity and position of an object. I have an accelerometer, therefore the acceleration is known. The approach is same as: Kalman filter for ...
user3506463's user avatar
1 vote
2 answers
2k views

about Kalman gain

Hi everybody. I'm very new in Kalman filter. Today I try to design Kalman filter to get estimated postion, velocity and acceleration from measurement position (by linear encoder). I don't use optimal ...
Kho's user avatar
  • 93
1 vote
1 answer
230 views

Kalman Filter - Order of Update Step?

I have seen some literature where the covariance is updated first, like $(P_k)^{-1} = (P_k^-)^{-1} + H^T R^{-1} H$, where $P^-$ is the a priori estimate of the state covariance $P$. Then, the updated ...
andykl's user avatar
  • 13
0 votes
2 answers
4k views

Discrete or continuous Kalman filter?

I have position and acceleration measurements and I would like to apply a Kalman filter to estimate the velocity of the system. I am not sure yet about how to procede, but I will check the already ...
Rhei's user avatar
  • 413
-1 votes
1 answer
5k views

Re-implementing the "spectrogram" function from matlab

I am trying to make a spectrogram viewer without using the spectrogram command. For this purpose, I used a sin function. I broke up the input signal into 256 segments, multiplied each segment with the ...
Serkan's user avatar
  • 1