GPCA vs. PCA in Recognition and 3-D Localization of Ultrasound Reflectors

In this paper, a new method of classification and localization of reflectors, using the time-of-flight (TOF) data obtained from ultrasonic transducers, is presented. The method of classification and localization is based on Generalized Principal Component Analysis (GPCA) applied to the TOF values obtained from a sensor that contains four ultrasound emitters and 16 receivers. Since PCA works with vectorized representations of TOF, it does not take into account the spatial locality of receivers. The GPCA works with two-dimensional representations of TOF, taking into account information on the spatial position of the receivers. This report includes a detailed description of the method of classification and localization and the results of achieved tests with three types of reflectors in 3-D environments: planes, edges, and corners. The results in terms of processing time, classification and localization were very satisfactory for the reflectors located in the range of 50–350 cm.


Introduction
The classification and localization of reflectors constitutes a fundamental task in the field of mobile robotics, since this information contributes in a decisive way to other higher level tasks, such as the generation of environment maps and the robot's localization. With respect to the process of reflector classification, the techniques more broadly used are based on geometric considerations obtained from the TOFs for every reflector type [1,2]. An important inconvenience of the systems based on geometric considerations is their high dependence on the precision with which the measurements of the TOFs are carried out, and consequently, the classification results are strongly influenced by noise.
Principal Component Analysis (PCA) has been used to reduce the dimension of data sets and object recognition in different works related to image processing [3][4][5][6]. The classification and localization technique for 3-D reflectors based on PCA using an ultrasonic sensor is explicitly discussed in [7], in which it is applied to 18 TOF values originated from a sensor that contains two emitter/receiver transducers and 12 receivers, (see Figure 1). The pulses emitted by E 0 /R 0 are processed by itself (E 0 /R 0 ) and by transducers E 1 /R 1, R 2 , R 3, R 4, R 5, R 6, R 7, and R 8 . The pulses emitted by E 1 /R 1 are processed by transducers E 1 /R 1 , E 0 /R 0, R 5, R 7, R 9, R 10, R 11, R 12 , and R 13 . In [7][8][9][10][11] to reduce the number of transducers, the simultaneous emission of complementary sequences by two or more emitters is proposed. Figure 1. View of sensor structure proposed in [7].
The PCA is applicable only for data in vectorized representation. Therefore, the data obtained from a matrix sensor must have been previously converted to a vector form. A typical way to do this is the so-called "matrix to vector alignment", which consists of concatenating all the rows in the matrix together to get a single vector. Figure 1 shows two matrix sensors of nine transducers. The TOFs t 0_2 , t 0_6 , t 0_3 , t 0_8 , t 0_0 , t 0_5 , t 0_4 , t 0_7 , t 0_1 obtained from reception of sequence emitted by E 0 /R 0 and the TOFs t 1_0 , t 1_5 , t 1_7 , t 1_9 , t 1_10 , t 1_11 , t 1_12 , t 1_13 obtained from reception of sequence emitted by E 1 /R 1 are aligned to get a single vector (1). Receiver R 2 and R 8 are neighbours in the sensor, while they are far away from each other in the vectorized representation. The same observations hold for positions R 0 and R 6 , etc. Due to the vector alignment the spatial information is missed. Also it can be remarked that the original 3 × 3 matrixes are converted to an 18 × 18 scatter matrix in PCA, which leads to higher time and memory space costs: In [8], the sensorial structure is formed by four transducers which can simultaneously obtain 16 TOF values at every scanning process. These 16 TOF values are aligned in a vector that is used in the classification algorithm based on PCA.
In [12] the generalized PCA (GPCA) algorithm is used for image compression. The GPCA algorithm deals with the data in its original matrix representation and considers the projection onto a space, which is the tensor product of two vector spaces. In this paper, we use the GPCA for recognition and localization of ultrasound reflectors which aim to overcome the drawbacks in the traditional PCA. We used a matrix of 16 transducers (using four of the centre sensors as emitters/receivers and the other 12 as receivers). Thus, we can obtain up to four 4 × 4 matrices, each of which performs a classification procedure independently. The results of the four classification processes merge to give the final result.
The rest of this paper is organized as follows. Section 2 illustrates the proposed sensor structure. Section 3 describes the GPCA algorithm. Experimental results are presented in Section 4. And, conclusions are offered in Section 5.

