Design and Construction of an Ultrasonic Sensor for the Material Identification in Robotic Agents

Quality assurance in all industrial fields depends on having a suitable and robust inspection method which let to know the integrity or characteristics of the inspected sample. The testing can be destructive or not destructive. The former is more expensive and it does not guarantee to know the condition of the inspected sample. Though, it is used in sectors where the latter cannot be used due to the technical limitations. The second one is an ongoing research field where cheaper, faster and more reliable methods are searched to assess the quality of specific specimens. Once a suitable reliability and quality are achieved by using a specific method, the next step is to reduce the duration and cost of the associated process. If it is paid attention to the fact that most of these processes require of a human operator, who is skilled in the labour of interpreting the data, it can be said that those previously mentioned factors (process duration and cost) can be reduced by improving the automation and autonomy of the associated processes. If a robotic system is used this can be achieved. However, most of the algorithms associated to those processes are computationally expensive and therefore the robots should have a high computational capacity which implies a platform of big size, reduced mobility, limited accessibility and/or considerable cost. Those constraints are decisive for some specific applications. One important factor which should be considered to develop a low cost, small size and mobile robotic system is the design of the software and hardware of the sensor. If it is designed with a depth analysis of the context of the specific application it can be obtained a considerable reduction on the requirements and complexity of the robotic system. The appropriated design of the hardware and software of the sensor depends on the proper selection of the signal pattern which is going to be used to characterize the condition of the inspected sample. For ultrasonic waves the patterns are changes on amplitude, frequency or phase on the received echo because of the properties of a specific target. Some of those properties are attenuation, acoustic impedance and speed of sound, among others. Among the many applications of ultrasound, one of them which is important for the aerospace, automotive, food and oil industries, among others, is the material identification. Depict the fact that there are many ultrasonic sensors which let to identify the material of the sample being inspected, most of them are not appropriated to be implemented in a


Introduction
Quality assurance in all industrial fields depends on having a suitable and robust inspection method which let to know the integrity or characteristics of the inspected sample. The testing can be destructive or not destructive. The former is more expensive and it does not guarantee to know the condition of the inspected sample. Though, it is used in sectors where the latter cannot be used due to the technical limitations. The second one is an ongoing research field where cheaper, faster and more reliable methods are searched to assess the quality of specific specimens. Once a suitable reliability and quality are achieved by using a specific method, the next step is to reduce the duration and cost of the associated process. If it is paid attention to the fact that most of these processes require of a human operator, who is skilled in the labour of interpreting the data, it can be said that those previously mentioned factors (process duration and cost) can be reduced by improving the automation and autonomy of the associated processes. If a robotic system is used this can be achieved. However, most of the algorithms associated to those processes are computationally expensive and therefore the robots should have a high computational capacity which implies a platform of big size, reduced mobility, limited accessibility and/or considerable cost. Those constraints are decisive for some specific applications. One important factor which should be considered to develop a low cost, small size and mobile robotic system is the design of the software and hardware of the sensor. If it is designed with a depth analysis of the context of the specific application it can be obtained a considerable reduction on the requirements and complexity of the robotic system. The appropriated design of the hardware and software of the sensor depends on the proper selection of the signal pattern which is going to be used to characterize the condition of the inspected sample. For ultrasonic waves the patterns are changes on amplitude, frequency or phase on the received echo because of the properties of a specific target. Some of those properties are attenuation, acoustic impedance and speed of sound, among others. Among the many applications of ultrasound, one of them which is important for the aerospace, automotive, food and oil industries, among others, is the material identification. Depict the fact that there are many ultrasonic sensors which let to identify the material of the sample being inspected, most of them are not appropriated to be implemented in a www.intechopen.com robot. The high computational capacity demanded by the algorithm of the sensor is the main constraint for the implementation of the ultrasonic identification of materials in a robot. In this book chapter is addressed this problem and it is solved by the Peniel method. Based on this method is designed and constructed a novel sensor which is implemented in two robots of the kit TEAC 2 H-RI. This book chapter is organized as follows: Section Two briefly reviews some approaches in Material Identification with ultrasonic sensors. Section Three illustrates the novel Peniel method and its associated hardware and software. Section Four describes the results. Finally, section five presents the conclusions and future work.

