Two-ray propagation channel

The `phased.TwoRayChannel`

models a narrowband
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 the fields to be non-polarized
and adjust the propagation speed to be the speed of sound in air or
water. You can use `phased.TwoRayChannel`

to model
propagation from several points simultaneously.

While 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 `phased.TwoRayChannel`

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

Signals at the channel output can be kept *separate* or
be *combined* — controlled by the `CombinedRaysOutput`

property.
In the *separate* option, both fields arrive at
the destination separately and are not combined. For the *combined* option,
the two signals at the source propagate separately but are coherently
summed at the destination into a single quantity. This option is convenient
when the difference between the sensor or array gains in the directions
of the two paths is not significant and need not be taken into account.

Unlike the `phased.FreeSpace`

System
object, the `phased.TwoRayChannel`

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 using the Construction procedure that follows.

Call the

`step`

method to compute the propagated signal using the properties of the`phased.TwoRayChannel`

System object.The behavior of

`step`

is specific to each object in the toolbox.

Starting in R2016b, 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.

`s2Ray = phased.TwoRayChannel`

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

.

`s2Ray = phased.TwoRayChannel(`

creates
a System
object, `Name`

,`Value`

)`s2Ray`

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

).

`PropagationSpeed`

— Signal propagation speed`physconst('LightSpeed')`

(default) | positive scalarSignal 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 scalarOperating 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 scalarAmbient temperature, specified as a real-valued scalar. Units are in degrees Celsius.

**Example: **`20.0`

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`DryAirPressure`

— Atmospheric dry air pressure`101.325e3`

(default) | positive real-valued scalarAtmospheric 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`

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`WaterVapourDensity`

— Atmospheric water vapor density`7.5`

(default) | positive real-valued scalarAtmospheric water vapor density, specified as a positive real-valued
scalar. Units are in g/m^{3}.

**Example: **`7.4`

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`LiquidWaterDensity`

— Liquid water density`0.0`

(default) | nonnegative real-valued scalarLiquid 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`

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`RainRate`

— Rainfall rate`0.0`

(default) | nonnegative scalarRainfall rate, specified as a nonnegative scalar. Units are in mm/hr.

**Example: **`10.0`

To enable this property, set `SpecifyAtmosphere`

to `true`

.

**Data Types: **`double`

`SampleRate`

— Sample rate of signal`1e6`

(default) | positive scalarSample 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`

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

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

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

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

To enable this property, set `MaximumDistanceSource`

to
`'Property'`

.

**Data Types: **`char`

`MaximumNumInputSamples`

— Maximum number of input signal samples`100`

(default) | positive integerMaximum 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`

To enable this property, set `MaximumNumInputSamplesSource`

to `'Property'`

.

**Data Types: **`double`

reset | Reset states of System object |

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

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

`release` | Allow System object property value changes |

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

**Create and Plot Propagating Signal**

Create a nonpolarized electromagnetic field consisting of two rectangular waveform pulses at a carrier frequency of 100 MHz. Assume the pulse width is 10 ms and the sampling rate is 1 MHz. The bandwidth of the pulse is 0.1 MHz. Assume a 50% duty cycle in 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 = 1e6; pw = 10e-6; pri = 2*pw; PRF = 1/pri; fc = 100e6; lambda = c/fc; waveform = phased.RectangularWaveform('SampleRate',fs,'PulseWidth',pw,... 'PRF',PRF,'OutputFormat','Pulses','NumPulses',2); wav = waveform(); n = size(wav,1); figure; plot([0:(n-1)],real(wav),'b.-'); xlabel('Time (samples)') ylabel('Waveform magnitude')

**Specify the Location of Source and Receiver**

Place the source and receiver about 1000 meters apart horizontally and approximately 10 km apart vertically.

pos1 = [1000;0;10000]; pos2 = [0;100;100]; vel1 = [0;0;0]; vel2 = [0;0;0];

Compute the predicted signal delays in units of samples.

```
[rng,ang] = rangeangle(pos2,pos1,'two-ray');
delay = rng/c*fs
```

`delay = `*1×2*
33.1926 33.8563

**Create a 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.

channel = phased.TwoRayChannel('SampleRate',fs,... 'GroundReflectionCoefficient',.9,'OperatingFrequency',fc,... 'CombinedRaysOutput',false); prop_signal = channel([wav,wav],pos1,pos2,vel1,vel2);

**Plot the Propagated Signals**

Plot the signal propagated along the line-of-sight.

Then, overlay a plot of the signal propagated along the reflected path.

Finally, overlay a plot of the coherent sum of the two signals.

n = size(prop_signal,1); delay = [0:(n-1)]; plot(delay,abs([prop_signal(:,1)]),'g') hold on plot(delay,abs([prop_signal(:,2)]),'r') plot(delay,abs([prop_signal(:,1) + prop_signal(:,2)]),'b') hold off legend('Line-of-sight','Reflected','Combined','Location','NorthWest') xlabel('Delay (samples)') ylabel('Signal Magnitude')

The plot shows that 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 indicating that there is some interference between the two signals.

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 meters above the ground. The receiving antenna is 150 m above the ground. The receiving antenna is also a crossed-dipole. Plot the received signal.

**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 = 10e6;
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','Up','Envelope','Rectangular','SweepInterval',... 'Positive'); antenna = phased.CrossedDipoleAntennaElement(... 'FrequencyRange',[50,200]*1e6); radiator = phased.Radiator('Sensor',antenna,'OperatingFrequency',fc,... 'Polarization','Combined'); channel = phased.TwoRayChannel('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 about 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™ 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 signals to receiver via 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™ uses these angles to apply separate antenna gains to the two signals.

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

Collect and combine received rays.

y = collector(prop_sig,angsRx,laxRx);

**Plot received waveform**

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

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 (see the
`phased.FreeSpace`

System
object). 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 `phased.TwoRayChannel`

and `phased.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,

`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 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}$$

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.

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

$${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

`GroundReflectionCoefficient`

property.
In general, `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,

$$\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

`GroundRelativePermittivity`

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

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

$${L}_{tworay}=\frac{{(4\pi R)}^{2}}{{\lambda}^{2}},$$

where *λ* is the signal wavelength.

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,

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.

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

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.

This model calculates the attenuation of signals that propagate through regions of rainfall.

Electromagnetic signals are attenuate 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. To compute the attenuation, this model uses

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

where *r* is
the rain rate 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 a propagation
distance, *R*. Then, total attenuation is *L _{r} =
Rγ_{r}*. Instead of using geometric
range as the propagation distance, the toolbox uses a modified range.
The modified range is the geometric range multiplied by a range factor

$$\frac{1}{1+\frac{R}{{R}_{0}}}$$

where

$${R}_{0}=35{e}^{-0.015r}$$

is the effective path
length in kilometers (see Seybold, J. *Introduction to RF
Propagation*.) When there is no rain, the effective path
length is 35 km. When the rain rate is, for example, 10 mm/hr, the
effective path length is 30.1 km. At short range, the propagation
distance is approximately the geometric range. For longer ranges,
the propagation distance asymptotically approaches the effective path
length.

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.

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

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

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

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

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

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

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

Usage notes and limitations:

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

A modified version of this example exists on your system. Do you want to open this version instead?

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

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

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

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