Target reflection echo detection algorithm and its FPGA implementation: an overview of algorithms

Source: Internet
Author: User
Tags reflection sin truncated

target reflection echo detection algorithm and its FPGA implementation One: Algorithm Overview

A time ago, a project was contacted with a sonar target reflection echo detection. The core function of the sonar receiver is to recognize the echo of the excitation signal emitted by the transmitter in the reflected echo which contains a lot of noise. I will share a few articles on this FPGA-based ECHO recognition algorithm development process and the original code, welcome to enlighten us. The following original content welcome users reprint, but please specify the source: Https://www.cnblogs.com/helesheng. Firstly, this paper introduces the main design ideas of the cross-correlation reflection echo detection algorithm based on FPGA.

The principle of sonar ranging is very simple, as shown in that the sperm whale emits a specific sonic signal underwater and listens to the echo of the sound of interest to the object (the squid) that is reflected. The sperm whale can "extrapolate" the basic physical information of the squid's azimuth, distance, velocity, and surface hardness, based on the time, amplitude and phase of the echoes.

Figure 1 Sonar Fundamentals

Here we only discuss the simplest physical information-the distance. The sperm whale can "calculate" the distance from the prey according to the time the reflected wave arrives: L=VXΔT/2

Figure 2 Sonar ranging

The problem of sonar ranging can be simplified as follows: How to accurately locate the reflected echo of transmitting signal in the received signal. There are two reasons why the reflection signal is difficult to locate: the signal strength is greatly reduced after the reflection signal is reflected by the target and long-distance transmission, and a lot of noise further reduces the signal-to-noise ratio of the received signals.

Above is the ideal echo signal for a sinusoidal signal (about 6 cycles) with a length of 64 sampling points and a Blackman window. Below is the simulation echo signal produced by MATLAB, which adds standard deviation of 800 white noise. It can be seen that it is not easy to get the position of reflected echoes without any algorithm.

Fig. 3 The theoretical echo signal and the simulated echo signal after adding the noise

One of the most direct ideas is the short-time Fourier transform of the signal (Short-time FFT). The MATLAB code that simulates this process in MATLAB is as follows.

Percent percent this script is used to verify the algorithm of short-time Fourier transform detection echo

i=1:60;

S=2000*sin (2*PI*I*6/60);% added a signal template for the Blackman window

s=[0,0,s,0,0];

S=s.* (Blackman (64)) ';

Sl=[zeros (1,100), S,zeros (1,100)];% extended signal on both sides

Figure

Subplot (2,1,1);

Plot (SL); grid;

Title (' Theoretical echo signal ')

N=randn (1,264) noise signal with *800;% variance of 800

slp=sl+n;% expansion signal after adding noise

Subplot (2,1,2);

Plot (SLP); grid;

Title (' Real signal of the simulation echo after adding white noise ')

[S,f,t,p]=spectrogram (SLP,64,63,64,50E3);%SLP is a signal, 64 is the length of the window, 60 is the length of the overlapping portion of each Fourier transform, 64 is the length of the Fourier transform, and 50E3 is the sampling rate.

Figure

Surf (ABS (S));

Xlabel (' time ')

Ylabel (' frequency ')

Zlabel (' signal strength ')

Title (' Time-frequency graph with short-time Fourier transform ')

The time-frequency diagram of the simulated echo signal is shown below. It can be found that the short-time short-time Fourier algorithm can successfully detect the time of echo occurrence.

Fig. 4 time-frequency graph obtained by short-time Fourier transform

However, the method of searching reflected echoes with short-time Fourier transform has the following disadvantages:

1. The calculation of multiplication and calculation of FFT algorithm is N*log (N), for example, when the window length is 64 o'clock, the multiplication and operation times are 64*6=384 mac (multiply Plus) operation. In order to obtain the best time-domain resolution and target positioning accuracy, high enough short-time Fourier window overlap rates (overlap rate) are required. For example, to obtain the highest positioning accuracy at a fixed sample rate, an FFT should be performed after each sample, and the amount of computation to be performed for each A/d sampling interval is 384 macs.

2, the short-time Fourier transform needs to the signal window truncation for a shorter length, respectively, to improve the resolution of the results in the time domain, and the window will be at the truncated boundary to generate energy leakage effect. And this is reflected in the Shimantu, the boundary of the large disturbance, the impact of the algorithm on the location of the echo judgement.

3, the short-time Fourier transform is only valid when the excitation signal is the positive/cosine signal. If the excitation signal is not a unique spectral line in the frequency domain (that is, the non-positive/cosine signal), then the reflected echo will also contain other frequency components, it is difficult to implement an FFT to determine which is the excitation of which is noise.

A better algorithm enables cross-correlation by calculating the excitation signal m (t) and the reflection echo s (t):

