# widebandTwoRayChannel

Wideband two-ray propagation channel

## Description

The `widebandTwoRayChannel`

models a wideband two-ray
propagation channel. A two-ray propagation channel is the simplest type of multipath
channel. You can use a two-ray channel to simulate propagation of signals in a
homogeneous, isotropic medium with a single reflecting boundary. This type of medium has
two propagation paths: a line-of-sight (direct) propagation path from one point to
another and a ray path reflected from the boundary.

You can use this System object™ for short-range radar and mobile communications applications where the
signals propagate along straight paths and the earth is assumed to be flat. You can also
use this object for sonar and microphone applications. For acoustic applications, you
can choose nonpolarized fields and adjust the propagation speed to be the speed of sound
in air or water. You can use `widebandTwoRayChannel`

to
model propagation from several points simultaneously.

Although the System object works for all frequencies, the attenuation models for atmospheric gases and rain are valid for electromagnetic signals in the frequency range 1–1000 GHz only. The attenuation model for fog and clouds is valid for 10–1000 GHz. Outside these frequency ranges, the System object uses the nearest valid value.

The `widebandTwoRayChannel`

System object applies range-dependent time delays to the signals, as well as gains or
losses, phase shifts, and boundary reflection loss. When either the source or
destination is moving, the System object applies Doppler shifts to the signals.

Signals at the channel output can be kept *separate* or be
*combined*. If you keep the signals separate, both signals arrive
at the destination separately and are not combined. If you choose to combine the
signals, the two signals from the source propagate separately but are coherently summed
at the destination into a single quantity. Choose this option when the difference
between the sensor or array gains in the directions of the two paths is
insignificant.

In contrast to the `phased.WidebandFreeSpace`

and `phased.WidebandLOSChannel`

System objects, this System object does not support two-way propagation.

To compute the propagation delay for specified source and receiver points:

Define and set up your two-ray channel. See Construction.

Call the

`step`

method to compute the propagated signal using the properties of the`widebandTwoRayChannel`

System object.

**Note**

Alternatively, instead of using the `step`

method
to perform the operation defined by the System object, you can
call the object with arguments, as if it were a function. For example, ```
y
= step(obj,x)
```

and `y = obj(x)`

perform
equivalent operations.

## Construction

creates a
two-ray propagation channel System object, `channel`

= widebandTwoRayChannel`channel`

.

creates a System object, `channel`

= widebandTwoRayChannel(`Name`

,`Value`

)`channel`

, with each specified property
`Name`

set to the specified `Value`

. You can
specify additional name and value pair arguments in any order as
(`Name1,Value1`

,...,`NameN,ValueN`

).

## Properties

`PropagationSpeed`

— Signal propagation speed

`physconst('LightSpeed')`

(default) | positive scalar

Signal propagation speed, specified as a positive scalar. Units are in meters per second. The
default propagation speed is the value returned by
`physconst('LightSpeed')`

. See `physconst`

for more information.

**Example: **`3e8`

**Data Types: **`double`

`OperatingFrequency`

— Operating frequency

`300e6`

(default) | positive scalar

Operating frequency, specified as a positive scalar. Units are in Hz.

**Example: **`1e9`

**Data Types: **`double`

`SpecifyAtmosphere`

— Enable atmospheric attenuation model

`false`

(default) | `true`

Option to enable the atmospheric attenuation model, specified
as a `false`

or `true`

. Set this
property to `true`

to add signal attenuation caused
by atmospheric gases, rain, fog, or clouds. Set this property to `false`

to
ignore atmospheric effects in propagation.

Setting `SpecifyAtmosphere`

to `true`

,
enables the `Temperature`

, `DryAirPressure`

, `WaterVapourDensity`

, `LiquidWaterDensity`

,
and `RainRate`

properties.

**Data Types: **`logical`

`Temperature`

— Ambient temperature

`15`

(default) | real-valued scalar

Ambient temperature, specified as a real-valued scalar. Units are in degrees Celsius.

**Example: **`20.0`

#### Dependencies

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`DryAirPressure`

— Atmospheric dry air pressure

`101.325e3`

(default) | positive real-valued scalar

Atmospheric dry air pressure, specified as a positive real-valued scalar. Units are in pascals (Pa). The default value of this property corresponds to one standard atmosphere.

**Example: **`101.0e3`

#### Dependencies

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`WaterVapourDensity`

— Atmospheric water vapor density

`7.5`

(default) | positive real-valued scalar

Atmospheric water vapor density, specified as a positive real-valued
scalar. Units are in g/m^{3}.

**Example: **`7.4`

#### Dependencies

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`LiquidWaterDensity`

— Liquid water density

`0.0`

(default) | nonnegative real-valued scalar

Liquid water density of fog or clouds, specified as a nonnegative
real-valued scalar. Units are in g/m^{3}.
Typical values for liquid water density are 0.05 for medium fog and
0.5 for thick fog.

**Example: **`0.1`

#### Dependencies

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`RainRate`

— Rainfall rate

`0.0`

(default) | nonnegative scalar

Rainfall rate, specified as a nonnegative scalar. Units are in mm/hr.

**Example: **`10.0`

#### Dependencies

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`SampleRate`

— Sample rate of signal