Material identification with ultrasonic sensors
The material identification using ultrasonic techniques is very important for a plethora of sectors of the industry, research, security, health, among others. In contrast with other methods for the identification of materials, those based on ultrasonic signals not only are cheaper but also some of them let to identify objects which are occluded by others. Following is the general procedure to achieve this: 1. It is used a specific configuration for the receiver and transmitter ultrasonic transducers.
Some of them are: Pulse-Echo, Through-Transmission and Pitch-Catch configuration [NASA, 2007] 2. It is sent an ultrasonic wave to the inspected sample 3. Once the wave has interacted with the object, it returns as an echo to its source and there it is captured by means of an ultrasonic transducer (receiver). 4. Then, the electrical signal goes to a signal conditioning system, which is formed by amplifiers, filters, digital to analog converters (DAC), and so on. 5. Finally, there is the processing module, which is in charge to perform the most important stage of the system, i.e., the signal processing. In this case, it can be used microcontrollers, microprocessors, FPGAs, computers, among other devices. In this processing module the algorithm is implemented, in order to process the respective signal patterns and indicates the material under inspection. In the next lines is illustrated some methods proposed in the state of the art for the material identification and is mentioned their strengths and more important limitations. In [Thomas et al, 1991] is developed an ultrasonic perception system for robots for the task of identification of materials. This system is based on the neural network Multi Layer Perceptron (MLP), which was trained with the characteristics of the frequency spectrum and the time domain of the ultrasonic echo. Its most relevant advantage is that the sample was inspected from different positions; additionally the ultrasonic transducer did not require making contact with the inspected sample. Its more remarkable limitations are that it identifies the material in a stochastic manner, i.e. sometimes the material is correctly identified and other not, and the issue that the sensor was never implemented in a robotic system. In [Gunarathne et al, 2002] is proposed an implementation to identify the material of nonplanar cylindrical surface profiles (e.g. petroleum pipelines) with a prediction accuracy of the result. The method is mainly based on the feature extraction by curve fitting. The curve fitting consists in a computationally generated artificial signal which fits the shape of the experimental signal. The optimal parameters chosen for the artificial signal (AS) are those which make the AS to fit the experimental signal with a low error; those are used for the task of material identification.

