Professional Documents
Culture Documents
| ( )|
%=====================================
%Tinh bien do kenh va ham alpha
%=====================================
clear;
| v v hm
th:
hold off;
th:
channel_profile=[1.0000,0.8487,0.7663,0.7880,0.6658,0.6658,0.5174,0.0543,0.04
56];
%He so cong suat tre
rho=channel_profile;
N_P=length(rho);
%Chieu dai dap ung kenh
u=rand(N_P,number_of_summations);
%Bien ngau nhien
initial_time=1.1;
%Thoi gian bat dau
h=[];
%vector CIR
H=[];
%vector CTF
for i= 1:100;
h_i=MCM_channel_model(u,initial_time,number_of_summations,T_S,f_dmax,rho);
h_i_tem=[h_i,zeros(1,NFFT-N_P)];
H_i_tem=fft(h_i_tem);
H_i=[H_i_tem(NFFT/2+1:NFFT),H_i_tem(1:NFFT/2)];
initial_time=initial_time+T_S;
h=[h;h_i];
H=[H;H_i];
end;
figure(2);
mesh(abs(H))
xlabel('f in B=1.25MHz')
ylabel('t in 1.024e-0.4s')
zlabel('H(f,t)')
title('f_{D,max}=0.0Hz')
Ln lt thay
th:
Bi 2.2: So snh hm t tng quang thi gian ca knh cho 2 trng hp:
%==========================================================================
%chuong trinh uoc luong ham tu tuong tuong quan thoi gian cua kenh
%==========================================================================
clear all;
NFFT=64;
t_a=8.0000e-007;
T_S=NFFT*t_a;
number_of_summations=40;
f_dmax1=90.0;
f_dmax2=9.0;
channel_profile=[1.0000,0.8487,0.7663,0.7880,0.6658,0.5644,0.5174,0.0543,0.04
65];
rho=channel_profile;
N_P=length(rho);
u=rand(N_P,number_of_summations);
T_S=NFFT*t_a;
NofSymbol=1000;
t=0.1;
H_sequence1=[];
H_sequence2=[];
for i=0:NofSymbol-1;
[h1]=MCM_channel_model(u,t,number_of_summations,T_S,f_dmax1,rho);
[h2]=MCM_channel_model(u,t,number_of_summations,T_S,f_dmax2,rho);
h_extended1=[h1,zeros(1,NFFT-length(h1))];
h_extended2=[h2,zeros(1,NFFT-length(h2))];
H1=fft(h_extended1);
H2=fft(h_extended2);
H_f11=H1(3);
H_f12=H2(3);
H_sequence1=[H_sequence1,H_f11];
H_sequence2=[H_sequence2,H_f12];
t=t+T_S;
end;
time_autoc1=xcorr(H_sequence1,'coeff');
time_autoc2=xcorr(H_sequence2,'coeff');
tau1=-(NofSymbol-1)*T_S:T_S:(NofSymbol-1)*T_S;
tau2=-(NofSymbol-1)*T_S:T_S:(NofSymbol-1)*T_S;
plot(tau1,real(time_autoc1),'k.');
xlabel('\Delta t (s)');
ylabel('Tuong quan thoi gian R(\Delta t)');
hold on;
plot(tau2,real(time_autoc2),'k.');
legend('f_{D,max}=9.0Hz','f_{D,max}=90.0Hz');
th:
Code hm
OFDM_Demodulator
x=fft(x_remove_gaurd_interval);
y=x(1:chnr);
end
Kt qu m phng: