Reply To: Massive MIMO Simulation -spatialChannelModel

Bashar Tahir

Dear Farhan,

The spatialChannelModel requires setting the number of the horizontal and vertical antenna elements in scStr.simulation.antennaConfiguration. Their product should be equal to the total number of transmit antennas, that is, nHor x nVer = nTxAntennas.

At the moment in the simulator, the antennaConfiguration is fixed. In the massiveMIMO sceraio, it is set to {[4,4]}, which corresponds to 16 transmit antennas. This is the reason you are getting this error, because when you sweep over nAntennasBaseStation and it is not 16, then you get a mismatch error, as the antennaConfiguration does not match nAntennasBaseStation.

So, you can use the following fix: Go to +Parameters/SimulationParameters.m, then go to the function initializeLinks(obj, Links, BS, UE). Add the following line to the begining of function:
obj.simulation.antennaConfiguration(:) = {[obj.simulation.nAntennasBaseStation(1), 1]};

This will make sure that the antennaConfiguration is adjusted based on nAntennasBaseStation. Here, [obj.simulation.nAntennasBaseStation(1), 1] means that the configuration correponds to a uniform linear array (ULA), where all the antennas are put on the horizontal direction (1D).

Best regards,