`1e6`

(default) | positive scalar

Sample rate of signal, specified as a positive scalar. Units are in Hz. The System object uses this quantity to calculate the propagation delay in units of samples.

**Example: **`1e6`

**Data Types: **`double`

`NumSubbands`

— Number of processing subbands

`64`

(default) | positive integer

Number of processing subbands, specified as a positive integer.

**Example: **`128`

**Data Types: **`double`

`EnablePolarization`

— Enable polarized fields

`false`

(default) | `true`

Option to enable polarized fields, specified as `false`

or
`true`

. Set this property to `true`

to enable
polarization. Set this property to `false`

to ignore
polarization.

**Data Types: **`logical`

`GroundReflectionCoefficient`

— Ground reflection coefficient

`-1`

(default) | complex-valued scalar | complex-valued 1-by-*N* row vector

Ground reflection coefficient for the field at the reflection
point, specified as a complex-valued scalar or a complex-valued 1-by-*N* row
vector. Each coefficient has an absolute value less than or equal
to one. The quantity *N* is the number of two-ray
channels. Units are dimensionless. Use this property to model nonpolarized
signals. To model polarized signals, use the `GroundRelativePermittivity`

property.

**Example: **`-0.5`

#### Dependencies

To enable this property, set `EnablePolarization`

to `false`

.

**Data Types: **`double`

**Complex Number Support: **Yes

`GroundRelativePermittivity`

— Ground relative permittivity

`15`

(default) | positive real-valued scalar | real-valued 1-by-*N*row vector of positive
values

Relative permittivity of the ground at the reflection point,
specified as a positive real-valued scalar or a 1-by-*N* real-valued
row vector of positive values. The dimension *N* is
the number of two-ray channels. Permittivity units are dimensionless.
Relative permittivity is defined as the ratio of actual ground permittivity
to the permittivity of free space. This property applies when you
set the `EnablePolarization`

property to `true`

.
Use this property to model polarized signals. To model nonpolarized
signals, use the `GroundReflectionCoefficient`

property.

**Example: **`5`

#### Dependencies

To enable this property, set `EnablePolarization`

to `true`

.

**Data Types: **`double`

`CombinedRaysOutput`

— Option to combine two rays at output

`true`

(default) | `false`

Option to combine the two rays at channel output, specified
as `true`

or `false`

. When this
property is `true`

, the object coherently adds the
line-of-sight propagated signal and the reflected path signal when
forming the output signal. Use this mode when you do not need to include
the directional gain of an antenna or array in your simulation.

**Data Types: **`logical`

`MaximumDistanceSource`

— Source of maximum one-way propagation distance

`'Auto'`

(default) | `'Property'`

Source of maximum one-way propagation distance, specified as `'Auto'`

or `'Property'`

.
The maximum one-way propagation distance is used to allocate sufficient
memory for signal delay computation. When you set this property to `'Auto'`

,
the System object automatically allocates memory. When you set
this property to `'Property'`

, you specify the maximum
one-way propagation distance using the value of the `MaximumDistance`

property.

**Data Types: **`char`

`MaximumDistance`

— Maximum one-way propagation distance

`10000`

(default) | positive real-valued scalar

Maximum one-way propagation distance, specified as a positive real-valued scalar. Units are in meters. Any signal that propagates more than the maximum one-way distance is ignored. The maximum distance must be greater than or equal to the largest position-to-position distance.

**Example: **`5000`

#### Dependencies

To enable this property, set the `MaximumDistanceSource`

property
to `'Property'`

.

**Data Types: **`double`

`MaximumNumInputSamplesSource`

— Source of maximum number of samples

`'Auto'`

(default) | `'Property'`

The source of the maximum number of samples of the input signal, specified as
`'Auto'`

or `'Property'`

. When you set this
property to `'Auto'`

, the propagation model automatically allocates
enough memory to buffer the input signal. When you set this property to
`'Property'`

, you specify the maximum number of samples in the
input signal using the `MaximumNumInputSamples`

property. Any input
signal longer than that value is truncated.

To use this object with variable-size signals in a MATLAB^{®} Function Block in Simulink^{®}, set the `MaximumNumInputSamplesSource`

property to
`'Property'`

and set a value for the
`MaximumNumInputSamples`

property.

**Example: **`'Property'`

#### Dependencies

To enable this property, set `MaximumDistanceSource`

to
`'Property'`

.

**Data Types: **`char`

`MaximumNumInputSamples`

— Maximum number of input signal samples

`100`

(default) | positive integer

Maximum number of input signal samples, specified as a positive
integer. The input signal is the first argument of the `step`

method,
after the System object itself. The size of the input signal is
the number of rows in the input matrix. Any input signal longer than
this number is truncated. To process signals completely, ensure that
this property value is greater than any maximum input signal length.

The waveform-generating System objects determine the maximum signal size:

For any waveform, if the waveform

`OutputFormat`

property is set to`'Samples'`

, the maximum signal length is the value specified in the`NumSamples`

property.For pulse waveforms, if the

`OutputFormat`

is set to`'Pulses'`

, the signal length is the product of the smallest pulse repetition frequency, the number of pulses, and the sample rate.For continuous waveforms, if the

`OutputFormat`

