Design of Electromagnetic Ultrasonic Data Acquisition and Analysis System Based on USB

Aiming at weakness and diversity characteristics of electromagnetic ultrasonic signals and demand of portable devices based on electromagnetic acoustic transducer(EMAT), an electromagnetic ultrasonic data acquisition and analysis system was designed. Data exchange between computer and acquisition circuits was realized through USB. Controls of electromagnetic ultrasonic transmit/receive circuits and acquisition of echo data were implemented utilizing FPGA. Software was developed by LabWindows CVI. Experiment showed that the system not only had comparatively high sampling rate and accuracy, but was also very easy to use.


Introduction
Electromagnetic Acoustic Transducer(EMAT) is a non-contact electromagnetic ultrasonic transmitting and receiving devices.It can easily generate surface waves, body waves, guided waves and so on without the use of acoustic coulping agent.It hss gradually became the mainstream of ultrasonic testing home and aboard.
Currently, the domestic electromagnetic ultrasonic technology has been widely used for defect detection of wheel, steel, pipe and composite materials.
The excitation and receiving of ultrasonic waves are realized by the way electromagnetic coupling, the signal amplitude is much smaller compared with that of the traditional piezoelectric ultrasonic.And Electromagnetic ultrasonic signals are often submerged in noise of a complex background.So It's very difficult to achieve a high signal to noise ratio(SNR) using traditional analog filter.However, with the development of VLSI and computer technology, the technology of digital signal processing has been widely used, the electromagnetic ultrasonic signals can be easily handled with the methods of digital signal processing, echo signals extracting, defection detection, characteristics of defects identifying and so on.whilethere are too many ways of digital signal processing, so experiments have to be done and the algorithm has to be changed before it can be efficiently used in the system.So,an electromagnetic ultrasonic data acquisition and analysis system need to be designed in order to facilitate the achievement of transmtting and receiving of EMAT signals, the control of transmitting and receiving, and the verification of the algorithm.
At present, it's very common to see piezoelectric data acquisition and analysis systems, while it's very rare to see a portable data acquisition and analysis system based on electromagnetic ultrasonic due to the weakness of EMAT signal and the interference of noise.
Based on the actual application requirements, a data acquisition and analysis system was designed based on EMAT using USB interface to communicate with the host computer.Virtual instrument software Labwindows CVI is also used to analysis and display the EMAT signals.Experients showd that the system not only had comparatively high sampling rate and accuracy, but was also very easy to use.

Overall system block diagram
Currently, EMAT operates at a frequency of more than 10MHZ and the received signal is very weak, so the acquisition system should have a high sampling rate and sampling precision.There are various ways in exciting electromagnetic ultrasonic waves, so methods are needed to change the transmitting pulse frequency, cycles of the system flexibly.In addition, considering the complexity of environment where electromagnetic ultrasonic applications are used, the USB data transmission which has the advantage of excellent portability is no doubt the first choice.
According to actual requirements of application, the sampling rate of the electromagnetic ultrasonic data acquisition should up to 40MSPS, 12-bit, and a maximum 1MB sampling depth.The number of ultrasonic pulse waves of EMAT emission are in a range of 0-100 and frequency from 10kHZ-20kHZ adjustable.
A high-speed USB2.0 chip has been choosed in the system in order to achieve high-speed data acquisiton.The advantage of high-speed and flexibility of FPGA has been utilized so as to achieve data acquisition and transmission control.Large-capacity SRAM has been used as a data cache, which also improves the sampling depth.Labwindows CVI has outstanding performance with graphics and rich library software tools and it has been used so as to reduce the difficulty of programming.
The overall system block diagram of USB-based electromagnetic ultrasonic data acquisition and analysis system is shown in Figure .1.The host PC uses USB interface to communicate with CY7C68013A.When the system starts to work, transmitting waves, frequency, repeat cycle, sampling rate of the data acquisition circuit and sampling time can be setted through the software interface, then these parameters are passed to configuration registers of FPGA through USB interface.The emission of electromagnetic ultrasonic is controled by FPGA and the AD conversion which is started soon after the trigger of emission.The data connected are then stored in SRAM.
After data collection, an interrupt signal is sent to CY7C68013A from FPGA, then the USB chip starts its internal general programmable interface(GPIF) configuration of the timing sequence.The data stored in the SRAM are first transmitted to the internal FIFO in CY7C68013A and then to the host PC under the timing sequence set above.
The data collected are then processed and displayed by the host PC using LabWindows CVI, the system analysis software is also designed using LabWindows CVI and the USB user interface is designed using VC++, because the Cypress has provided a development Kit for the USB chip which includes drivers and interface programs making the development of it an easy one.

