Home > WaveComBox > Toolbox > W_OFDM > Modulation > W_OFDM_Demodulator.m

W_OFDM_Demodulator

PURPOSE ^

W-OFDM demodulates received signal.

SYNOPSIS ^

function [ z ] = W_OFDM_Demodulator( r, Para)

DESCRIPTION ^

 W-OFDM demodulates received signal.

 function [ z ] = W_OFDM_Demodulator( r, Para )

 The function works for SISO and MIMO systems.

 Input arguments:

   r: received signal. Size: matrix [Para.N_R,
   (Para.nSubcarriers+CP_L+Para.win_L)*(Para.Ns)+Para.win_L]

   Para: structure containing the modulation parameters.

 Outputs arguments:

   z: demodulated symbols. Size: matrix [Para.nSubcarriers, Ns+Para.PreambleLength]
   if Para.N_R == 1, multidimensional array [Para.N_R, Para.nSubcarriers,
   Ns+Para.PreambleLength] if Para.N_R > 1.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ z ] = W_OFDM_Demodulator( r, Para)
0002 % W-OFDM demodulates received signal.
0003 %
0004 % function [ z ] = W_OFDM_Demodulator( r, Para )
0005 %
0006 % The function works for SISO and MIMO systems.
0007 %
0008 % Input arguments:
0009 %
0010 %   r: received signal. Size: matrix [Para.N_R,
0011 %   (Para.nSubcarriers+CP_L+Para.win_L)*(Para.Ns)+Para.win_L]
0012 %
0013 %   Para: structure containing the modulation parameters.
0014 %
0015 % Outputs arguments:
0016 %
0017 %   z: demodulated symbols. Size: matrix [Para.nSubcarriers, Ns+Para.PreambleLength]
0018 %   if Para.N_R == 1, multidimensional array [Para.N_R, Para.nSubcarriers,
0019 %   Ns+Para.PreambleLength] if Para.N_R > 1.
0020 
0021 %References :
0022 %    [1] R. Zayani, Y. Medjahdi, H. Shaiek and D. Roviras, "WOLA-OFDM: A Potential Candidate for Asynchronous 5G," 2016 IEEE Globecom Workshops (GC Wkshps), Washington, DC, 2016, pp. 1-5.
0023 %    [2] 3GPP R1-166999, 'Detailed configuration of f-OFDM and W-OFDM for LLS evaluation'
0024 
0025 % This file is part of WaveComBox: www.wavecombox.com and is distributed under the terms of the MIT license. See accompanying LICENSE file.
0026 % Original author: Mathieu Van Eeckhaute, September 26, 2018.
0027 % Contributors:
0028 % Change log:
0029 
0030 CP_L=Para.nSubcarriers*Para.CP;
0031 Fw_RX = W_OFDM_RX_window_design(Para);
0032 if Para.N_R==1
0033     %serial to parallel conversion
0034     sig_rx = zeros(Para.nSubcarriers+CP_L+2*Para.win_L, Para.Ns);
0035     for kBlock = 1:Para.Ns
0036         sig_rx(:, kBlock) = r((Para.nSubcarriers+CP_L+Para.win_L)*(kBlock-1)+1:...
0037             ((Para.nSubcarriers+CP_L+Para.win_L))*(kBlock-1)+(Para.nSubcarriers+CP_L+2*Para.win_L));
0038     end
0039     %RX windowing [1]
0040     sig_rx = sig_rx(1+CP_L-Para.win_L:end-Para.win_L, :).*(Fw_RX);
0041     %Overlap and Add
0042     start_win = sig_rx(1:2*Para.win_L, :);
0043     end_win =sig_rx(end-2*Para.win_L+1:end, :);
0044     % figure, hold on, plot(start_win), plot(end_win)
0045     sig_rx(1:2*Para.win_L, :) = sig_rx(1:2*Para.win_L, :) + end_win;
0046     sig_rx(end-2*Para.win_L+1:end, :) = sig_rx(end-2*Para.win_L+1:end, :) + start_win;
0047     sig_rx = sig_rx(Para.win_L+1:end-Para.win_L, :);
0048     %OFDM demodulator
0049     rx_symbols = 1/sqrt(Para.nSubcarriers)*fft(sig_rx, Para.nSubcarriers, 1);
0050     %compensate for time shift of win_L (incured by design in [1])
0051     z = rx_symbols.*repmat(exp(1j*2*pi*Para.win_L/Para.nSubcarriers.*(0:Para.nSubcarriers-1)).', 1, Para.Ns);
0052 else
0053     error('MIMO not implemented')
0054 end
0055 
0056 
0057 
0058 end
0059

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