Home > WaveComBox > Example > MSEComparisonFBMC_OFDM.m

MSEComparisonFBMC_OFDM

PURPOSE ^

MSE comparison between 2x2 FBMC-OQAM and CP-OFDM systems

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 MSE comparison between 2x2 FBMC-OQAM and CP-OFDM systems

 Example showing a basic MSE comparison of an FBMC-OQAM and CP-OFDM 2x2
 MIMO system using WaveComBox. Parameters of the two modulations, defined in
 structures ParaFBMC and ParaOFDM are flexible. For more information, one
 can refer to the help of each functions.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % MSE comparison between 2x2 FBMC-OQAM and CP-OFDM systems
0002 %
0003 % Example showing a basic MSE comparison of an FBMC-OQAM and CP-OFDM 2x2
0004 % MIMO system using WaveComBox. Parameters of the two modulations, defined in
0005 % structures ParaFBMC and ParaOFDM are flexible. For more information, one
0006 % can refer to the help of each functions.
0007 
0008 % This file is part of WaveComBox: www.wavecombox.com and is distributed under
0009 % the terms of the MIT license. See accompanying LICENSE file.
0010 % Original author: François Rottenberg, May 8, 2018.
0011 % Contributors:
0012 % Change log:
0013 
0014 %% Modulation parameters
0015 
0016 % Parameters of the FBMC-OQAM modulation (see definition of
0017 % FBMC_OQAM_InitializeChainParameters() for a definition of all modulation
0018 % parameters)
0019 ParaFBMC=InitializeChainParameters( 'FBMC-OQAM' ) % initialize parameters by default of the FBMC-OQAM chain
0020 ParaFBMC.ActiveSubcarriers=(11:ParaFBMC.nSubcarriers-10);
0021 ParaFBMC.Ns=2000;
0022 ParaFBMC.N_T=2;
0023 ParaFBMC.N_R=2;
0024 ParaFBMC.S=min(ParaFBMC.N_T,ParaFBMC.N_R);
0025 
0026 % Parameters of the CP-OFDM modulation (see definition of
0027 % OFDM_InitializeChainParameters() for a definition of all modulation
0028 % parameters)
0029 ParaOFDM=InitializeChainParameters( 'CP-OFDM' ) % initialize the general parameters by default of the CP-OFDM chain
0030 ParaOFDM.ActiveSubcarriers=(11:ParaOFDM.nSubcarriers-10);
0031 ParaOFDM.Ns=1000;
0032 ParaOFDM.N_T=2;
0033 ParaOFDM.N_R=2;
0034 ParaOFDM.S=min(ParaOFDM.N_T,ParaOFDM.N_R);
0035 
0036 
0037 %% Transmitter
0038 % FBMC-OQAM
0039 d_FBMC = GenerateData (ParaFBMC); % Generate data symbols
0040 s_FBMC = Modulator(d_FBMC, ParaFBMC ); % FBMC-OQAM modulation
0041 
0042 % CP-OFDM
0043 d_OFDM = GenerateData (ParaOFDM); % Generate data symbols
0044 s_OFDM = Modulator(d_OFDM, ParaOFDM ); % CP-OFDM modulation
0045 
0046 
0047 %% Channel
0048 C=GenerateRayleighChannelReal('ITU_VehA', ParaFBMC); %
0049 
0050 r_FBMC = Channel_Multipath( s_FBMC, C ); % Multipath channel
0051 r_FBMC = Channel_AWGN( r_FBMC, ParaFBMC ); % AWGN channel, SNR fixed in Para
0052 
0053 r_OFDM = Channel_Multipath( s_OFDM, C ); % Multipath channel
0054 r_OFDM = Channel_AWGN( r_OFDM, ParaOFDM ); % AWGN channel, SNR fixed in Para
0055 
0056 %% Receiver
0057 
0058 % FBMC-OQAM demodulation and conventional single-tap equalization
0059 z_FBMC = Demodulator( r_FBMC, ParaFBMC ); % FBMC demodulation
0060 [ x, B ] = Equalizer( z_FBMC, C, ParaFBMC, 'SingleTap' ); % Single-tap equalization
0061 d_hat = real(x);
0062 
0063 NMSE_FBMC = 2/ParaFBMC.Es* MSEComputes( d_FBMC, d_hat, ParaFBMC ); % Normalized MSE
0064 NMSE_FBMC_singletaptheo=2/ParaFBMC.Es*MSESingleTapTheo( B, C, ParaFBMC ); % Theoretical MSE for single-tap equalizer
0065 
0066 % CP-OFDM demodulation and conventional single-tap equalization
0067 z_OFDM = Demodulator( r_OFDM, ParaOFDM ); % OFDM demodulation
0068 [ d_hat, B ] = Equalizer( z_OFDM, C, ParaOFDM, 'SingleTap'); % Single-tap equalization
0069 
0070 NMSE_OFDM = 1/ParaOFDM.Es*MSEComputes( d_OFDM, d_hat, ParaOFDM ); % Normalized MSE
0071 NMSE_OFDM_singletaptheo=1/ParaOFDM.Es*MSESingleTapTheo( B, C, ParaOFDM ); % Theoretical MSE for single-tap equalizer
0072 
0073 %% Plot performance metrics
0074 % Periodograms
0075 N_fft = 1e4;
0076 psd_FBMC = 10*log10(sum(abs(1/sqrt(N_fft).*fft(s_FBMC,N_fft,2)).^2,1));
0077 psd_OFDM = 10*log10(sum(abs(1/sqrt(N_fft).*fft(s_OFDM,N_fft,2)).^2,1));
0078 frequency = ParaFBMC.nSubcarriers/N_fft*(0:N_fft-1);
0079 figure
0080 plot(frequency,psd_OFDM,'--r')
0081 hold on
0082 plot(frequency,psd_FBMC,'-b')
0083 xlim([frequency(1) frequency(end)])
0084 xlabel('Subcarrier index')
0085 legend('CP-OFDM','FBMC-OQAM')
0086 
0087 figure
0088 plot(ParaFBMC.ActiveSubcarriers,10*log10(NMSE_FBMC_singletaptheo(ParaFBMC.ActiveSubcarriers)),'-b','markersize',8,'linewidth',1.5)
0089 hold on
0090 plot(ParaFBMC.ActiveSubcarriers,10*log10(NMSE_FBMC),'xb','markersize',8,'linewidth',1.5)
0091 plot(ParaOFDM.ActiveSubcarriers,10*log10(NMSE_OFDM_singletaptheo(ParaOFDM.ActiveSubcarriers)),'--r','markersize',8,'linewidth',1.5)
0092 plot(ParaOFDM.ActiveSubcarriers,10*log10(NMSE_OFDM),'xr','markersize',8,'linewidth',1.5)
0093 xlabel('Subcarrier index')
0094 ylabel('NMSE [dB]')
0095 xlim([min(ParaFBMC.ActiveSubcarriers) max(ParaFBMC.ActiveSubcarriers)])
0096 legend('FBMC-OQAM theo','FBMC-OQAM simu','CP-OFDM theo','FBMC-OQAM simu')

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