Channel
Libraries:
RF Blockset /
Circuit Envelope /
Systems
Description
Use the Channel block from the Circuit Envelope library to model an isotropic free-space or ray-tracing based channel to account for the effect of antennas and RF propagation in a medium.
Examples
Connect Transmitter and Receiver Using Channel Block
This example shows how to use the Channel block to:
Model a ray-tracing based channel to account for the effect of antennas and RF propagation in a medium.
Connect the transmitter and receiver system and measure signal power.
Visualize the propagation scenario.
View the internal structure of the Channel block.
Model Ray-Tracing Based Channel
To model a ray-tracing based channel using the Channel block, define the transmitter and receiver site elements. These elements require you to define a set of frequencies that characterize the channel in Hz along with the latitude and the longitude of the base station and user equipment.
fch = (6:0.5:8)*1e9; bsPosition = [22.287495, 114.140706]; uePosition = [22.287323,114.140859];
Create a siteviewer
object and connect it to building data in the OpenStreetMap
file. The siteviewer
object can be used to display the transmitter sites, receiver sites, and RF propagation visualizations.
viewer = siteviewer("Basemap","openstreetmap","Buildings","hongkong.osm"); pause(5) viewer.Visible = false;
Create transmitter (TX) and receiver (RX) antenna.
dtx = design(dipole,fch(1)); drx = copy(dtx);
Calculate the input impedance of the antennas at fch
. Pre-solving the antennas at the frequencies characterizing the channel is required for simulation with the channel block. In addition, the impedances at the first frequency are used for matching in the RF systems described in the model.
Zin_t = impedance(dtx,fch); Zin_t = Zin_t(1); Zin_r = impedance(drx,fch); Zin_r = Zin_r(1);
Create a base station TX site with the TX antenna at fch
frequencies.
bsSite = txsite("Name","Base station", ... "Latitude",bsPosition(1),"Longitude",bsPosition(2),... "Antenna",dtx,... "AntennaHeight",4,... % in m "TransmitterFrequency",fch);
Create user-equipment RX site. Note that rxsite
object is not accepting frequency input and channel frequencies are obtained from TX site.
ueSite = rxsite("Name","UE", ... "Latitude",uePosition(1),"Longitude",uePosition(2),... "AntennaHeight",1,... % in m "Antenna",drx);
Define the number of reflections for ray-tracing analysis and create a propagation model.
reflectionsOrder = 1; pm = propagationModel("raytracing",... "Method","sbr",... "MaxNumReflections",reflectionsOrder);
The Channel block uses the command raytrace(bsSite,ueSite,pm,"Map",viewer)
internally to obtain the ray-tracing information and cache it. However, for internal path calculations, the block considers the antennas as isotropic, as the Antenna blocks already contain gain (pattern) information. Note that if you use the raytrace
function on antennas that you designed using Antenna Toolbox™, it can result in loss of EM solution that was specifically obtained for the relevant frequencies.
To facilitate the above definitions, set the Channel block parameters to:
Source of the channel —
Ray-tracing
Map —
viewer
Propagation model —
pm
TX site —
bsSite
RX site —
ueSite
Carrier frequencies —
fc
Measure Signal Power by Connecting Transmitter and Receiver System
The simrf_channel.slx
model includes a simple transmitter that consists of a signal source and power amplifier, as well as a simple receiver that includes a low-noise amplifier. To establish the connection, insert the Channel block between the transmitter and receiver systems.
Open and run the model with the Channel block.
fc = [6e9 7e9 8e9]; open_system('simrf_channel.slx'); sim("simrf_channel.slx");
Visualize Propagation Scenario
Open the Channel block and click the View Site button.
Note that the Site Viewer now displays the propagation scenario. Observe the power from the RX system. This value is very close to the expected value of -35.74
, which you can obtain using the sigstrength
command. The small difference is due to antenna gain differences on account of the spherical resolution pattern.
View Internal Structure of Channel Block
To view the internal structure of the Channel block, select the Channel block and press Ctrl+U to view under the block's mask. There are four rays connecting the TX and RX antennas.
Move User-Equipment Antenna and Measure Signal Power
Move the antenna at the user equipment site.
uePosition = [22.287323,114.140920]; ueSite = rxsite("Name","UE", ... "Latitude",uePosition(1),"Longitude",uePosition(2),... "AntennaHeight",1,... % in m "Antenna",drx);
Open the Channel block and click the View Site button to see the propagation scenario change to reflect a movement in the antenna. Observe that a building is obstructing the line of sight and that there is only one path between the antennas.
Run the simulation to observe that the power coming from the RX system is significantly lower now. Select the Channel block and press Ctrl+U to open the mask. There is there is only one path between the antennas now.
Use Three-element Array in TX Site and Observe Channel Inputs
Create a three-element TX antenna.
dtx_arr = design(linearArray("NumElements",3),fch(1),dipole); Zin_t_arr = impedance(dtx_arr,fch); bsSite_arr = txsite("Name","Base station", ... "Latitude",bsPosition(1),"Longitude",bsPosition(2),... "Antenna",dtx_arr,... "AntennaHeight",4,... % in m "TransmitterFrequency",fch);
Double click the Channel block and set the TX site parameter to bsSite_arr
. Select Apply and observe that there are now three TX inputs to the Channel block.
Observe that the Channel block is connected internally to the three inputs of the TX Antenna block. Change the TX site edit box value to bsSite
and press Apply to return to a single port.
Further Exploration
Further explore this example by:
Changing RF propagation properties such as antenna location or types to see how the changes impact the output in the Site Viewer and the simulation speed.
Using
bsSite_arr
in TX site and change the model accordingly by copying the TX chain to feed each of the array port for full model simulation.Simulating the model for a time-varying signal (for example, replace the Constant block with a Sine block) and running the simulation for a longer time. Changing the modeling option in the Channel block to observe effect of antenna frequency dependent impedance and pattern on temporal results.
Expanding or editing the Channel block using the Edit System button.
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
Main
Source of channel model — Channel source
Isotropic free-space
(default) | Ray-tracing
Channel source, specified as one of these:
Isotropic free-space
— The block models the behavior of electromagnetic radiation from a point of transmission as it travels through free space. Free-space propagation models have no enforced frequency range, assume line-of-sight (LOS) conditions, and disregard terrain, the curvature of the Earth, and other obstacles. For more information, seeFreeSpace
(Antenna Toolbox).Ray-tracing
— The block models propagation paths using 3-D environment geometry. For more information, seeRayTracing
(Antenna Toolbox).Note
To specify the
Ray-tracing
option, you must have a license for Antenna Toolbox™.
Antenna gain — Gain of transmitter antenna
0 dBi
(default) | real scalar or vector | positive scalar or vector
Gain of the transmitter antenna, specified as a real scalar or vector, or as a positive scalar or vector.
If you specify a real scalar or vector, then set the Antenna gain parameter unit as
dBi
.If you specify a positive scalar or vector, then set the Antenna gain parameter unit as
None
.If you are specify a vector, the vector must be of the same length as the vector in the Carrier frequencies parameter.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Impedance (Ohm) — Input impedance of transmitter antenna
50
(default) | complex scalar or vector
Input impedance of the transmitter antenna, specified as a complex scalar or vector in ohms. The vector must be of the same length as the vector that you specify in the Carrier frequencies parameter.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Data Types: double
Complex Number Support: Yes
Antenna gain — Gain of receiver antenna
0 dBi
(default) | real scalar or vector | positive scalar or vector
Gain of the receiver antenna, specified as a real scalar or vector, or as a positive scalar or vector.
If you specify a real scalar or vector, then set the Antenna gain parameter unit as
dBi
.If you specify a positive scalar or vector, then set the Antenna gain parameter unit as
None
.If you are specify a vector, the vector must be of the same length as the vector in the Carrier frequencies parameter.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Impedance (Ohm) — Input impedance of receiver antenna
50
(default) | complex scalar or vector
Input impedance of the receiver antenna, specified as a complex scalar or vector in ohms. The vector must be of the same length as the vector that you specify in the Carrier frequencies parameter.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Data Types: double
Complex Number Support: Yes
Path loss — Free-space path loss
10 dB
(default) | real scalar or vector | positive scalar or vector
Free-space path loss, specified as a real scalar or vector, or as a positive scalar or vector.
If you specify a real scalar or vector, then set the Antenna gain parameter unit as
dB
.If you specify a positive scalar or vector, then set the Antenna gain parameter unit as
None
.If you are specify a vector, the vector must be of the same length as the vector in the Carrier frequencies parameter.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Path delay — Free-space path delay
0 s
(default) | nonnegative scalar
Free-space path delay, specified as a nonnegative scalar in seconds, milliseconds, microseconds, or nanoseconds.
Dependencies
To enable this parameter, set Source of channel model to
Isotropic free-space
.
Map — Map for visualization or surface data
"none"
(default) | siteviewer
object | triangulation
object | string scalar | character vector
Map for visualization or surface data, specified as a siteviewer
object, a triangulation
object, a string scalar, or a character
vector. Valid and default map values depend on the coordinate system, as specified in
the propagation model.
Coordinate System | Valid map values |
---|---|
"geographic" |
|
"cartesian" |
|
a Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®. |
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Data Types: char
| string
Propagation model — Propagation model
'raytracing'
(default) | RayTracing
object
Propagation model, specified as 'raytracing'
or as a RayTracing
(Antenna Toolbox)
object. The default value is 'raytracing'
, which uses the SBR
method, finds paths with up to two reflections and zero diffractions, and discards
paths that are more than 40 dB weaker than the strongest path.
You can create a RayTracing
(Antenna Toolbox)
object by using the propagationModel
(Antenna Toolbox) function. RayTracing
objects enable
you to specify properties such as the ray tracing method, the maximum number of
reflections and diffractions, path loss thresholds, and building and terrain
materials.
For information about the differences between ray tracing methods, see Choose a Propagation Model (Antenna Toolbox).
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Data Types: char
| string
Tx site — Transmitter site
txsite
object | array of txsite
objects
Transmitter site, specified as a txsite
(Antenna Toolbox)
object or an array of txsite
objects. If you specify an array, the
txsite
objects comprising the array must be identical except for
the TransmitterFrequency
property.
Note
Analyze the antenna, array, or PCB stack objects that you are specifying in the Tx site for at least one frequency before using them in the block.
Specify the
Antenna
property of thetxsite
object as either an antenna element from the Antenna Catalog (Antenna Toolbox) or an array element from the Array Catalog (Antenna Toolbox). For more information, seetxsite
(Antenna Toolbox).
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Rx site — Receiver site
rxsite
object
Receiver site, specified as an rxsite
(Antenna Toolbox) object.
Note
Analyze the antenna, array, or PCB stack objects that you are specifying in the Rx site for at least one frequency before using them in the block.
Specify the
Antenna
property of therxsite
object as either an antenna element from the Antenna Catalog (Antenna Toolbox) or an array element from the Array Catalog (Antenna Toolbox). For more information, seerxsite
(Antenna Toolbox).
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
View Site — Display RF propagation scenarios
button
Click this button to display the transmitter sites, receiver sites, and RF
propagation rays. For more information, see siteviewer
(Antenna Toolbox). Before clicking this button, specify the siteviewer
(Antenna Toolbox)
object in the Map parameter.
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Carrier frequencies — Carrier frequencies of channel
2.1 GHz
(default) | nonnegative scalar or row vector
Carrier frequencies of the channel, specified as a nonnegative scalar or row vector in Hz, kHz, MHz, or GHz.
Simulate noise — Simulate thermal noise
'on'
(default) | 'off'
Select this parameter to simulate thermal noise in the channel. You must select Simulate noise in the Configuration block before you enable the parameter in this block. Note that the noise is only added in TX and RX antennas and not in the medium surrounding them.
Ground and hide negative terminals — Ground RF circuit terminals
'on'
(default) | 'off'
Select this option to ground and hide the negative terminals. Clear this parameter to expose the negative terminals. By exposing these terminals, you can connect them to other parts of your model.
Edit System — Edit or expand channel block
button
Click this button to break the Channel block's links to the library and replace the variables with values that the block estimates using the block parameters. When clicking this button, the Channel block is either made a simple unmasked subsystem, or gets expanded. For more information, see Edit Channel Block.
Clicking this button brings up a dialog box with the following options:
Edit System — Edit the internal variables without expanding the subsystem.
Expand System — Edit the subsystem and Expand the subsystem in the Simulink canvas.
Cancel — Cancel the operation.
Note
Once you click the Edit System or Expand System button, the operation cannot be undone.
TX Modeling
Modeling options — Technique to model frequency-dependent channel parameters
Time domain
(default) | Frequency domain
Technique to model frequency-dependent channel parameters, specified as one of these values:
Time domain
— This technique creates an analytical rational model that approximates all the data in the range.Frequency domain
— This technique computes the baseband impulse response for each carrier frequency independently. This technique is based on convolution. You can also specify the duration of the impulse response when you select this option. For more information, see Compare Time and Frequency Domain Simulation Options for S-parameters.
The two analysis techniques use these frequency-dependent parameters.
Antenna impedance — This parameter relates to the input impedance at the transmitter antenna terminals and is used in RF system simulation.
Normalized vector effective length — This parameter establishes a relationship between the current flowing at the transmitter antenna terminals and the radiated far-field region in a specific direction. Due to reciprocity, this parameter also establishes a relationship between the incident field and the induced open-circuit voltage on the antenna terminals.
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Relative error desired (dB) — Relative error for the rational fit
-40
(default) | scalar
Relative error for the rational fit, specified as a scalar. The block applies this value in time-domain modeling of transmitter antenna impedance and normalized vector effective length and displays the corresponding rational fitting results in the block mask.
Dependencies
To enable this property, set Modeling options to
Time domain
.
Automatically estimate impulse response duration — Automatically calculate impulse response duration
'on'
(default) | 'off'
Select this parameter to automatically calculate the impulse response duration or clear this parameter to manually specify the impulse response duration using the Impulse response duration parameter. The block applies the duration value in frequency-domain modeling of transmitter antenna impedance and normalized vector effective length.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
.
Impulse response duration — Impulse response duration
0
s
(default) | scalar
Impulse response duration, specified as a scalar in seconds. The block applies the duration value in frequency-domain modeling of transmitter antenna impedance and normalized vector effective length.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
and clear Automatically
estimate impulse response duration.
Medium Modeling
Modeling options — Technique to model frequency-dependent channel parameters
Frequency domain
(default) | Time domain
Since R2024a
Technique to model frequency-dependent channel parameters, specified as one of these values:
Frequency domain
— This technique computes the baseband impulse response for each carrier frequency independently. This technique is based on convolution. You can also specify the duration of the impulse response when you select this option. For more information, see Compare Time and Frequency Domain Simulation Options for S-parameters.Time domain
— This technique creates an analytical rational model that approximates all the data in the range.
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Relative error desired (dB) — Relative error for rational fit
-40
(default) | scalar
Since R2024a
Relative error for the rational fit, specified as a scalar in dB. The block applies this value in time-domain modeling of the medium and displays the corresponding rational fitting results in the block mask.
Dependencies
To enable this property, set Modeling options to
Time domain
.
Automatically estimate impulse response duration — Automatically calculate impulse response duration
'off'
(default) | 'on'
Since R2024a
Select this parameter to automatically calculate the impulse response duration or clear this parameter to manually specify the impulse response duration using the Impulse response duration parameter. The block applies the duration value in frequency-domain modeling of the medium.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
.
Impulse response duration — Impulse response duration
0
s
(default) | scalar
Since R2024a
Impulse response duration, specified as a scalar in seconds. The block applies the duration value in frequency-domain modeling of the medium.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
and clear Automatically
estimate impulse response duration.
RX Modeling
Modeling options — Technique to model frequency-dependent channel parameters
Time domain
(default) | Frequency domain
Technique to model frequency-dependent channel parameters, specified as one of these values:
Time domain
— This technique creates an analytical rational model that approximates all the data in the range.Frequency domain
— This technique computes the baseband impulse response for each carrier frequency independently. This technique is based on convolution. You can also specify the duration of the impulse response when you select this option. For more information, see Compare Time and Frequency Domain Simulation Options for S-parameters.
The two analysis techniques use these frequency-dependent parameters.
Antenna impedance — This parameter relates to the input impedance at the receiver antenna terminals and is used in RF system simulation.
Normalized vector effective length — This parameter establishes a relationship between the current flowing at the transmitter antenna terminals and the radiated far-field region in a specific direction. Due to reciprocity, this parameter also establishes a relationship between the incident field and the induced open-circuit voltage on the antenna terminals.
Dependencies
To enable this parameter, set Source of channel model to
Ray-tracing
.
Relative error desired (dB) — Relative error for the rational fit
-40
(default) | scalar
Relative error for the rational fit, specified as a scalar. The block applies this value in time-domain modeling of receiver antenna impedance and normalized vector effective length and displays the corresponding rational fitting results in the block mask.
Dependencies
To enable this property, set Modeling options to
Time domain
.
Automatically estimate impulse response duration — Automatically calculate impulse response duration
'on'
| 'off'
Select this parameter to automatically calculate the impulse response duration or clear this parameter to manually specify the impulse response duration using the Impulse response duration parameter. The block applies the duration value in frequency-domain modeling of receiver antenna impedance and normalized vector effective length.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
.
Impulse response duration — Impulse response duration
0
s
(default) | scalar
Impulse response duration, specified as a scalar. The block applies the duration value in frequency-domain modeling of receiver antenna impedance and normalized vector effective length.
Dependencies
To set this parameter, set Modeling options to
Frequency domain
and clear Automatically
estimate impulse response duration.
Algorithms
Edit Channel Block
By clicking the Edit System button the Channel block can be made editable within a subsystem, or expanded such that the content of the block is moved into the containing system. The contents of a Channel block include a transmitting antenna, a medium, and a receiving antenna as shown in this figure.
The Medium block applies the acquired path loss, phase shift, and delay of rays on the
signals flowing between transmitter and receiver antennas. In the figure, the channel is
represented by four rays traveling between the two antennas. Before editing, the Channel
block translates the mask parameters into parameters of the internal blocks using a function
that is accessible for viewing. To view the function, type edit
simrfV2_channel_params.m
at the command line. As an example, the
Radiated carrier frequencies parameter of the internal transmitting
antenna block is specified by the nested structure field
channelParams.Antenna_TX.CarrierFreqRad
.
The value of this field is specified in the simrfV2_channel_params
function as equal to the value specified in the Carrier
frequencies parameter of the Channel block. When editing the
Channel block, the nested structure fields populating each mask parameter of the internal
blocks are replaced by corresponding numbers or objects that are placed in the model
workspace. These numbers or objects can be accessed and modified by the user.
While the internal Antenna blocks are linked to the Antenna block in the Circuit Envelope Elements library, the internal Medium block is unlinked when the Channel block is edited and can be modified. This Medium block can be represented differently depending on the Source of channel model used.
For
Isotropic free-space
, the Medium block simply represents the free-space.For
Ray-tracing
, the Medium block accounts for the effect of each ray traveling between the antennas.
Type edit simrfV2medium.m
at the command line to understand how the
rays are processed in the Medium block. The rays are obtained from Channel block mask
parameters using raytrace
function in the
simrfV2_channel_params
function. Since the internal Medium block can be
arbitrarily modified after editing the Channel block, the Mask Initialization of the block
can be altered to call a user created function.
Version History
Introduced in R2023bR2024b: Time domain (rationalfit)
parameter renamed
The Time domain (rationalfit)
parameter value in the
Modeling options parameter has been renamed to Time
domain
in the Channel block.
When you open a model created before R2024b containing an Channel block,
the parameter name displays as Time domain
.
R2024a: Model frequency-dependent propagation scenario using Channel block
You can now use the Channel block to model a frequency-dependent Ray-trace propagation scenario between two RF systems using options in the Medium Modeling tab.
R2024a: Modeling TX and Modeling RX tabs are renamed
The Modeling TX and Modeling RX tabs in the Channel block have been renamed to TX Modeling and RX Modeling, respectively.
When you open a model created before R2024a containing the Channel block, the software displays the names of the Modeling TX and Modeling RX tabs as TX Modeling and RX Modeling tabs, respectively.
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)