is set to`'Sweeps'`

, the signal length is the product of the sweep time, the number of sweeps, and the sample rate.

**Example: **`2048`

#### Dependencies

To enable this property, set `MaximumNumInputSamplesSource`

to `'Property'`

.

**Data Types: **`double`

## Methods

reset | Reset states of System object |

step | Propagate wideband signal from point to point using two-ray channel model |

Common to All System Objects | |
---|---|

`release` | Allow System object property value changes |

## Examples

### Scalar Wideband Signal Propagating in Two-Ray Channel

This example illustrates the two-ray propagation of a wideband signal, showing how the signals from the line-of-sight path and reflected path arrive at the receiver at different times.

**Note:** You can replace each call to the function with the equivalent `step`

syntax. For example, replace `myObject(x)`

with `step(myObject,x)`

.

**Create and Plot Transmitted Waveform**

Create a nonpolarized electromagnetic field consisting of two linear FM waveform pulses at a carrier frequency of 100 MHz. Assume the pulse width is 20 μs and the sampling rate is 10 MHz. The bandwidth of the pulse is 1 MHz. Assume a 50% duty cycle so that the pulse width is one-half the pulse repetition interval. Create a two-pulse wave train. Set the `GroundReflectionCoefficient`

to –0.9 to model strong ground reflectivity. Propagate the field from a stationary source to a stationary receiver. The vertical separation of the source and receiver is approximately 10 km.

c = physconst('LightSpeed'); fs = 10e6; pw = 20e-6; pri = 2*pw; PRF = 1/pri; fc = 100e6; lambda = c/fc; bw = 1e6; waveform = phased.LinearFMWaveform('SampleRate',fs,'PulseWidth',pw,... 'PRF',PRF,'OutputFormat','Pulses','NumPulses',2,'SweepBandwidth',bw,... 'SweepDirection','Down','Envelope','Rectangular','SweepInterval',... 'Positive'); wav = waveform(); n = size(wav,1); plot([0:(n-1)]/fs*1e6,real(wav),'b') xlabel('Time (\mu s)') ylabel('Waveform Magnitude')

**Specify the Location of Source and Receiver**

Place the source and receiver about 1 km apart horizontally and approximately 5 km apart vertically.

pos1 = [0;0;100]; pos2 = [1e3;0;5.0e3]; vel1 = [0;0;0]; vel2 = [0;0;0];

**Create a Wideband Two-Ray Channel System Object**

Create a two-ray propagation channel System object™ and propagate the signal along both the line-of-sight and reflected ray paths. The same signal is propagated along both paths.

channel = widebandTwoRayChannel('SampleRate',fs,... 'GroundReflectionCoefficient',-0.9,'OperatingFrequency',fc,... 'CombinedRaysOutput',false); prop_signal = channel([wav,wav],pos1,pos2,vel1,vel2); [rng2,angs] = rangeangle(pos2,pos1,'two-ray');

Calculate time delays in μs.

tm = rng2/c*1e6; disp(tm)

16.6815 17.3357

Display the calculated propagation paths azimuth and elevation angles in degrees.

disp(angs)

0 0 78.4654 -78.9063

**Plot the Propagated Signals**

Plot the real part of the signal propagated along the line-of-sight path.

Plot the real part of the signal propagated along the reflected path.

Plot the real part of the coherent sum of the two signals.

n = size(prop_signal,1); delay = [0:(n-1)]/fs*1e6; subplot(3,1,1) plot(delay,real([prop_signal(:,1)]),'b') grid xlabel('Time (\mu sec)') ylabel('Real Part') title('Direct Path') subplot(3,1,2) plot(delay,real([prop_signal(:,2)]),'b') grid xlabel('Time (\mu sec)') ylabel('Real Part') title('Reflected Path') subplot(3,1,3) plot(delay,real([prop_signal(:,1) + prop_signal(:,2)]),'b') grid xlabel('Time (\mu sec)') ylabel('Real Part') title('Combined Paths')

The delay of the reflected path signal agrees with the predicted delay. The magnitude of the coherently combined signal is less than either of the propagated signals. This result indicates that the two signals contain some interference.

### Compare Wideband Two-Ray Channel Propagation to Free Space

Compute the result of propagating a wideband LFM signal in a two-ray environment from a radar 10 meters above the origin *(0,0,10)* to a target at *(3000,2000,2000)* meters. Assume that the radar and target are stationary and that the transmitting antenna is isotropic. Combine the signal from the two paths and compare the signal to a signal propagating in free space. The system operates at 300 MHz. Set the `CombinedRaysOutput`

property to `true`

to combine the direct path and reflected path signals when forming the output signal.

**Note:** This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent `step`

syntax. For example, replace `myObject(x)`

with `step(myObject,x)`

.

Create a linear FM waveform.

fop = 300.0e6; fs = 1.0e6; waveform = phased.LinearFMWaveform(); x = waveform();

Specify the target position and velocity.

posTx = [0; 0; 10]; posTgt = [3000; 2000; 2000]; velTx = [0;0;0]; velTgt = [0;0;0];

Model the free space propagation.

```
fschannel = phased.WidebandFreeSpace('SampleRate',waveform.SampleRate);
y_fs = fschannel(x,posTx,posTgt,velTx,velTgt);
```

