Home > WaveComBox > Example > CP_OFDM > SISOSynchroAndChannelEstimation.m

SISOSynchroAndChannelEstimation

PURPOSE ^

Synchronization, channel estimation and equalization for SISO CP-OFDM

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Synchronization, channel estimation and equalization for SISO CP-OFDM

 Example showing how to perform synchronization, channel estimation and
 channel equalization of a SISO CP-OFDM system under frequency selective
 channel.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Synchronization, channel estimation and equalization for SISO CP-OFDM
0002 %
0003 % Example showing how to perform synchronization, channel estimation and
0004 % channel equalization of a SISO CP-OFDM system under frequency selective
0005 % channel.
0006 
0007 % This file is part of WaveComBox: www.wavecombox.com and is distributed under
0008 % the terms of the MIT license. See accompanying LICENSE file.
0009 % Original author: François Rottenberg, May 8, 2018.
0010 % Contributors:
0011 % Change log:
0012 
0013 clear all
0014 close all
0015 
0016 % Definition of general parameters
0017 Para=InitializeChainParameters( 'CP-OFDM' ) % initialize parameters of the FBMC-OQAM chain
0018 Para.Ns=20;
0019 Para.Es_N0_dB=20;
0020 
0021 % Parameters of the preamble
0022 Para.PreamblePilotSubcarriers=Para.ActiveSubcarriers(1:2:end);
0023 Para.PreambleLength=2;
0024 A=sqrt(length(Para.ActiveSubcarriers)/(length(Para.PreamblePilotSubcarriers) ));
0025 d_TR=A.*((randi([0 1],Para.nSubcarriers,1))*2-1);
0026 
0027 
0028 %% Transmitter
0029 
0030 % Preamble generation
0031 d_preamble=GeneratePreamble(d_TR, Para,'synchro');
0032 % Data payload
0033 d_data = GenerateData (Para); % Generate data symbols
0034 % Synthesis filterbank
0035 d=MergePreambleData(d_preamble,d_data,Para);
0036 s = Modulator(d, Para ); % CP-OFDM modulation
0037 
0038 
0039 %% Channel
0040 C=GenerateRayleighChannelReal('ITU_VehA', Para);
0041 r = Channel_Multipath( s, C ); % Multipath channel
0042 [ r, Delta_omega, Delta_tau ]=Channel_Desynchronization( r, Para );
0043 r=Channel_AWGN( r, Para ); % AWGN channel, SNR fixed in Para
0044 
0045 %% Receiver
0046 % Synchronization
0047 [r_corrected, Delta_tau_est, Delta_omega_hat ] = Synchronization( r, Para );
0048 
0049 % OFDM demodulator
0050 z = Demodulator( r_corrected, Para ); % CP-OFDM demodulation
0051 [ z_preamble,z_data ] = SeparatePreambleData(z,Para);
0052 
0053 % Channel estimation (algorithm uses an a-priori on the channel impulse
0054 % response length in TD)
0055 L=Para.nSubcarriers*Para.CP;
0056 C_est=ChannelEstimator(z_preamble,L,d_TR,Para);
0057 
0058 % Channel estimation
0059 figure
0060 plot(squeeze(abs(fft(squeeze(C(1,1,:)),Para.nSubcarriers))),'-b')
0061 hold on
0062 Htemp=fft(squeeze(C_est(1,1,:)),Para.nSubcarriers);
0063 plot(abs(Htemp),'xb')
0064 xlim([min(Para.ActiveSubcarriers) max(Para.ActiveSubcarriers)])
0065 xlabel('Subcarrier index')
0066 ylabel('Channel frequency response')
0067 legend('True', 'Estimated')
0068 
0069 
0070 % Conventional single-tap equalizer
0071 ParaEqualizer.criterion='MMSE';
0072 [ d_hat, B ] = Equalizer( z_data, C_est, Para, 'SingleTap', ParaEqualizer );
0073 MSE = MSEComputes( d_data, d_hat, Para );
0074 
0075 
0076 figure
0077 plot(Para.ActiveSubcarriers, 10*log10(MSE),'-xb','markersize',8,'linewidth',1.5)
0078 hold on
0079 xlabel('Subcarrier index')
0080 ylabel('MSE [dB]')
0081 xlim([min(Para.ActiveSubcarriers) max(Para.ActiveSubcarriers)])
0082

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