Click or drag to resize

Basic Communications

The Communications Library contains several high level objects which make modeling a communications system easy. These objects are configurable and are easily added to your communication scenario.

Note Note

The functionality described in this topic requires a license for the Communications Library.

Transmitters and Receivers

The communications library has transmitter and receiver models for both the radio frequency (RF) and optical bands.

The RF transmitters come in two types, analog and digital, each type with a simple and complex version:

The optical transmitter is a complex digital model:

Digital transmitters provide a way to model data modulation on the transmitted signal, whereas analog transmitters do not have that capability. The simple transmitters have a fixed configuration, providing for a constant power radiated isotropically. Complex transmitters allow you to configure what type of antenna gain pattern and, in the case of digital transmitters, the type of modulation used in the transmitter. Additionally, complex transmitters allow you to access the internal configuration details. A complex transmitter also can be created from an existing simple transmitter. This upgrade capability is nice if you find that the simple transmitter you already created isn't flexible enough.

The RF receivers come in both simple and complex versions:

The optical receiver is a complex model:

The simple receiver provides a fixed configuration, providing for a constant amplifier gain and an isotropic antenna gain. Complex receivers allow you to configure the type of antenna gain pattern and the type of amplifier that are used in the receiver. Additionally, complex receivers allow you to access the internal configuration details. A complex receiver also can be created from an existing simple receiver. This is nice if you need a more flexible receiver and you already have a simple receiver defined.

Transmitters and receivers are derived from Platform. This means that each transmitter or receiver has its own location and orientation behavior. When building a communication scenario, you can think of this location and orientation as belonging to the antenna, which can be located and pointed independent of the parent vehicle.

To aid in pointing transmitters and receivers, a new Axes type has been introduced: AxesTargetingLink. Setting the OrientationAxes property of your communications objects to this type allows them to target the object defined in the link that they both share, and maintain that targeting over time.

When a transmitter and receiver are added to a CommunicationSystem, you can call GetLinkBudgetEvaluator to get an evaluator for the link budget.

The following code shows how to create a transmitter and receiver and orient them towards each other.

C#
// Get a Reference to the Earth's CentralBody context
EarthCentralBody earth = CentralBodiesFacet.GetFromContext().Earth;

// Create a simple digital transmitter in LA, then uplink to the satellite.
SimpleDigitalTransmitter policeTransmitter = new SimpleDigitalTransmitter();

// Let's change the transmitting power
policeTransmitter.EffectiveIsotropicRadiatedPower = 350; // Watts

Cartographic losAngelesPD = new Cartographic(-2.0637416544, 0.5943235692, 30);
Cartographic losAngelesMedCenter = new Cartographic(-2.062997065, 0.594448304, 40);
policeTransmitter.LocationPoint = new PointCartographic(earth, losAngelesPD);

// Create a reference direction vector, used in the AxesTargetingLink type.
// By using PlatformLocationPoint instead of specifying policeTransmitter.LocationPoint directly,
// we will always get the current policeTransmitter.LocationPoint property, even if we change its
// value later on, the Vector will refer to the new value.
Vector localZAxis = new VectorFixed(new AxesEastNorthUp(earth, new PlatformLocationPoint(policeTransmitter)), UnitCartesian.UnitZ);

// Create a receiver
SimpleReceiver medCenterReceiver = new SimpleReceiver();
medCenterReceiver.LocationPoint = new PointCartographic(earth, losAngelesMedCenter);
// Add noise to the Receiver
medCenterReceiver.NoiseFactor = 2;

// Create a link between them
CommunicationSystem commSys = new CommunicationSystem();
IServiceProvider link = commSys.Links.Add(policeTransmitter, medCenterReceiver);

// Orient them towards each other.
// Note that we could allow the CommunicationSystem to orient these towards each other
// by calling commSys.ConfigureAntennaTargeting(),  this just shows how to perform targeting manually.
policeTransmitter.OrientationAxes = new AxesTargetingLink(link, LinkRole.Transmitter, localZAxis);
medCenterReceiver.OrientationAxes = new AxesTargetingLink(link, LinkRole.Receiver, localZAxis);

