Main Content

add, +

Add propagation models

Since R2020a

Description

pmc = propmodel1 + propmodel2 combines the specified propagation model objects into a composite propagation model object. This syntax enables you to combine more than two propagation models, such as propmodel1 + propmodel2 + propmodel3.

example

pmc = add(propmodel1,propmodel2) is an alternate way to combine propagation models.

example

Examples

collapse all

Create propagation models for gas and rain.

gasModel = propagationModel("gas"); 
rainModel = propagationModel("rain");

Combine the models by using the add function. The result is a CompositePropagationModel object.

pmc2 = add(gasModel,rainModel)
pmc2 = 
  CompositePropagationModel with properties:

    PropagationModels: [1x2 rfprop.PropagationModel]

Create a propagation model for fog. Then, add the fog model to the combined gas and rain model.

fogModel = propagationModel("fog");
pmc3 = add(pmc2,fogModel)
pmc3 = 
  CompositePropagationModel with properties:

    PropagationModels: [1x3 rfprop.PropagationModel]

Alternatively, you can combine all of the propagation models at once by using the + operator.

pmcPlus = gasModel + rainModel + fogModel;

Create the transmitter and the receiver sites.

tx = txsite(Name="Fenway Park", ...
    Latitude=42.3467, ...
    Longitude=-71.0972, ...
    TransmitterFrequency=6e9);
rx = rxsite(Name="Bunker Hill Monument", ...
    Latitude=42.3763, ...
    Longitude=-71.0611);  

Calculate the signal strength using the default Longley-Rice propagation model.

ss1 = sigstrength(rx,tx)
ss1 = -80.9353

Create a composite propagation model by combining the Longley-Rice model with gas and rain models.

propmodel1 = propagationModel("longley-rice");
propmodel2 = propagationModel("gas");
propmodel3 = propagationModel("rain");
cpm = propmodel1 + propmodel2 + propmodel3;

Calculate the signal strength again, this time using the composite propagation model.

ss2 = sigstrength(rx,tx,cpm)
ss2 = -81.2259

Input Arguments

collapse all

Propagation model, specified as a FreeSpace, Rain, Gas, Fog, CloseIn, LongleyRice, TIREM, or RayTracing object. Create propagation models by using the propagationModel function.

Specifying more than one model that includes the effects of free-space loss is not supported. For more information about combining propagation models, see Choose a Propagation Model.

The propmodel1 and propmodel2 arguments must specify different types of objects.

Output Arguments

collapse all

Composite propagation model, returned as a CompositePropagationModel object.

A CompositePropagationModel object has one property, PropagationModels, which stores the propagation models that comprise the object. The PropagationModels property stores the models using FreeSpace, Rain, Gas, Fog, CloseIn, LongleyRice, TIREM, or RayTracing objects.

The path loss for the composite propagation model is the sum of the path losses for the input propagation models. If either input is a ray tracing model, then the output contains a ray tracing model that adds the path losses from rain, gas, or fog models to the path loss for each propagation path.

Version History

Introduced in R2020a