I know how to use least square for estimating a constant value given a bunch of measurements. It is
Alani Conner
Answered question
2022-05-23
I know how to use least square for estimating a constant value given a bunch of measurements. It is the average assuming measurements have same weight of variance.
where in the case of estimating a constant value and are a bunch of measurements. Now I would like to simulate a sensor that provides the range and the angle to a point with some Gaussian noise. From the sensor, we can get as follows
How can I apply least square to filter and . Is as follows
then I apply the least square formula since I have and ? This gives me wrong results.
Answer & Explanation
Fahrleine9m
Beginner2022-05-24Added 11 answers
The linear least squares estimation formula you consider implies that the observation and the parameter of interest , (), are linearly related as
where , and is a noise vector with uncorellated elements of zero mean and equal variance. For the sensor problem, since the sensors provide the cartesian coordinates of the point (if I understood correct), it is convenient to consider as parameter of interest the cartesian coordinates of the point. Noting that the -th sensor provides a measurement , stacking all, say, measurements to a single observation vector results in the linear model of (1). I will leave it to you to determine the form of . You may then proceed in determining the LS estimate of , from which you can then obtain an estimate of the polar coordinates by the well-known transformation formulas. Note that the above approach estimates the polar coordinates implicitly (as a by-product of the cartesian coordinates estimate). The reason is that the polar coordinates are not linearly related to the observations (i.e., for , you cannot find a matrix so that (1) holds). If you wish to obtain a direct estimate of the polar coordinates from the observations you would have to perform a non-linear parameter estimation procedure. EDIT: Since your question considers only sensor, the estimate of the cartesian coordinates is simply and the corresponding polar coordinates estimate is