Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

# Tag Info

3

KF is actually a mixture of a deterministic state propagator and a statistical estimator. Despite it's name including the term filter, Kalman filter is not a simple frequency selective one. It's indeed a statistical recursive estimator of a state of a (linear) dynamic system. Yet on a broader sense it's called as a filter as it will separate a desired ...

3

With your edit it becomes clear that you've modeled your problem incorrectly: While the offending signal appears shortly with a frequency of 50 Hz, that is by no means the frequency content of the interference! (also, your filter isn't well-designed, probably too short, judging from the impulse response it displays, to filter out 50 Hz) You'll find that ...

2

This is a really nice problem. Problem Formulation I will formulate it as following: Let $x \in \mathbb{R}^{n}$ be a signal. Given $y \in \mathbb{R}^{n}$ which is a noisy measurement of $x$ such that $y = x + v$ and $z$ be a noisy measurement of the derivative of $x$ such that $z = F x + w$ where $F$ is the finite differences operator. ...

2

The mass-spring-damper combination is an LTI system described by the following continuous-time linear differential equation $$\ddot{x} = - \frac{k}{m} x - \frac{b}{m} \dot{x} + \frac{1}{m} u$$ where $u$ is the deterministic input force (N), $k$ is the spring constant (N/m) and $b$ is the damping coefficient (N.s/m). Assuming two states as the position ... 2 The main reason why your Kalman filter is not working is because you are not converting lat and lon values to kms. In the code below, I defined a new function called lat_lon_posx_posy which converts lat and lon values to px and py values in mts. You will need to make the following changes to your code. Include the following function import utm def ... 2 A resistance isn’t a particularly dynamic state, should be an unknown constant, but you might have a bin of resistors where they might vary. Taking one “randomly” out the bin makes it a random variable. The bin of resistors will have a mean value, so perhaps that mean constitutes a state variable. Perhaps someone starts putting resistors in the bin from a ... 2 Perhaps an analogy might be constructive. Consider a submarine commander with a fat tanker in the cross hairs of his periscope. He needs to shoot his torpedoes, not at where the target is now, but at some place where the torpedo will intersect with the target. A skilled commander will have knowledge about how fast or slow the tanker can go. knowledge ... 2 If you add an accelerometer to the project, a Kalman filter can give a good estimation of vertical speed. With only a barometric sensor, I don't think it's possible to reduce the lag below 1 second. import numpy as np import matplotlib.pyplot as plt import random from filterpy.kalman import KalmanFilter from filterpy.common import Q_discrete_white_noise ... 1 That depends on how many of the accelerometer parameters (mostly drift and misalignment) you're trying to estimate. If the IMU and the 'extra' accelerometer were in perfect alignment (and if their statistics are Gaussian), then the optimal combination of their outputs would be a simple weighted sum:\vec {\hat a} = k_1 \vec a_1 + k_2 \vec a_2$where (... 1 Simple Description Imagine you're in a car that is traveling at 70MPH with cruise control. Because the cruise control isn't perfect, your actual speed might vary slightly. This imperfection is called "process noise". Now lets also imagine the car is being tracked using GPS. Because GPS isn't perfect, there will be some noise in the sensor reading. This ... 1 See: What is the relationship between a Kalman filter and polynomial regression? In over-simplified form, eyeball a line though a cloud of data samples, look where that line might point one sample into the future; and, when you get a new sample check, how good that estimate might have been; then redo, but optimize for a lot less arithmetic per step. A ... 1 You can model your system as a linear time varying, where only the measurement matrix$H_kvaries in time \begin{align} x_{k+1} &= F\,x_k, \\ y_k &= H_k\,x_k. \end{align} Namely in your case you can considery_k^i=H^i\,x_k$($i$is just an index, not a power) to be the output of the$i$th sensor. So at a time$k$when only sensor 1 is active you ... 1 The authors cite this work in their response to the review: Zhao H, Lu L. Adaptive recursive algorithm with logarithmic transformation for nonlinear system identification in α-stable noise [J]. Digital Signal Processing, 2015:S1051200415002535. They take their inspiration from equation (14):$J_p(n)=\sum_{i=1}^n \lambda^{n-1} \cdot \log^p (1+|e(i)|...

1

The process noise $w(t)$, which is typically assumed to be a zero mean, white Gaussian noise with (power) variance $\sigma^2$, is used to account for any mismatches between the assumed dynamic model of the states and the actual truth. If your assumed constant state (DC) model perfectly matches with the underlying nature of the observed signal, then you ...

1

I ended up with a quite satisfactory solution, not by using a Kalman filter, but by using the Savitzky-Golay differentiating filter. The algorithm is described more or less like this: In a for loop, apply a running window to get a segment of the unfiltered volume signal around a range of given time instants, as measured by the load cell; For each segment, ...

1

The first question you link to states that it only measures acceleration and the answer suggests to add the acceleration to the state vector as well, $\begin{bmatrix}x^\top&\dot{x}^\top&\ddot{x}^\top\end{bmatrix}^\top$. This is why the observation matrix becomes $\begin{bmatrix}0&0&I\end{bmatrix}$. So your reasoning for observation matrix is ...

1

Have you taken a look at the documentation - section 2.2.4 discusses a Linear Kalman filter model that is very similar to the one you described. From that example you see that: The resulting $\bf{A}$ matrix does not depend on the process noise The $\bf{A}$ matrix only depends on the size of the time step. The $\bf{Q}$ matrix only depends on the size of the ...

1

There are many differences but I would say that the basic difference is a Kalman Filter operates under the assumption that you have a linear state space and linear measurement model corrupted by Gaussian Noise. A Gaussian process is completely specified by its mean and variance. The state variables are a mean vector. The state is a sufficient statistic. ...

1

In general, for position-related Kalman filters, you want your state vector to contain $x$, and $\dot{x}$ (location and velocity) components. See, for example, the Wikipedia page or this question and answer here. If you have a measure of velocity, then it can certainly also be an input to the Kalman filter.

1

Marcus and Ben have very clearly identified the problem: the signal is simply too small relative to the least significant bits (LSBs) of the "virtual machine"'s ADC. The sensible solution is to increase the signal by use of gain. From the provided plots, a signal gain around 100 would be a good starting value. Alternatively, the ADC resolution would have to ...

1

I can say a couple of things about this problem since I have been working on a similar one for a few weeks. First thing to note is that you should subtract the mean of a section of noise from your data, not the entire section. As below, moving from figure 1 to figure 2: You could also fit a 0 degree polynominal and subtract from the original data: A = ...

1

assume we are tracking a vehicle with a radar/lidar. The radar/lidar is placed some where to observe the vehicle. the state of the vehicle is $$\mathbf{x}=\begin{bmatrix} x \\ v \end{bmatrix},P=\begin{bmatrix} cov(x,x) && cov(x,v) \\ cov(v,x) && cov(v,v) \end{bmatrix}$$ from the radar/lidar, we can read the time of echo signal, not the ...

1

I think the problem is in Q. Q are charging K with their values. I achieve good results when Q is preloaded with powers of delta_t. See any article about wiener model. It has a good Q matrix. A00 has to be multiple of delta_t power of 5 A11 delta_t power of 3 A22 delta_t power of 1 A01 multiple of delta_t power of 4 And so on Look at https://www.google....

Only top voted, non community-wiki answers of a minimum length are eligible