Model two-ray propagation from the position of the radar to the target.

tworaychannel = widebandTwoRayChannel('SampleRate',waveform.SampleRate,... 'CombinedRaysOutput',true); y_tworay = tworaychannel(x,posTx,posTgt,velTx,velTgt); plot(abs([y_tworay y_fs])) legend('Wideband two-ray (Position 1)','Wideband free space (Position 1)',... 'Location','best') xlabel('Samples') ylabel('Signal Magnitude') hold on

Move the radar by 10 meters horizontally to a second position.

posTx = posTx + [10;0;0]; y_fs = fschannel(x,posTx,posTgt,velTx,velTgt); y_tworay = tworaychannel(x,posTx,posTgt,velTx,velTgt); plot(abs([y_tworay y_fs])) legend('Wideband two-ray (Position 1)','Wideband free space (Position 1)',... 'Wideband two-ray (Position 2)','Wideband free space (Position 2)',... 'Location','best') hold off

The free-space propagation losses are the same for both the first and second positions of the radar. The two-ray losses are different due to the interference effect of the two-ray paths.

### Wideband Polarized Field Propagation in Two-Ray Channel

Create a polarized electromagnetic field consisting of linear FM waveform pulses. Propagate the field from a stationary source with a crossed-dipole antenna element to a stationary receiver approximately 10 km away. The transmitting antenna is 100 m above the ground. The receiving antenna is 150 m above the ground. The receiving antenna is also a crossed-dipole. Plot the received signal.

**Note:** You can replace each call to the function with the equivalent `step`

syntax. For example, replace `myObject(x)`

with `step(myObject,x)`

.

**Set Radar Waveform Parameters**

Assume the pulse width is$$10\mu s$$ and the sampling rate is 10 MHz. The bandwidth of the pulse is 1 MHz. Assume a 50% duty cycle in which the pulse width is one-half the pulse repetition interval. Create a two-pulse wave train. Assume a carrier frequency of 100 MHz.

```
c = physconst('LightSpeed');
fs = 20e6;
pw = 10e-6;
pri = 2*pw;
PRF = 1/pri;
fc = 100e6;
bw = 1e6;
lambda = c/fc;
```

**Set Up Required System Objects**

Use a `GroundRelativePermittivity`

of 10.

waveform = phased.LinearFMWaveform('SampleRate',fs,'PulseWidth',pw,... 'PRF',PRF,'OutputFormat','Pulses','NumPulses',2,'SweepBandwidth',bw,... 'SweepDirection','Down','Envelope','Rectangular','SweepInterval',... 'Positive'); antenna = phased.CrossedDipoleAntennaElement(... 'FrequencyRange',[50,200]*1e6); radiator = phased.Radiator('Sensor',antenna,'OperatingFrequency',fc,... 'Polarization','Combined'); channel = phased.WidebandTwoRayChannel('SampleRate',fs,... 'OperatingFrequency',fc,'CombinedRaysOutput',false,... 'EnablePolarization',true,'GroundRelativePermittivity',10); collector = phased.Collector('Sensor',antenna,'OperatingFrequency',fc,... 'Polarization','Combined');

**Set Up Scene Geometry**

Specify transmitter and receiver positions, velocities, and orientations. Place the source and receiver approximately 1000 m apart horizontally and approximately 50 m apart vertically.

posTx = [0;100;100]; posRx = [1000;0;150]; velTx = [0;0;0]; velRx = [0;0;0]; laxRx = rotz(180); laxTx = rotx(1)*eye(3);

**Create and Radiate Signals from Transmitter**

Compute the transmission angles for the two rays traveling toward the receiver. These angles are defined with respect to the transmitter local coordinate system. The `phased.Radiator`

System object(TM) uses these angles to apply separate antenna gains to the two signals.

```
[rng,angsTx] = rangeangle(posRx,posTx,laxTx,'two-ray');
wav = waveform();
```

Plot the transmitted waveform.

n = size(wav,1); plot([0:(n-1)]/fs*1000000,real(wav)) xlabel('Time ({\mu}sec)') ylabel('Waveform')

sig = radiator(wav,angsTx,laxTx);

Propagate the signals to the receiver via a two-ray channel.

prop_sig = channel(sig,posTx,posRx,velTx,velRx);

**Receive Propagated Signal**

Compute the reception angles for the two rays arriving at the receiver. These angles are defined with respect to the receiver local coordinate system. The `phased.Collector`

System object(TM) uses these angles to apply separate antenna gains to the two signals.

```
[rng1,angsRx] = rangeangle(posTx,posRx,laxRx,'two-ray');
delays = rng1/c*1e6
```

`delays = `*1×2*
3.3564 3.4544

Collect and combine the received rays.

y = collector(prop_sig,angsRx,laxRx);

Plot the received waveform.

plot([0:(n-1)]/fs*1000000,real(y)) xlabel('Time ({\mu}sec)') ylabel('Received Waveform')

### Two-Ray Propagation of Wideband LFM Waveform with Atmospheric Losses

Propagate a wideband linear FM signal in a two-ray channel. The signal bandwidth is 15% of the carrier frequency. Assume there is signal loss caused by atmospheric gases and rain. The signal propagates from a transmitter located at `(0,0,0)`

