Home > WaveComBox > Toolbox > Receiver > Equalizer.m

Equalizer

PURPOSE ^

Equalization of the demodulated symbols.

SYNOPSIS ^

function [ x, B ] = Equalizer( z, C, ParaModulation, EqualizerType, ParaEqualizer )

DESCRIPTION ^

 Equalization of the demodulated symbols.

 function [ x, B ] = Equalizer( z, C, ParaModulation, modulation )
 function [ x, B ] = Equalizer( z, C, ParaModulation, modulation, EqualizerType )
 function [ x, B ] = Equalizer( z, C, ParaModulation, modulation, EqualizerType, ParaEqualizer )

 The function works for MIMO and SISO systems depending on the type of
 equalizer being used. See the help related to the specific equalizer
 functions called by the present parent function.

 Input arguments:

   z: demodulated OFDM symbols. Size: matrix [2*Para.M, ~] if
   Para.N_R == 1, multidimensional array [Para.N_R, 2*Para.M, ~]
   if Para.N_R > 1.   

   C: channel impulse response. Multidimensional array [Para.N_R, Para.N_T, ~].

   ParaModulation: structure containing the modulation parameters.

   EqualizerType: optional (by default 'SingleTap'), determines the type
   of equalizer to compute and use. Several options are possible,
   depending on the modulation.

       'SingleTap': conventional single-tap equalization.

       'MultiTapFS': multi-tap equalization using frequency sampling
       design (only for FBMC-OQAM).

       'MultiTapFullMMSE': multi-tap equalization using general MMSE
       design (only for FBMC-OQAM).

       'ParallelMultistage': parallel multistage equalization. (only for
       FBMC-OQAM).

       'FrequencySpreading': frequency spreading equalization. (only for
       FBMC-OQAM).

       'TimeDomain': time domain equalization directly on the received
       signal prior to demodulation.

   ParaEqualizer: structure containing parameters of the equalizer.
   Depending on the equalizer type, the structure may contain optional
   arguments (set to default values) and/or mandatory arguments:

       ParaEqualizer.criterion: specific version of the equalizer,
       optional, default value: 'ZF'.

       ParaEqualizer.B: mandatory if ParaEqualizer.criterion is set to
       'Specific'. 

       ParaEqualizer.r: received signal, mandatory for EqualizerType
       'ParallelMultiStage', 'FrequencySpreading' and 'TimeDomain'.

       ParaEqualizer.L_eq: number of coefficients of the multi-tap
       equalizers, optional, default value: 3.

       ParaEqualizer.R: number of additional parallel analysis filterbanks
       of the multistage equalizer, optional, default value: 1.

       ParaEqualizer.N: block size of the overlap-and-save algorithm,
       optional, default value: 4*Para.M.

       ParaEqualizer.Kov: discarded samples from each block of N samples,
       optional, default value: ceil(length(C(1,1,:))/2)*2.

 Ouput arguments:

   x: equalized symbols. Size: matrix [2*Para.M, ~] if Para.S == 1,
   multidimensional array [para.S, 2*Para.M, ~] if Para.S > 1.   

   B: (optional, only for SingleTap EqualizerType) equalizing matrices
   used at each subcarrier. Size: vector [2*Para.M ,1] if Para.N_T == 1
   and multidimensional array [Para.S, Para.N_R, 2*Para.M] otherwise.

 See also OFDM_EQUALIZERSINGLETAP, FBMC_OQAM_EQUALIZERSINGLETAP,
 FBMC_OQAM_EQUALIZERMULTITAPFS, FBMC_OQAM_EQUALIZERMULTITAPFULLMMSE,
 FBMC_OQAM_EQUALIZERPARALLELMULTISTAGE,
 FBMC_OQAM_EQUALIZERFREQUENCYSPREADINGRECEIVER,
 EQUALIZERTIMEDOMAINOVERLAPANDSAVE.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ x, B ] = Equalizer( z, C, ParaModulation, EqualizerType, ParaEqualizer )
