6 DFT estimates the gain of the power spectrum

Source: Internet
Author: User
Tags abs

The previous section describes the basic knowledge of using DFT to estimate power spectra, and this section discusses some specific issues. How to gain gains with DFT.

In general, there are two ways: correlation gain and cumulative gain.

The gain is obtained by increasing the number of sample points of the signal. Because for DFT, each x (k) can be considered as a narrowband filter, increasing the number of DfT points, so that the bandpass of the filter is smaller, so that more noise can be filtered, so that the original signal submerged in the noise is detected. For example, for a mono signal, the 64-point DFT is indistinguishable, but when the 256-point DFT is performed, the signal can be distinguished:


But when the signal volume is very large, although the FFT is convenient to calculate, but the signal sequencing will also bring a large amount of computation, so a way to consider is to segment the signal, each section of the calculation results, and then the results are averaged. This is the basic idea of cumulative gain. There are many details, such as averaging the DFT results or the amplitude of the DFT results. Whether it is a direct or overlapping segment. In fact, these are not important issues, it is important to do the average advantage of the segment where. Is that by means of piecewise averaging, although the signal-to-noise ratio cannot be changed, the variance of the noise can be reduced, and the overlapping fragment variance is smaller. Secondly, what is the difference between the average amplitude and the DFT result? When the phase of the signal to it, the average effect of the DFT is better, because the noise tends to offset each other, and if not aligned, then the amplitude of the average bar.

Here is a comparison of the results of these methods:


As can be seen, the first three methods can only be affected by the difference, only the 4th method can significantly improve the signal-to-noise ratio.


Here is the code for these graphs:

Clear all;
Close all;
CLC
RNG (' Default ');
% N = 1024;
FS = 10e3;
f1 = 1875;
a1 = 1;
t = 0:1/fs: (N-1)/fs;
xn = A1*cos (2*pi*f1.*t) +4* ( -1+2*rand (1,n));
Figure
Subplot (3,1,1) plot (xn (1:256));
Title (' Time domain waveform ');
% in the processing of real signal due to the symmetry of the power spectrum, only half can be considered percent relative gain comparison% DFT points less, the signal is submerged in the noise, can not detect N1 = 64;
Xk = Fftshift (FFT (xn (1:n1)));
Freq = 0:1/n1*fs:1/2*fs-1/n1;
res = ABS (Xk (n1/2+1:end));
RESDBC = 10*LOG10 (Res/max (res));
Subplot (3,1,2) plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' 64-point DFT result ');


Grid on;
When the number of DfT points is higher, the signal N2 = 256 can be detected because the SNR is improved.
Xk = Fftshift (FFT (xn (1:n2)));
Freq = 0:1/n2*fs:1/2*fs-1/n2;
res = ABS (Xk (n2/2+1:end));
RESDBC = 10*LOG10 (Res/max (res));
Subplot (3,1,3);
Plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' 256-point DFT result ');


Grid on;
Percent cumulative gain% direct calculation of 256-point signal power spectrum N1 = 256;
Xk = Fftshift (FFT (xn (1:n1)));
Freq = 0:1/n1*fs:1/2*fs-1/n1;
res = ABS (Xk (n1/2+1:end));
RESDBC = 10*LOG10 (Res/max (res));
Figure
Subplot (4,1,1) plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' Direct calculation of 256-point DFT results ');

Grid on; % related Cumulative gain: Segment the signal, each segmentThe amplitude of the FFT is averaged, and the variance decreases N1 = 256;
N2 = n/n1;
Xk = zeros (N2,N1); For i = 1:n2 Xk (i,:) = Fftshift (FFT (xn (1+) i-1)), End res = *n1:i*n1 (zeros), for i = n2,n1/2 res (i,:) = ABS (X
K (i,n1/2+1:end));
End averes = mean (res);
RESDBC = 10*log10 (Averes/max (averes));
Subplot (4,1,2) freq = 0:1/n1*fs:1/2*fs-1/n1;
Plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' Related cumulative gain results (non-overlapping segments) ');

Grid on;
% related cumulative gain: Overlapping segments of the signal, further reducing variance ovlap = 0.5;
Ovlaplen = round (N1*OVLAP);
Segnum = n/ovlaplen-1; For i = 1:segnum Xk (i,:) = Fftshift (FFT (xn (1+) i-1). *ovlaplen:i*ovlaplen+ovlaplen (*hamming) '); End res = N1 (seg
NUM,N1/2); For i = 1:segnum res (i,:) = ABS (Xk (i,n1/2+1:end)), End averes = Mean (res), RESDBC = 10*log10 (Averes/max (averes)); SUBP
Lot (4,1,3) freq = 0:1/n1*fs:1/2*fs-1/n1;
Plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' Related cumulative gain results (overlapping segments) ');

Grid on;
% non-correlated gain accumulation: averaging the signal DFT results, increasing the SNR N1 = 256;
N2 = n/n1;
Xk = zeros (N2,N1); For i = 1:n2 Xk (i,:) = Fftshift (FFT (xn (1+) i-1). *N1:I*N1 (*hamming) '); End N1 = Mean (XK);
Averes = ABS (AVEDFT (n1/2+1:end));
RESDBC = 10*log10 (Averes/max (averes));
Subplot (5,1,5) freq = 0:1/n1*fs:1/2*fs-1/n1;
Plot (Freq,resdbc,freq,mean (RESDBC), '. ') title (' Average result of signal DFT results '); Grid on;



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.