// In order to access the resulting link budget, we call GetLinkBudgetEvaluator.  We can then
// use the returned evaluator to request results at any specified time.  Note that GetLinkBudgetEvaluator
// is an expensive call, so you should only reacquire a new evaluator if one of your objects' definition
// has changed.  Otherwise, store lbEval in a member variable and use it when you need results.
// For more information on evaluators, see the "Evaluators And Evaluator Groups" topic under "Patterns".
Evaluator<LinkBudget> lbEval = commSys.GetLinkBudgetEvaluator(link, new IntendedSignalByTransmitter(policeTransmitter));
LinkBudget lb = lbEval.Evaluate(new JulianDate(new GregorianDate(2011, 7, 28, 13, 49, 43)));
Transponders and Transceivers

A Transceiver models a device with a receiver, an amplifier, and a transmitter that acts as an active bent pipe for a signal. Internally, the receiver is connected to the transmitter via a LinkInstantaneous. The transceiver will demodulate and optionally filter the incoming signals. Once demodulated, the intended signal is then remodulated, with a possibly different modulation scheme, amplified and retransmitted with the transceiver's transmitter.

A Transponder acts similarly, except it does not demodulate or remodulate the signal. Optional filtering can be used on a transponder as well.

Both Transceiver and Transponder model their receiving and transmitting antennas as a Platform. This allows for independent positioning and targeting of the transceiver's and transponder's reception and transmission capabilities.

The following code shows how to create a transceiver and add a signal filter to it.

C#
// This relay transceiver has an isotropic receiver antenna gain pattern and accepts a BPSK modulation scheme.
// On retransmisson of the received signal, it uses a GaussianGainPattern and a QPSK modulation scheme.
Transceiver relay = new Transceiver();
relay.Name = "Relay Transceiver";
relay.Modulation = new ModulationBpsk();
relay.InputAntennaGainPattern = new IsotropicGainPattern();
relay.CarrierFrequency = policeTransmitter.CarrierFrequency;

GaussianGainPattern transmitterPattern = new GaussianGainPattern();
transmitterPattern.BacklobeGain = 0.001; // decimal
transmitterPattern.Diameter = 1.0; // meters
transmitterPattern.Efficiency = 0.55; // ratio between zero and one
relay.OutputAntennaGainPattern = transmitterPattern;

// Change the output gain to 10;
relay.OutputGain = 10;

// Create a location for the Transceiver - 970 meters above the Police station, which is 30 meters high
Cartographic transceiverLocation = new Cartographic(-2.0637416544, 0.5943235692, 1000);
relay.InputAntenna.LocationPoint = new PointCartographic(earth, transceiverLocation);

// Offset the transceiver's transmitter from the receiver by 1 meter east.
// First create a reference frame that is east, north and up from the input antenna.
ReferenceFrame enuFrame = new ReferenceFrame(relay.InputAntenna.LocationPoint, new AxesEastNorthUp(earth, relay.InputAntenna.LocationPoint));
// Now create a fixed offset from that frame and assign it to the output antenna.
relay.OutputAntenna.LocationPoint = new PointFixedOffset(enuFrame, new Cartesian(1, 0, 0));

// Hook up a filter on the relay
relay.Filter = new RectangularFilter();
// Set the filter's Frequency to the frequency that will be retransmitted.
relay.Filter.Frequency = policeTransmitter.CarrierFrequency;
// Define a 2 MHz bandwidth for the filter.
relay.Filter.LowerBandwidthLimit = -1e6;
relay.Filter.UpperBandwidthLimit = 1e6;
Communication System

A CommunicationSystem is used to collect and manage all of the transmitters, receivers, transponders, transceivers and links in a communication scenario. Links are added to the system via the Links property. You can create your own links, using a LinkSpeedOfLight, for example, or simply add your receivers and transmitters to the collection using the overloaded Add methods. If you do decide to create your own links, they must also provide the ITransmittedSignalService and IPropagatedSignalService services, usually added to the link via the WirelessLinkExtension.

Links created for you will use the same default propagation models specified by WirelessLinkExtension. You can change these using DefaultPropagationModels.

The communication system also has an automatic orientation feature. When you call the ConfigureAntennaTargeting method, it will automatically orient transmitters and receivers to point to each other along the links in which they are defined. It's worth reading the documentation for this method to understand how and when it will orient your objects, and what the method returns. This automatic orientation allows for easier setup of a system, but retains user flexibility where needed. Automatic orientation sets the OrientationAxes property to an AxesTargetingLink for each object in a link, using the DefaultReferenceVector property of the CommunicationSystem. You can change this vector's definition in the CommunicationSystem to meet your needs. Once set, the object's OrientationAxes can be modified to support special circumstances.

