Home > WaveComBox > Toolbox > UFMC > Modulation > UFMC_Modulator_FD.m

UFMC_Modulator_FD

PURPOSE ^

UFMC modulates data symbols [1].

SYNOPSIS ^

function [ s ] = UFMC_Modulator_FD( d, Para )

DESCRIPTION ^

 UFMC modulates data symbols [1].

 function [ s ] = UFMC_Modulator( d, Para )

 The function works for SISO and MIMO systems.

 Input arguments:

   d: data symbols. Size: matrix [Para.nSubcarriers, Ns] if Para.N_T == 1,
   multidimensional array [para.N_T, Para.nSubcarriers, Ns] if Para.N_T > 1.

   Para: structure containing the modulation parameters.

 Outputs arguments:

   s: transmitted signal. Size: matrix [Para.N_T,
   (Para.nSubcarriers+Para.filt_L-1)*(Para.Ns+Para.PreambleLength)]

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ s ] = UFMC_Modulator_FD( d, Para )
0002 % UFMC modulates data symbols [1].
0003 %
0004 % function [ s ] = UFMC_Modulator( d, Para )
0005 %
0006 % The function works for SISO and MIMO systems.
0007 %
0008 % Input arguments:
0009 %
0010 %   d: data symbols. Size: matrix [Para.nSubcarriers, Ns] if Para.N_T == 1,
0011 %   multidimensional array [para.N_T, Para.nSubcarriers, Ns] if Para.N_T > 1.
0012 %
0013 %   Para: structure containing the modulation parameters.
0014 %
0015 % Outputs arguments:
0016 %
0017 %   s: transmitted signal. Size: matrix [Para.N_T,
0018 %   (Para.nSubcarriers+Para.filt_L-1)*(Para.Ns+Para.PreambleLength)]
0019 
0020 
0021 % This file is part of WaveComBox: www.wavecombox.com and is distributed under the terms of the MIT license. See accompanying LICENSE file.
0022 % Original author: Mathieu Van Eeckhaute, May 25, 2018.
0023 % Contributors: François Rottenberg
0024 % Change log:
0025 
0026 % References:
0027 % [1] T. Wild and F. Schaich, "A Reduced Complexity Transmitter for UF-OFDM," 2015 IEEE 81st Vehicular Technology Conference (VTC Spring), Glasgow, 2015, pp. 1-6.
0028 
0029 %% Parameters (specific to FD UFMC modulator)
0030 
0031 Nifft_o = 128; %size of the small subband iffts
0032 Nos = 2;  %oversampling factor
0033 
0034 %% Modulator
0035 
0036 %generate prototype filter
0037 proto_filt = protofilter_design(Para);
0038 %shift prototype filter by half a subcarrier so that it is centered on an even number of subcarriers
0039 k = 1:Para.filt_L;
0040 epsi = exp(-1j*pi*(k.'-1)/(Para.nSubcarriers));
0041 proto_filt_shift = proto_filt.*epsi;
0042 
0043 %Generate cut-out FD filter from the prototype filter impulse response
0044 f_ext = [proto_filt_shift; zeros(Nos*Para.nSubcarriers-Para.filt_L,1)];
0045 Fos = fft(f_ext);
0046 Fcut = repmat([Fos(1:Nifft_o); Fos(end-Nifft_o+1:end)],1,Para.Ns);
0047 
0048 %number of loaded sub-carriers
0049 NsubCar = Para.SubBandWidth*Para.NbSubBands;
0050 %Select loaded sub-carriers in data
0051 
0052 if Para.N_T==1
0053     data = d(Para.ActiveSubcarriers, :);
0054     %initialise final ifft input
0055     X_total = zeros(2*Para.nSubcarriers,Para.Ns);
0056     for iSubBand = 1:Para.NbSubBands
0057         %sub-band separation
0058         %Sub-band symbol
0059         symb = data((iSubBand-1)*Para.SubBandWidth+1:iSubBand*Para.SubBandWidth,:);
0060         %zero-padding before ifft, done sothat the right ifft bins are loaded
0061         Kf = (Nifft_o - Para.SubBandWidth)/2;
0062         symbol_padded = [zeros(Kf, Para.Ns);symb;zeros(Kf, Para.Ns)];
0063         x_short = ifft(symbol_padded, Nifft_o);
0064         %zero-padding before fft
0065         Kt = Nifft_o*(Nos-1);
0066         x_ext = [x_short; zeros(Kt, Para.Ns)];
0067         X_ext = fftshift(fft(x_ext, Nos*Nifft_o));
0068         %FD sub-band filtering
0069         X_filt = fftshift(X_ext.*Fcut);
0070         %Place sub-band on corresponding ifft bin and sum resulting FD
0071         %filtered signals
0072         SubBandIndex = (iSubBand-1)*Para.SubBandWidth;
0073         Koffs = Nos*(SubBandIndex-Kf-NsubCar/2);
0074         X_full = circshift([X_filt; zeros(2*Para.nSubcarriers-2*Nifft_o, Para.Ns)], Koffs);
0075         X_total = X_total + X_full;
0076     end
0077     % IFFT of FD signal and select first Para.nSubcarriers+Para.filt_L-1 samples for
0078     % each multi-carrier block
0079     s = ifft(fftshift(X_total, 1), 2*Para.nSubcarriers)*sqrt(Para.nSubcarriers);
0080     s = s(1:Para.nSubcarriers+Para.filt_L-1,:);
0081     s = s(:).';
0082     % power normalization
0083     norm_fact=ComputeNormFact(Para);
0084     s = s.*norm_fact;
0085 else
0086     s=zeros(Para.N_T,(Para.nSubcarriers+Para.filt_L-1)*Para.Ns);
0087     for index_N_T=1:Para.N_T
0088         data = squeeze(d(index_N_T,Para.ActiveSubcarriers, :));
0089         %initialise final ifft input
0090         X_total = zeros(2*Para.nSubcarriers,Para.Ns);
0091         for iSubBand = 1:Para.NbSubBands
0092             %sub-band separation
0093             %Sub-band symbol
0094             symb = data((iSubBand-1)*Para.SubBandWidth+1:iSubBand*Para.SubBandWidth,:);
0095             %zero-padding before ifft, done sothat the right ifft bins are loaded
0096             Kf = (Nifft_o - Para.SubBandWidth)/2;
0097             symbol_padded = [zeros(Kf, Para.Ns);symb;zeros(Kf, Para.Ns)];
0098             x_short = ifft(symbol_padded, Nifft_o);
0099             %zero-padding before fft
0100             Kt = Nifft_o*(Nos-1);
0101             x_ext = [x_short; zeros(Kt, Para.Ns)];
0102             X_ext = fftshift(fft(x_ext, Nos*Nifft_o));
0103             %FD sub-band filtering
0104             X_filt = fftshift(X_ext.*Fcut);
0105             %Place sub-band on corresponding ifft bin and sum resulting FD
0106             %filtered signals
0107             SubBandIndex = (iSubBand-1)*Para.SubBandWidth;
0108             Koffs = Nos*(SubBandIndex-Kf-NsubCar/2);
0109             X_full = circshift([X_filt; zeros(2*Para.nSubcarriers-2*Nifft_o, Para.Ns)], Koffs);
0110             X_total = X_total + X_full;
0111         end
0112         % IFFT of FD signal and select first Para.nSubcarriers+Para.filt_L-1 samples for
0113         % each multi-carrier block
0114         s_temp = ifft(fftshift(X_total, 1), 2*Para.nSubcarriers)*sqrt(Para.nSubcarriers);
0115         s_temp = s_temp(1:Para.nSubcarriers+Para.filt_L-1,:);
0116         s_temp = s_temp(:).';
0117         % power normalization
0118         norm_fact=ComputeNormFact(Para);
0119         s(index_N_T,:) = s_temp.*norm_fact;
0120     end
0121 end
0122 
0123 end

Generated on Mon 24-Jun-2019 13:51:48 by m2html © 2005