Least square method to fit a curve using projection/orthogonal families of polynomials

159 Views Asked by At

An object was lanched from a building and had its height registered by the following table:

Height 192 180 150 115 72

Time --- 1 - 2 --- 3 -- 4--- 5

Use the least squares method to estimate the height, $g$ and the vertical velocity at $t=0$

I think I must fit a curve into this dataset. I'm studying orthogonal families of polynomials and projection onto subspaces, so I guess I should use these concepts.

The first question is: which function I should use to approximate to the dataset and how many free parameters I should use?

1

There are 1 best solutions below

0
On

Assuming that the dynamical model is

$$ \ddot y = -g $$

we have as general solution

$$ y(t) = -\frac 12 g t^2+c_1 t + c_2 $$

so defining now the measurement error as

$$ e_k^2 = \left(y(t_k) + y_k\right)^2 $$

and calling the total error as

$$ E_2 = \sum_k e_k^2 = f(c_1,c_2,g) $$

the minimum total error is attained at

$$ \frac{\partial E_2}{\partial c_1} = \frac{\partial E_2}{\partial c_2} = \frac{\partial E_2}{\partial g} = 0 $$

now solving the resulting linear system we get

$$ c_1 = -\frac{25}{14},\ \ c_2 = \frac{999}{5},\ \ g = \frac{67}{7} $$

now at $t = 0$ we have $y_0 = c_2 = \frac{999}{5}$ and $\dot y_0 = v_0 = c_1 =-\frac{25}{14}$

Attached a plot showing in blue the adjusted function $y(t)$ and in red the measuring points.

enter image description here