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

12 次查看(过去 30 天)
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;

采纳的回答

vidyesh
vidyesh 2023-9-22
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 个评论
zburcin
zburcin 2023-9-27
Dear @vidyesh,
Thank you so much for your comment.
Do I need to keep 'fftshift' if I also add the Cyclic Prefix?
vidyesh
vidyesh 2023-9-28
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:

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Signal Processing 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by