Lab 03 Report Part 1

advertisement
Lab 03 Report
Part 1
Introduction
This report will outline and investigate the accuracy of the sensor and its associated random
errors through statistical and uncertainty analysis and demonstrate the use of the laser scanner in
object and position measurement using regression and minimisation techniques.
Test Conditions
Independent scans and tests of the flat board and circular bin were taken from various laboratory
sessions with the following data and results:
Sample
Shape and
Range Angle Number of Intervals
Mean
Standard
No.
object
from
of
scans − L
− dt (s)
Deviation
π‘₯Μ…
scanner object
σ
(m)
1
Flat board
1
45°
20
0.05
5.2493
13.1771
2
Flat board
1
90°
20
0.05
4.6288
13.1927
3
Flat board
1.5
40°
50
0.01
5.1186
12.5151
4
Flat board
3
45°
20
0.05
3.8304
6.2659
5
Circular Bin
0.5
20
0.05
2.6920
4.7444
6
Circular Bin
1.0
20
0.05
3.202
4.9999
7
Circular Bin
1.5
20
0.05
3.8791
6.6076
th
In Part 1, the 180 scan is of particular interest.
Extraction of the line
The data points can be extracted manually or can be extracted by using a loop that extracts data
based on the limits determined via inspection which is a more feasible approach.
Standard Deviation, range and inclination
Standard deviation measures the width or spread of data from the mean of a collection of random
variables in this case, position coordinates and tells us, on average, how far each observation is
removed from the mean. Mathematically it is represented in either continuous or discrete form
respectively it is given as:
∞
𝜎 = √ ∫ (π‘₯𝑖 − π‘₯Μ… )2 𝑝(π‘₯)𝑑π‘₯
−∞
𝑁
1
𝜎= √
∑(π‘₯𝑖 − π‘₯Μ… )2
𝑛−1
𝑖=1
In MATLAB, the functions used to obtain the mean and standard deviation respectively are mean(R) and
for the range data. The laser scanner’s measurement can have its quality and accuracy
evaluated by the standard deviation, where a higher standard deviation infers lower accuracy. It
has been shown that the standard deviation is inversely proportional to the range and does not
vary significantly with different angle of inclination at the same range.
Error dependence and independence against tests
There is random error present in this part of the analysis which will not yield perfect results.
ο‚· Noise will always impose variations in sampled data.
std(R)
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
1
ο‚·
ο‚·
ο‚·
ο‚·
ο‚·
ο‚·
Systematic error remains constant in these repeated measurements and cannot be
discerned via statistical means alone.
Error propagation means that any small error present in the laser scanning apparatus will
result in larger errors and discrepancies especially with increasing range.
Data acquisition errors such as sensor installation and data-reduction errors such as curve
fit also affects the results.
Human errors such as the placement of the board, where distances and angles are
measured in the magnitude of centimetres at best, resulting in reading errors of that
magnitude.
The use of polar coordinates with angle as a variable presents marginal error compared to
the uncertainty present in range measurements which is the main source of error as shown
previously in the discussion on standard deviation.
More reliable measurements can be obtained with increased number of scans and an
environment with minimal disturbances and interference such as noise, diffraction and
vibration.
Figure 1: Extracted Cartesian plots of the board seen as lines.
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
2
Figure 2: Histograms of the board measurements.
The histogram allows patterns of variation to be displayed by displaying the relative frequency of
each data and is more useful than a stem-and-leaf plot because of its ability to accommodate
large amounts of data where in this case, laser scans. To accommodate all 361 scans, the
histogram command in MATLAB has been modified to accommodate all the 361 scans by the
use of the command hist(R,361)for better accuracy.
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
3
Distance versus scans
Figure 3: Plots of the distances with respect to the scans of the board as the subject.
The laser scanner takes 361 scans within an 180° arc, the 180th beam which is directly in from is
of particular interest here by using the command plot(X.Scans(: ,180),'.')
Naturally the board is a static object and should in theory the above plots should show the same
distance with each individual scan regardless. However this is not the case with the laser scanner.
The contribution of errors listed in the previous section and other unaccounted factors will result
in range data never being exactly the same at different times as shown above. One sample in
particular, sample 3 has its number of individual scans increased to 50 to better identify any data
that is beyond the expected range. This shows while the laser is a high precision apparatus it is
not perfect which is why the accuracy of the laser is analysed in the first place.
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
4
Part 2
Extraction of the line
The laser performs its scans and provides raw data in polar coordinates where ρ (rho) represents
range and α (alpha) represents the angle. Part of the scan includes the position of the board which
is recorded as a sequence of independent discrete points which can be discerned as a line. This
linear profile can be extracted first by manually inspecting the limits of the line then using the
MATLAB command find to extract the relevant coordinates. Then using the method called least
squares regression to predict the position of the board as a linear regression line of the form y =
ax + b then equate to zero after minimising the error.
The MATLAB command used for this is polyfit(x,y,1) which accepts the data in Cartesian
Coordinates then produces a first-order polynomial also known as a linear function.
The transformation from polar to Cartesian co-ordinate system is performed through the relations
x = ρcos(α) & y = ρsin(α). We can obtain an intermediate linear regression equation in Cartesian
however our original coordinate system is polar. Substituting this relation back into the linear
regression equation with minimisation gives:
y + ax + b = a[ρcos(α)] + [ρsin(α)] + b = aρcos(α) + ρsin(α) + b = 0
1
π‘Ž
𝜌 sin(𝛼) + 𝜌 cos(𝛼) = −1
𝑏
𝑏
1
π‘Ž
1
sin(𝛼) + cos(𝛼) = −
𝑏
𝑏
𝜌
1
π‘Ž
1
− sin(𝛼) − cos(𝛼) =
𝑏
𝑏
𝜌
Therefore for the flat board the coefficients that explicitly represent the linear regression
equation can be implicitly used become:
1
π‘Ž
𝐴 = − π‘Žπ‘›π‘‘ 𝐡 = −
𝑏
𝑏
For all samples of the board the coefficients and endpoint coordinates yielded were:
Sample
a
b
A
B
1
1.099
1.0902
−0.9173
−1.0089
2
0.0083
0.9836
−1.0167
−0.0085
3
−0.7720
1.6330
−0.6124
0.4727
4
−0.7321
3.0516
−0.3277
0.2399
Sample
1
2
3
4
x-coordinate of
left endpoint
(m)
−0.2735
−0.4018
−0.3282
−0.3792
y-coordinate of
left endpoint
(m)
0.7942
0.9701
1.861
3.328
x-coordinate of
right endpoint
(m)
0.3822
0.5478
0.4326
0.3215
y-coordinate of
right endpoint
(m)
1.533
0.9833
1.331
2.822
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
5
Figure 4: Least squares regression line superimposed on experimental data.
The above figure helps visualise how least squares regression can help determine an expression
and visualise the laser scan of the flat board as an object with a linear profile.
Extraction of the circular surface
In reality the radius and centre of the circular plastic bin is known as it can be observed in three
dimensional Cartesian coordinate system.
However the front of the bin is seen towards the laser scanner as having a different range which
is symmetrical at the centre when its position is plotted.
Minimisation Criteria
Minimisation seeks a solution given a set of data or initial point(s) and converges to a solution
iteratively by minimising the difference between the desired solution and the candidate solution.
One way to overcome this is to use implicit equations and numerical methods such as Newtons’
Method, in particular an external function known as CircleFitByTaubin(XY). The function
uses the discrete x-y coordinates of the semi-circle from the laser scan as an input then utilizes
Newton’s method to converge to a solution giving the radius coordinates of the centre of the
circle as the output. This allows us to estimate coordinates such as the centre and radius of a
circle represented from a limited set of data.
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
6
Distance (m)
0.5
1.0
1.5
x-coordinate of centre (m)
−0.0478
−0.0247
0.0215
y-coordinate of centre (m)
0.7776
1.2173
1.7243
Radius (m)
0.2661
0.2771
0.2516
Figure 5: Plots of the circular surface of the bins at different ranges with estimated circle fits.
The above figure helps visualise how a circular fit through minimisation criteria and numerical
methods can be applied to estimate the centre and radius of experimental data acquired from the
laser scan of the circular bin. An external function called circle(CENTER,RADIUS,NOP,STYLE)
allows a circle to be superimposed onto the plot based on the estimated centre and radius, also
allowing the user to specify number of points and the plotting style.
Conclusion
The laser scanner’s accuracy has been examined through statistical means and uncertainty
analysis. A flat board and a circular bin’s has been the subject of object estimation and their
shape represented through least squares regression, minimisation criteria and numerical methods.
References
MATLAB Central, Circle Fit by Taubin, created by Nikolai Chernov – Viewed on 12 Sep 2010 –
http://www.mathworks.com/matlabcentral/fileexchange/22678-circle-fit-taubin-method
MATLAB Central, Draw a Circle, created by Zenhai Wang – Viewed on 12 Sep 2010 –
http://www.mathworks.com/matlabcentral/fileexchange/2876-draw-a-circle
Jason Lam – z3252911 – MMAN3210 – Engineering Experimentation – T09A – 6663 – Lab 03 Report
7
Download