www.intechopen.com
Furthermore, for this case is used a database which contains the typical values of the parameters correspondent to specific materials. Its more relevant strengths are the identification of the materials of objects of non-planar cylindrical surface profiles and the accuracy of the results. On the other hand, its more significant limitations are the expensive computational cost of its processing algorithm, the absence of autonomy and the restrictions to the position of the transducer. In [Ohtanil et al, 2006], is implemented an array of ultrasonic sensors and a MLP neural network for the materials identification. Some experiments were performed on copper, aluminium, pasteboard and acrylic, at different angles with respect to the x and z axes. The maximum distance between the sensor array and the target was 30cm. The main strength of the system is that it works in air over a wide range of distances between the target and the sensor system. Additionally, the sensor model is automatically adjusted based on this distance. The results are quite accurate. Its more significant limitation is the big size of the system (only appropriated for a huge robot), the computing requirements and the dependence on the position of the target to achieve the identification of the material.
In [Zhao et al, 2003] is used the ultrasonic identification of materials for the quality assurance in the production of canned products. The configuration of the ultrasonic system is pulse-echo. Water is the coupling medium between the transducer and the target. By means of this set up, it can be detected any shift from a specific value of the acoustic impedance, which is the result of foreign bodies within the bottle. Its main strengths are the accuracy of the system and the high sensibility. Its more relevant weaknesses are the absence of mobility and autonomy. In [Pallav et al, 2009] is illustrated a system which has the same purpose of the previous mentioned system, i.e. also by means of the material identification performs quality control in canned food. The system uses an ultrasonic sensor to identify the acoustic impedance shift within the canned food which is related to foreign bodies within the can. The main difference in comparison to the previous mentioned system [Zhao et al, 2003] is the fact that the Through-Transmission configuration is used, and that the couplant is not water but air. Its more relevant strengths are the successful detection of foreign bodies and the mobility achieve in the X and Y axes. Its more important limitations are the high requirements of voltage, the dependence of the object's position and the narrow range of mobility.
In [Stepanić et al, 2003] is used the identification of materials to differentiate between common buried objects in the soil and antipersonnel landmines. For this case is used a tip with an ultrasonic transducer in its border and this latter is acoustically coupled with the target. The procedure to operate the system is: 1. Select a zone where is suspected the landmine is. 2. Introduced the tip in this zone in order to touch the suspecting object 3. Take some measurements. Based on this measurements the material can be identified and as a consequence it can be detected the presence or absence of landmines. Its more important limitations are the lack of autonomy, because it requires a human operator, and the dangerous fact which involves making contact with the landmine. From the previous mentioned approaches the most significant limitation which forbids the automation in small robotic agents is the expensive computational cost of the processing algorithms. This problem was addressed in a master thesis and the results are exposed in this article.

Peniel method
In the following lines is exposed the Peniel Method, which is a method of low computational cost and therefore its associated algorithm and circuit can be implemented in a small robot. It is important to highlight that only one microcontroller is used to implement this method.
where A is related to the first echo amplitude, B to the rate of decay of reverberations, C to the timing of the first echo from the start of the scan and D to the signal-to-noise ratio.
In [Gunarathne et al, 2002] is mentioned that knowing the decay coefficient (B) the material can be identified. Moreover, in [Allin, 2002] is illustrated that there are several methods that are based on the decay coefficient to identify the material. This variable is important because it only depends on the attenuation and acoustic impedance of the material, if the thickness is kept constant. In most of the solids, the attenuation is low and its effect is negligible in comparison with the acoustic impedance. Based on this the material can be identified if the acoustic impedance is known. In the following lines we present a novel method developed to estimate indirectly the decay coefficient B and therefore it can be used to identify the material of solid plates. Without losing generality, in (1) we assume that D=0 and C=0. If it is sought the time interval during A(t) is greater than or equal to a value w, then the equation which express this is: Replacing (1) in (2) and taking into account the considerations that were made with respect C and D, we obtained: After some algebra we obtained: It means that in the time interval the exponential function is greater than or equal to w. The duration of this time interval is defined as t di,, and then for the previous case it can be said that: The left side term in the expression (3) is an artificial signal which fits the received ultrasonic echo (see page 3). If the received ultrasonic echo is amplified by a Gain G, as will the exponential function (3). Thus it is obtained from (3): It leads to expressions similar to those obtained in (4) and (5): Therefore, for two signals with similar A values, the t di duration is inversely proportional to the decay coefficient B. It can be seen in figure 1 for the case when A = 1, w = 0.5, and B = 1000, 2000, 3000 and 4000. Additionally, it is shown the behavior with G of the difference between t di3 and t di4. This let us to conclude that t di can be used to characterize a material if G, A and w are known. Now, if it is used two different gain values (G1 and G2) for the same signal, the equation (8) yields: If G 1 <G 2 and (9) is subtracted from (10) As it can be seen (14) does not depend on A and therefore is only necessary to know G 2 and G 1 to find B from ∆t 1 . Moreover, if there are two signals from different materials, even though G 2 and G 1 are not known, the material can be identified from the difference between the correspondent ∆ts. In figure 2 is shown the behavior of ∆t as a function of B for different values of G r . As it can be seen in the figure 2 the duration increment of the time interval (∆t) depends on B if G r is kept constant. Also, it can be recognized that if B is kept constant, high values of G r result in high increases on the duration of the time interval (∆t).

