Home > WaveComBox > Toolbox > CP_OFDM > Modulation > OFDM_Demodulator.m

OFDM_Demodulator

PURPOSE ^

OFDM demodulates received signal.

SYNOPSIS ^

function [ z ] = OFDM_Demodulator( r, Para)

DESCRIPTION ^

 OFDM demodulates received signal.

 function [ z ] = OFDM_Demodulator( d, Para )

 The function works for SISO and MIMO systems.

 Input arguments:

   r: received signal. Size: matrix [Para.N_R,
   Para.nSubcarriers(1+Para.CP)*(Para.Ns+Para.PreambleLength)]

   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 ] = OFDM_Demodulator( r, Para)
0002 % OFDM demodulates received signal.
0003 %
0004 % function [ z ] = OFDM_Demodulator( d, 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(1+Para.CP)*(Para.Ns+Para.PreambleLength)]
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 
0022 % This file is part of WaveComBox: www.wavecombox.com and is distributed under the terms of the MIT license. See accompanying LICENSE file.
0023 % Original author: François Rottenberg, May 3, 2018.
0024 % Contributors:
0025 % Change log:
0026 
0027 L_CP=Para.nSubcarriers*Para.CP;
0028 
0029 if Para.N_R==1
0030     temp= reshape(r,Para.nSubcarriers+L_CP,Para.Ns+Para.PreambleLength);
0031     z=sqrt(Para.nSubcarriers+L_CP)/(Para.nSubcarriers)*fft(temp(L_CP+1:end,:));
0032 else
0033     z=zeros(Para.N_R, Para.nSubcarriers, Para.Ns+Para.PreambleLength);
0034     for index_N_R=1:Para.N_R
0035         temp= reshape(r(index_N_R,:),Para.nSubcarriers+L_CP,Para.Ns+Para.PreambleLength);
0036         z(index_N_R,:,:)=sqrt(Para.nSubcarriers+L_CP)/(Para.nSubcarriers)*fft(temp(L_CP+1:end,:));
0037     end
0038 end
0039 
0040 
0041 
0042 end
0043

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