There are two collections that are used for adding interference sources and sinks. When you create a transmitter that you intend to be used as an interference source in the CommunicationSystem, add it to the TransmitToAll collection. This will create links from the transmitter to every receiver in the system. Conversely, if you have a receiver that should accept interference from all sources, add it to the ReceiveFromAll collection.

Once your communication system is set up and all of your communication objects are added, a link budget evaluator for an intended signal can be retrieved by calling the GetLinkBudgetEvaluator method.

The following code shows how to create a communications system with a transmitter, transceiver and receiver and evaluate the LinkBudget for that system.

C#
// In the previous examples, we created a Transmitter from a Los Angeles Police Station, and a Receiver
// at a Medical Center.  We evaluated the Link Budget for the pair, but now we've added a Transceiver 1000 meters above the city.
// We've set the OrientationAxes of the transmitter and receiver back to null and will now let the Comm System autoOrient everything for us.
commSys = new CommunicationSystem();

// Add a chain of comm objects to the Links collection, in the order they communicate.
commSys.Links.AddChain(policeTransmitter, relay, medCenterReceiver);
// Let's set the DefaultReferenceVector to something different
commSys.DefaultReferenceVector = localZAxis;
// Orient the antennas automatically.
commSys.ConfigureAntennaTargeting();

// Now let's find a reference to the downlink, so we can get a Link Budget for it.
IServiceProvider myLink = commSys.Links.FindFirst(medCenterReceiver, LinkRole.Receiver);

// Now we can get a Link Budget from the commSys, for the downlink
lbEval = commSys.GetLinkBudgetEvaluator(myLink, new IntendedSignalByTransmitter(policeTransmitter));
lb = lbEval.Evaluate(new JulianDate(new GregorianDate(2011, 7, 28, 13, 49, 43)));

The following code shows how to use the CommunicationSystem to compute link budget values for an optical communications link. The example also shows how to implement a custom sky spectral radiance SignalComputation, used for computing the optical detector background light noise contribution from the sky.

C#
// Optical transmitter configuration parameters
double xmtrDivergenceAngle = 75.0e-6; // radians
double xmtrApertureDiameter = 7.62e-2; // meters
double xmtrOpticalEfficiency = 1.0; // 100%
double xmtrOpticalPointingError = 0.0;
double xmtPower = 1.0; // Watts
double xmtrWavelength = 1550e-9;
double xmtrDataRate = 1.0e9;
var xmtrDigitalModulation = new ModulationOok();

// Optical receiver configuration parameters
double rcvrApertureDiameter = 7.62e-2; // meters
double rcvrDivergenceAngle = 75.0e-6; // radians
double rcvrOpticalEfficiency = 1.0; // 100%
double rcvrOpticalPointingError = 0.0;
double rcvrFieldOfView = Trig.DegreesToRadians(5.0);
double rcvrPhotodetectorQuantumEfficiency = 0.8; // 80%
double rcvrNoiseTemperature = 10.0; // Kelvin
double rcvrDarkCurrent = 1.0e-16; // amps
double rcvrLoadImpedance = 1.0e8; // ohms
double rcvrApdExcessNoiseFactor = 0.0;
double rcvrApdGain = 500.0;

// Ground terminal Lat, Lon, Alt
double gteLat = Trig.DegreesToRadians(37.713717);
double gteLon = Trig.DegreesToRadians(-121.702683);
double gteAlt = 152.0;

// Air terminal Lat, Lon, Alt
double ateLat = Trig.DegreesToRadians(37.120803);
double ateLon = Trig.DegreesToRadians(-119.924024);
double ateAlt = 1524.0;

// Maximum altitude used in atmospheric propagation computations
double maximumAltitude = 22860.0; // meters

// Beer-Lambert Law extinction coefficient model
double extinctionCoefficientModel = 0.00013;

var earth = CentralBodiesFacet.GetFromContext().Earth;

// Construct the ground terminal's Point and Axes objects
var groundCart = new Cartographic(gteLon, gteLat, gteAlt);
var groundPoint = new PointCartographic(earth, groundCart);
var groundAxes = new AxesEastNorthUp(earth, groundPoint);

// Construct the air terminal's Point and Axes objects
var airCart = new Cartographic(ateLon, ateLat, ateAlt);
var airPoint = new PointCartographic(earth, airCart);
var airAxes = new AxesEastNorthUp(earth, airPoint);

