Comparing CDL channel results with NeoRadium
Using CDL-D profile, a delay spread of 10 ns, and UE velocity of 15 km/h:
% To save a new set of files, you need to set the saveFiles to true.
outPath = fileparts(matlab.desktop.editor.getActiveFilename);
disp(outPath);
/Users/shahab/code/Fireball/OpenSource/onGithub/Tests/Wireless/NewProject/OnGit/neoradium/Playground/CompareWithMatlab/CDL/MatlabFiles
v = 15.0; % UE velocity in km/h
fc = 4e9; % carrier frequency in Hz
c = physconst('lightspeed'); % speed of light in m/s
fd = (v*1000/3600)/c*fc; % UE max Doppler frequency in Hz
cdl.DelayProfile = 'CDL-D';
cdl.CarrierFrequency = fc;
cdl.MaximumDopplerShift = fd;
cdl.MeanAngles = [130 70 80 110];
cdl.RandomStream = 'Global stream'; % Use this to be able to match the random numbers in python
Transmit antenna array is a 2 x 2 panel with 2 polarization angles. Receive antenna contains a single element antanna with 2 polarization angles. This means nt=8 and nr=2. The transmit antenna also has some orientation to exercise the code handling transformations between global and local coordinate systems.
cdl.TransmitAntennaArray.Size = [2 2 2 1 1]; % 2x2 antenna panel
cdl.TransmitArrayOrientation = [10; 20; 30]; % Transmit antenna orientation bearing(α), downtilt(β), and slant(γ) angles in degrees
cdl.ReceiveAntennaArray.Size = [1 1 2 1 1]; % 1x1 antenna
cdl.ReceiveAntennaArray.Element = '38.901'; % Make sure we are using 3GPP antennas. (Default is not 3GPP)
curPath = fileparts(matlab.desktop.editor.getActiveFilename())
curPath = '/Users/shahab/code/Fireball/OpenSource/onGithub/Tests/Wireless/NewProject/OnGit/neoradium/Playground/CompareWithMatlab/CDL/MatlabFiles'
Create a random waveform.
Nt = cdlinfo.NumInputSignals;
txWaveform = complex(randn(T,Nt),randn(T,Nt));
save(strcat(outPath,'/txWaveform.mat'),'txWaveform');
txWaveform = load(strcat(outPath,'/txWaveform.mat')).txWaveform; % Read from file for reproducibility
txWaveform(201:204,3:4)
-0.6478 - 0.1199i -0.2126 + 1.1219i
0.2027 - 0.3657i -0.2350 + 0.5164i
0.2795 + 0.0952i -1.5704 - 1.3598i
1.0207 + 0.3367i 0.2162 - 1.0988i
Transmit the input waveform through the channel and get the signal received at the receiver.
rng(123); % For Reproducibility
rxWaveform = cdl(txWaveform);
save(strcat(curPath,'/rxWaveform.mat'),'rxWaveform')
rxWaveform(201:204,2)
-0.0091 + 0.0549i
0.0093 - 0.0458i
0.0008 + 0.0113i
0.0250 - 0.0101i