Generated robust MMSE for 50 prb

master
ismagom 9 years ago
parent bcc80bc6c0
commit 38e005af14

@ -0,0 +1,14 @@
function [ out ] = write_c_struct_complex( filename, varname, x)
[tidin msg]=fopen(filename,'wt');
if (tidin==-1)
fprintf('error opening %s: %s\n',filename, msg);
out=[];
return
end
fprintf(tidin, 'float %s[%d]={%.9g,%.9g',varname,2*length(x),real(x(1)),imag(x(1)));
fprintf(tidin, ',\n %.9g,%.9g',real(x(2:end)),imag(x(2:end)));
fprintf(tidin, '};\n');
fclose(tidin);
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

@ -6,20 +6,20 @@ clear
plot_noise_estimation_only=false; plot_noise_estimation_only=false;
SNR_values_db=linspace(0,30,7); SNR_values_db=30;%linspace(0,40,7);
Nrealizations=4; Nrealizations=1;
Lp=10; Lp=20;
N=512; N=1024;
K=300; K=600;
rstart=(N-K)/2; rstart=(N-K)/2;
P=K/6; P=K/6;
Rhphp=zeros(P,P); Rhphp=zeros(P,P);
Rhhp=zeros(K,P); Rhhp=zeros(K,P);
Rhh=zeros(K,K); Rhh=zeros(K,K);
enb.NDLRB = 25; % Number of resource blocks enb.NDLRB = 50; % Number of resource blocks
enb.CellRefP = 1; % One transmit antenna port enb.CellRefP = 1; % One transmit antenna port
enb.NCellID = 0; % Cell ID enb.NCellID = 0; % Cell ID
enb.CyclicPrefix = 'Normal'; % Normal cyclic prefix enb.CyclicPrefix = 'Normal'; % Normal cyclic prefix
@ -29,11 +29,11 @@ enb.DuplexMode = 'FDD'; % FDD
cfg.Seed = 0; % Random channel seed cfg.Seed = 0; % Random channel seed
cfg.InitTime = 0; cfg.InitTime = 0;
cfg.NRxAnts = 1; % 1 receive antenna cfg.NRxAnts = 1; % 1 receive antenna
cfg.DelayProfile = 'EVA'; cfg.DelayProfile = 'EPA';
% doppler 5, 70 300 % doppler 5, 70 300
cfg.DopplerFreq = 200; % 120Hz Doppler frequency cfg.DopplerFreq = 50; % 120Hz Doppler frequency
cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation
cfg.NTerms = 16; % Oscillators used in fading model cfg.NTerms = 16; % Oscillators used in fading model
cfg.ModelType = 'GMEDS'; % Rayleigh fading model type cfg.ModelType = 'GMEDS'; % Rayleigh fading model type
@ -245,7 +245,7 @@ prows=rstart+(1:6:K);
F=dftmtx(N); F=dftmtx(N);
F_p=F(prows,1:Lp); F_p=F(prows,1:Lp);
F_l=F((rstart+1):(K+rstart),1:Lp); F_l=F((rstart+1):(K+rstart),1:Lp);
Wi=(F_p'*F_p+C_l/snr_lin)^(-1); Wi=(F_p'*F_p+C_l*0.01)^(-1);
W2=F_l*Wi*F_p'; W2=F_l*Wi*F_p';
% for i=1:length(hidx) % for i=1:length(hidx)

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@ -2,12 +2,36 @@
%% Cell-Wide Settings %% Cell-Wide Settings
% A structure |enbConfig| is used to configure the eNodeB. % A structure |enbConfig| is used to configure the eNodeB.
%clear %clear12
recordedSignal=[]; recordedSignal=[];
Npackets = 30; Npackets = 100;
SNR_values = linspace(9,24,5); SNR_values = linspace(2,10,10);
Lp=12;
N=256;
K=180;
rstart=(N-K)/2;
P=K/6;
Rhphp=zeros(P,P);
Rhhp=zeros(K,P);
Rhh=zeros(K,K);
t=0:Lp-1;
alfa=log(2*Lp)/Lp;
c_l=exp(-t*alfa);
c_l=c_l/sum(c_l);
C_l=diag(1./c_l);
prows=rstart+(1:6:K);
F=dftmtx(N);
F_p=F(prows,1:Lp);
F_l=F((rstart+1):(K+rstart),1:Lp);
Wi=(F_p'*F_p+C_l*0.01)^(-1);
W2=F_l*Wi*F_p';
w2=reshape(transpose(W2),1,[]);
%% Choose RMC %% Choose RMC
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.0',[1;0;0;1]); [waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.0',[1;0;0;1]);
@ -34,7 +58,7 @@ Nsf = 9;
cfg.Seed = 0; % Random channel seed cfg.Seed = 0; % Random channel seed
cfg.NRxAnts = 1; % 1 receive antenna cfg.NRxAnts = 1; % 1 receive antenna
cfg.DelayProfile = 'EPA'; % EVA delay spread cfg.DelayProfile = 'EPA'; % EVA delay spread
cfg.DopplerFreq = 120; % 120Hz Doppler frequency cfg.DopplerFreq = 5; % 120Hz Doppler frequency
cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation cfg.MIMOCorrelation = 'Low'; % Low (no) MIMO correlation
cfg.InitTime = 0; % Initialize at time zero cfg.InitTime = 0; % Initialize at time zero
cfg.NTerms = 16; % Oscillators used in fading model cfg.NTerms = 16; % Oscillators used in fading model
@ -70,8 +94,8 @@ for snr_idx=1:length(SNR_values)
if isempty(recordedSignal) if isempty(recordedSignal)
%% Fading %% Fading
rxWaveform = lteFadingChannel(cfg,waveform); %rxWaveform = lteFadingChannel(cfg,waveform);
%rxWaveform = waveform; rxWaveform = waveform;
%% Noise Addition %% Noise Addition
noise = N0*complex(randn(size(rxWaveform)), randn(size(rxWaveform))); % Generate noise noise = N0*complex(randn(size(rxWaveform)), randn(size(rxWaveform))); % Generate noise
@ -103,7 +127,7 @@ for snr_idx=1:length(SNR_values)
if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0) if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0)
[dec2, data, pdschRx, pdschSymbols2, cws2] = srslte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ... [dec2, data, pdschRx, pdschSymbols2, cws2] = srslte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ...
rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ... rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ...
subframe_rx); subframe_rx,w2);
else else
dec2 = 1; dec2 = 1;
end end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save