// Construct the optics gain pattern for the transmitter
var xmtrAntennaPattern = new GaussianOpticalGainPattern(xmtrApertureDiameter, xmtrDivergenceAngle,
                                                        xmtrOpticalEfficiency, xmtrOpticalPointingError);
// Construct the transmitter instance
var xmtr = new OpticalTransmitter("ATETransmitter", airPoint, airAxes, xmtrDigitalModulation,
                                  xmtrAntennaPattern, xmtrWavelength, xmtPower, xmtrDataRate, null);

// Construct the optics gain pattern for the receiver
var rcvrAntenna = new GaussianOpticalGainPattern(rcvrApertureDiameter, rcvrDivergenceAngle,
                                                 rcvrOpticalEfficiency, rcvrOpticalPointingError);

// Construct the photodetector and receiver instance
var rcvrPhotodetector = new AvalanchePhotodiode();
var rcvr = new OpticalReceiver("GTEReceiver", groundPoint, groundAxes, rcvrPhotodetector, rcvrAntenna);

// Configure the avalanche potodetector
rcvrPhotodetector.ParentReceiver = rcvr;
rcvrPhotodetector.CentralBody = earth;
rcvrPhotodetector.FieldOfView = rcvrFieldOfView;
rcvrPhotodetector.Wavelength = xmtrWavelength;
rcvrPhotodetector.Bandwidth = xmtrDataRate;
rcvrPhotodetector.OpticalBandpassFilterBandwidth = 2.0 * xmtrDataRate;
rcvrPhotodetector.Efficiency = rcvrPhotodetectorQuantumEfficiency;
rcvrPhotodetector.NoiseFactor = rcvrApdExcessNoiseFactor;
rcvrPhotodetector.NoiseTemperature = rcvrNoiseTemperature;
rcvrPhotodetector.DarkCurrent = rcvrDarkCurrent;
rcvrPhotodetector.LoadImpedance = rcvrLoadImpedance;
rcvrPhotodetector.Gain = rcvrApdGain;
rcvrPhotodetector.SkySpectralRadiance = new SkySpectralRadianceCurveFit(); // Construct our custom sky spectral radiance model
rcvrPhotodetector.SunSpectralRadiantEmittance = 0.0; // We're not modeling sun spectral radiant emittance in this example, so set to zero

// Construct the CommunicationSystem instance
var cs = new CommunicationSystem();

// Construct the refractive index structure parameter model
var cn2Model = new HufnagelValleyRefractiveIndexStructureParameterModel();

// Tropospheric scintillation loss model
var scintModel = new TropoScintAttenuationModelItuRP1814(maximumAltitude, cn2Model, earth);

// Beer-Lamber Law Atmospheric Absorption Model configured with a constant extinction coefficient
var atmosLossModel = new BeerLambertLawAtmosphericAttenuationModel(extinctionCoefficientModel, maximumAltitude, earth);

// Add the default propagation models to the CommunicationSystem instance
cs.Links.DefaultPropagationModels.Add(atmosLossModel);
cs.Links.DefaultPropagationModels.Add(scintModel);

// Using the CommSystem's Links collection, add a new link between the OpticalTransmitter and OpticalReceiver
cs.Links.Add(xmtr, rcvr);

// Configure the optical antenna pointing
cs.ConfigureAntennaTargeting();

// When retrieving evaluators, we need to specify our desired signal.
var intendedSignal = new IntendedSignalByTransmitter(xmtr);

// Create an Evaluator group to optimize the evaluator calculations.
// Since the CommunicationSystem has many evaluators within it, you should always create an EvaluatorGroup
var group = new EvaluatorGroup();

// Get the link budgets scalars object using the link that was created by the CommunicationSystem and the intended signal strategy
var lbs = cs.GetLinkBudgetScalars(cs.Links[0], intendedSignal);

// Get each of the desired evaluators passing the evaluator group for later optimization
var outputPowerEval = lbs.PowerAtReceiverOutput.GetEvaluator(group);
var xmtGainEval = lbs.TransmitterAntennaGainInLinkDirection.GetEvaluator(group);
var rcvGainEval = lbs.ReceiverAntennaGainInLinkDirection.GetEvaluator(group);
var propLossEval = lbs.PropagationLoss.GetEvaluator(group);
var ripEval = lbs.ReceivedIsotropicPower.GetEvaluator(group);
var cOverNEval = lbs.CarrierToNoise.GetEvaluator(group);
var berEval = lbs.BitErrorRate.GetEvaluator(group);