meters in the global coordinate system to a receiver at `(10000,200,30)`

meters. Assume that the transmitter and the receiver are stationary and that they both have cosine antenna patterns. Plot the received signal. Set the dry air pressure to 102.0 Pa and the rain rate to 5 mm/hr.

**Set Radar Waveform Parameters**

```
c = physconst('LightSpeed');
fs = 40e6;
pw = 10e-6;
pri = 2.5*pw;
PRF = 1/pri;
fc = 100e6;
bw = 15e6;
lambda = c/fc;
```

**Set Up Radar Scenario**

Create the required System objects.

waveform = phased.LinearFMWaveform('SampleRate',fs,'PulseWidth',pw,... 'PRF',PRF,'OutputFormat','Pulses','NumPulses',2,'SweepBandwidth',bw,... 'SweepDirection','Down','Envelope','Rectangular','SweepInterval',... 'Positive'); antenna = phased.CosineAntennaElement; radiator = phased.Radiator('Sensor',antenna); collector = phased.Collector('Sensor',antenna); channel = widebandTwoRayChannel('SampleRate',waveform.SampleRate,... 'CombinedRaysOutput',false,'GroundReflectionCoefficient',0.95,... 'SpecifyAtmosphere',true,'Temperature',20,... 'DryAirPressure',102.5,'RainRate',5.0);

Set up the scene geometry. Specify transmitter and receiver positions and velocities. The transmitter and receiver are stationary.

posTx = [0;0;0]; posRx = [10000;200;30]; velTx = [0;0;0]; velRx = [0;0;0];

Specify the transmitting and receiving radar antenna orientations with respect to the global coordinates. The transmitting antenna points along the positive *x*-direction and the receiving antenna points close to the negative *x*-direction.

laxTx = eye(3); laxRx = rotx(5)*rotz(170);

Compute the transmission angles which are the angles at which the two rays traveling toward the receiver leave the transmitter. The `phased.Radiator`

System object™ uses these angles to apply separate antenna gains to the two signals. Because the antenna gains depend on path direction, you must transmit and receive the two rays separately.

`[~,angTx] = rangeangle(posRx,posTx,laxTx,'two-ray');`

**Create and Radiate Signals from Transmitter**

Radiate the signals along the transmission directions.

wavfrm = waveform(); wavtrans = radiator(wavfrm,angTx);

Propagate the signals to the receiver via a two-ray channel.

wavrcv = channel(wavtrans,posTx,posRx,velTx,velRx);

**Collect Signal at Receiver**

Compute the angle at which the two rays traveling from the transmitter arrive at the receiver. The `phased.Collector`

System object™ uses these angles to apply separate antenna gains to the two signals.

`[~,angRcv] = rangeangle(posTx,posRx,laxRx,'two-ray');`

Collect and combine the two received rays.

yR = collector(wavrcv,angRcv);

**Plot Received Signal**

dt = 1/waveform.SampleRate; n = size(yR,1); plot([0:(n-1)]*dt*1e6,real(yR)) xlabel('Time ({\mu}sec)') ylabel('Signal Magnitude')

## More About

### Two-Ray Propagation Paths

A two-ray propagation channel is the next step up in complexity from a
free-space channel and is the simplest case of a multipath propagation environment. The
free-space channel models a straight-line *line-of-sight * path from
point 1 to point 2. In a two-ray channel, the medium is specified as a homogeneous,
isotropic medium with a reflecting planar boundary. The boundary is always set at *z
= 0*. There are at most two rays propagating from point 1 to point 2. The first
ray path propagates along the same line-of-sight path as in the free-space channel. The line-of-sight path is often called the *direct
path*. The second ray reflects off the boundary before propagating to point 2.
According to the Law of Reflection , the angle of reflection equals the angle of incidence.
In short-range simulations such as cellular communications systems and automotive radars,
you can assume that the reflecting surface, the ground or ocean surface, is flat.

The `twoRayChannel`

and `widebandTwoRayChannel`

System objects model propagation time delay, phase
shift, Doppler shift, and loss effects for both paths. For the reflected path, loss effects
include reflection loss at the boundary.

The figure illustrates two propagation paths. From the source
position, *s _{s}*, and the receiver
position,

*s*, you can compute the arrival angles of both paths,

_{r}*θ′*and

_{los}*θ′*. The arrival angles are the elevation and azimuth angles of the arriving radiation with respect to a local coordinate system. In this case, the local coordinate system coincides with the global coordinate system. You can also compute the transmitting angles,

_{rp}*θ*and

_{los}*θ*. In the global coordinates, the angle of reflection at the boundary is the same as the angles

_{rp}*θ*and

_{rp}*θ′*. The reflection angle is important to know when you use angle-dependent reflection-loss data. You can determine the reflection angle by using the

_{rp}`rangeangle`

function and
setting the reference axes to the global coordinate system. The total
path length for the line-of-sight path is shown in the figure by *R*which is equal to the geometric distance between source and receiver. The total path length for the reflected path is

_{los}*R*. The quantity

_{rp}= R_{1}+ R_{2}*L*is the ground range between source and receiver.

You can easily derive exact formulas for path lengths and angles in terms of the ground range and object heights in the global coordinate system.