Sensor Structure
The sensor structure used to extract information in a 3-D environment and to subsequently classify and locate ultrasonic reflectors with the obtained data (TOF sets) from echoes is shown in Figure 2.   The physical structure of the ultrasonic sensor consists of 16 transducers, four of them working as emitters and receivers (E 1 /R 6 , E 4 /R 7 , E 3 /R 10 and E 2 /R 11 ) and the others only working as receivers. All the transducers are located in a plane (plane xz), with the axial axis in the y-direction. Furthermore, the separation between transducers is determined by the distance a (a = 0.17 m).
With the proposed sensor structure it is possible to obtain up to 64 TOFs at every emission/scanning process. To do this, it is necessary to assign a different macrosequence to every transducer to encode their emissions. These macrosequences, obtained from complementary sets of sequences, allow simultaneous emission and reception to be carried out with all the transducers for the same scanned environment [8,11].

GPCA Algorithm.
In this paper, the usage of GPCA is proposed to carry out the reflector classification using the measurements of 16, 32 and 64 TOFs provided by the ultrasonic sensors. This method maintains the spatial distribution of sensor data, which is represented by the TOFs in a matrix format (2): In (2), t 1 … t 16 are the TOFs associated to each receiver and Therefore, in our case we can obtain up to four matrices ( In GPCA we compute an optimal (l 1 , l 2 )-dimensional space, such that the projections of the data points (subtracted by the mean) onto this axis system have the maximum variance among all possible (l 1 , l 2 )-dimensional axes systems. Unlike PCA, the projections of the data points onto the (l 1 , l 2 )-dimensional axis system in GPCA are matrices, instead of vectors.
Let consider S = {τ 0 , τ 1 , τ 2 , …τ n-1 } be a training set of n samples of TOF matrix. The mean TOF matrix of the set is defined by: Matrices with mean zero are represented as: Then the variance of the projections of Φ i onto the (l 1 , l 2 ) dimensional axis system is defined as:  (5) where || || F is the Frobenius norm and L  1 IR l r and R  2 IR l c are two matrices with orthonormal columns, such that the variance var(L,R) is maximum. The maximum value of (5) cannot be found in closed form and thus an iterative approach is needed:  For a given R, the optimal matrix L consists of the l 1 eigenvectors of the matrix M L which correspond to the largest l 1 eigenvalues, where:  In the same way, given L, the matrix R consists of the l 2 eigenvectors of the matrix M R , corresponding to the largest l 2 eigenvalues, where: In the realized experiments we used l 1 = l 2 = 2 ( ) and l 1 = l 2 = 1 (L  IR 4×1 and R  IR 4×1 ).
To calculate the L and R matrices that maximize Equation 5, it is necessary to initially fix one of them. Fixing L, we can calculate R by computing the eigenvectors of the matrix M R , and then, with the calculated R we can then update L by computing the eigenvectors of the matrix M L . It is necessary to repeat the procedure until the result converges. The solution depends on the initial choice of L (L 0 ). As it is recommended in [12], we use L 0 = (I, 0) T , where I is the identity matrix. To measure the convergence of the GPCA procedure we use the root mean square error (ζ), defined as follows: In the realized experiments for ζ = 10 −8 the procedure converges within five iterations. Once the transformation matrices L and R are determined and given a new TOF matrix τ i to be classified, its zero-mean version Φ i is transformed into the feature space as: Then we can reconstruct Φ i as: The reconstruction error (ε R ) for i Φ can be computed as:

Offline Generation of the Classes
The objective of this work is to classify one of the three reflector types (plane, corner, and edge) and its approximate direction (azimuth angle γ, elevation angle θ) and distance (r) with respect to the frontal space of the sensor. Before beginning the classification process, it is necessary to create different classes, depending on the reflector type and its spatial location. Every class has two (11) transformation matrices L, R associated to it. These matrices are referred as L P and R P for the plane, L C and R C for the corner, and L E and R E for the edge.
As it is stated in [7,8], we assume that the frontal space of the sensorial structure is formed by Q

Classification and Position Estimation of the Reflector
The strategy proposed in this paper to carry out the online classification process is to first classify the type and approximate direction in which the reflector is located and then to estimate its distance with respect to the frontal space of the sensor.
To classify the type and approximate direction of the reflector, we calculate the square reconstruction error (ε), using the transformation matrices associated to every direction q and every reflector type: The reflector is classified as a plane if C q min Once the type of reflector and the direction in which it is positioned are known, the approximate distance with respect to the sensor structure can be determined. The Frobenius norm in the transformed space between the feature vector τ e for the object to be classified , and every feature vector of the training samples of the class to which this reflector belongs, are calculated. For example, if the object was classified as a plane in the direction q, the TOF vector set used offline to generate the transformation matrix will have been   P qD P q P q P q τ τ τ τ ,..., , , . Therefore, it is only necessary to compute the Frobenius norm in the transformed space among the feature vector corresponding to the TOF vector τ e , and the feature vectors corresponding to the training samples, as is shown in: The value corresponding to d, that provides the minimum ε d , will be the approximate reflector distance, in the direction q.
It has been proven empirically that the relationship among the distances of the reflectors to the sensor structure, and the Frobenius norm of their feature vectors in the transformed space, is approximately linear. In this way, considering the distance interval, where the reflector is, and the Frobenius norm in the transformed space, a correct estimation can be obtained by means of a linear interpolation of the distance at which the reflector is positioned.

Processing Time Using PCA and GPCA.
To compare the processing time of the GPCA classification method with the PCA method, we analyze the number of multiplication operations required to classify the type of the reflector from the reconstruction error. To do this, we consider a generic sensor as proposed in Figure 2 with r rows and c columns. With TOF's obtained a r × c matrix and a vector of dimension r.c are built for GPCA and PCA methods respectively. It's also considered that a number l of eigenvectors are selected and that the sensor has m emitters.
In PCA, the reconstruction error is given by the following expression: where L is the transformation matrix and  is the measurements column vector with mean zero. The dimensions of the vector  and matrix L are r· c· m (   (r.c.m) ) and (r· c· m) × l (L   (r.c.m)×l ) respectively. We can obtain the number of multiplication operations required broking expression (13) down in different terms (14) and (15): (13) Therefore, taking the dimensions of vector  and matrix L into account, to calculate the terms E = L T  and F = LE l.(r.c.m) multiplications are needed. To obtain the Euclidean distance, r.c.m multiplications are needed. So, the total number of multiplications required to classify the type of the reflector using PCA is: In GPCA the reconstruction error is given by: where L and R are transformation matrices and  is the measurements matrix with mean zero. In this case, the dimensions of matrices , L and R are r × c (   r×c ), r × l 1 (L  Then, the total number of multiplications required to classify the type of the reflector using GPCA is: The number of multiplications for both methods particularized for r = 3, c = 3 and using different numbers of emitters (m) and eigenvalues (l, l 1 , l 2 ) are shown in Table 1. One can see that the total number of multiplications using GPCA is slightly lower than using PCA. However, its main advantage is that because the classification is performed independently with the TOFS obtained for each emitter and added to the obtained values, it is possible to make a parallelization of the calculations when using a multiprocessor system. That is, for two emitters (m = 2) using a dual processor system, the processing time can be reduced by more than half using GPCA (160 using PCA and 68 using GPCA).

Simulation Results
A simulator has been used in order to carry out the simulations; this allows TOFs to be obtained in three-dimensional environments, based on the sensor model proposed by Barshan and Kuc [13] and using the rays technique [14]. The system employs a frequency of 50 Khz. To this frequency we can suppose a specular model. This simulator is the same as that used in [7] and it is validated with real measurements. The measures used to compare the two methods of classification, PCA and GPCA, have been obtained under the same conditions.
To evaluate and compare the GPCA classification method with the PCA method, we generate TOFs simulating the sensor structure of Figure 2. To obtain the transformation matrices, the reflectors have been located at distances from 50 to 350 cm, with 30-cm intervals. The azimuth and elevation angles were from -12º to +12º , with intervals of 2º .
In the simulations carried out, we analyze the percentage of successful classifications, using different values for the number of emitters (m) and different values of the number of used eigenvectors (l = l 1 = l 2 ) corresponding to the largest eigenvalues. In all the cases, the results are obtained adding to the TOFs a zero mean, independent and identically distributed (i.i.d.) Gaussian noise with typical deviation of 15 µs. The distance for plane, edge, and corner-type reflectors placed at distances from 50 to 350 cm, with intervals of 20 cm, and an azimuth angle of 7.5º . For each type of reflector at each distance 500 tests were conducted. We also performed simulations for different azimuth and elevation angles and the results are similar to the ones showed in this section.
In Figure 3 the classification percentage for l = 2 and m = 2, using PCA and GPCA methods, is shown. In this figure we can observe that the percentage of successful classifications using the PCA algorithm is greater than using the GPCA for distances greater than 200 cm. This is due to, the GPCA algorithm need a amount of input data greater than PCA for a appropriate classification. In both cases we obtained a 100% success rate for distances below 200 cm. If we maintain the same number of emitters and use only the eigenvector corresponding to the largest eigenvalue, the percentage of success is greater than 95% up to 300 cm and then decreases very sharply, as shown in Figure 4. The simulations carry out with other values of noise and a single eigenvector have shown that, using PCA and GPCA the percentages successful classifications of corners and planes fall sharply for distances greater than 330 cm. This is due to the loss of dimensionality in the transformed space.
If one wants to increase the percentage of hits in the classification, we can increase the number of emitters. In Figure 5 the results obtained for m = 4 are shown. In this figure we can see that the percentage of hits is over 98% up to 350 cm. In this case the processing time for PCA is approximately twice that with two transmitters. However, using GPCA we can get a time similar to that obtained for a single emitter, if we use parallel processing. In applications that do not require classifying objects at distances greater than 290 cm, you can use a single eigenvector to obtain 100% success. In Figure 6 the results obtained for m = 4 and l = 1 are shown. In this figure we can see that the percentage of success is 100% up to 290 cm and then decreases very sharply.
The GPCA approach better organizes the data in the sense of adjacent components in the matrix representation correspond to physically adjacent readings in the sensor array. This allows, with smaller transformation matrixes to achieve similar results to those obtained with PCA and the computational cost is lower.
The results obtained in estimating the distance are similar using PCA and GPCA methods. However, using GPCA has the advantage of a lower computational cost. The computational cost in the estimation of distance can be analyzed in the same way as is analyzed in the classification process.
Although all the results presented come from simulations done with non-correlated noise, tests with correlated noise have been carried out. It has been verified that the proposed algorithm is very robust against that kind of noise. In these tests, the classification is successful even when the correlated noise has higher standard deviations than the non-correlated noise.

Conclusions
In this paper, a classification algorithm based on the GPCA techniques have been proposed, with which three types of basic 3-D reflectors can be classified: planes, corners, and edges. The excellent behaviour of the GPCA proposed classification algorithm for a wide range of distances between reflectors and sensor systems has been demonstrated by means of simulations, under extreme noise conditions regarding measurements. Experiments show similar performance between GPCA and PCA, in terms of successful classification percentage. However, GPCA uses transformation matrices that are much smaller than PCA. This significantly reduces the space to store the transformation matrices and reduces the computational time in the classification procedure. Also, as the processing of the data is obtained for each emitter it is processed independently and processing time can be significantly reduced using parallel processing.