Digital Signal Processing Experiment 2: Conjugate Symmetry and Application of DFT

Purpose

1. Master the characteristics of DFT conjugate symmetry of real sequences;

2. Learn the method of constructing frequency-domain sequences by applying the conjugate symmetry of real sequence DFT to ensure that the time-domain sequences are real numbers;

Experimental principle

1. Conjugate symmetry of DFT

 

in:

2. Conjugate Symmetry of DFT of Finite Length Real Sequences

Set as a finite-length real sequence of length N, it is a circular conjugate symmetric sequence: . This symmetry can be expressed as:  .

Experimental content

1. Try to use the conjugate symmetry of DFT to design two efficient algorithms, so that an N-point DFT can be calculated to obtain the N-point DFT of two real sequences. Assume:

(1) Algorithm 1: Let , calculate its 16-point discrete Fourier transform (hint: when N=16, .

 It is verified whether the obtained result is correct by calculating the sums separately and by summing the IDFT method.

clc,clear,close all
N=16;
n=0:1:N-1;
x1=cos(pi/4*n);
x2=sin(pi/8*n);
xn=x1+x2;
Xk=fft(xn,16);
X1=real(Xk);
X2=imag(Xk);
x11=ifft(X1,16);
x22=ifft(1i*X2,16);

subplot(611)
stem(n,X1)
xlabel('k');
ylabel('real(X1)');

subplot(612)
stem(n,X2)
xlabel('k');
ylabel('real(X2)');

subplot(613)
stem(n,x1);
xlabel('n');
ylabel('x1');

subplot(614)
stem(n,x11);
xlabel('n');
ylabel('x1恢复');

subplot(615)
stem(n,x2);
xlabel('n');
ylabel('x2');

subplot(616)
stem(n,x22);
xlabel('n');
ylabel('x2恢复');

Experimental conclusion 1-1 : The relationship between , and ?

answer:

(2) Algorithm 2: Let , repeat (1).

clc,clear,close all
N=16;
n=0:1:N-1;
k=0:1:N-1;
x1=cos(pi/4*n);
x2=sin(pi/8*n);
xn=x1+1i*x2;
Xk=fft(xn,16);
Xkx=conj(Xk);%取共轭
X1=1/2*(Xk+[Xkx(1),fliplr(Xkx(2:16))]);
X2=1/2*(Xk-[Xkx(1),fliplr(Xkx(2:16))]);
x11=ifft(X1,16);
x22=ifft(X2,16)*(-1i);

subplot(611)
stem(n,real(X1))
xlabel('k');
ylabel('real(X1)');

subplot(612)
stem(n,real(X2))
xlabel('k');
ylabel('real(X2)');

subplot(613)
stem(n,x1);
xlabel('n');
ylabel('x1');

subplot(614)
stem(n,x11);
xlabel('n');
ylabel('x1恢复');

subplot(615)
stem(n,x2);
xlabel('n');
ylabel('x2');

subplot(616)
stem(n,x22);
xlabel('n');
ylabel('x2恢复');

Experimental conclusion 1-2 : The relationship between , and ?

answer:

2. Conjugate Symmetry of DFT of Finite Length Real Sequences

From the conjugate symmetry of the DFT of the finite-length real sequence, it can be known that the sequence with conjugate symmetry in the frequency domain is used as IDFT

The latter is a real sequence, and the sending of real numbers can greatly simplify the sending device. OFDM uses this feature to ensure that the sequence sent to the channel is a real sequence.

Program the following as required:

Let XK_in be a frequency domain complex number sequence, XK_in=[1+j,-3-j,-3+3*j,-1-3*j];

Try to use the conjugate symmetry formula of the DFT of the real sequence to convert the frequency domain sequence

XK_in is expanded into a conjugate symmetric form Xk to ensure that the corresponding time domain sequence xn =ifft(Xk,16) is a real number sequence.

(1) Find the frequency domain sequence Xk; and give the real and imaginary parts of Xk;

clc,clear,close all
format compact
N=16;
n=0:1:N-1;
k=0:1:7;
XK_in=[1+1i,-3-1i,-3+3*1i,-1-3*1i];
XKf=conj(fliplr(XK_in)); 
Xk=[0,XK_in,0,0,0,0,0,0,0,XKf];

subplot(211)
stem(n,real(Xk));
xlabel('k');
ylabel('real(Xk)');
subplot(212)
stem(n,imag(Xk));
xlabel('k');
ylabel('imag(Xk)');

Experimental conclusion 2-1: Explain the characteristics of the real and imaginary parts of Xk;

Answer: The real part is symmetrical about N/2 even, and the imaginary part is symmetrical about N/2 odd.

2)求xn =ifft(Xk,16);  

clc,clear,close all
format compact
N=16;
n=0:1:N-1;
k=0:1:7;
XK_in=[1+1i,-3-1i,-3+3*1i,-1-3*1i];
XKf=conj(fliplr(XK_in)); 
Xk=[0,XK_in,0,0,0,0,0,0,0,XKf];
xn =ifft(Xk,16)

subplot(211)
stem(n,real(xn));
xlabel('n');
ylabel('real(xn)');
subplot(212)
stem(n,imag(xn));
xlabel('n');
ylabel('imag(xn)');

Experimental conclusion 2-2: Whether xn is a sequence of real numbers can be explained by the graph of real and imaginary parts of xn.

Answer: As can be seen from the above figure, the imaginary part of xn is always 0, which is a sequence of real numbers.

experimental thinking

1. For the sequence x(n), how to get the N-point DFT by calculating the N/2-point DFT?

answer:

  (1) For the sequence x(n), the radix 2FFT algorithm can be used to divide the parity sequence of x(n) to obtain the N/2-point DFT, thereby obtaining the N-point DFT.

(2) In particular, if x(n) is a real sequence, then when N=even, it is only necessary to calculate the front N/2+1 points of X(k), and when N=odd, only X is calculated. (N+1)/2 points in front of (k), thus calculating N-point DFT.

Guess you like

Origin blog.csdn.net/yyfloveqcw/article/details/124188895
Recommended