// Optimize the evaluators
group.OptimizeEvaluators();

var time = new JulianDate(GregorianDate.Parse("5 Oct 2015 22:35:00"));

// Evaluate each evaluator instance given the desired time.
double xmtGain = CommunicationAnalysis.ToDecibels(xmtGainEval.Evaluate(time));
double outputPower = CommunicationAnalysis.ToDecibels(outputPowerEval.Evaluate(time));
double rcvGain = CommunicationAnalysis.ToDecibels(rcvGainEval.Evaluate(time));
double propLoss = CommunicationAnalysis.ToDecibels(propLossEval.Evaluate(time));
double rip = CommunicationAnalysis.ToDecibels(ripEval.Evaluate(time));
double opticsOutputPower = rip + rcvGain;
double cOverN = CommunicationAnalysis.ToDecibels(cOverNEval.Evaluate(time));
double ber = berEval.Evaluate(time);

The following code shows the custom SignalComputation used above to compute the sky spectral radiance for a given Signal parameter.

C#
public sealed class SkySpectralRadianceCurveFit : SignalComputation
{
    public SkySpectralRadianceCurveFit()
    {
    }

    private SkySpectralRadianceCurveFit(SignalComputation existingInstance, CopyContext context)
        : base(existingInstance, context)
    {
    }

    protected override bool CheckForSameDefinition(SignalComputation other)
    {
        return other is SkySpectralRadianceCurveFit;
    }

    public override object Clone(CopyContext context)
    {
        return new SkySpectralRadianceCurveFit(this, context);
    }

    public override IEvaluator<double> GetEvaluator(EvaluatorGroup group)
    {
        return group.CreateEvaluator<IEvaluator<double>, SignalParameter>(CreateEvaluator, Parameter);
    }

    private static IEvaluator<double> CreateEvaluator(EvaluatorGroup group, SignalParameter parameter)
    {
        return new SkySpectralRadianceEvaluator(group, parameter.GetEvaluator(group));
    }

    private sealed class SkySpectralRadianceEvaluator : Evaluator<double>
    {
        public SkySpectralRadianceEvaluator(EvaluatorGroup group, ParameterEvaluator<Signal> signalEvaluator)
            : base(group)
        {
            m_signalEvaluator = signalEvaluator;
        }

        private SkySpectralRadianceEvaluator(SkySpectralRadianceEvaluator existingInstance, CopyContext context)
            : base(existingInstance, context)
        {
            m_signalEvaluator = existingInstance.m_signalEvaluator;
            UpdateEvaluatorReferences(context);
        }

        public override void UpdateEvaluatorReferences(CopyContext context)
        {
            m_signalEvaluator = context.UpdateReference(m_signalEvaluator);
        }

        public override double Evaluate(JulianDate date)
        {
            Signal signal = m_signalEvaluator.Evaluate(date);
            double waveLength = Constants.SpeedOfLight / signal.Frequency * 1.0e9; // in nm

            // Curve fit from section 6 of the ITU-R P.1814 recommendation
            return 8.97e-13 * Math.Pow(waveLength, 5) -
                   4.65e-9 * Math.Pow(waveLength, 4) +
                   9.37e-6 * Math.Pow(waveLength, 3) -
                   9.067e-3 * waveLength * waveLength +
                   4.05 * waveLength - 5.70;
        }

        public override bool IsAvailable(JulianDate date)
        {
            return m_signalEvaluator.IsAvailable(date);
        }

        public override TimeIntervalCollection GetAvailabilityIntervals(TimeIntervalCollection consideredIntervals)
        {
            return m_signalEvaluator.GetAvailabilityIntervals(consideredIntervals);
        }

        public override bool IsThreadSafe
        {
            get { return m_signalEvaluator.IsThreadSafe; }
        }

        public override object Clone(CopyContext context)
        {
            return new SkySpectralRadianceEvaluator(this, context);
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing)
                m_signalEvaluator.Dispose();
        }

        public override bool IsTimeVarying
        {
            get { return m_signalEvaluator.IsTimeVarying; }
        }

        private ParameterEvaluator<Signal> m_signalEvaluator;
    }
}
Code Sample

The Basic Communications Code Sample topic contains further examples of using these classes.