The design of interface between USB and FPGA
GPIF is the main controller of the endpoint of FIFO of the USB interface chip CY7C68013A, it has four user-defined waveform descriptors.In general, one for the FIFO reading, one for the FIFO writing and one for single byte/word reading, and the last one for single byte/word writing.External pins of GPIF are output pins (CTL[5:0]), input pins (RDY[5:0]), data bus pins (FD[15:0]) and the address line pins (GPIFADR[8:0]).
The connection between CY7C68013A and FPGA are shown in Fig 2 .PLL clock signals are output to IFCLK at a frequency of 40MHZ, under which the data are read from the SRAM.CTL0, CTL1, CTL2 are respectively byte writing, word reading and the trigger signal of FIFO reading.RESET is the global reset signal of the FPGA and FPGA uses the START pin to control the data collection.D_RDY is an interrupt signal from FPGA when the data collection is finished notifying USB that the data is ready, you can start data transmission now.
There are five 16-bit registers that are used in FPGA.it's depth_L, depth_H, pluse_num, pluse_period, and sample_div.They are used respectively as data sampling depth of low and high, the number of cycles, the period of the signal, and sampling division ratio and all of these values can be read through CY7C68013A.In addition, a 12-bit AD is used in this system, considering the registers and SRAM used in this system are all in 16-bit format, so the higher 4-bit need to be set 0 in order to extend 12-bit to a 16-bit format.The sampling time can be calculated by the formula: When the CY7C68013A is notified by the host PC to collect data, the USB interface chip then sends FPGA a starting signal and FPGA starts AD conversion, the data from AD conversion are then stored in SRAM.
Taking the steel plate for example, assuming that the electromagnetic ultrasonic waves travel in the steel at a speed of 3000m/s, according to the above discussed,the distance S can be expressed as follows: After the data acquisition, FPGA then sends CY7C68013A an interrupt signal, the chip uses the GPIF to transfer data from the SRAM to FIFO in the chip, then data are transfered to the host PC through the USB interface.

The data analysis software
The user interface of data analysis and processing is realized using LabWindows CVI, the parameters of electromagnetic ultrasonic transmitting and receiving, data sampling and ultrasonic echo data acquisition can be set through the user interface.
ANSI C is the core of Windows CVI, it uses the powerful and flexible platform of C language for data acquisition, analysis and display.It simplifies the design of user interface and allows the user to generate a variety of applications easily.To further enhance the SNR of the system for analysis and calculation, the method of correlation detection is used for the processing of echo signal.
The correlation detection is used to describe the relationship of values at different times in various random processes or the same random process, which has a advantage of eliminating noise.
So, a method is used to extract envelop signals from the complex ultrasonic echo signals based on self-correlation detection.The schematic diagram of self-correlation detection is shown in Fig. 3.As the position of the probe is fixed, so the defected echo signals from these two signals are almost the same.The noise signal is random in these two sets of signals, so the defected echo signals can be extracted using the relevance nature of echo signal and the random nature of noise signal.
In the Fig. 3, two band-pass filters and a low-pass filter are used which are realized through the Functions Bw_BPF() and Bw_LPF() both of which are attached in the Butterworth functions of LabWindows CVI to achieve a better filtering effect.The location of all echo signals can be calculated through the sets of the thresholds of waveforms from self-correlation detection.
A new data collection thread is built in the system process of LabWindows CVI which is mainly focus on the electromagnetic ultrasonic data collection and processing.The acquisition and analysis software flow chart is shown in Fig. 4.

The testing and Vertification of the system.
In order to vertify the availability of the USB-based data collection and analysis of electromagnetic ultrasonic signals, a test is made on a 60mm thick aluminum plate in order to measrue the thickness of the plate, we can see two waveforms in the host PC as shown in Fig. 5.Among them, the upper signal is the original one and the lower waveform is the upper one processed using the method of autocorrelation.The pulse frequency of the electromagnetic ultrosonic signal is 2.08MHZ, containing 7 frequencies, the sampling frequency is 40MHZ and the sampling time is 200us with a 20HZ repetition rate.We can see that the processed waveform has a higher SNR, and we can have several echo time after the setting of the threshold, by introducing the propagation speed of echo we can calculate the distance it travels.The finally calculated four echo distances are shown in Fig. 6 and the measurement error is less than 1%.

Conclusion
The USB bus is used for the data collection of electromagnetic ultrasonic signals, the sampling rate can up to 40MSPS and a maximum 1MB sampling depth.the frequency,cycle numbers and repeat cycle of electromagnetic altrasonic signals can be easily changed through the change of sampling rate and depth.The user interface based on LabWindows CVI can communicate with the USB devices flexibly, it can process and display the real-time electromagnetic ultrasonic echo signals, it also can automatically calculate the location of electromagnetic ultrasonic echo signals.The system provides a good experimental research platform for the further study of processing of electromagnetic ultrasonic signals.
received signals by EMAT in different inspection cycles and v o is the processed signal.Both signals are been collected from the time of emission.

Figure 1 .Figure 3 .
Figure 1.Structure diagram of electromagnetic acoustic data acquisition and analysis system

Figure 4 .
Figure 4. Flowchart of electromagnetic acoustic data acquisition and analysis system