Hello jordi,
To perform deconvolution and retrieve the OFDM signal from the circularly convolved signal, you can follow these steps:
- Use 'fft' to transform both the convolved signal and the convolution kernel to the frequency domain
- Divide the FFT of the convolved signal by the FFT of the convolution kernel.
- Transform the result back to the time domain using the inverse FFT 'ifft'.
% Example signals
h = randn(1, 2048) + 1i * randn(1, 2048);
ofdmsignal = randn(80, 2048) + 1i * randn(80, 2048);
c = [];
for i = 1:size(ofdmsignal, 1)
c = [c; cconv(h, ofdmsignal(i, :), length(h))]; % Perform circular convolution
end
%% Deconvolution
h_fft = fft(h); % FFT of the convolution kernel
deconvolved_signal = zeros(size(ofdmsignal));
for i = 1:size(c, 1)
% FFT of the convolved signal
convolved_fft = fft(c(i, :));
deconv_fft = convolved_fft ./ h_fft;
deconvolved_signal(i, :) = ifft(deconv_fft);
end
row_index = 1;
original_signal = ofdmsignal(row_index, :);
retrieved_signal = deconvolved_signal(row_index, :);
fprintf('Original Signal (first 5 elements):\n');
disp(original_signal(1:5));
fprintf('Retrieved Signal (first 5 elements):\n');
disp(retrieved_signal(1:5));
figure;
subplot(2, 1, 1);
plot(abs(original_signal));
title('Original Signal Magnitude');
xlabel('Sample Index');
ylabel('Magnitude');
subplot(2, 1, 2);
plot(abs(retrieved_signal));
title('Retrieved Signal Magnitude');
xlabel('Sample Index');
ylabel('Magnitude');
Kindly refer to the documentation by executing the following command in MATLAB Command Window to know more about 'fft' and 'ifft' functions:
doc fft
doc ifft