The electronic circuit and the algorithm
One of the conditions to identify the material using the expression (8) of the Peniel Method, is that those signals compared in terms of the behavior of the time interval durations should have a similar value A (see equation 1). To meet this requirement it has been used the circuit in the figure 3. This circuit is called clustering circuit. Despite the fact that by means of (14) the material can be identified without knowing A, the clustering circuit is used to make more robust the method.

Clustering algorithm and circuit
This circuit is formed by four amplifiers, four comparators and a microcontroller. Each amplifier has different gains. The gain grows in the direction of AMP4, i.e., the smaller and higher gains belong to the AMP1 and AMP4 amplifiers, respectively. Each amplifier represents a group, in this manner AMP3 represents the group 3 and group 2 is represented by AMP2 The output of the amplifiers goes to the respective comparators. The threshold (w) is the same for the last three comparators and a little bit higher for the first comparator (AMP1). The echo signal belongs to the group which has the amplifier with lower gain but with its comparator activated. In this manner a signal which activates the comparator three only belongs to the group three if the respective comparators of AMP1 and AMP2 are not activated. The output of each comparator goes to the microcontroller and once this detects low levels on any comparator, it identifies what is the amplifier with lower gain which has its comparator activated and therefore it identifies the group the signal belongs to. Consequently, those signals with similar peak amplitude, A (see equation 1), will be in the same group. In this manner is met the requirement that the A value should be similar between signals which are compared in terms of the duration of the time interval.

The Peak voltage detection circuit and the algorithm
In addition to the previous mentioned circuit also the system has a circuit that allows knowing the peak value of the received echo. This peak value is an estimation of A, which is also a parameter of the expression (1) and therefore can be used to identify the material. The associated circuit is shown in Figure 4. The AMP1, 2, 3 and 4 are the same as in the circuit of Figure 3. The ENV1, 2, 3 and 4 are envelope detectors, whose function is conditioning the signal before is sent to the microcontroller. The CD4052 is a multiplexer. The exit of each comparator goes to a specific input of the CD4052, and the output of this latter in the pin 3 goes to the microcontroller. As mentioned above, the clustering circuit identifies which group the signal belongs to; this information is used by the microcontroller to select which of the four envelope detectors should be used to find the peak amplitude. This selection is done by means of the CD4052. Once the microcontroller has chosen the right envelope detector and captured the correspondent signal, it proceeds to search the peak value by successive analog to digital conversions and comparison.

The Circuit and the algorithm for the identification of the changes in the durations
As it was mentioned in section 3.1 the material can be identified by finding the difference between the two durations which are produced for the same signal when it is amplified by two different gain values, i.e. finding ∆t. In order to do this, the circuit of Figure 5 was implemented. In this case AMP1-4 correspond to the same amplifiers mentioned in Figure 3. Amp1.1, Amp2.1, Amp3.1 and Amp4.1 are additional amplifiers. COMP5, COMP6, COMP7 and COMP8 are comparators which even with an amplitude modulated sinusoidal signal, such as the ultrasonic echo, remains activated as long as the envelope of the signal is above the threshold of 2.5V. While the output of this comparator is quite stable, still it has some noisy fluctuations which are necessary to be removed and this is the reason to use the comparators COMP5.1, COMP6.1, COMP7.1 and COMP8.1. The output of these comparators is connected to a specific input in the CD4052, and the output in the pin 13 of this multiplexer goes to the microcontroller.

