Home > WaveComBox > Toolbox > CP_OFDM > PerformanceAnalysis > OFDM_MSESingleTapTheor.m

OFDM_MSESingleTapTheor

PURPOSE ^

Computes OFDM theoretical MSE for single-tap pre-equalizing and equalizing matrices.

SYNOPSIS ^

function [ MSE_theo ] = OFDM_MSESingleTapTheor( B, C, Para, A )

DESCRIPTION ^

 Computes OFDM theoretical MSE for single-tap pre-equalizing and equalizing matrices.

 function [ MSE_theo_approx ] = OFDM_MSESingleTapTheor( B, C, Para )
 function [ MSE_theo_approx ] = OFDM_MSESingleTapTheor( B, C, Para, A )

 The function works for SISO and MIMO time-invariant systems. The MSE is
 aggregated over all spatial streams.

 Input arguments:

   B: equalizing matrices at each subcarrier. Size: vector [Para.nSubcarriers, 1]
   if Para.N_T == Para.N_R == 1 and multidimensional array
   [Para.S,Para.N_R,Para.nSubcarriers] otherwise

   C: channel impulse response. Vector if Para.N_R == 1 and
   multidimensional array [Para.N_R, Para.N_T, ~] if Para.N_R > 1.

   Para: structure containing the modulation parameters.

   A: (optional, by default identity) pre-equalizing matrices at each
   subcarrier. Size: vector [Para.nSubcarriers, 1] if Para.N_T == Para.N_R == 1 and
   multidimensional array [Para.T,Para.S,Para.nSubcarriers] otherwise

 Outputs arguments:

   MSE_theo: MSE at each subcarrier. Size: vector [Para.nSubcarriers, 1]

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ MSE_theo ] = OFDM_MSESingleTapTheor( B, C, Para, A )
0002 % Computes OFDM theoretical MSE for single-tap pre-equalizing and equalizing matrices.
0003 %
0004 % function [ MSE_theo_approx ] = OFDM_MSESingleTapTheor( B, C, Para )
0005 % function [ MSE_theo_approx ] = OFDM_MSESingleTapTheor( B, C, Para, A )
0006 %
0007 % The function works for SISO and MIMO time-invariant systems. The MSE is
0008 % aggregated over all spatial streams.
0009 %
0010 % Input arguments:
0011 %
0012 %   B: equalizing matrices at each subcarrier. Size: vector [Para.nSubcarriers, 1]
0013 %   if Para.N_T == Para.N_R == 1 and multidimensional array
0014 %   [Para.S,Para.N_R,Para.nSubcarriers] otherwise
0015 %
0016 %   C: channel impulse response. Vector if Para.N_R == 1 and
0017 %   multidimensional array [Para.N_R, Para.N_T, ~] if Para.N_R > 1.
0018 %
0019 %   Para: structure containing the modulation parameters.
0020 %
0021 %   A: (optional, by default identity) pre-equalizing matrices at each
0022 %   subcarrier. Size: vector [Para.nSubcarriers, 1] if Para.N_T == Para.N_R == 1 and
0023 %   multidimensional array [Para.T,Para.S,Para.nSubcarriers] otherwise
0024 %
0025 % Outputs arguments:
0026 %
0027 %   MSE_theo: MSE at each subcarrier. Size: vector [Para.nSubcarriers, 1]
0028 %
0029 
0030 % This file is part of WaveComBox: www.wavecombox.com and is distributed under the terms of the MIT license. See accompanying LICENSE file.
0031 % Original author: François Rottenberg, May 3, 2018.
0032 % Contributors:
0033 % Change log:
0034 
0035 N_R=Para.N_R;
0036 N_T=Para.N_T;
0037 S=Para.S;
0038 
0039 if exist('A','var')==0
0040     A=zeros(N_T,S,Para.nSubcarriers);
0041     for m=1:Para.nSubcarriers
0042         A(:,:,m)=1./sqrt(S)*eye(N_T);
0043     end
0044 else
0045     A=A./sqrt(S);
0046 end
0047 
0048 
0049 %% Theoretical approximation of the MSE [TSP1]
0050 
0051 % Compute CFR and its derivatives
0052 H=zeros(N_R,N_T,Para.nSubcarriers);
0053 for i=1:N_R
0054     for j=1:N_T        
0055         H(i,j,:)=fft(squeeze(C(i,j,:)),Para.nSubcarriers).';
0056     end
0057 end
0058 
0059 % Noise power
0060 Para.Es_N0=10.^(Para.Es_N0_dB/10);
0061 N0=Para.Es./Para.Es_N0;
0062 
0063 % Compute MSE at each active subcarrier
0064 MSE_theo=zeros(Para.nSubcarriers,1);
0065 for m=Para.ActiveSubcarriers
0066     if N_T==1 && N_R==1
0067         H_m=H(m);
0068         B_m=B(m);
0069         A_m=A(m);
0070     else
0071         H_m=H(:,:,m);
0072         B_m=B(:,:,m);
0073         A_m=A(:,:,m);
0074     end
0075     I=1./sqrt(Para.S)*eye(S,S);
0076     MSE_theo(m)= Para.Es* trace( (B_m*H_m*A_m-I)*(B_m*H_m*A_m-I)'  )...
0077         +N0*(1+Para.CP)*trace(B_m*B_m');
0078 end
0079 
0080 
0081 
0082 end
0083

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