git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5722 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -5,12 +5,12 @@ clear all;
|
||||
%file='E:\EMOS\corridor\postprocessed data\eNB_data_UHF_20140519_run4.mat'; % mat file
|
||||
%file='E:\EMOS\corridor\postprocessed data\eNB_data_20140331_UHF_run2.mat'; % mat file
|
||||
|
||||
n_carriers=1;
|
||||
n_trials=1;
|
||||
n_carriers=2;
|
||||
n_trials=2;
|
||||
n_runs=1;
|
||||
%file='E:\EMOS\corridor\postprocessed data\eNB_data_20140331_2.6GHz_run2.mat'; % mat file
|
||||
%file='eNB_data_UHF_20140519_run2.mat'; % mat file
|
||||
file='eNB_data_20140331_UHF_run1.mat'; % mat file
|
||||
%file='eNB_data_UHF_20140519_run4.mat'; % mat file
|
||||
file='eNB_data_20140519_2.6GHz_run1.mat'; % mat file
|
||||
|
||||
|
||||
post_processed_data=load(file, 'PDD_totala','PDP_totala','delay_doppler_profile_beforea','delay_doppler_profile_duringa','delay_doppler_profile_aftera');
|
||||
@@ -87,7 +87,7 @@ end
|
||||
|
||||
|
||||
%% Doppler spectrum (choose the block you want to read)
|
||||
block = 60;
|
||||
block = 20;
|
||||
figure(1)
|
||||
for i=1:size(PDDta,3)
|
||||
for j=1:size(PDDta,4)
|
||||
@@ -97,6 +97,8 @@ for i=1:size(PDDta,3)
|
||||
F=-(50*120/2-1)*30.72E6/(2*50*120/2)/5120:30.72E6/(50*120/2)/5120:(50*120/2-1)*30.72E6/(2*50*120/2)/5120;
|
||||
end
|
||||
plot(F,10*log(PDDta(:,block,i,j)));
|
||||
ylabel('power [dB]')
|
||||
xlabel('Doppler shift [Hz]')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -113,7 +115,7 @@ if(n_carriers==2)
|
||||
|
||||
end
|
||||
%% Power Delay Profile (choose the frame you want to read)
|
||||
frame = 6000;
|
||||
frame = 3000;
|
||||
figure(3)
|
||||
for i=1:size(PDDta,3)
|
||||
for j=1:size(PDDta,4)
|
||||
@@ -149,8 +151,9 @@ if(n_carriers==2)
|
||||
end
|
||||
|
||||
%% Total doppler spectrum in pseudocolor plot
|
||||
doppler_profile_figures_dir = 'E:\byiringi\Matlab Plots\Doppler Shift pcolor plots new sync\';
|
||||
|
||||
figure(5)
|
||||
h=figure(5);
|
||||
hold off
|
||||
for i=1:size(PDDta,3)
|
||||
for j=1:size(PDDta,4)
|
||||
@@ -158,8 +161,10 @@ for i=1:size(PDDta,3)
|
||||
|
||||
T=1:1:size(PDDta,2);
|
||||
F=-(100*120/2-1)*7.68E6/(2*100*120/2)/1280:7.68E6/(100*120/2)/1280:(100*120/2-1)*7.68E6/(2*100*120/2)/1280;
|
||||
filename=sprintf('Trial %d Run %d UHF.fig',n_trials,n_runs);
|
||||
if(n_carriers==2)
|
||||
F=-(50*120/2-1)*30.72E6/(2*50*120/2)/5120:30.72E6/(50*120/2)/5120:(50*120/2-1)*30.72E6/(2*50*120/2)/5120;
|
||||
filename=sprintf('Trial %d Run %d 2.6 GHz Carrier 2a.fig',n_trials,n_runs);
|
||||
end
|
||||
|
||||
|
||||
@@ -167,14 +172,17 @@ for i=1:size(PDDta,3)
|
||||
subplot(size(PDDta,3),size(PDDta,4),(i-1)*size(PDDta,4) + j);
|
||||
pcolor(T,F,10*log10( PDDta(:,:,i,j)));
|
||||
shading flat
|
||||
colormap hot
|
||||
%colormap hot
|
||||
bara=colorbar;
|
||||
%ylim([])
|
||||
%xlim([])
|
||||
xlabel('time [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bara,'Power [dB]')
|
||||
end
|
||||
end
|
||||
saveas(h,strcat(doppler_profile_figures_dir, filename));
|
||||
|
||||
|
||||
% for i=1:size(PDDta,1)
|
||||
% for j=1:size(PDDta,2)
|
||||
@@ -206,49 +214,57 @@ end
|
||||
|
||||
|
||||
if(n_carriers==2)
|
||||
figure(6)
|
||||
h=figure(6);
|
||||
for i=1:size(PDDtb,3)
|
||||
for j=1:size(PDDtb,4)
|
||||
|
||||
|
||||
T=1:1:size(PDDtb,2);
|
||||
F=-(50*120/2-1)*15.36E6/(2*50*120/2)/2560:15.36E6/(50*120/2)/2560:(50*120/2-1)*15.36E6/(2*50*120/2)/2560;
|
||||
|
||||
filename=sprintf('Trial %d Run %d 2.6 GHz Carrier 2b.fig',n_trials,n_runs);
|
||||
|
||||
|
||||
subplot(size(PDDtb,3),size(PDDtb,4),(i-1)*size(PDDtb,4) + j);
|
||||
pcolor(T,F,10*log10( PDDtb(:,:,i,j)));
|
||||
shading flat
|
||||
barb=colorbar;
|
||||
colormap hot
|
||||
%colormap hot
|
||||
%ylim([])
|
||||
%xlim([])
|
||||
xlabel('time [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(barb,'Power [dB]')
|
||||
end
|
||||
end
|
||||
saveas(h,strcat(doppler_profile_figures_dir, filename));
|
||||
end
|
||||
|
||||
|
||||
|
||||
%% Total Power Delay Profile in pseudocolor
|
||||
figure(7)
|
||||
power_delay_profile_figures_dir = 'E:\byiringi\Matlab Plots\PDP pcolor plots new sync\';
|
||||
|
||||
h=figure(7);
|
||||
for i=1:size(PDDta,3)
|
||||
for j=1:size(PDDta,4)
|
||||
tau=linspace(0,300/4/4.5E6,300/4);
|
||||
T=1:1:(size(PDPta,1));
|
||||
filename=sprintf('Trial %d Run %d UHF.fig',n_trials,n_runs);
|
||||
if n_carriers==2
|
||||
tau=linspace(0,1200/4/18E6,1200/4);
|
||||
filename=sprintf('Trial %d Run %d 2.6 GHz Carrier 2a.fig',n_trials,n_runs);
|
||||
end
|
||||
subplot(size(PDDta,3),size(PDDta,4),(i-1)*size(PDDta,4)+j)
|
||||
pcolor(tau,T,10*log10(PDPta(:,:,i,j)));
|
||||
bara=colorbar;
|
||||
shading flat
|
||||
colormap hot
|
||||
%colormap hot
|
||||
xlabel('delay [s]')
|
||||
ylabel('time [*10 ms]')
|
||||
ylabel(bara,'Power [dB]')
|
||||
end
|
||||
end
|
||||
saveas(h,strcat(power_delay_profile_figures_dir, filename));
|
||||
|
||||
% for i=1:size(PDPta,1)
|
||||
% for j=1:size(PDPta,2)
|
||||
@@ -273,20 +289,23 @@ end
|
||||
% ylabel('time [*10 ms]')
|
||||
|
||||
if(n_carriers==2)
|
||||
figure(8)
|
||||
h=figure(8);
|
||||
for i=1:size(PDDtb,3)
|
||||
for j=1:size(PDDtb,4)
|
||||
tau=linspace(0,600/4/18E6,600/4);
|
||||
tau=linspace(0,600/4/9E6,600/4);
|
||||
T=1:1:(size(PDPtb,1));
|
||||
filename=sprintf('Trial %d Run %d 2.6 GHz Carrier 2b.fig',n_trials,n_runs);
|
||||
subplot(size(PDDtb,3),size(PDDtb,4),(i-1)*size(PDDtb,4)+j)
|
||||
pcolor(tau,T,10*log10(PDPtb(:,:,i,j)));
|
||||
barb=colorbar;
|
||||
shading flat
|
||||
colormap hot
|
||||
%colormap hot
|
||||
xlabel('delay [s]')
|
||||
ylabel('time [*10 ms]')
|
||||
ylabel(barb,'Power [dB]')
|
||||
end
|
||||
end
|
||||
saveas(h,strcat(power_delay_profile_figures_dir, filename));
|
||||
end
|
||||
|
||||
|
||||
@@ -310,6 +329,7 @@ colormap hot
|
||||
bar1=colorbar;
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar1,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for UHF-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_before));
|
||||
if(n_carriers==2)
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 1-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_before));
|
||||
@@ -322,6 +342,7 @@ colormap hot
|
||||
bar2=colorbar;
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar2,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for UHF-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_during));
|
||||
if(n_carriers==2)
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 1-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_during));
|
||||
@@ -330,9 +351,11 @@ end
|
||||
subplot(1,3,3)
|
||||
pcolor(tau,F,10*log10(delay_doppler_profile_aftera(:,:)))
|
||||
shading flat
|
||||
colormap hot
|
||||
bar3=colorbar;
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar3,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for UHF-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_after));
|
||||
if(n_carriers==2)
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 1-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_after));
|
||||
@@ -348,24 +371,30 @@ if(n_carriers==2)
|
||||
subplot(1,3,1)
|
||||
pcolor(tau,F,10*log10(delay_doppler_profile_beforeb(:,:)))
|
||||
shading flat
|
||||
colormap hot
|
||||
bar4=colorbar;
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar4,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 2-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_before));
|
||||
|
||||
subplot(1,3,2)
|
||||
pcolor(tau,F,10*log10(delay_doppler_profile_duringb(:,:)))
|
||||
shading flat
|
||||
bar5=colorbar;
|
||||
colormap hot
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar5,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 2-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_during));
|
||||
|
||||
subplot(1,3,3)
|
||||
pcolor(tau,F,10*log10(delay_doppler_profile_afterb(:,:)))
|
||||
shading flat
|
||||
bar6=colorbar;
|
||||
colormap hot
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
ylabel(bar6,'Power [dB]')
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 2-Trial %d-Run %d-Block %d ',n_trials,n_runs,block_after));
|
||||
end
|
||||
@@ -4,7 +4,7 @@ clear all
|
||||
global symbols_per_slot slots_per_frame;
|
||||
|
||||
enable_plots=0; %enables figures
|
||||
|
||||
record=1; %put 1 to enable the video record of the delay doppler profile
|
||||
%% preload and init data
|
||||
addpath('../../../openair1/PHY/LTE_REFSIG');
|
||||
primary_synch; %loads the primary sync signal
|
||||
@@ -12,7 +12,7 @@ primary_synch; %loads the primary sync signal
|
||||
%load('E:\EMOS\corridor\ofdm_pilots_sync_2048_v7.mat');
|
||||
load('ofdm_pilots_sync_30MHz.mat');
|
||||
|
||||
n_carriers = 2; % use 1 for UHF and 2 for 2.6GHz
|
||||
n_carriers = 1; % use 1 for UHF and 2 for 2.6GHz
|
||||
n_trials=1;%use 1 for trial1 and 2 for trial2
|
||||
n_run=1;
|
||||
symbols_per_slot = 6;
|
||||
@@ -24,9 +24,9 @@ switch n_carriers
|
||||
pss_t = upsample(primary_synch0_time,4);
|
||||
|
||||
%filename = 'E:\EMOS\corridor\trials1\eNB_data_20140331_UHF_run1.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials1/eNB_data_20140331_UHF_run1.EMOS';
|
||||
filename = 'E:/byiringi/emosFiles/trials1/eNB_data_20140331_UHF_run1.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials1/eNB_data_20140331_UHF_run2.EMOS';
|
||||
filename = 'E:/byiringi/emosFiles/trials2/eNB_data_UHF_20140519_run4.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials2/eNB_data_UHF_20140519_run4.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials2/eNB_data_UHF_20140519_run4.EMOS';
|
||||
|
||||
nframes = 100; % frames in one block
|
||||
@@ -37,9 +37,9 @@ switch n_carriers
|
||||
pss_t = upsample(primary_synch0_time,4*4); % this assumes we are doing the sync on the second carrier, which is 10MHz
|
||||
|
||||
%filename = 'E:\EMOS\corridor\trials1\eNB_data_20140331_UHF_run1.EMOS';
|
||||
filename = 'E:/byiringi/emosFiles/trials1/eNB_data_20140331_2.6GHz_run2.EMOS';
|
||||
filename = 'E:/byiringi/emosFiles/trials1/eNB_data_20140331_2.6GHz_run1.EMOS';
|
||||
%filename = 'E:\EMOS\corridor\trials2\eNB_data_20140519_2.6GHz_run2.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials2/eNB_data_20140519_2.6GHz_run2.EMOS';
|
||||
%filename = 'E:/byiringi/emosFiles/trials2/eNB_data_20140519_2.6GHz_run4.EMOS';
|
||||
|
||||
nframes = 50; % frames in one block
|
||||
threshold = 3e+4 ; % maybe should change that !!!!
|
||||
@@ -73,6 +73,8 @@ if(n_carriers==2)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
doppler_freq_of_max_a=zeros(1,nblocks);
|
||||
doppler_freq_of_max_b=zeros(1,nblocks);
|
||||
if(n_carriers==1)
|
||||
@@ -86,11 +88,18 @@ PDP_totala = zeros(nblocks*nframes,p(1).useful_carriers/4,p(1).nant_tx,p(1).nant
|
||||
PDD_totala = zeros(nframes*num_symbols_frame/2,nblocks,p(1).nant_tx,p(1).nant_rx);
|
||||
|
||||
% delay doppler spectrum
|
||||
|
||||
delay_doppler_profile_videoa=VideoWriter(sprintf('Trial%d_Run%d_UHF_delayDopplerProfile.avi',n_trials,n_run));%variable used to make a video of the evolution of the delay doppler profile
|
||||
if n_carriers==2
|
||||
delay_doppler_profile_videoa=VideoWriter(sprintf('Trial%d_Run%d_2.6GHzCarrier2a_delayDopplerProfile.avi',n_trials,n_run));
|
||||
end
|
||||
|
||||
delay_doppler_profile_beforea=zeros(nframes*num_symbols_frame/2,p(1).useful_carriers/4);%contains the delay doppler spectrum for a block before the passing of the train
|
||||
delay_doppler_profile_duringa=zeros(nframes*num_symbols_frame/2,p(1).useful_carriers/4);%contains the delay doppler spectrum for a block during the passing of the train
|
||||
delay_doppler_profile_aftera=zeros(nframes*num_symbols_frame/2,p(1).useful_carriers/4);%contains the delay doppler spectrum for a block after the passing of the train
|
||||
|
||||
if n_carriers==2
|
||||
delay_doppler_profile_videob=VideoWriter(sprintf('Trial%d_Run%d_2.6GHzCarrier2b_delayDopplerProfile.avi',n_trials,n_run));
|
||||
delay_doppler_profile_beforeb=zeros(nframes*num_symbols_frame/2,p(2).useful_carriers/4);%contains the delay doppler spectrum for a block before the passing of the train
|
||||
delay_doppler_profile_duringb=zeros(nframes*num_symbols_frame/2,p(2).useful_carriers/4);%contains the delay doppler spectrum for a block during the passing of the train
|
||||
delay_doppler_profile_afterb=zeros(nframes*num_symbols_frame/2,p(2).useful_carriers/4);%contains the delay doppler spectrum for a block after the passing of the train
|
||||
@@ -185,6 +194,11 @@ if(n_carriers==2)
|
||||
end
|
||||
nframes = NFRAMES;
|
||||
|
||||
open(delay_doppler_profile_videoa);
|
||||
if n_carriers==2
|
||||
open(delay_doppler_profile_videob);
|
||||
end
|
||||
|
||||
while ~feof(fid)
|
||||
|
||||
|
||||
@@ -570,9 +584,10 @@ while ~feof(fid)
|
||||
end
|
||||
end
|
||||
|
||||
if enable_plots>=2
|
||||
figure(20)
|
||||
|
||||
if record==1
|
||||
ha=figure(20);
|
||||
set(gca,'nextplot','replacechildren');
|
||||
set(gcf,'Renderer','zbuffer');
|
||||
|
||||
tau=linspace(0,p(1).useful_carriers/4/4.5E6,p(1).useful_carriers/4);
|
||||
F=-(NFRAMES*num_symbols_frame/2-1)*7.68E6/(2*NFRAMES*num_symbols_frame/2)/1280:7.68E6/(NFRAMES*num_symbols_frame/2)/1280:(NFRAMES*num_symbols_frame/2-1)*7.68E6/(2*NFRAMES*num_symbols_frame/2)/1280;
|
||||
@@ -590,9 +605,14 @@ while ~feof(fid)
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
|
||||
framea = getframe(ha);
|
||||
writeVideo(delay_doppler_profile_videoa,framea);
|
||||
|
||||
|
||||
if(n_carriers==2)
|
||||
figure(21)
|
||||
hb=figure(21);
|
||||
set(gca,'nextplot','replacechildren');
|
||||
set(gcf,'Renderer','zbuffer');
|
||||
tau=linspace(0,p(2).useful_carriers/4/9E6,p(2).useful_carriers/4);
|
||||
F=-(NFRAMES*num_symbols_frame/2-1)*15.36E6/(2*NFRAMES*num_symbols_frame/2)/2560:15.36E6/(NFRAMES*num_symbols_frame/2)/2560:(NFRAMES*num_symbols_frame/2)*15.36E6/(2*NFRAMES*num_symbols_frame/2)/2560;
|
||||
title(sprintf('Delay Doppler Spectrum for 2.6GHz Carrier 2-Trial %d-Run %d-Block %d ',n_trials,n_run,block));
|
||||
@@ -602,6 +622,8 @@ while ~feof(fid)
|
||||
xlabel('delay [s]')
|
||||
ylabel('Doppler shift [Hz]')
|
||||
|
||||
frameb = getframe(hb);
|
||||
writeVideo(delay_doppler_profile_videob,frameb);
|
||||
|
||||
end
|
||||
|
||||
@@ -744,6 +766,13 @@ while ~feof(fid)
|
||||
|
||||
end
|
||||
|
||||
close(delay_doppler_profile_videoa);
|
||||
|
||||
if n_carriers==2
|
||||
close(delay_doppler_profile_videob);
|
||||
end
|
||||
|
||||
|
||||
%%
|
||||
|
||||
if(enable_plots>=2)
|
||||
@@ -908,18 +937,20 @@ if (n_carriers==2)
|
||||
end
|
||||
%%
|
||||
figure(17)
|
||||
|
||||
plot(doppler_freq_of_max_a);
|
||||
title(sprintf('Main Doppler peak for UHF Trial %d-Run%d',n_trials,n_run));
|
||||
if n_carriers==2
|
||||
title(sprintf('Main Doppler peak for 2.6GHz Carrier 1 Trial %d-Run%d',n_trials,n_run));
|
||||
end
|
||||
plot(doppler_freq_of_max_a);
|
||||
xlabel('time [s]');
|
||||
ylabel('f-ftx [Hz]');
|
||||
|
||||
if(n_carriers==2)
|
||||
figure(18)
|
||||
title(sprintf('Main Doppler peak for 2.6GHz Carrier 2 Trial %d-Run%d',n_trials,n_run));
|
||||
|
||||
plot(doppler_freq_of_max_b);
|
||||
title(sprintf('Main Doppler peak for 2.6GHz Carrier 2 Trial %d-Run%d',n_trials,n_run));
|
||||
xlabel('time [s]');
|
||||
ylabel('f-ftx [Hz]');
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user