Use of a Cyclic Prefix to Eliminate Channel Dispersion
In this section, we consider a method to mitigate channel dispersion.
Matlab Coding
https://www.cnblogs.com/zzyzz/p/13702307.html
1 % MATLAB script for Illustrative Problem 8.4 2 3 echo on 4 clear; 5 K=10;N=2*K;T=100;m=4; 6 a=rand(1,36); 7 a=sign(a-0.5); 8 b=reshape(a,9,4);
9 % Generate the 16QAM points 10 XXX=2*b(:,1)+b(:,2)+1i*(2*b(:,3)+b(:,4)); 11 XX=XXX'; 12 X=[0 XX 0 conj(XX(9:-1:1))]; 13 xt=zeros(1,101); 14 for t=0:100 15 for k=0:N-1 16 xt(1,t+1)=xt(1,t+1)+1/sqrt(N)*X(k+1)*exp(1i*2*pi*k*t/T); 17 echo off 18 end 19 end 20 echo on 21 xn=zeros(1,N+m); 22 for n=0:N-1 23 for k=0:N-1 24 xn(n+m+1)=xn(n+1)+1/sqrt(N)*X(k+1)*exp(1i*2*pi*n*k/N); 25 echo off 26 end 27 end
xn0 = xn; 28 xn(1:m)=xn(N-m+1:N); % Cycle Shift 29 echo on
30 pause % press any key to see a plot of x(t) 31 plot([0:100],abs(xt)) 32 % Check the difference between xn and samples of x(t) 33 for n=0:N-1 34 d(n+1)=xt(T/N*n+1)-xn(1+n+m); 35 echo off 36 end 37 echo on 38 e=norm(d); 39 Y=zeros(1,10); 40 for k=1:9 41 for n=0:N-1 42 Y(1,k+1)=Y(1,k+1)+1/sqrt(N)*xn(n+m+1)*exp(-1i*2*pi*k*n/N); 43 echo off 44 end 45 end 46 echo on 47 dd=Y(1:10)-X(1:10); 48 ee=norm(dd);
Simulation Result
>> xn0
xn0 =
Columns 1 through 6
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.6708 - 0.2236i -0.7071 - 0.0054i
Columns 7 through 12
-0.6741 + 0.2134i -0.5752 + 0.4113i -1.0908 + 0.3453i -0.9307 + 0.6655i -0.6795 + 0.9205i -0.3618 + 1.0854i
Columns 13 through 18
-0.6795 + 0.9205i -0.3618 + 1.0854i -0.0087 + 1.1441i 0.3453 + 1.0908i -0.0054 + 0.7071i 0.2134 + 0.6741i
Columns 19 through 24
0.4113 + 0.5752i 0.5689 + 0.4200i -0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 + 0.0000i -0.0000 - 0.0000i
>> xn
xn =
Columns 1 through 6
-0.0054 + 0.7071i 0.2134 + 0.6741i 0.4113 + 0.5752i 0.5689 + 0.4200i -0.6708 - 0.2236i -0.7071 - 0.0054i
Columns 7 through 12
-0.6741 + 0.2134i -0.5752 + 0.4113i -1.0908 + 0.3453i -0.9307 + 0.6655i -0.6795 + 0.9205i -0.3618 + 1.0854i
Columns 13 through 18
-0.6795 + 0.9205i -0.3618 + 1.0854i -0.0087 + 1.1441i 0.3453 + 1.0908i -0.0054 + 0.7071i 0.2134 + 0.6741i
Columns 19 through 24
0.4113 + 0.5752i 0.5689 + 0.4200i -0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 + 0.0000i -0.0000 - 0.0000i
>> e
e =
11.6719
>> ee
ee =
8.1777
Reference,
1. <<Contemporary Communication System using MATLAB>> - John G. Proakis