Perfect channel estimation for OFDM (via H=Y/X)

11 views (last 30 days)
Despite using the same channel for convolution, each time I get a different estimated channel. Could you please tell me what I'm doing wrong? I want to demonstrate that I can estimate the same channel for different modulated signals (dataIn).
M=4;
nfft = 512; % Number of data carriers
% Generate random data
dataIn = randi([0 M-1],1,nfft,1);
% Apply QPSK modulation
qamSig = qammod(dataIn,M,'UnitAveragePower',true);
% Taking IFFT
x_ifft1 = sqrt(nfft) * ifft(fftshift(qamSig),nfft);
% transmit through the channel
yhat2 = conv(x_ifft1,channelTD.');
% set the signal power to '1'
yhat2 = yhat2 / sqrt(var(yhat2));
% Taking FFT OFDM for the perfect channel knowledge
y_fft2 = (1/sqrt(nfft))*(fft(fftshift(yhat2),nfft));
% Estimate Channel
EstimatedChannel = y_fft2 ./ qamSig;

Accepted Answer

vidyesh
vidyesh on 22 Sep 2023
Hello zburcin,
I understand that you are trying to perform Channel Estimation in OFDM. Making the following changes to your code will resolve the issue.
  1. Multiplication in the DFT domain is equivalent to circular convolution in the discrete-time domain. You can substitute yhat2 = conv(x_ifft1,channelTD.');” with “yhat2 = cconv(x_ifft1,channelTD',nfft);”
  2. Setting Signal Power to 1, should be done for transmitted signal not for received Signal. Please remove theyhat2 = yhat2 / sqrt(var(yhat2));” line from your code.
  3. As the Cyclic Prefix is not being added, we do not need to shift the signal. You can remove the “fftshift” from the following lines.
a. x_ifft1 = sqrt(nfft) * ifft(fftshift(qamSig),nfft);
b. y_fft2 = (1/sqrt(nfft))*(fft(fftshift(yhat2),nfft));
Note that the data in “EstimatedChannel” variable will be in the frequency domain.To directly compare it with the data in “channelTD.mat,” conversion to time domain by using “fft” is necessary.
You can find more information about the “cconv” function here, https://in.mathworks.com/help/signal/ref/cconv.html.
  2 Comments
zburcin
zburcin on 27 Sep 2023
Dear @vidyesh,
Thank you so much for your comment.
Do I need to keep 'fftshift' if I also add the Cyclic Prefix?
vidyesh
vidyesh on 28 Sep 2023
Hi zburcin,
In the context of performing OFDM with a cyclic prefix, it is not necessary to use the 'fftshift' method. Instead, the cyclic prefix is appended to the data before applying the 'ifft' function, and the corresponding bits are removed after the 'fft' operation.
For more information on the 'fftshift' function and the concept of cyclic prefix, you can refer to the following documentation:

Sign in to comment.

More Answers (0)

Categories

Find more on Signal Processing in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!