Home > WaveComBox > Example > CP_OFDM > SISOChannelEstimationTimeVariant.m

SISOChannelEstimationTimeVariant

PURPOSE ^

Channel estimation for SISO CP-OFDM under doubly selective channel

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Channel estimation for SISO CP-OFDM under doubly selective channel

 Example showing how to perform channel estimation and channel
 equalization of a SISO CP-OFDM system under time and frequency
 selective channel. Channel estimation relies on the combination of a
 preamble at the beginning of the transmision and pilots scattered in the
 data frame.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Channel estimation for SISO CP-OFDM under doubly selective channel
0002 %
0003 % Example showing how to perform channel estimation and channel
0004 % equalization of a SISO CP-OFDM system under time and frequency
0005 % selective channel. Channel estimation relies on the combination of a
0006 % preamble at the beginning of the transmision and pilots scattered in the
0007 % data frame.
0008 
0009 % This file is part of WaveComBox: www.wavecombox.com and is distributed under
0010 % the terms of the MIT license. See accompanying LICENSE file.
0011 % Original author: François Rottenberg, May 8, 2018.
0012 % Contributors:
0013 % Change log:
0014 
0015 % Definition of general parameters
0016 Para=InitializeChainParameters( 'CP-OFDM' ) % initialize parameters of the FBMC-OQAM chain
0017 Para.Ns=1000;
0018 Para.Es_N0_dB=20;
0019 Para.Velocity=30;
0020 
0021 % Parameters of the preamble
0022 Para.PreamblePilotSubcarriers=Para.ActiveSubcarriers(1:2:end);
0023 Para.PreambleLength=1;
0024 A=sqrt(length(Para.ActiveSubcarriers)/(length(Para.PreamblePilotSubcarriers) ));
0025 d_TR=A.*((randi([0 1],Para.nSubcarriers,1))*2-1);
0026 
0027 % Parameters of the scattered pilots
0028 PilotSpacingTime=4;
0029 PilotSpacingFrequency=4;
0030 Para.ScatteredPilotSubcarriers=Para.ActiveSubcarriers(1:PilotSpacingFrequency:end);
0031 Para.ScatteredPilotSymbols=PilotSpacingTime:PilotSpacingTime:Para.Ns;
0032 Para.Ep=4*Para.Es;
0033 
0034 %% Transmitter
0035 
0036 % Preamble generation
0037 d_preamble=GeneratePreamble(d_TR, Para);
0038 % Data payload
0039 d_data = GenerateData (Para); % Generate real PAM symbols
0040 % Scattered pilot
0041 d_data_pilot=InsertScattteredPilot(d_data,Para);
0042 % OFDM modulator (FFT + CP)
0043 d=MergePreambleData(d_preamble,d_data_pilot,Para);
0044 s = Modulator(d, Para ); % CP-OFDM modulation
0045 
0046 
0047 %% Channel
0048 % C=GenerateRayleighChannelReal('ITU_VehA', Para);
0049 [C, Psi]=GenerateRayleighChannelReal('ITU_VehA', Para, 'Jakes', length(s));
0050 r = Channel_Multipath( s, C ); % Multipath channel
0051 r=Channel_AWGN( r, Para ); % AWGN channel, SNR fixed in Para
0052 
0053 %% Receiver
0054 % OFDM demodulator (CP removal + IFFT)
0055 z = Demodulator( r, Para ); % CP-OFDM demodulation
0056 [ z_preamble,z_data_pilot ] = SeparatePreambleData(z,Para);
0057 
0058 % L=2*Para.M*Para.CP;
0059 L=length(C(1,1,:,1));
0060 C_est=ChannelEstimator(z_preamble,L,d_TR,Para,'Preamble'); % First channel estimation relying on the preamble transmission
0061 
0062 d_hat=zeros(Para.nSubcarriers,Para.Ns);
0063 ParaEqualizer.criterion='MMSE'; % Criterion chosen to design each equalizer
0064 [~, ParaEqualizer.B]=Equalizer( z_data_pilot(:,1), C_est, Para, 'SingleTap', ParaEqualizer ); % Computation of the equalizing matrices and equalization of the first symbol
0065 for l=1:Para.Ns
0066     if mod(l,PilotSpacingTime)==0 % Check if symbol "l" is a pilot symbol index
0067         d_TR=zeros(Para.nSubcarriers,1);
0068         d_TR(Para.ScatteredPilotSubcarriers)=d_data_pilot(Para.ScatteredPilotSubcarriers,l);
0069         C_est=ChannelEstimator(z_data_pilot(:,l),L, d_TR, Para,'ScatteredPilots'); % Update of the channel impulse response estimate
0070         ParaEqualizer.criterion='MMSE'; % Criterion chosen to recompute the equalizer
0071         [~, ParaEqualizer.B]=Equalizer( z_data_pilot(:,1), C_est, Para, 'SingleTap', ParaEqualizer ); % Update of the equalizing matrices and equalization of the first symbol
0072     end   
0073     % Conventional single-tap equalizer
0074     ParaEqualizer.criterion='Specific'; % Choose ParaEqualizer.B as specific equalizing matrices
0075     [d_hat(:,l), ~] = Equalizer( z_data_pilot(:,l), 0, Para, 'SingleTap', ParaEqualizer );
0076 end
0077 
0078 %% Compute performance metrics and plot results
0079 MSE = MSEComputes( d_data_pilot, d_hat, Para );
0080 geo_average_MSE_dB = 10*log10(mean(MSEComputes( d_data_pilot, d_hat, Para )))
0081 arith_average_MSE_dB = mean(10*log10(MSEComputes( d_data_pilot, d_hat, Para )))
0082 
0083 figure
0084 plot(Para.ActiveSubcarriers, 10*log10(MSE),'xb','markersize',8,'linewidth',1.5)
0085 xlabel('Subcarrier index')
0086 ylabel('MSE [dB]')
0087 xlim([min(Para.ActiveSubcarriers) max(Para.ActiveSubcarriers)])
0088 
0089 
0090 
0091 
0092

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