Time domain equalization of the received signal efficiently performed using the overlap-and-save algorithm. function [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, N, K_ov, criterion, Para ) function [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, N, K_ov, criterion, Para, B ) The function works for SISO systems and is not dependent on a specific modulation format. Input arguments: r: received signal. Size: vector [1, nFrameSamples]. C: channel impulse response. Multidimensional array [1, 1, ~]. N: block size of the overlap-and-save algorithm. K_ov: discarded samples from each block of N samples, needs to be even. criterion: determines the criterion to use. Several options are possible: 'ZF': zero forcing. 'MMSE': minimum mean squared error. 'Specific': the specific equalizing matrices given in the function argument B should be provided and will be used for equalization. Argument C is not regarded. B: the equalizing matrices at each subcarrier should be provided if 'Specific' equalizer type is chosen.% Para: structure containing the modulation parameters. Ouput arguments: r_eq: equalized signal. Size: vector [1, nFrameSamples].
0001 function [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, N, K_ov, criterion, Para, B ) 0002 % Time domain equalization of the received signal efficiently performed using the 0003 % overlap-and-save algorithm. 0004 % 0005 % function [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, N, K_ov, criterion, Para ) 0006 % function [ r_eq ] = EqualizerTimeDomainOverlapandsave( r, C, N, K_ov, criterion, Para, B ) 0007 % 0008 % The function works for SISO systems and is not dependent on a specific 0009 % modulation format. 0010 % 0011 % Input arguments: 0012 % 0013 % r: received signal. Size: vector [1, nFrameSamples]. 0014 % 0015 % C: channel impulse response. Multidimensional array [1, 1, ~]. 0016 % 0017 % N: block size of the overlap-and-save algorithm. 0018 % 0019 % K_ov: discarded samples from each block of N samples, needs to be even. 0020 % 0021 % criterion: determines the criterion to use. Several 0022 % options are possible: 0023 % 0024 % 'ZF': zero forcing. 0025 % 0026 % 'MMSE': minimum mean squared error. 0027 % 0028 % 'Specific': the specific equalizing matrices given in the function 0029 % argument B should be provided and will be used for equalization. 0030 % Argument C is not regarded. 0031 % 0032 % B: the equalizing matrices at each subcarrier should be provided if 0033 % 'Specific' equalizer type is chosen.% 0034 % Para: structure containing the modulation parameters. 0035 % 0036 % Ouput arguments: 0037 % 0038 % r_eq: equalized signal. Size: vector [1, nFrameSamples]. 0039 % 0040 0041 0042 0043 % This file is part of WaveComBox: www.wavecombox.com and is distributed under the terms of the MIT license. See accompanying LICENSE file. 0044 % Original author: François Rottenberg, May 4, 2018. 0045 % Contributors: 0046 % Change log: 0047 0048 if Para.N_R==1 && Para.N_T==1 0049 nFrameSamples=length(r); 0050 H=squeeze(fft(C,N)).'; 0051 switch criterion 0052 case 'ZF' 0053 B=1./H; 0054 case 'MMSE' 0055 % Noise power 0056 Es_N0=10.^(Para.Es_N0_dB/10); 0057 B=conj(H)./(abs(H).^2+1/Es_N0); 0058 case 'Specific' 0059 if exist('B','var')==0 0060 error('Argument B missing for criterion "Specific"') 0061 end 0062 otherwise 0063 error('Equalizer type not existing') 0064 end 0065 iter=ceil((nFrameSamples)/(N-K_ov)); 0066 for index_iter=1:iter 0067 if(index_iter==1) 0068 block=[zeros(1,K_ov/2), r((index_iter-1)*(N-K_ov)+1:(index_iter)*(N-K_ov)+K_ov/2)]; 0069 elseif(index_iter==iter) 0070 block=[r((index_iter-1)*(N-K_ov)-K_ov/2+1:nFrameSamples) zeros(1,(index_iter)*(N-K_ov)+K_ov/2-nFrameSamples)]; 0071 elseif (index_iter)*(N-K_ov)+K_ov/2 > nFrameSamples 0072 block=[r((index_iter-1)*(N-K_ov)-K_ov/2+1:end) zeros(1,(index_iter)*(N-K_ov)+K_ov/2-nFrameSamples)]; 0073 else 0074 block=r((index_iter-1)*(N-K_ov)-K_ov/2+1:(index_iter)*(N-K_ov)+K_ov/2); 0075 end 0076 temp=fft(block); 0077 for m=1:N 0078 temp(m)=B(m)*temp(m); 0079 end 0080 temp= ifft(temp); 0081 r_eq((index_iter-1)*(N-K_ov)+1:(index_iter)*(N-K_ov))=temp(K_ov/2+1:end-K_ov/2); 0082 end 0083 r_eq=r_eq(1:nFrameSamples); 0084 0085 else 0086 if Para.N_T>Para.N_R 0087 error('Error: N_T>N_R') 0088 else 0089 error('Error: MIMO setting not yet available') 0090 0091 end 0092 0093 end 0094 0095 0096 0097 0098 0099 0100 0101 0102 0103 0104 0105 0106 0107 0108 0109 end 0110