next up previous contents
Next: The general problem formulation Up: Linear Least Squares Previous: Linear Least Squares   Contents

Least Squares Data Fitting

Consider the following problem. We have a set of 21 data points, representing measurements of a rocket altitude during flight at 21 consecutive time moments. We know that, in an uniformly accelerated motion, the altitude as a function of time is given by

(15.1)

From the data set
     t     h(t)        t     h(t)        t     h(t)  
    ------------      ------------      ------------
    0.0  -0.2173      0.7   3.3365      1.4   6.3312
    0.1   1.0788      0.8   1.9122      1.5   6.3549
    0.2   0.1517      0.9   3.0594      1.6   8.5257
    0.3   0.1307      1.0   3.7376      1.7   8.7116
    0.4   1.4589      1.1   3.3068      1.8   8.2902
    0.5   2.9535      1.2   3.7606      1.9  11.4596
    0.6   2.4486      1.3   6.6112      2.0  11.2895
we try to infer the parameters , , , which define the smooth curve ([*]). In particular, the acceleration of the vehicle is , and, if is the mass of the rocket and is the gravitational acceleration, then we can infer the total force produced by thrusters .

Note that we have 21 data points to determine 3 parameters; the data is corrupted by measurement errors (for example, the first altitude is negative!). We will use the redundancy in the data to ``smooth out'' these measurement errors; see Figure [*] for the distribution of data points and the parametrized curve.

Figure: Altitude versus time: the data points and the resulting fitted quadratic curve.

At each time moment , we are given the measured height (in the data set); the height obtained by the formula ([*]) is . Therefore, the formula ([*]) ``approximates'' the measured height at time with an error


We want the values , and chosen such that the differences between the model and the measurements are small. Therefore, we impose that the sum of squares of errors is minimized


We recall from calculus that, when attains its minimum value, the derivatives are equal to zero. therefore, to obtain a minimum of , the following necessary conditions hold


These equations form a linear system in the unknowns , , , which, in matrix notation, is
(15.2)

The computations give , , .


next up previous contents
Next: The general problem formulation Up: Linear Least Squares Previous: Linear Least Squares   Contents
Adrian Sandu 2001-08-26