MMAN 3210 ENGINEERING EXPERIMENTATION LABORATORY ASSIGNMENT 3 Yogi K. Gunario z3246759 Laboratory T 11 A Tuesday (11 – 1) and Wednesday (3 – 4) INTRODUCTION This report will contain 2 sections. Part 1 will focus on evaluating the accuracy of the laser sensor including the related random errors, whereas part 2 will focus on estimation of the shape of the scanned objects with using range measurement and regression methods. EXPERIMENT PART 1 APPROACH Test Conditions There are two objects which will be utilised in this experiment, which are a flat board and a cylindrical bin. For this section, the flat board will be used to evaluate the accuracy of the scan results. The data collected from the scans of the flat board at different ranges and angles will be used to evaluate the quality and accuracy of the measurement. This is possible to be done by examining the data standard deviation which is caused by random errors. Different ranges of the middle of flat board from the scanner to be measured are 1 m, 2 m, and 3 m, with various angles for each different range which are 0o, 30o, and 45o. Data Extraction Method The data extraction is done with a laser scanner, with number of scan of 20 and time interval of 0.1 s between each scans. The scanner will emit laser beams at 361 different angles with a difference of 0.5o between each beam. This will detect object positions in front of the scanner about a plane on the height of the laser beam emission, covering 180o degrees in the scan. The 180th laser beam will be used as the range measurement, as this laser is pointing straight towards the object (perpendicular to laser scan surface). In other words, three-dimensional objects can be interpreted as two-dimensional objects by the laser scanner and hence it is possible to detect object position and shape. The range collected is the range measured by the beam 180; the laser beam pointing to the front of the scanner. Such example code below shows how to extract the measurement from beam 180 in order to create plot and histogram as shown in figure 1 and figure 2. load 1m0d.mat time_interval = 0:0.1:1.9; range = X.Scans(:,180); plot(time_interval,range,'.') hist(range) The code above represents an example of data extraction by loading data set 1m0d.mat. Setting the time interval from 0 to 1.9 s with time interval of 0.1 s (this gives 20 scan attempts), and the range taken from beam 180, plots and histograms for such time interval and range as shown in figure 1 and figure 2 can be created. Standard Deviation Standard deviation is a magnitude of how much the data values spread from the mean value of all data points, which is also the square root of the data variance. Standard deviation can be mathematically expressed as ∞ π 1 π = √π£πππππππ = √ ∫ (π₯π − π₯Μ )2 π(π₯)ππ₯ = √ ∑(π₯π − π₯Μ )2 π−1 π=1 −∞ Meanwhile such functions can be used to find standard deviation and mean value in Matlab STD = std(R) MEAN = mean(R), where R is the collection of data points By comparing the standard deviation to the mean value, it is possible to evaluate the quality and accuracy of the measurement done by laser scanner. It is expected that the error is dependent against the test. The hypothesis is that the error will increase as the range and angle of inclination of the object are increased while being measured. There are various reasons why the error might be dependent against different tests. ο· Any small error represents in the laser scanner will cultivate into larger error as the range of object is increased. ο· Discrepancies caused by noise interference contributes to error ο· Human error does not allow the object to be placed perfectly at the desired range and inclination angle. ο· Object has limited ability to reflect laser beam RESULTS 1 m 0 deg 0 1 Time (s) 2 m 30 deg 1 Time (s) 1 m 45 deg Range 0 1 Time (s) 2 m 45 deg 0 1 Time (s) 2 2.14 2.12 2 0 1 Time (s) 3 m 45 deg 2 0 1 Time (s) 2 3.25 Range 2 1 Time (s) 3 m 30 deg 3.2 3.18 2 2.16 Range 4 0 3.22 2.18 2.16 2 3.08 3.07 2 2.2 0 Range 2.08 2.07 2 Range Range 1 Time (s) 1 m 30 deg Range Range Range 0 1.14 1.135 1.13 1.125 0 3.09 2.09 1.1 1.05 3 m 0 deg 2 m 0 deg 1.15 0 1 Time (s) 2 3.245 3.24 Figure 1 – Multiple scan for flat board for laser beam 180, range versus time 1 m 0 Deg 2 m 0 deg 3 m 0 deg 20 20 10 10 10 5 0 1.05 1.1 1.15 0 2.07 2.08 1 m 30 deg 2.09 0 3.07 2 m 30 deg 20 20 20 10 10 10 0 1.1251.131.1351.14 0 2.16 2.18 1 m 45 deg 2.2 0 3.18 2 m 45 deg 20 20 10 10 10 0 10 0 2.12 2.14 3.09 3.2 3.22 3 m 45 deg 20 0 -10 3.08 3 m 30 deg 2.16 0 3.24 3.245 3.25 Figure 2 – Histograms of extracted measurement, number of data points versus data point value (Board at angle of 0 degrees) 4 Figure 3 – Example of flat surface locations – Locations at incidence angle of 0 degree and at different ranges; 1, 2, and 3 m Random Readings Board 3.5 Distance reading (m) 3 2.5 2 1.5 1 0.5 0 -2 -1.5 -1 -0.5 0 0.5 Horizontal position (m) 1 1.5 2 Figure 3 shows an example of locating flat surface from data points available from scan. In the figure, the flat surfaces at different ranges are shown in the graph by green dots, whereas the red dots show random surrounding objects. By observation from such graph, the locations of the flat surfaces can be clearly seen. INVESTIGATION Table 1 below shows the error standard deviation for different range and angle of inclination of the measured flat board Object scanned Flat board Angle of inclination (degrees) 0 0 0 30 30 30 45 Distance (m) Mean π₯Μ (m) Error (m) 1 2 3 1 2 3 1 1.0710 2.0810 3.0850 1.1210 2.1745 3.1905 1.1000 0.0710 0.0810 0.0850 0.1210 0.1745 0.1905 0.1000 Standard Deviation σ (m) 0.0055 0.0031 0.0051 0.0031 0.0051 0.0022 1.2231e-007 45 45 2 2.1325 3 3.2405 Table 1 – error standard deviation 0.1325 0.2405 0.0044 0.0022 Based on table 1, the error in measurement generally increases as the angle of inclination and distance are increased. The error is represented by the difference between the mean and the distance. By looking at the error column, there is a general trend of increase in error by increasing distance and angle of inclination. However, there is no certain trend of change in the standard deviation for any change of distance and angle of inclination, as shown in the table above. Furthermore, there is no strong evidence to proof that the increase in error is dependent to the increase in distance and angle of inclination. The error might be caused by some other factors. To increase experiment quality by reducing the effects of any possible error factors, there are some possible methods can be applied. Firstly, the number of scanning repetition and data sets can be increased to obtain more reliable measurement. Secondly, the experiment can be held in an environment with minimal disturbances (including noise, vibration, etc.). Lastly, providing a new laser scanner with better quality will increase the quality of data measurement. EXPERIMENT PART 2 APPROACH In this section, the positions and estimated shape of the flat board and cylindrical bin will be evaluated by the laser sensor. However, due to random errors, uncertainties, and limited ability of the laser scanning, the position and shape of both objects cannot be fully estimated by only using the data points available from the scanning result. Therefore, line regression must be done to estimate their position and shape, including possible dimensions. Figure 3, 4 and 5 below shows the linear regression for the required estimations. (Board at angle of 0 degrees) 4 Random Readings Board Polynomial fit 3.5 Distance reading (m) 3 2.5 2 1.5 1 0.5 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 Horizontal position (m) 0.6 0.8 1 Figure 3 – Board at 0oinclination angle, at different ranges (Board at angle of 30 degrees) (Board at angle of 45 degrees) 4 4 Random Readings Board Polynomial fit 3.5 3 Distance reading (m) Distance reading (m) 3 2.5 2 1.5 2.5 2 1.5 1 1 0.5 0.5 0 -1 Random Readings Board Polynomial fit 3.5 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 Horizontal position (m) 0.6 Figure 4 – Board at inclination angle 30o at different positions 0.8 1 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 Horizontal position (m) 0.6 Figure 5 – Board at inclination angle 45o at different positions For flat board, linear regression is done so that its position and dimensions can be estimated. This can be done by applying a polynomial function to create a line of best fit for the data points which represent the position and dimensions of the flat board. However, there are random objects being scanned during the experiment. It is desired to separate these random data points from the flat board data points. Code taken from Matlab below shows the method to separate the points on the flat board from all random data points. This will allow the flat board to be recognised by computer, so that estimations can be done. The code minimises the data points for which to be taken for the linear regression. k = 1; % define k to be 1 for for loop for u=1:length(x) if (x(u) > -0.8 && x(u) < 0.8) % minimise range of x x1(k) = x(u); y1(k) = y(u); k = k + 1; % increment k end end k = 1; % define k to be 1 again for new loop for u=1:length(y1) if (y1(u) > 0.4 && y1(u) < 4) % minimise range of y x_board(k) = x1(u); y_board(k) = y1(u); k = k + 1; % increment k end num = k-1; % total number of points for board end The minimisation of point selection is done after board location inspection from the result shown in figure 3, 4, and 5. As shown above, all boards at different ranges are located within the x-coordinate of -0.8 and 0.8, and y-coordinate of 0.4 and 4. Variables x1 and y1 store the data points which is already within the minimised x-coordinate range. Variables x_board and y_board store minimised data points about y-coordinate by using x1 and y1 which have already been minimised in xcoordinate before. Hence, x_board and y_board carry vectors of data points for the flat board within the desired range. 0.8 1 RESULTS Table 2 represents the result for end-points and coefficients for linear regression applied to flat board at different distances and incidence angles. Object scanned Angle of Distance Left end-point Right end-point Coefficient A inclination (m) coordinate [X,Y] coordinate [X,Y] (degrees) Flat board 0 1 -0.4785, 1.0748 0.4842 ,1.0876 -0.9329 0 2 -0.3995, 2.0550 0.5622 ,2.0980 -0.4800 0 3 -0.2433, 3.0914 0.7135 ,3.0907 -0.3242 30 1 -0.4290 ,0.8605 0.4103 ,1.3422 -0.8922 30 2 -0.4041 ,1.9010 0.4276 ,2.4251 -0.4612 30 3 -0.4643 ,2.9315 0.3904 ,3.4263 -0.3143 45 1 -0.3576 ,0.7173 0.3102 ,1.3990 -0.9144 45 2 -0.3143 ,1.7825 0.3289 ,2.4984 -0.4710 45 3 -0.4250 ,2.8434 0.2833 ,3.5994 -0.3103 Table 2 – Coefficients and end points for flat board at different situations INVESTIGATION Cylindrical Bin Readings Random Readings Bin Circle Fit by Pratt Center of Circle (Cylindrical bin) 4 3.5 Distance reading (m) 3 2.5 2 1.5 1 0.5 0 -1 -0.5 0 0.5 Horizontal position (m) 1 Coefficient B -0.0129 -4.5503e-005 7.4786e-006 -0.4763 -0.2702 -0.1794 -0.9058 -0.5250 -0.3017 Object scanned Cylindrical Bin Range (m) Angle of Estimated Centre Coordinate inclination [X,Y] (degrees) 0.5 0.0831 ,0.7585 1 0.1077 ,1.2635 2 0.0830 ,2.2489 2.5 0.0677 ,2.8820 Table 3 – Estimated Circle Centre and Radius at different locations Estimated Circle Radius (m) 0.2438 0.2536 0.2205 0.2550