$$\begin{array}{l}\overrightarrow{R}={\overrightarrow{x}}_{s}-{\overrightarrow{x}}_{r}\\ {R}_{los}=\left|\overrightarrow{R}\right|=\sqrt{{\left({z}_{r}-{z}_{s}\right)}^{2}+{L}^{2}}\\ {R}_{1}=\frac{{z}_{r}}{{z}_{r}+{z}_{z}}\sqrt{{\left({z}_{r}+{z}_{s}\right)}^{2}+{L}^{2}}\\ {R}_{2}=\frac{{z}_{s}}{{z}_{s}+{z}_{r}}\sqrt{{\left({z}_{r}+{z}_{s}\right)}^{2}+{L}^{2}}\\ {R}_{rp}={R}_{1}+{R}_{2}=\sqrt{{\left({z}_{r}+{z}_{s}\right)}^{2}+{L}^{2}}\\ \mathrm{tan}{\theta}_{los}=\frac{\left({z}_{s}-{z}_{r}\right)}{L}\\ \mathrm{tan}{\theta}_{rp}=-\frac{\left({z}_{s}+{z}_{r}\right)}{L}\\ {{\theta}^{\prime}}_{los}=-{\theta}_{los}\\ {{\theta}^{\prime}}_{rp}={\theta}_{rp}\end{array}$$

### Two-Ray Attenuation

Attenuation or path loss in the two-ray channel is the product
of five components, *L = L _{tworay} L_{G} L_{g} L_{c} L_{r}*,
where

*L*is the two-ray geometric path attenuation_{tworay}*L*is the ground reflection attenuation_{G}*L*is the atmospheric path attenuation_{g}*L*is the fog and cloud path attenuation_{c}*L*is the rain path attenuation_{r}

Each component is in magnitude units, not in dB.

### Ground Reflection and Propagation Loss

Losses occurs when a signal is reflected from a boundary. You
can obtain a simple model of ground reflection loss by representing
the electromagnetic field as a scalar field. This approach also works
for acoustic and sonar systems. Let *E* be a scalar
free-space electromagnetic field having amplitude *E _{0}* at
a reference distance

*R*from a transmitter (for example, one meter). The propagating free-space field at distance

_{0}*R*from the transmitter is

_{los}$${E}_{los}={E}_{0}\left(\frac{{R}_{0}}{{R}_{los}}\right){e}^{i\omega \left(t-{R}_{los}/c\right)}$$

for the line-of-sight
path. You can express the ground-reflected *E*-field
as

$${E}_{rp}={L}_{G}{E}_{0}\left(\frac{{R}_{0}}{{R}_{rp}}\right){e}^{i\omega \left(t-{R}_{rp}/c\right)}$$

where *R _{rp}* is
the reflected path distance. The quantity

*L*represents the loss due to reflection at the ground plane. To specify

_{G}*L*, use the

_{G}`GroundReflectionCoefficient`

property.
In general, *L*depends on the incidence angle of the field. If you have empirical information about the angular dependence of

_{G}*L*, you can use

_{G}`rangeangle`

to compute
the incidence angle of the reflected path. The total field at the
destination is the sum of the line-of-sight and reflected-path fields.For electromagnetic waves, a more complicated but more realistic
model uses a vector representation of the polarized field. You can
decompose the incident electric field into two components. One component, *E _{p}*,
is parallel to the plane of incidence. The other component,

*E*, is perpendicular to the plane of incidence. The ground reflection coefficients for these components differ and can be written in terms of the ground permittivity and incidence angle.

_{s}$$\begin{array}{l}{G}_{p}=\frac{{Z}_{1}\mathrm{cos}{\theta}_{1}-{Z}_{2}\mathrm{cos}{\theta}_{2}}{{Z}_{1}\mathrm{cos}{\theta}_{1}+{Z}_{2}\mathrm{cos}{\theta}_{2}}=\frac{\mathrm{cos}{\theta}_{1}-\frac{{Z}_{2}}{{Z}_{1}}\mathrm{cos}{\theta}_{2}}{\mathrm{cos}{\theta}_{1}+\frac{{Z}_{2}}{{Z}_{1}}\mathrm{cos}{\theta}_{2}}\\ {G}_{s}=\frac{{Z}_{2}\mathrm{cos}{\theta}_{1}-{Z}_{1}\mathrm{cos}{\theta}_{2}}{{Z}_{2}\mathrm{cos}{\theta}_{1}+{Z}_{1}\mathrm{cos}{\theta}_{2}}=\frac{\mathrm{cos}{\theta}_{2}-\frac{{Z}_{2}}{{Z}_{1}}\mathrm{cos}{\theta}_{1}}{\mathrm{cos}{\theta}_{2}+\frac{{Z}_{2}}{{Z}_{1}}\mathrm{cos}{\theta}_{1}}\\ {Z}_{1}=\sqrt{\frac{{\mu}_{1}}{{\epsilon}_{1}}}\\ {Z}_{2}=\sqrt{\frac{{\mu}_{2}}{{\epsilon}_{2}}}\end{array}$$

where *Z* is
the impedance of the medium. Because the magnetic permeability of
the ground is almost identical to that of air or free space, the ratio
of impedances depends primarily on the ratio of electric permittivities