(1)

To search for the position of reflected echoes on the timeline. Its physical interpretation is: in the echo signal search and excitation signal m (t) "most similar" place, so as to locate where the most like the echo signal. Is the result of a theoretical echo signal that does not add noise.

Fig. 5 cross-correlation between theoretical echo signal and excitation

Obviously, because the excitation signal has certain periodicity, causes the cross-correlation result to have the more complex periodic structure. It is unwise to use the result of the formula (1) directly to calculate the position of the echo, and it is necessary to further reduce the high frequency periodic toggle in the result by the integral link. Of course, due to the cross-correlation result R (Tau) of the DC component is 0, directly to its integral also does not. The sum can be squared to produce a signal proportional to the power of R (Tau), and only positive signals are used to calculate the integral. I have designed the objective function shown below to characterize the similarity of the echo signal to the excitation signal.

(2)

Where t0 is the length of the final integral summation window, if the length of the excitation signal is also taken, that is, 64, the ideal signal simulation results as shown.

Figure 6 Simulation of cross-correlation results squared

Figure 7 Results of truncated integrals for squared results

The MATLAB simulation code of the algorithm with the same stringent additive noise parameters as the short-time Fourier transform is shown below.

% This script is used to verify the echo convolution algorithm

i=1:60;

S=2000*sin (2*PI*I*6/60);% added a signal template for the Blackman window

s=[0,0,s,0,0];

S=s.* (Blackman (64)) ';

Plot (s); grid;

Title (' 5K signal of 64 dots @50ksps ')

Sl=[zeros (1,100), S,zeros (1,100)];% extended signal on both sides

Figure

Subplot (5,1,1);

Plot (SL); grid;

Title (' Theoretical echo signal ')

N=randn (1,264) noise signal with *800;% variance of 800

slp=sl+n;% expansion signal after adding noise

Subplot (5,1,2);

Plot (SLP); grid;

Title (' Real signal of the simulation echo after adding white noise ')

Tp=conv (slp,s);% add noise after the simulation of the actual signal and template convolution (due to the excitation signal left and right symmetry, here the convolution function conv () Calculation of cross-correlation)

Subplot (5,1,3);

Plot (tp); grid;

Title (' Result of actual signal and signal template convolution ')

Tp1=tp.^2;% calculates the square of the convolution result (energy)

Subplot (5,1,4);

Plot (TP1); grid;

Title (' Square of convolution result ')

W=ones (1,64);% rectangular window for summing historical data by convolution

Tp2=conv (W,TP1);% Historical data accumulation

Subplot (5,1,5);

Plot (TP2); grid;

Title (' Historical Data accumulation ')

The results of the operation are as shown.

Fig. 8 Simulation results of cross-correlation algorithm for the echo signal with noise added

It can be seen that the result of the last line has a fairly high signal-to-noise ratio, which can easily distinguish the position of the echoes in the echo signal which is added to the noise (variance is also 800).

In addition, this algorithm solves the problems in the short-time Fourier transform very well:

1, the correlation algorithm multiplication calculates the amount is N, is much smaller than the FFT computation amount n*log (n), when the excitation signal length is 64 sampling points, the computation amount of a sampling period is only 64 times Mac. When the excitation signal is a signal with left and right symmetry, the computational amount can be further reduced to n/2 multiplication and multiplication.

2, the Excitation Plus window function in the calculation of the correlation can be effective to avoid the leakage effect of the window, from the simulation results can be seen (2) type of integration results at both ends of the non-existent interference.

3, can be any kind of excitation signal (such as square wave or sawtooth wave) real-time correlation calculation, its spectrum, even if there are multiple lines or continuous spectrum will not affect the (2)-type integration results.

Careful readers will find that the so-called "short-time Fourier method" and the "cross-correlation search method" Proposed here have the similarities, in the popular language interpretation:

The essence of Fourier transform is to let the signal and the sinusoidal signal of different frequency correlation, in order to calculate the signal and their "similarity", so that the signal at different frequencies of "power density", and further get the spectrum. The advantage of our direct cross-correlation is that we do not need to calculate the correlation of other frequency sine signals and signals within the Nyquist frequency. Of course, since we are searching for the position of the signal with the same frequency as the excitation signal, this "cross-correlation search" naturally eliminates much of the computational weight of the short-time Fourier method.

For the practical implementation of the above algorithm in FPGA, please follow the following blog post " Process Control with VERILOG-HDL Moore State Machine ".

For A/D and D/A conversion that is the process of building the experimental platform, see the previous blog post in this series, " cross-correlation/convolution/fir circuit implementation ."

Target reflection echo detection algorithm and its FPGA implementation: an overview of algorithms

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.