addChannelModel
Add custom channel or path loss model
Description
addChannelModel(
adds a custom channel model or path loss model to the wireless network simulation. The
networkSimulator
,customMdl
)addChannelModel
function sets the ChannelFunction
property of the wirelessNetworkSimulator
object to the custom model specified at input.
Input Arguments
networkSimulator
— Wireless network simulator
wirelessNetworkSimulator
object
Wireless network simulator, specified as a wirelessNetworkSimulator
object.
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)
The 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.
Field | Description |
ID | Unique receiver node identifier. |
Position | Position of the receiver node in 3-D Cartesian coordinates
(x , y , z ). Units are
in meters. |
Velocity | Velocity of the receiver node
(Vrx ,
Vry ,
Vrz ) in the x -,
y -, and z -directions. Units are in
meters per second. |
The packets from the transmitter node is a structure with these fields.
Field | Description |
Type | Type of input signal packet, specified as one of these values: 0, 1, 2, 3, and 4.
|
TransmitterID | Unique transmitter node identifier, specified as a positive scalar integer. |
TransmitterPosition | Position of the transmitter node in 3-D Cartesian coordinates
(x , y , z ). Units
are in meters. |
TransmitterVelocity | Velocity of the transmitter node
(Vtx ,
Vty ,
Vtz ) in the
x -, y -, and
z -directions. Units are in meters per second. |
StartTime | Time at which the transmitter starts transmitting the packets, specified as a non-negative scalar. Units are in seconds. |
Duration | Duration of the transmitter packet, specified as a positive scalar. Units are in seconds. |
Power | Average power consumption during transmission. Units are in dBm. |
CenterFrequency | Center frequency of the carrier signal. Units are in Hz. |
Bandwidth | Carrier signal bandwidth. Units are in Hz. |
Abstraction | Type of abstraction, specified as a logical scalar.
The default value is 0. |
SampleRate | Sample rate of the packet, specified as a numeric scalar in samples per
second. This field is applicable only if the value of the
Abstraction field is set to 0. The default value is [
]. |
DirectToDestination | Information about the transmitted packet, specified as a numeric scalar integer.
|
Data | Time-domain samples or frame information.
|
Metadata | 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.
Data Types: function_handle
Version History
Introduced in R2022b
See Also
Objects
Functions
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)