% =======================================================================
% MatLab Script �UFMC_OFDM___TransceiverChain.m?Terms of Use
% Version: 2014-03-21
%
% This MatLab script was created and is made available free of charge
% by Alcatel-Lucent Deutschland AG, Lorenzstra�e 10, 70435 Stuttgart
% (�Alcatel-Lucent?.
%
% You may use this script for any purpose, and you may modify the
% contents of this script and incorporate the script into your own
% scripts in whole or in part.
%
% If you use this script without modification, you must preserve the
% copyright notice identifying Alcatel-Lucent. If you incorporate this
% script into your own scripts, you must include into them a notice
% stating that portions of the script were created by Alcatel-Lucent.
%
% Alcatel-Lucent does not provide any technical support for the script
% or for MatLab itself. For enquiries related to the above, you may
% contact
% Frank Schaich, e-mail frank.schaich@acatel-lucent.com, or
% Thorsten Wild, e-mail thorsten.wild@alcatel-lucent.com.
%
% Alcatel-Lucent does not provide any representation or warranty with
% regard to the functionality of this script, and Alcatel-Lucent does
% does not assume any liability for the functionality of this script.
% Furthermore, Alcatel-Lucent does not represent, warrant, guarantee
% or otherwise assume any liability for the fitness of the script for
% any particular purpose and for any consequences the use of this
% script may have.
%
% By making available the script, Alcatel-Lucent does not provide an
% express or implied license as to any of its or its related companies?
% patents or patent applications . The granting of rights embodied
% in this notice relates only to the script itself.
%
% MatLab is software licensed separately by The MathWorks, Inc.
%
% ========================================================================
%
% Further technical details on UFMC can be found in the following
% references (and references therein):
% [1] F. Schaich, T. Wild, Y. Chen , �Waveform contenders for 5G ?
% suitability for short packet and low latency transmissions?
% accepted for IEEE VTCs?4, Seoul, Korea, April 2014
% [2] V. Vakilian, T. Wild, F. Schaich, S.t. Brink, J.-F. Frigon,
% "Universal-Filtered Multi-Carrier Technique for Wireless Systems
% Beyond LTE", 9th International Workshop on Broadband Wireless Access
% (BWA) @ IEEE Globecom'13, Atlanta, GA, USA, December 2013.
clear all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% simplified UFMC chain: %%%
%%% single-user, no delay, AWGN, BPSK/QPSK, ZF/MF/MMSE and FFT based %%%
%%% detection, UFMC and CP-OFDM %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Parameter settings %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% burst placing, modulation %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PAR.blockShift = 28;% frequency shift of lowest-frequency block in subcarriers
PAR.nPRB = 10;% Allocation width in number of subbands (sub-band width defined in PAR.blockSize below)
PAR.DataSource = 'QPSK'; % 'BPSK', 'QPSK'
PAR.Constellation{1} = [-1 1 ; 1 0]; % BPSK signal constellation
PAR.Constellation{2} = [(+1+1i)/sqrt(2) 0 0 ; ... % QPSK signal constellation (Gray mapping)
(+1-1i)/sqrt(2) 0 1 ; ...
(-1+1i)/sqrt(2) 1 0 ; ...
(-1-1i)/sqrt(2) 1 1 ];
PAR.Tx.Flag_UndoFilterResponse = 1; %if flag set to 1: filter response in pass-band is undone in Tx to uniform power distribution beteen subcarriers.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Parameteres for Rx %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PAR.Rx.ZF = 0; %ZF active? 1 --> active, 0 --> not active
PAR.Rx.MF = 0; %MF active? 1 --> active, 0 --> not active
PAR.Rx.MMSE = 0; %MMSE active? 1 --> active, 0 --> not active
PAR.Rx.FFTbasedRx = 1; %FFT based detection active? 1 --> active, 0 --> not active
PAR.Rx.ChanEst = 'viaKnownSymbs'; %'viaKnownSymbs' (ideal yet, i.e. all symbols used as pilots)
PAR.Rx.flag_CFOcomp_on = 1; % CFO compensation (time domain) done in receiver: 1 = yes; 0 = no
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Settings regarding synchronization misalignments per alloc and per layer %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PAR.rCFO = 0.0;%relative carrier frequency offset in subcarrier spacings
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% General settings %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
PAR.SNR_dB = [0:10];
PAR.NsymbsperTTI = 14;% number of Multi-carrier symbols per TTI (i.e. per simulation drop)
PAR.FFTsize = 1024;
PAR.lFIR = 74; % filter length: 1 means OFDM, >1 uses a Dolph-Chebychev FIR filter
PAR.FilterPar_dB = 40; % sideband attenuation (design parameter of Dolph-Chebychev filters)
PAR.blockSize = 12; % width of subband in number of subcarriers (needs to match to Filterbandwidth)
PAR.CPlength = 73; % length of OFDM CP in samples
PAR.NTTIs = 10000; % number of TTIs/drops
if (PAR.Tx.Flag_UndoFilterResponse && (PAR.Rx.ZF || PAR.Rx.MF || PAR.Rx.MMSE))
error('PAR.Tx.Flag_UndoFilterResponse and at least one of the linear receivers is active. PAR.Tx.Flag_UndoFilterResponse is only applicable to FFT based Rx!')
end
%% Initialization
%%%%%%%%%%%%%%%%%%%%%%%%%
%%% basic parameters %%%
%%%%%%%%%%%%%%%%%%%%%%%%%
% number of samples per multicarrier symbol
if (PAR.lFIR == 1) % OFDM
PARderived.lMCsym = PAR.FFTsize + PAR.CPlength;
else
PARderived.lMCsym = PAR.FFTsize + PAR.lFIR -1;
end
switch PAR.DataSource
case {'BPSK'}
PARderived.Bit_per_Symbol = 1;
case {'QPSK'}
PARderived.Bit_per_Symbol = 2;
end
PARderived.nSNR = length(PAR.SNR_dB);
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Signal generation %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
% OFDM CP and CP removal
% matrix for cyclic prefix addition
CPadd = zeros(PAR.CPlength+PAR.FFTsize,PAR.FFTsize);
CPadd(1:PAR.CPlength,(PAR.FFTsize-PAR.CPlength+1):end) = diag(ones(1,PAR.CPlength));
CPadd((PAR.CPlength+1):end,:) = diag(ones(1,PAR.FFTsize));
PARderived.Tx.CPadd=CPadd;
% matrix for cyclic prefix removal
CPrem = zeros(PAR.FFTsize,PAR.CPlength+PAR.FFTsize);
CPrem(:,(PAR.CPlength+1):end) = diag(ones(1,PAR.FFTsize));
PARderived.Rx.CPrem=CPrem;
% Allocation widths
PARderived.nUsedCarr = PAR.nPRB*PAR.blockSize;
% allocated subcarriers
PARderived.allocatedSubcarriers = [1 : PARderived.nUsedCarr] + PAR.blockShift;
% Generation of IDFT spreading matrices carrying the relevant columns of the IDFT matrice with size PAR.FFTsize
% Dimension of the matrices: [PAR.FFTsize x PARderived.nUsedCarr]
PARderived.V = zeros(PAR.FFTsize,PARderived.nUsedCarr);
for c = 1:PARderived.nUsedCarr %loop through all allocated subcarriers
SubcarrierIndex=PARderived.allocatedSubcarriers(c);
PARderived.V([1:PAR.FFTsize],c) = exp(2*pi*1i*([1:PAR.FFTsize]-1)*SubcarrierIndex/PAR.FFTsize); %generation of the IDFT vector
end
% final multicarrier modulation matrix T
if PAR.lFIR == 1 % OFDM
V=PARderived.V;
T=(1/norm(V))*CPadd*V; %CP-OFDM = IDFT spreading matrices plus CP addition
PARderived.T = T;
else % UFMC
f = chebwin(PAR.lFIR,PAR.FilterPar_dB); %Dolph-Chebyshev
% initialize helper matrices
F_all = [];
V_all = zeros(PAR.FFTsize*PAR.nPRB,PARderived.nUsedCarr);
for iPRB = 1:PAR.nPRB
% shift to center carrier
blockShift = PARderived.allocatedSubcarriers(1)-1; %edge of the allocation
carrierind = blockShift + (PAR.blockSize+1)/2 + (iPRB-1)*PAR.blockSize; % center carrier
centerFshift = zeros(PAR.lFIR,1);
for k = 1:PAR.lF
评论0