Main Content

swapTransmitAndReceive

Reverse link direction in CDL channel model

Since R2021a

Description

swapTransmitAndReceive(cdl) reverses the link direction in the specified clustered delay line (CDL) channel model by swapping the roles of the transmit and receive antennas in the channel. The swap results in a reciprocal channel model but does not alter the channel fading. Sending waveforms through the channel for both link directions (original and reversed) results in channel path gains that differ only in swapped transmit and receive antenna dimensions. Calling the function again reverts the channel to its original link direction by swapping back the roles of the transmit and receive antennas.

You can use this function during a simulation to model time division duplex (TDD) operation by sending waveforms for each link direction through the channel while maintaining channel reciprocity.

The function swaps the values of these property pairs of the input cdl to reflect the link direction change.

The function also toggles the TransmitAndReceiveSwapped property value of the input cdl between true and false to reflect the actual status of the link direction.

Note

To preserve the reciprocity of a multi-antenna channel, set cdl.NormalizeChannelOutputs to false before calling swapTransmitAndReceive(cdl).

example

Examples

collapse all

Use a single channel model for both a downlink and an uplink transmission by swapping the roles of the transmit and receive antennas in the channel. Confirm that the channel model is reciprocal.

Create a default carrier configuration object for both the downlink and the uplink transmission.

carrier = nrCarrierConfig;

Create and configure the channel model. You can specify either a CDL channel model or a TDL channel model.

channel = nrCDLChannel;                  % For TDL channel model, use nrTDLChannel 
channel.MaximumDopplerShift = 0;
channel.NormalizeChannelOutputs = false; % Avoid normalization by the number of Rx antennas
ofdmInfo = nrOFDMInfo(carrier);
channel.SampleRate = ofdmInfo.SampleRate;

Create a signal for downlink transmission.

channelinfo = info(channel);
txgridDL = nrResourceGrid(carrier,channelinfo.NumTransmitAntennas);
txDL = nrOFDMModulate(carrier,txgridDL);

Account for the maximum channel delay.

channelinfo = info(channel);
maxChDelay = channelinfo.MaximumChannelDelay;
txDL = [txDL; zeros([maxChDelay size(txDL,2)])];

Send the downlink signal through the channel model.

[rxDL,pathGainsDL] = channel(txDL);

Reconfigure the channel model for uplink transmission by swapping the roles of the transmit and receive antennas.

swapTransmitAndReceive(channel);

Create a signal for uplink transmission.

channelInfoUL = info(channel);
txGridUL = nrResourceGrid(carrier,channelInfoUL.NumTransmitAntennas);
txUL = nrOFDMModulate(carrier,txGridUL);

Account for the maximum channel delay.

txUL = [txUL; zeros([maxChDelay size(txUL,2)])];

Send the uplink signal through the reconfigured channel model.

[rxUL,pathGainsUL] = channel(txUL);

Confirm that the channel is reciprocal, that is, the channel fading is the same in both transmissions. The uplink channel path gain and the downlink channel path gain differ only in swapped transmit and receive antenna dimensions.

isequal(pathGainsUL,permute(pathGainsDL,[1 2 4 3]))
ans = logical
   1

Input Arguments

collapse all

CDL channel model, specified as an nrCDLChannel System object. The nrCDLChannel object implements the multi-input multi-output (MIMO) link-level fading channel specified in TR 38.901 Section 7.7.1.

References

[1] 3GPP TR 38.901. “Study on channel model for frequencies from 0.5 to 100 GHz.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2021a