Results and discussion
In order to prove the effectiveness of the Peniel Method, it was performed some experiments. The characteristics of the experiments are mentioned below: The transducer used for the measurements was the AT120 (120KHz) of Airmar Technology, which is a low cost transducer commonly used for obstacle avoidance or level measurement but not for NDT. This transducer was used both for transmission and reception in the Through-Transmission configuration which was used to inspect the samples. The transmitter circuit is the T1 development board of Airmar Technology (Airmar Technology, 2011). With this transmitter is sent a 130KHz toneburst which has a 40µs duration and a pulse rate of 10Hz. The chosen samples for the inspection were Acrylic (16mm thickness), Aluminium (16mm thickness) and Glass (14mm thickness). Oil was the couplant used between the transducers and the inspected sample. The receiver circuit is the result of integrating the three circuits mentioned in the section 3.2. The circuit is fed by four 9volts batteries. Two of them are for the positive source and the other two are for the negative. The data were processed by the main board of the mom-robot of the kit TEAC 2 H-RI (González J.J. et al, 2010a).which was developed by the authors. In the main board, the microcontroller MC68HC908JK8 is the device in charge to assign tasks or www.intechopen.com process the data of the sensors. The six outputs from the receiver circuit go to the main board and two outputs of the main board go to the receiver circuit. These two outputs control the CD4052. The microcontroller sends the duration and the peak voltage of the signals to the PC. There, the signal is processed by Matlab and the results are plotted. The whole set up of the experiments can be seen in figure 6. In order to assure the repeatability of the results the following procedure was followed: Procedure 1 1. Clean the inspected sample and the transducers face 2. Spread oil over the surface of both transducer faces 3. Push the transducers against the inspected sample 4. Take ten different measurements 5. Repeat this procedure for five times. The ten different measurements refer to send in different moments a toneburst to the inspected sample and capture the received echo. This is done ten times. For the different materials used in this experiment this procedure was followed and the results are in figure 7. Fig. 6. Diagram of the Experimental set up used in procedure 1. The couplant is oil. Tx and Rx refer to the Transmitter and Receiver, respectively In figure 7 Delta t 1 refers to t di2 -t di1 , Delta t 2 refers to t di3 -t di2 , and so on. t di1 refers to the duration of the signal at the output of the comparator which corresponds to the group signal and the other t di, belong to the comparators of the groups with amplifiers with higher gain than the amplifier of the group of the signal, e.g. if the signal belongs to group 2 the t di1 refers to the duration of Comp6.1, and t di2 and t di3 belong to Comp7.1 and Comp8.1, respectively. As it can be seen, for the higher order groups the number of t di will be fewer than for the groups of lower order. As it can be seen from figures 7a-7b, the ∆t is not constant for any material. However, it can be said that this value is always within a defined interval. In [Gunarathne et al, 2002] is mentioned that the decay coefficient B does not have a fixed value from measurement to measurement but it takes different values within an interval. Because of this is defined a Gaussian Probability Density Function for the B value of each material, then the value can be any of those values within the PDF. This fact, confirms that the results obtained here with ∆t are correct because they are congruent with the theory. Though, for the current case it was not necessary to create a PDF but only intervals where the correspondent ∆t belongs. This fact simplifies the material identification task. Following, the intervals are chosen.
www.intechopen.com From figure 7a it can be seen that the ∆t 1 is always within the range (0.025ms, 0.15ms), while ∆t 2 and ∆t 3 are in the ranges (0.16ms, 0.4ms) and (0, 0.1ms), respectively, then these intervals are chosen to identify the acrylic sample. From figure 7b it can be seen that the ∆t 1 and ∆t 2 are always between (0.6ms, 1ms) and (0.2ms, 0.65ms), respectively. Then, those are the intervals for the glass sample. From figure 7c it can be seen that the ∆t 1 and ∆t 2 are always between (1ms, 2ms) and (0.8ms, 1.9ms), respectively. Then, those are the intervals for the aluminium sample.
In figure 8 is shown the peak voltages for the correspondent measurements in figure 7. It can be seen from this figure that the peak voltage also varies in a wide range from measurement to measurement. Then, if this parameter is going to be implemented to identify the material also have to be defined a voltage interval for each material. This parameter can be used to make more robust the measurements but for this moment only the ∆t variable will be used for the identification of the materials.
It is important to mention that both, the peak voltage and ∆t change, are within an interval from measurement to measurement because those variables are very dependent on the characteristics of the couplant used between the transducer face and the inspected sample.

