Add custom channel or path loss model
networkSimulator — Wireless network simulator
Wireless network simulator, specified as a
customMdl — Function for computing custom channel or path loss model
MATLAB function handle
Function for computing the custom channel or path loss model, specified as a MATLAB® function handle. The syntax for the custom function must be of the format:
rxData = customFcnName(rxInfo,txData)
rxInfo input is the receiver node information, and the
txData input specifies the transmitted packets. The simulator
automatically passes information about the receiver node and the packets transmitted by
a transmitter node as inputs to the custom function.
The receiver node information is a structure with these fields.
|Unique receiver node identifier.|
|Position of the receiver node in 3-D Cartesian coordinates
|Velocity of the receiver node
The packets from the transmitter node is a structure with these fields.
Type of input signal packet, specified as one of these values: 0, 1, 2, 3, and 4.
|Unique transmitter node identifier, specified as a positive scalar integer.|
|Position of the transmitter node in 3-D Cartesian coordinates
|Velocity of the transmitter node
|Time at which the transmitter starts transmitting the packets, specified as a non-negative scalar. Units are in seconds.|
|Duration of the transmitter packet, specified as a positive scalar. Units are in seconds.|
|Average power consumption during transmission. Units are in dBm.|
|Center frequency of the carrier signal. Units are in Hz.|
|Carrier signal bandwidth. Units are in Hz.|
Type of abstraction, specified as a logical scalar.
The default value is 0.
|Sample rate of the packet, specified as a numeric scalar in samples per
second. This field is applicable only if the value of the
Information about the transmitted packet, specified as a numeric scalar integer.
Time-domain samples or frame information.
|A structure representing the technology-specific and abstraction-specific information of the packet.|
The custom channel model function applies channel effects to the packets transmitted by the simulator. The modified packets are then sent back to the must simulator. The packets returned at the output must be a structure with same fields as those of the transmitted packets.
Introduced in R2022b