# Channel

Model isotropic free-space or ray-tracing based channel

Since R2023b

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

expand all

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

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select .

### Main

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, see `FreeSpace` (Antenna Toolbox).

• `Ray-tracing` — The block models propagation paths using 3-D environment geometry. For more information, see `RayTracing` (Antenna Toolbox).

Note

To specify the `Ray-tracing` option, you must have a license for Antenna Toolbox™.

TX Antenna

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`.

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

RX Antenna

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`.

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

Medium

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`.

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`.

Ray-tracing

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 SystemValid map values
`"geographic"`
• A `siteviewer` (Antenna Toolbox) objecta.

• A terrain name, if the function is called with an output argument. Valid terrain names are `"none"`, `"gmted2010"`, or the name of the custom terrain that you create using `addCustomTerrain` (Antenna Toolbox).

`"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, 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`

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.

#### Dependencies

To enable this parameter, set Source of channel model to `Ray-tracing`.

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.

#### Dependencies

To enable this parameter, set Source of channel model to `Ray-tracing`.

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`.

Channel Configuration

Carrier frequencies of the channel, specified as a nonnegative scalar or row vector in Hz, kHz, MHz, or GHz.

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.

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.

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 the internal variables without expanding the subsystem.

• — Edit the subsystem and Expand the subsystem in the Simulink canvas.

• — Cancel the operation.

Note

Once you click the or button, the operation cannot be undone.

### TX Modeling

Technique to model frequency-dependent channel parameters, specified as one of these values:

• `Time domain (rationalfit)` — 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 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 (rationalfit)`.

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, 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

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 (rationalfit)` — 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`.

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 (rationalfit)`.

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`.

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

Technique to model frequency-dependent channel parameters, specified as one of these values:

• `Time domain (rationalfit)` — 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 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 (rationalfit)`.

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, 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.

expand all

## Version History

Introduced in R2023b

expand all