www.intechopen.com
From the previous mentioned results the algorithm was modified and the intervals were used to identify the material. With this new algorithm a procedure (procedure 2) similar to procedure 1 was repeated for all the materials. The only difference in this new procedure is that the average of the ten measurements is taken and this result is compared with the different intervals. In figure 9 can be seen one of the five repetitions of the new procedure.
In table 1 can be seen the performance of the developed sensor for the material identification task. As it can be seen in these experiments the accuracy of the identification is 100% for all the materials. This fact is very important because with a quite easy method and a low cost computational algorithm was performed a task which requires of more complex methods and algorithms of more expensive computational cost.

The robotic kit TEAC 2 H-RI
In the previous sections, the signal was processed using the main board of the mom-robot of the kit TEAC 2 H-RI (González J.J. et al, 2010a) joint with the software Matlab. Then, the Peniel Method was partially implemented in a robotic system. In future work the sensor will be fully implemented in a robotic system formed by two robots of the kit TEAC 2 H-RI. These robots are the mom-robot and the son-robot. Both of them can be seen in figure 10 Fig. 10. Son-robot and mom-robot exploring the environment (González J.J. et al, 2010a) www.intechopen.com

Conclusion and future work
In this book chapter was proposed for the first time in the literature the shift in ∆t as a variable which can be used to identify the material. The method based on this variable, Peniel Method, is much easier and much less computationally expensive than other methods in the literature. This fact is the most important approach of this research because it lets to implement the ultrasonic material identification sensor in two robots. This last result was not found in the literature reviewed. The cost of the ultrasonic AT120 transducer is only $35US which is very low in comparison with other options (>$400US) in the market which are used for the identification of materials. Then, it can be concluded that low cost ultrasonic transducers can be used instead of more expensive transducers if the proper method is used. This is another important strength of the method because it can be used in industrial processes to automate the material identification task at a low cost. Another important conclusion of this work is that if the appropriate methodology is followed to design a sensor, it could be save considerable economical investments in the transducer, the processing system and the other elements necessary to design the sensor. In this case the methodology followed to develop the sensor consists of seven steps: 1) to study in depth the model or physical-mathematical models proposed in the literature 2) to perform experiments to confirm the theory and identify new signal patterns which let to develop new models 3) to redefine or create a new physical-mathematical model which must be simpler than the others and fits to the specific characteristics of the application, which in this case is two small robots to identify materials 4) This new model is the basis of the new method, but again it is necessary to also consider the characteristics of the specific application and all the constraints in order to design the electronic circuit and the algorithm of the method 5) to build the sensor with the proper devices in terms of cost, size and functionality 6) to design the appropriate experiments for the verification of the method 7) to validate the performance of the sensor using the proposed experiments and debug both the algorithm and circuit for optimum performance. As it can be seen not only is necessary to design or redefined the software or hardware but also the mathematical model in order to obtain the sensor which fulfils the requirements of the application at the lowest cost. The next step of this work is to implement completely the sensor in the mom-robot and sonrobot of the kit TEAC 2 H-RI without depending on the processing of the PC to identify the material. Also more materials will be evaluated with the sensor in order to provide to the robot a wider database of materials. Also in future work, will be used the peak voltage as another factor to identify the materials or to differentiate between materials of very similar acoustic properties.

Acknowledgment
We would like to acknowledge to the Science, Technology and Innovation Management Department, COLCIENCIAS, for the economical support to the master student Juan José González España within the Youth Researchers and Innovators Program-2009. www.intechopen.com