$$\begin{array}{l}{G}_{p}=\frac{\sqrt{\rho}\mathrm{cos}{\theta}_{1}-\mathrm{cos}{\theta}_{2}}{\sqrt{\rho}\mathrm{cos}{\theta}_{1}+\mathrm{cos}{\theta}_{2}}\\ {G}_{s}=\frac{\sqrt{\rho}\mathrm{cos}{\theta}_{2}-\mathrm{cos}{\theta}_{1}}{\sqrt{\rho}\mathrm{cos}{\theta}_{2}+\mathrm{cos}{\theta}_{1}}\end{array}$$

where the quantity *ρ
= ε _{2}/ε_{1}* is
the

*ground relative permittivity*set by the

`GroundRelativePermittivity`

property.
The angle *θ*is the incidence angle and the angle

_{1}*θ*is the refraction angle at the boundary. You can determine

_{2}*θ*using Snell’s law of refraction.

_{2}After reflection, the full field is reconstructed from the parallel
and perpendicular components. The total ground plane attenuation, *L _{G}*,
is a combination of

*G*and

_{s}*G*.

_{p}When the origin and destination are stationary relative to each
other, you can write the output `Y`

of `step`

as *Y(t)
= F(t-τ)/L*. The quantity *τ* is
the signal delay and *L* is the free-space path loss.
The delay *τ* is given by *R/c*. *R* is
either the line-of-sight propagation path distance or the reflected
path distance, and *c* is the propagation speed.
The path loss

where *λ* is the signal wavelength.

### Atmospheric Gas Attenuation Model

This model calculates the attenuation of signals that propagate through atmospheric gases.

Electromagnetic signals attenuate when they propagate through the atmosphere. This effect is
due primarily to the absorption resonance lines of oxygen and water vapor, with smaller
contributions coming from nitrogen gas. The model also includes a continuous absorption
spectrum below 10 GHz. The ITU model *Recommendation ITU-R P.676-10: Attenuation by
atmospheric gases* is used. The model computes the specific attenuation
(attenuation per kilometer) as a function of temperature, pressure, water vapor density, and
signal frequency. The atmospheric gas model is valid for frequencies from 1–1000 GHz and
applies to polarized and nonpolarized fields.

The formula for specific attenuation at each frequency is

$$\gamma ={\gamma}_{o}(f)+{\gamma}_{w}(f)=0.1820f{N}^{\u2033}(f).$$

The quantity *N"()* is the imaginary part of the complex
atmospheric refractivity and consists of a spectral line component and a continuous component:

$${N}^{\u2033}(f)={\displaystyle \sum _{i}{S}_{i}{F}_{i}+{{N}^{\u2033}}_{D}^{}(f)}$$

The spectral component consists of a sum of discrete spectrum terms
composed of a localized frequency bandwidth function,
*F(f)*_{i}, multiplied by a spectral line strength,
*S*_{i}. For atmospheric oxygen, each spectral line
strength is

