%% Estimate Downlink Channel Characteristics
% Estimate the channel for an RMC R.12 (four-antenna transmit diversity) waveform.
% Initialize a cell-wide configuration structure for transmission of RMC R.12.

rc = 'R.12';
enb = lteRMCDL(rc);

% Initialize a channel estimation configuration. The averaging window size is configured in terms of resource elements (REs), time, and frequency. Use cubic interpolation with an averaging window of 1-by-1 REs. No noise estimate or averaging is required because no noise is not present in this example. You can therefore set the frequency window and time window size to one.

cec.FreqWindow = 1;
cec.TimeWindow = 1;
cec.InterpType = 'cubic';
cec.PilotAverage = 'UserDefined';
cec.InterpWinSize = 3;
cec.InterpWindow = 'Causal';

% Generate a transmit waveform for the specified cell-wide settings by using the lteRMCDLTool function.

txWaveform = lteRMCDLTool(enb,[1;0;0;1]);

% Model the propagation channel by combining all transmit antennas into one receive antenna.

rxWaveform = sum(txWaveform,2);

% Perform OFDM demodulation.

rxGrid = lteOFDMDemodulate(enb,rxWaveform);

% Estimate the channel characteristics, displaying the size of the returned array. Confirm that the noise power spectral density estimate is zero.

[hest,noiseEst] = lteDLChannelEstimate(enb,cec,rxGrid);
disp(size(hest))
disp(noiseEst)

% Copyright 2012 The MathWorks, Inc.