Two-channel signal using a real FFT calculation algorithm simultaneously

Foreword

In practical application scenarios project, the province most often need resources. The DSP resources and the FPGA BRAM precious resource is.

For real signals there are a plurality of channels simultaneously FFT needs to be done, it is common practice for each channel with a FFT IP, FFT IP is input RE + 0 * j. I.e. the imaginary part of the input FFT IP directly set to zero.

Is it possible that this imaginary parts of wasted resources used up, the answer is yes.

 

Reference Documents

http://www.doc88.com/p-0394736871727.html

https://wenku.baidu.com/view/e89895af9ec3d5bbfc0a7403.html

 

Basics

What is the complex conjugate right?

If a complex of a + b * j, then its conjugate is ab * j. Both called complex conjugate pairs.

Rule of FFT is what?

As shown below, the output of N-point FFT, the first point is a DC component, starting from the second point is about 2N / 2 at this point is conjugate symmetric. The second such point is the point with the N-th conjugate symmetric.

Algorithmic process

There are two simultaneous real signal needs to be calculated, can be used N-point FFT 1 can be calculated in parallel N-point two-way real signal achieved.

(1) Let x1 (n) and x2 (n) is a sequence of two N-point real.

(2) construct a new sequence: x (n) = x1 (n) + x2 (n) * j.

(3) FFT calculation x (n) to give X (K) = RE (K) + IM (K) * j.

(4) the use of symmetry, there are: an FFT (X1 (n-)) = [X-(K) + X- * (of NK)] / 2

FFT(x2(n)) = -j*[X(K) - X*(N-K)]/2

Thereby achieving x1 (n), x2 (n) of the FFT.

Note: X- * (of NK) to X (NK) conjugate. In the above fourth point is not considered a DC signal, can be set to 0 for direct engineering applications meaningless, DC signal point.

 

Maltab algorithm verification

So that Fs = 6M, x1 signal 600k, x2 signal 1200k, FFT points is 8,192.

matlab code may be as follows:

%%powered by kingstacker
%%
clc;                             %clear
clear all;
close all;
Fs = 6e6;
L = 8192;
n = 0:L-1;
x1 = load('600k_signal_8192.txt');
X2 = Load ( ' 1200k_signal_8192.txt ' );
 %% configured FFT signal
y = x1 + x2*j;
The Y = FFT (Y, 8192 );
 %% 
the X1 ( . 1 ) = 0 ;% first current point is set to 0
An X2 ( . 1 ) = 0 ;
 for I = 2 : 8192 % starting from the second point
    X1(i) = 1/2*(Y(i)+conj(Y(8194-i)));
    X2(i) = -1/2*j*(Y(i)-conj(Y(8194-i)));
end
x = n*Fs/(L*1e3)-Fs/(2*1e3); %x axis
plot(x,fftshift(db(abs(X1))));
hold on ; 
plot(x,fftshift(db(abs(X2))));
title ( ' same result FFT algorithm ' );
figure ;
plot(x,fftshift(db(abs(fft(x1)))));
hold on;
plot(x,fftshift(db(abs(fft(x2)))));
title ( ' X1, X2 respectively FFT calculation result ' );
figure;
X1_reshape = reshape(X1,[8192,1]);
X2_reshape = reshape(X2,[8192,1]);
erro1 = abs(X1_reshape - fft(x1));
erro2 = abs(X2_reshape - fft(x2));
plot(erro1(2:8192));
hold on;
plot(erro2(2:8192));
title ( ' different computing the relative error ' );

The results as shown below:

You can see the output result calculated by the calculation result with the respective FFT algorithms FFT with a small error, consistent results.

The next step is a concrete realization of the FPGA friends.

 

 the above.

 

Guess you like

Origin www.cnblogs.com/kingstacker/p/11328842.html