Hi Elcinur,
To simulate a frequency-selective channel using the ‘nrTDLChannel’ object in MATLAB, you can refer the following steps and the attached code snippets:
1. Initialize the TDL channel model using the ‘nrTDLChannel’ function and set the parameters like DelayProfile, DelaySpread, and MaximumDopplerShift to define the channel's characteristics.
channel.DelayProfile = 'TDL-C';
channel.DelaySpread = 30e-9;
channel.MaximumDopplerShift = 5;
channel.NumTransmitAntennas = 1;
channel.NumReceiveAntennas = 1;
channel.SampleRate = 15.36e6;
2. Simulate the channel by generating a random signal and passing it through the ‘nrTDLChannel’.
txWaveform = randn(numSubcarriers, 1);
[rxWaveform, pathGains] = channel(txWaveform);
3. Use the Fast Fourier Transform (FFT) function to convert time-domain path gains to the frequency domain, which helps us analyze frequency selectively.
pathGainsFreqDomain = fft(pathGains, numSubcarriers, 1);
4. Examine the frequency-selective nature by displaying path gains for each subcarrier
plot(1:numSubcarriers, 20*log10(abs(pathGainsFreqDomain)));
xlabel('Subcarrier Index');
ylabel('Path Gain (dB)');
title('Frequency Response of the Channel');
You may refer to the output below for better understanding:
To know more about ‘nrTDLChannel’ object or ‘fft’ function in MATLAB, kindly refer the following documentations:
Happy Coding!