# Least squares

1)We wish to measure a wavefront u(x,y) on a 3X3 grid (see the attached file). The sensor how ever provides us only with differences between grid points. There is sensor noise, so the difference measurements may not be consistent.

Number the grid points linearly and set up a set of linear equations (matrix form) relating the values of u to the values of du. Use least squares to get the best estimate of u(x,y). First use the exact values of du then use du with error, compare. Check by summing du's along a set of defined paths. Does least squares improve accuracy when sensor noise is included?

2)Often we are not interested in the component of u of the form L(x,y)=Ax+By+C

use least squares to find A,B,C wich provide a best fit to the u(x,y) determined from exact data.

Form u(x,y)-L(x,y) graph if possible

^u=exact value-/+error

^u is delta u

#### Solution Preview

See attachment.

1)We wish to measure a wavefront u(x,y) on a 3X3 grid (see attached file) The sensor however provides us only with differences between grid points. There is sensor noise, so the difference measurments may not be consistent. Number the grid points linearly , and set up a set of linear equations (matrix form) relating the values of u to the values of du. Use least squares to get the best estimate of u(x,y).

First use exact value of du then use du with error, compare.

Check by summing du's along a set of defined paths.

Does least squares improve accuracy when sensor noise is included?

2)(same problem continued)Often we are not interested

in the component of u of the form L(x,y)=Ax+By+C

use least squares to find A,B,C which provide the best fit to the u(x,y) determined from the exact data.

Form u(x,y)-L(x,y), graph if possible

^u=exact value +/- error

::^u means delta u app. value of u. ...

#### Solution Summary

This shows how to use least squares in measuring wavefront. The number of grid points are given.