Kalman Filter book using Jupyter Notebook. Focuses on building intuition and experience, not formal proofs. Includes Kalman filters,extended Kalman filters, unscented Kalman filters, particle filters, and more. All exercises include solutions.
Other
16.8k
stars
4.2k
forks
source link
Problem in solution to "Exercise: The Effect of Acceleration" in Chapter 1 #381
def gen_data(x0, dx, count, noise_factor, accel=0.):
zs = []
for i in range(count):
zs.append(x0 + accel * (i**2) / 2 + dx*i + randn()*noise_factor)
dx += accel
return zs
If I'm understanding this correctly, this is basically sampling the closed form solution of integrating the acceleration to get the distance travelled with some random noise. The closed form solution is:
Which matches the expression in the solution, but I was confused by the incrementing of dx. My understanding is that dx is v0 so there's no need to increment it over time. The velocity is increasing, but dx in this expression shouldn't go up for each sample since that's already accounted for by the integration being used. Based on this I believe the solution should be:
def gen_data(x0, dx, count, noise_factor, accel=0.):
zs = []
for i in range(count):
zs.append(x0 + accel * (i**2) / 2 + dx*i + randn()*noise_factor)
return zs
Doesn't effect the actual lesson being communicated here, though.
For this exercise the solution is given as:
If I'm understanding this correctly, this is basically sampling the closed form solution of integrating the acceleration to get the distance travelled with some random noise. The closed form solution is:
Which matches the expression in the solution, but I was confused by the incrementing of dx. My understanding is that dx is v0 so there's no need to increment it over time. The velocity is increasing, but dx in this expression shouldn't go up for each sample since that's already accounted for by the integration being used. Based on this I believe the solution should be:
Doesn't effect the actual lesson being communicated here, though.