$${S}_{i}={a}_{1}\times {10}^{-7}{\left(\frac{300}{T}\right)}^{3}\mathrm{exp}\left[{a}_{2}(1-\left(\frac{300}{T}\right)\right]P.$$

For atmospheric water vapor, each spectral line strength is

$${S}_{i}={b}_{1}\times {10}^{-1}{\left(\frac{300}{T}\right)}^{3.5}\mathrm{exp}\left[{b}_{2}(1-\left(\frac{300}{T}\right)\right]W.$$

*P* is the dry air pressure, *W* is the
water vapor partial pressure, and *T* is the ambient temperature. Pressure
units are in hectoPascals (hPa) and temperature is in degrees Kelvin. The water vapor
partial pressure, *W*, is related to the water vapor density, ρ, by

$$W=\frac{\rho T}{216.7}.$$

The total atmospheric pressure is *P* +
*W*.

For each oxygen line, *S _{i}* depends on two parameters,

*a*and

_{1}*a*. Similarly, each water vapor line depends on two parameters,

_{2}*b*and

_{1}*b*. The ITU documentation cited at the end of this section contains tabulations of these parameters as functions of frequency.

_{2}The localized frequency bandwidth functions *F _{i}(f)* are
complicated functions of frequency described in the ITU references
cited below. The functions depend on empirical model parameters that
are also tabulated in the reference.

To compute the total attenuation for narrowband signals along
a path, the function multiplies the specific attenuation by the path
length, *R*. Then, the total attenuation is *L _{g}=
R(γ_{o} + γ_{w})*.

You can apply the attenuation model to wideband signals. First, divide the wideband signal into frequency subbands, and apply attenuation to each subband. Then, sum all attenuated subband signals into the total attenuated signal.

### Fog and Cloud Attenuation Model

This model calculates the attenuation of signals that propagate through fog or clouds.

Fog and cloud attenuation are the same atmospheric phenomenon. The ITU model,
*Recommendation ITU-R P.840-6: Attenuation due to clouds and fog* is
used. The model computes the specific attenuation (attenuation per kilometer), of a signal
as a function of liquid water density, signal frequency, and temperature. The model applies
to polarized and nonpolarized fields. The formula for specific attenuation at each frequency is

$${\gamma}_{c}={K}_{l}\left(f\right)M,$$

where *M* is the liquid water density in
gm/m^{3}. The quantity
*K _{l}(f)* is the specific attenuation coefficient
and depends on frequency. The cloud and fog attenuation model is valid for frequencies
10–1000 GHz. Units for the specific attenuation coefficient are
(dB/km)/(g/m

^{3}).

To compute the total attenuation for narrowband signals along
a path, the function multiplies the specific attenuation by the path
length *R*. Total attenuation is *L _{c} =
Rγ_{c}*.

You can apply the attenuation model to wideband signals. First, divide the wideband signal into frequency subbands, and apply narrowband attenuation to each subband. Then, sum all attenuated subband signals into the total attenuated signal.

### Rainfall Attenuation Model

This model calculates the attenuation of signals that propagate through regions of rainfall. Rain attenuation is a dominant fading mechanism and can vary from location-to-location and from year-to-year.

Electromagnetic signals are attenuated when propagating through a region of rainfall. Rainfall
attenuation is computed according to the ITU rainfall model *Recommendation
ITU-R P.838-3: Specific attenuation model for rain for use in prediction
methods*. The model computes the specific attenuation (attenuation
per kilometer) of a signal as a function of rainfall rate, signal frequency,
polarization, and path elevation angle. The specific attenuation,
*ɣ*_{R}, is modeled as a power law with
respect to rain rate

$${\gamma}_{R}=k{R}^{\alpha},$$

where *R* is rain rate. Units are in mm/hr. The
parameter *k* and exponent *α* depend on the
frequency, the polarization state, and the elevation angle of the signal path. The
specific attenuation model is valid for frequencies from 1–1000 GHz.

To compute the total attenuation for narrowband signals along a path, the function multiplies
the specific attenuation by the an effective propagation distance,
*d*_{eff}. Then, the total attenuation
is *L =
d*_{eff}*γ*_{R}.

The effective distance is the geometric distance, *d*, multiplied by
a scale factor

$$r=\frac{1}{0.477{d}^{0.633}{R}_{0.01}^{0.073\alpha}{f}^{0.123}-10.579\left(1-\mathrm{exp}\left(-0.024d\right)\right)}$$

where *f* is the frequency. The article
*Recommendation ITU-R P.530-17 (12/2017): Propagation data and
prediction methods required for the design of terrestrial line-of-sight
systems* presents a complete discussion for computing
attenuation.

The rain rate, *R*, used in these computations is the long-term
statistical rain rate, *R*_{0.01}. This is the
rain rate that is exceeded 0.01% of the time. The calculation of the statistical
rain rate is discussed in *Recommendation ITU-R P.837-7 (06/2017):
Characteristics of precipitation for propagation modelling*. This
article also explains how to compute the attenuation for other percentages from the
0.01% value.

You can apply the attenuation model to wideband signals. First, divide the wideband signal into frequency subbands and apply attenuation to each subband. Then, sum all attenuated subband signals into the total attenuated signal.

### Subband Frequency Processing

Subband processing decomposes a wideband signal into multiple subbands and applies narrowband processing to the signal in each subband. The signals for all subbands are summed to form the output signal.

When using wideband frequency System objects or blocks, you specify the number of subbands,
*N*_{B}, in which to decompose the wideband signal.
Subband center frequencies and widths are automatically computed from the total bandwidth
and number of subbands. The total frequency band is centered on the carrier or operating
frequency, *f _{c}*. The overall bandwidth is given by
the sample rate,

*f*. Frequency subband widths are

_{s}*Δf = f*

_{s}/

*N*

_{B}. The center frequencies of the subbands are

Some System objects let you obtain the subband center frequencies as output when you run the object. The returned subband frequencies are ordered consistently with the ordering of the discrete Fourier transform. Frequencies above the carrier appear first, followed by frequencies below the carrier.

## References

[1] Proakis, J. *Digital Communications*. New York:
McGraw-Hill, 2001.

[2] Skolnik, M. *Introduction to Radar Systems*, 3rd Ed.
New York: McGraw-Hill.

[3] Saakian, A. *Radio Wave Propagation Fundamentals*.
Norwood, MA: Artech House, 2011.

[4] Balanis, C. *Advanced Engineering Electromagnetics*.
New York: Wiley & Sons, 1989.

[5] Rappaport, T. *Wireless Communications: Principles and Practice,
2nd Ed* New York: Prentice Hall, 2002.

[6] Radiocommunication Sector of the International Telecommunication Union.
*Recommendation ITU-R P.676-10: Attenuation by atmospheric
gases*. 2013.

[7] Radiocommunication Sector of the International Telecommunication Union.
*Recommendation ITU-R P.840-6: Attenuation due to clouds and
fog*. 2013.

[8] Radiocommunication Sector of the International Telecommunication Union.
*Recommendation ITU-R P.838-3: Specific attenuation model for rain for
use in prediction methods*. 2005.

## Extended Capabilities

### C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

Usage notes and limitations:

See System Objects in MATLAB Code Generation (MATLAB Coder).

## Version History

**Introduced in R2021a**

## MATLAB コマンド

次の MATLAB コマンドに対応するリンクがクリックされました。

コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)