Phased Array Antenna Code Sample |
The following is an example of how to configure and use a phased array receiver for steering a null in the direction of jamming interference.
Note |
---|
The functionality described in this topic requires a license for the Communications Library. |
var earth = CentralBodiesFacet.GetFromContext().Earth; var epoch = new GregorianDate(2017, 2, 10, 17, 0, 0.0).ToJulianDate(); Vector alignmentReferenceVector = new VectorFixed(earth.InertialFrame.Axes, new Cartesian(1, 0, 0)); var analysisStartTime = epoch; var analysisStopTime = analysisStartTime.AddSeconds(840.0); double aircraftAltitude = 11e3; double frequency = 14.5e9; double transmitPower = 1000.0; double dataRate = 1.0e6; double jammerPower = 10000.0; //Construct the receiver's Point and Axes var receiverPoint = new PointCartographic(earth, new Cartographic(Trig.DegreesToRadians(-75.5966), Trig.DegreesToRadians(40.038), 0.0)); var receiverAxes = new AxesEastNorthUp(earth, receiverPoint); //Define the waypoints for the transmitter's WaypointPropagator var waypointTimes = new List<JulianDate> { analysisStartTime, analysisStopTime }; var waypointLocations = new List<Cartographic> { new Cartographic(Trig.DegreesToRadians(-76.37869961), Trig.DegreesToRadians(40.04153207), aircraftAltitude), new Cartographic(Trig.DegreesToRadians(-74.67085047), Trig.DegreesToRadians(40.03188320), aircraftAltitude) }; //Construct the transmitter's Point and Axes var transmitterPropagator = WaypointPropagator.ConstructConstantVelocityWaypointPropagator(earth, waypointTimes, waypointLocations); var transmitterPoint = transmitterPropagator.CreatePoint(); var transmitterToReceiver = new VectorTrueDisplacement(transmitterPoint, receiverPoint); //Transmitter axes is targeted to the receiver location using the AxesAlignedConstrained type. var transmitterAxes = new AxesAlignedConstrained(transmitterToReceiver, AxisIndicator.Third, alignmentReferenceVector, AxisIndicator.First); //Construct the transmitter as a ComplexDigitalTransmitter with a Parabolic antenna gain pattern. var transmitter = new ComplexDigitalTransmitter("DesiredTransmitter", transmitterPoint, transmitterAxes, new ModulationBpsk(), new ParabolicGainPattern(1.0, 0.75, 0.001), frequency, transmitPower, dataRate, null); //Define the waypoints for the jamming transmitter's WaypointPropagator waypointLocations = new List<Cartographic> { new Cartographic(Trig.DegreesToRadians(-75.57784380), Trig.DegreesToRadians(40.73625037), aircraftAltitude), new Cartographic(Trig.DegreesToRadians(-75.59714152), Trig.DegreesToRadians(39.24067626), aircraftAltitude) }; //Construct the jamming transmitter's Point and Axes var jammerPropagator = WaypointPropagator.ConstructConstantVelocityWaypointPropagator(earth, waypointTimes, waypointLocations); var jammerPoint = jammerPropagator.CreatePoint(); var jammerToReceiver = new VectorTrueDisplacement(jammerPoint, receiverPoint); //Jamming transmitter's axes is targeted to the receiver location using the AxesAlignedConstrained type. var jammerAxes = new AxesAlignedConstrained(jammerToReceiver, AxisIndicator.Third, alignmentReferenceVector, AxisIndicator.First); //Construct the jamming transmitter as a ComplexDigitalTransmitter with same configuration as the desired transmitter. var jammer = new ComplexDigitalTransmitter("Jammer", jammerPoint, jammerAxes, new ModulationBpsk(), new ParabolicGainPattern(1.0, 0.75, 0.001), frequency, jammerPower, dataRate, null); //Construct the receiver's PhasedArrayGainPattern and initialize with the 9 array elements. var phasedArray = new PhasedArrayGainPattern(); phasedArray.ElementPattern.Add(new PhasedArrayElement(-0.5, -0.5)); phasedArray.ElementPattern.Add(new PhasedArrayElement(-0.5, 0.0)); phasedArray.ElementPattern.Add(new PhasedArrayElement(-0.5, 0.5)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.0, -0.5)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.0, 0.0)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.0, 0.5)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.5, -0.5)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.5, 0.0)); phasedArray.ElementPattern.Add(new PhasedArrayElement(0.5, 0.5)); phasedArray.DesignFrequency = frequency; //Initialize the phased array's element factor phasedArray.ElementFactor = new CosineExponentElementFactor(1.0, 0.25); //Construct the receiver's front end filter. var filter = new RectangularFilter(); filter.Frequency = frequency; filter.LowerBandwidthLimit = -1.0e6; filter.UpperBandwidthLimit = 1.0e6; //Construct the receiver's front end amplifier var amplifier = new ConstantGainAmplifier(); amplifier.Gain = 1000.0; //Construct the receiver as a ComplexReceiver type. var receiver = new ComplexReceiver("Receiver", receiverPoint, receiverAxes, amplifier, phasedArray); receiver.Filter = filter; //Construct the desired link and jamming link and add the WirelessLinkExtension to enable communications modeling. var desiredLink = new LinkInstantaneous(transmitter, receiver); desiredLink.Extensions.Add(new WirelessLinkExtension()); var jammerLink = new LinkInstantaneous(jammer, receiver); jammerLink.Extensions.Add(new WirelessLinkExtension()); //Construct the SignalPropagationGraph and add the desired and jamming links. var graph = new SignalPropagationGraph(); graph.AddLink(desiredLink); graph.AddLink(jammerLink); //Construct the intended signal strategy as an IntendedSingalByTransmitter with the desired transmitter instance. var intendedSignalStrategy = new IntendedSignalByTransmitter(transmitter); //Construct the MVDR beamformer and assign to the phased array instance. var mvdrBeamformer = new MinimumVarianceDistortionlessResponseBeamformer(); phasedArray.Beamformer = mvdrBeamformer; //Construct a new instance of the LinkDirectionsProvider and add the desired link to the provider's list of links. var linkDirectionsProvider = new LinkDirectionsProvider(); linkDirectionsProvider.Links.Add(desiredLink); linkDirectionsProvider.TimeObserver = receiver; //Assign the directions provider to the beam directions of the MVDR beamformer. This will cause the MVDR to try to form a beam in the desired transmitter's direction. mvdrBeamformer.BeamDirectionsProvider = linkDirectionsProvider; //Construct an instance of the ScalarCarrierToNoisePlusInterference communications scalar in order to compute C/(N+I) for the case where there is no null steering (for comparison purposes). var carrierToNoisePlusInterferenceNoNullSteeringScalar = new ScalarCarrierToNoisePlusInterference(receiver, graph, intendedSignalStrategy); var carrierToNoisePlusInterferenceNoNullSteeringEvaluator = carrierToNoisePlusInterferenceNoNullSteeringScalar.GetEvaluator(); //Add the constant weight link extension. This determines the weight assigned to this jammer when forming the corresponding null. jammerLink.Extensions.Add(new ScalarWeightLinkExtension(10000.0)); //Construct a new instance of the LinkDirectionsProvider and add the jammer link to the provider's list of links. linkDirectionsProvider = new LinkDirectionsProvider(); linkDirectionsProvider.Links.Add(jammerLink); linkDirectionsProvider.TimeObserver = receiver; //Assign the directions provider to the null directions of the MVDR beamformer. This will cause the MVDR to try to form a null in the jammer transmitter's direction. mvdrBeamformer.NullDirectionsProvider = linkDirectionsProvider; //Construct an instance of the ScalarCarrierToNoisePlusInterference communications scalar in order to compute C/(N+I) for the case where we are nulling the jammer transmitter. var carrierToNoisePlusInterferenceNullSteeringScalar = new ScalarCarrierToNoisePlusInterference(receiver, graph, intendedSignalStrategy); var carrierToNoisePlusInterferenceNullSteeringEvaluator = carrierToNoisePlusInterferenceNullSteeringScalar.GetEvaluator(); var cOverNPlusINullSteeringValues = new List<double>(); var cOverNPlusINoNullSteeringValues = new List<double>(); var difference = new List<double>(); //Compute the C/(N+I) values over the desired analysis interval and compare. double stepSize = 60.0; var computeTime = analysisStartTime; while (computeTime < analysisStopTime) { var cOverNPlusINullSteering = CommunicationAnalysis.ToDecibels(carrierToNoisePlusInterferenceNullSteeringEvaluator.Evaluate(computeTime)); cOverNPlusINullSteeringValues.Add(cOverNPlusINullSteering); var cOverNPlusINoNullSteering = CommunicationAnalysis.ToDecibels(carrierToNoisePlusInterferenceNoNullSteeringEvaluator.Evaluate(computeTime)); cOverNPlusINoNullSteeringValues.Add(cOverNPlusINoNullSteering); difference.Add(Math.Abs(cOverNPlusINullSteering - cOverNPlusINoNullSteering)); computeTime = computeTime.AddSeconds(stepSize); }