0002 % Equalization of the demodulated symbols.
0003 %
0004 % function [ x, B ] = Equalizer( z, C, ParaModulation, modulation )
0005 % function [ x, B ] = Equalizer( z, C, ParaModulation, modulation, EqualizerType )
0006 % function [ x, B ] = Equalizer( z, C, ParaModulation, modulation, EqualizerType, ParaEqualizer )
0007 %
0008 % The function works for MIMO and SISO systems depending on the type of
0009 % equalizer being used. See the help related to the specific equalizer
0010 % functions called by the present parent function.
0011 %
0012 % Input arguments:
0013 %
0014 %   z: demodulated OFDM symbols. Size: matrix [2*Para.M, ~] if
0015 %   Para.N_R == 1, multidimensional array [Para.N_R, 2*Para.M, ~]
0016 %   if Para.N_R > 1.
0017 %
0018 %   C: channel impulse response. Multidimensional array [Para.N_R, Para.N_T, ~].
0019 %
0020 %   ParaModulation: structure containing the modulation parameters.
0021 %
0022 %   EqualizerType: optional (by default 'SingleTap'), determines the type
0023 %   of equalizer to compute and use. Several options are possible,
0024 %   depending on the modulation.
0025 %
0026 %       'SingleTap': conventional single-tap equalization.
0027 %
0028 %       'MultiTapFS': multi-tap equalization using frequency sampling
0029 %       design (only for FBMC-OQAM).
0030 %
0031 %       'MultiTapFullMMSE': multi-tap equalization using general MMSE
0032 %       design (only for FBMC-OQAM).
0033 %
0034 %       'ParallelMultistage': parallel multistage equalization. (only for
0035 %       FBMC-OQAM).
0036 %
0037 %       'FrequencySpreading': frequency spreading equalization. (only for
0038 %       FBMC-OQAM).
0039 %
0040 %       'TimeDomain': time domain equalization directly on the received
0041 %       signal prior to demodulation.
0042 %
0043 %   ParaEqualizer: structure containing parameters of the equalizer.
0044 %   Depending on the equalizer type, the structure may contain optional
0045 %   arguments (set to default values) and/or mandatory arguments:
0046 %
0047 %       ParaEqualizer.criterion: specific version of the equalizer,
0048 %       optional, default value: 'ZF'.
0049 %
0050 %       ParaEqualizer.B: mandatory if ParaEqualizer.criterion is set to
0051 %       'Specific'.
0052 %
0053 %       ParaEqualizer.r: received signal, mandatory for EqualizerType
0054 %       'ParallelMultiStage', 'FrequencySpreading' and 'TimeDomain'.
0055 %
0056 %       ParaEqualizer.L_eq: number of coefficients of the multi-tap
0057 %       equalizers, optional, default value: 3.
0058 %
0059 %       ParaEqualizer.R: number of additional parallel analysis filterbanks
0060 %       of the multistage equalizer, optional, default value: 1.
0061 %
0062 %       ParaEqualizer.N: block size of the overlap-and-save algorithm,
0063 %       optional, default value: 4*Para.M.
0064 %
0065 %       ParaEqualizer.Kov: discarded samples from each block of N samples,
0066 %       optional, default value: ceil(length(C(1,1,:))/2)*2.
0067 %
0068 % Ouput arguments:
0069 %
0070 %   x: equalized symbols. Size: matrix [2*Para.M, ~] if Para.S == 1,
0071 %   multidimensional array [para.S, 2*Para.M, ~] if Para.S > 1.
0072 %
0073 %   B: (optional, only for SingleTap EqualizerType) equalizing matrices
0074 %   used at each subcarrier. Size: vector [2*Para.M ,1] if Para.N_T == 1
0075 %   and multidimensional array [Para.S, Para.N_R, 2*Para.M] otherwise.
0076 %
0077 % See also OFDM_EQUALIZERSINGLETAP, FBMC_OQAM_EQUALIZERSINGLETAP,
0078 % FBMC_OQAM_EQUALIZERMULTITAPFS, FBMC_OQAM_EQUALIZERMULTITAPFULLMMSE,
0079 % FBMC_OQAM_EQUALIZERPARALLELMULTISTAGE,
0080 % FBMC_OQAM_EQUALIZERFREQUENCYSPREADINGRECEIVER,
0081 % EQUALIZERTIMEDOMAINOVERLAPANDSAVE.
0082 
0083 % This file is part of WaveComBox: www.wavecombox.com and is distributed under
0084 % the terms of the MIT license. See accompanying LICENSE file.
0085 % Original author: François Rottenberg, May 8, 2018.
0086 % Contributors:
0087 % Change log:
0088 
0089 ParaEqualizer.a=[];
0090 if isfield(ParaEqualizer,'criterion') ==0
0091     ParaEqualizer.criterion='ZF';
0092 end
0093 if isfield(ParaEqualizer,'B') ==0
0094     B=[];
0095 end
0096 if exist ('EqualizerType','var')==0
0097    EqualizerType='SingleTap'; 
0098 end
0099 
0100 switch ParaModulation.Modulation
0101     case {'CP-OFDM', 'F-OFDM', 'W-OFDM'}
0102         switch EqualizerType
0103             case 'SingleTap'
0104                 if strcmp(ParaEqualizer.criterion,'Specific')==1
0105                     [x, B] = OFDM_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation, ParaEqualizer.B );
0106                 else
0107                     [x, B] = OFDM_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation );
0108                 end
0109             case 'TimeDomain'
0110                 if isfield(ParaEqualizer,'r')==0
0111                     error('Missing argument: received signal "ParaEqualizer.r"')
0112                 end
0113                 if isfield(ParaEqualizer,'N')==0
0114                     ParaEqualizer.N=4*ParaModulation.M;
0115                 end
0116                 if isfield(ParaEqualizer,'Kov')==0
0117                     ParaEqualizer.Kov=ceil(length(C(1,1,:))/2)*2;
0118                 end
0119                 [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, ParaEqualizer.N, ParaEqualizer.Kov, ParaEqualizer.criterion, ParaModulation );
0120                 x=Demodulator( r_eq, ParaModulation );
0121             otherwise
0122                 error('Equalizer type not defined for CP-OFDM modulation')
0123         end
0124     case 'FBMC-OQAM'
0125         switch EqualizerType
0126             case 'SingleTap'
0127                 if strcmp(ParaEqualizer.criterion,'Specific')==1
0128                     [x, B] = FBMC_OQAM_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation, ParaEqualizer.B );
0129                 else
0130                     [x, B] = FBMC_OQAM_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation );
0131                 end
0132             case 'MultiTapFS'
0133                 if isfield(ParaEqualizer,'L_eq')==0
0134                     ParaEqualizer.L_eq=3;
0135                 end
0136                 [ x ] = FBMC_OQAM_EqualizerMultiTapFS( z, C, ParaEqualizer.L_eq, ParaEqualizer.criterion, ParaModulation );
0137             case 'MultiTapFullMMSE'
0138                 if isfield(ParaEqualizer,'L_eq')==0
0139                     ParaEqualizer.L_eq=3;
0140                 end
0141                 [ x ] = FBMC_OQAM_EqualizerMultiTapFullMMSE( z, C, ParaEqualizer.L_eq, ParaModulation );
0142             case 'ParallelMultistage'
0143                 if isfield(ParaEqualizer,'r')==0
0144                     error('Missing argument: received signal "ParaEqualizer.r"')
0145                 end
0146                 if isfield(ParaEqualizer,'R')==0
0147                     ParaEqualizer.R=1;
0148                 end
0149                 [ x ] = FBMC_OQAM_EqualizerParallelMultistage( ParaEqualizer.r, C, ParaEqualizer.R, ParaEqualizer.criterion, ParaModulation );
0150             case 'FrequencySpreading'
0151                 if isfield(ParaEqualizer,'r')==0
0152                     error('Missing options argument: received signal "options.r"')
0153                 end
0154                 [ x ] = FBMC_OQAM_EqualizerFrequencySpreadingReceiver( ParaEqualizer.r, C, ParaEqualizer.criterion, ParaModulation );
0155             case 'TimeDomain'
0156                 if isfield(ParaEqualizer,'r')==0
0157                     error('Missing options argument: received signal "options.r"')
0158                 end
0159                 if isfield(ParaEqualizer,'N')==0
0160                     ParaEqualizer.N=4*ParaModulation.M;
0161                 end
0162                 if isfield(ParaEqualizer,'Kov')==0
0163                     ParaEqualizer.Kov=ceil(length(C(1,1,:))/2)*2;
0164                 end
0165                 [ r_eq ] = EqualizerTimeDomainOverlapandsave( ParaEqualizer.r, C, ParaEqualizer.N, ParaEqualizer.Kov, ParaEqualizer.criterion, ParaModulation );
0166                 x=Demodulator( r_eq, ParaModulation );
0167             otherwise
0168                 error('Equalizer type not defined for FBMC-OQAM modulation')
0169         end
0170         
0171     case 'UFMC'
0172          switch EqualizerType %Same equalizer as for CP-OFDM
0173             case 'SingleTap'
0174                 if strcmp(ParaEqualizer.criterion,'Specific')==1
0175                     [x, B] = UFMC_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation, ParaEqualizer.B );
0176                 else
0177                     [x, B] = UFMC_EqualizerSingleTap( z, C, ParaEqualizer.criterion, ParaModulation );
0178                 end
0179             case 'TimeDomain'
0180                 if isfield(ParaEqualizer,'r')==0
0181                     error('Missing argument: received signal "ParaEqualizer.r"')
0182                 end
0183                 if isfield(ParaEqualizer,'N')==0
0184                     ParaEqualizer.N=4*ParaModulation.M;
0185                 end
0186                 if isfield(ParaEqualizer,'Kov')==0
0187                     ParaEqualizer.Kov=ceil(length(C(1,1,:))/2)*2;
0188                 end
0189                 [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, ParaEqualizer.N, ParaEqualizer.Kov, ParaEqualizer.criterion, ParaModulation );
0190                 x=Demodulator( r_eq, ParaModulation );
0191             otherwise
0192                 error('Equalizer type not defined for UFMC modulation')
0193          end
0194     otherwise
0195         error('Modulation not implemented')
0196 end
0197 
0198 
0199 end
0200

Generated on Mon 14-Oct-2019 13:48:34 by m2html © 2005