Streamlined description of EKF linearization

This commit is contained in:
Roger Labbe 2016-01-03 11:32:22 -08:00
parent 331d8cf880
commit 8a01161ea4
3 changed files with 245 additions and 273 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -75,7 +75,7 @@ def plot_radar(xs, track, time):
plt.ylim((900, 1600))
plt.show()
def plot_bicycle():
plt.clf()
plt.axes()
@ -227,6 +227,22 @@ def show_radar_chart():
ax.yaxis.set_ticklabels([])
ax.xaxis.set_ticks([])
ax.yaxis.set_ticks([])
plt.show()
def show_linearization():
xs = np.arange(0, 2, 0.01)
ys = [x**2 - 2*x for x in xs]
def y(x):
return x - 2.25
plt.plot(xs, ys, label='$f(x)=x^22x$')
plt.plot([1, 2], [y(1), y(2)], color='k', ls='--', label='linearization')
plt.axes().axvline(1.5, lw=1, c='k')
plt.xlim(0, 2)
plt.ylim([-1.5, 0.0])
plt.title('Linearization of $f(x)$ at $x=1.5$')
plt.xlabel('$x=1.5$')
plt.legend(loc=4)
plt.show()