# Interference from Satellite Constellation on Communications Link

This example shows how to analyze interference on a downlink from a constellation of satellites in a medium-Earth orbit (MEO) to a ground station located in the Pacific Ocean. The interfering constellation consists of 40 satellites in a low-Earth orbit (LEO). This example determines the times at which the downlink is closed, the carrier to noise plus interference ratio, and the link margin.

This example requires Satellite Communications Toolbox™. If you have also have Antenna Toolbox™, you can use this example to learn how to import antennas from Antenna Toolbox into satellite scenario. If you also have Phased Array System Toolbox™, you can use this example to learn how to import antennas from Phased Array System Toolbox into satellite scenario and use beamforming to improve the carrier-to-noise-and-interference ratio (CNIR).

### Create Satellite Scenario

Create a satellite scenario. Define the start time and stop time of the scenario. Set the sample time to 60 seconds.

```startTime = datetime(2021,3,17,22,52,0); % 17 March 2021 10:52 PM UTC stopTime = startTime + minutes(10); % 17 March 2021 11:02 PM UTC sampleTime = 60; % In s sc = satelliteScenario(startTime,stopTime,sampleTime);```

Add a satellite in an MEO by specifying its Keplerian orbital elements. This satellite is the satellite from which data is downlinked.

```semiMajorAxis = 12000000; % In m eccentricity = 0; inclination = 8; % In degrees raan = 0; % Right ascension of ascending node, in degrees argOfPeriapsis = 0; % In degrees trueAnomaly = 343.9391; % In degrees meoSat = satellite(sc, semiMajorAxis, ... eccentricity, ... inclination, ... raan, ... argOfPeriapsis, ... trueAnomaly, ... "Name","MEO Satellite", ... "OrbitPropagator","two-body-keplerian");```

Add the interfering satellite constellation from a two-line-element (TLE) file. These satellites are placed in LEO.

`interferingSat = satellite(sc,"leoSatelliteConstellation.tle");`

### Add Transmitter to MEO Satellite

Add a transmitter to the MEO satellite. This transmitter is used for the downlink. Define the antenna specifications and set the operating carrier frequency to 3 GHz.

```txMEOFreq = 3e9; % In Hz txMEOSat = transmitter(meoSat, ... "Frequency",txMEOFreq, ... % In Hz "Power",12); % In dBW gaussianAntenna(txMEOSat, ... "DishDiameter",1); % In m```

### Add Transmitter to LEO Satellites

Add a transmitter to each satellite in the LEO constellation, and then define the antenna specifications. These transmitters are the ones that interfere with the downlink from the MEO satellite. Set the operating carrier frequency of the interfering satellites to 2.99 GHz. The example assigns each interfering satellite a random power in the range from 10 to 20 dBW.

```interferenceFreq = 2.99e9; % In Hz rng("default"); txInterferingSat = transmitter(interferingSat, ... "Frequency",interferenceFreq, ... % In Hz "Power",10+10*rand(1,numel(interferingSat))); % In dBW gaussianAntenna(txInterferingSat, ... "DishDiameter",0.2); % In m```

Add a ground station to the satellite scenario by specifying its latitude and longitude.

```gs = groundStation(sc, ... 0, ... % Latitude in degrees 180, ... % Longitude in degrees "Name","Ground station");```

### Specify Ground Station Antenna Type

For this example, you can choose from one of the following antennas:

• Gaussian Antenna

• Parabolic Reflector from Antenna Toolbox

• Uniform Rectangular Array from Phased Array System Toolbox

```% Select the desired ground station antenna. groundStationAntennaType = "Gaussian Antenna";```

Add a receiver to the ground station. If you selected Gaussian Antenna or Parabolic Reflector, attach the receiver to a gimbal, which is in turn attached to the ground station. Configure the gimbal to track the MEO satellite, so that the antenna also tracks the MEO satellite. If you selected Uniform Rectangular Array, attach the receiver directly to the ground station. Specify the mounting location and mounting angles of the gimbal and receiver, and the antenna specifications appropriately.

```switch groundStationAntennaType case {"Gaussian Antenna","Parabolic Reflector"} % When Gaussian Antenna or Parabolic Reflector is selected, attach % a gimbal to the ground station. gim = gimbal(gs, ... "MountingLocation",[0;0;-5], ... % In m "MountingAngles",[0;180;0]); % In degrees % Set the gimbal to track the MEO satellite. pointAt(gim,meoSat); if groundStationAntennaType == "Gaussian Antenna" % When Gaussian Antenna is selected % Create the receiver object and add it to the gimbal rxGs = receiver(gim, ... "MountingLocation",[0;0;1]); % In m % Provide the Gaussian Antenna specifications gaussianAntenna(rxGs, ... "DishDiameter",0.8); % In m else % When Parabolic Reflector is selected % Size the antenna based on the frequency % Requires Antenna Toolbox(TM) ant = design(reflectorParabolic,txMEOFreq); % Create the receiver object and add it to the gimbal rxGs = receiver(gim, ... "Antenna",ant, ... "MountingLocation",[0;0;1]); % In m end case "Uniform Rectangular Array" % When Uniform Rectangular Array is selected % Determine the wavelength of the downlink signal c = physconst('LightSpeed'); lambda = c/txMEOFreq; % Define array size nrow = 8; ncol = 8; % Define element spacing drow = lambda/2; dcol = lambda/2; % Create a back-baffled 6-by-6 antenna array % Requires Phased Array System Toolbox(TM) ant = phased.URA('Size',[nrow ncol], ... 'ElementSpacing',[drow dcol]); ant.Element.BackBaffled = true; % Create the receiver object and add it to the ground station rxGs = receiver(gs, ... "Antenna",ant, ... "MountingAngles",[0;90;0]); % In degrees end```

### Create Access Analysis Between Interfering Satellite Constellation and Ground Station

Add an access analysis between each satellite in the interfering constellation and the ground station. This analysis enables the visualization of interference in the satellite scenario viewer that will be launched later. Any time a satellite in the constellation is visible to the ground station, there is some level of interference from that visible satellite.

```ac = access(interferingSat,gs); ac.LineColor = [1 1 0]; % Yellow```

### Set Tracking Targets for Satellites

Set the satellites to track the ground station. This ensures that the transmitter antennas on board each satellite track the ground station. Setting the interfering satellite transmitters to track the ground station results in the worst-case interference on the downlink.

`pointAt([meoSat interferingSat],gs);`

### Calculate Weights of Uniform Rectangular Array

If you selected Uniform Rectangular Array as the ground station antenna, compute the weights that are required to point the main lobe towards the MEO satellite, and the nulls towards the interfering satellites, thereby cancelling the interference. Assign the computed weights using `pointAt`.

```if groundStationAntennaType == "Uniform Rectangular Array" % Find the LEO satellites that are in the line of sight of the ground % station. These satellites are the potential interferers. currentInterferingSat = interferingSat(accessStatus(ac,sc.StartTime) == true); % Calculate the direction of the MEO satellite with respect to the % array. This is the lookout direction. [azd,eld] = aer(rxGs,meoSat,sc.StartTime,'CoordinateFrame','body'); % Calculate the directions of the potentially interfering satellites % with respect to the array. These are the null directions. [azn,eln] = aer(rxGs,currentInterferingSat,sc.StartTime,'CoordinateFrame','body'); % Calculate the steering vectors for the lookout direction. % Requires Phased Array System Toolbox. wd = steervec(getElementPosition(ant)/lambda,[wrapTo180(azd);-eld]); % Calculate the steering vector for null directions. % Requires Phased Array System Toolbox. wn = steervec(getElementPosition(ant)/lambda,[wrapTo180(azn)';-eln']); % Compute the response of the desired steering at null directions. rn = (wn'*wn)\(wn'*wd); % Sidelobe canceler - remove the response at null directions. w = wd-wn*rn; % Assign the weights to the phased array. pointAt(rxGs,'Weights',w); end```

Create a downlink from the transmitter on board the MEO satellite to the receiver on board the ground station. This link is the downlink which encounters interference from the LEO constellation.

`downlink= link(txMEOSat,rxGs);`

Create a link between the transmitter on board each satellite in the LEO constellation and the receiver on board the ground station. These links are the interferer links with the desired downlink.

`link(txInterferingSat,rxGs);`

### Launch Satellite Scenario Viewer

Launch the Satellite Scenario Viewer with `ShowDetails` set to false. When the `ShowDetails `property is set to `false`, only the satellites, the ground station, accesses, and links will be shown. The labels and orbits will be hidden. Mouse over the satellites and the ground stations to show their labels.. Click on the MEO satellite so that its orbit projected up to the scenario `StopTime` and its label are visible without mousing over. Click on the ground station so that its label is visible without mousing over. The presence of the green line between the transmitter on board the MEO satellite and the receiver on board the ground station signifies that the downlink can be closed successfully assuming no interference from the satellite constellation exists. The presence of yellow lines between a given satellite in the constellation and the ground station signifies that they have access to one another, and as a result, interference from that satellite exists.

`v = satelliteScenarioViewer(sc,'ShowDetails',false);`

Visualize the radiation pattern of the transmitter antenna on board the MEO satellite and the receiver on board the ground station.

```pattern(txMEOSat, ... 'Size',1000000); % In m pattern(rxGs,txMEOFreq, ... 'Size',1000000); % In m```

#### Set Camera to View Ground Station Antenna Radiation Pattern

```% Set camera position and orientation to view the ground station antenna % radiation pattern. campos(v,-8,172,2500000); camheading(v,40); campitch(v,-60);```

Gaussian Antenna

Parabolic Reflector

Uniform Rectangular Array

### Simulate Scenario and Visualize

#### With Gaussian Antenna or Parabolic Reflector

If you selected Gaussian Antenna or Parabolic Reflector (requires Antenna Toolbox), use `play` to visualize the scenario from `StartTime` to `StopTime`. This will automatically simulate the scenario before playing back the visualization. Note how the antenna pointing changes as the gimbal tracks the MEO satellite.

```if groundStationAntennaType == "Gaussian Antenna" || groundStationAntennaType == "Parabolic Reflector" play(sc); campos(v,-8,172,2500000); camheading(v,40); campitch(v,-60); end```

With Gaussian Antenna

With Parabolic Reflector

#### With Uniform Rectangular Array

If you selected Uniform Rectangular Array (requires Phased Array System Toolbox), you must manually step through the simulation so that you can recompute the weights at each time step based on the new position of the MEO satellite and the interfering LEO satellites. To manually step through the simulation, first set `AutoSimulate` to false. Following this, you can call `advance` to move the simulation by one time step. The first call to `advance` will compute the simulation states at `StartTime`. Subsequent calls will advance the time step by one `SampleTime` and compute the states accordingly.

```if groundStationAntennaType == "Uniform Rectangular Array" % Set AutoSimulate to false. sc.AutoSimulate = false; % Manually step through the simulation. while advance(sc) % Determine the access status history for each LEO satellite % corresponding to the current SimulationTime. acStatusHistory = accessStatus(ac); acStatus = acStatusHistory(:,end); % Determine the LEO satellites that are visible to the ground % station. These are the satellites that will potentially % interfere with the ground station at the current simulation % time. currentInterferingSat = interferingSat(acStatus == true); % Determine the direction of the MEO satellite in the body frame of % the Uniform Rectangular Array. This is the lookout direction of % the array. [azdHistory,eldHistory] = aer(rxGs,meoSat,'CoordinateFrame','body'); azd = azdHistory(:,end); eld = eldHistory(:,end); % Determine the direction of these interfering satellites in % the body frame of the Uniform Rectangular Array. These are % the directions in which the array must point a null. [aznHistory,elnHistory] = aer(rxGs,currentInterferingSat,'CoordinateFrame','body'); azn = aznHistory(:,end); eln = elnHistory(:,end); % Calculate the steering vectors for lookout direction. % Requires Phased Array System Toolbox. wd = steervec(getElementPosition(ant)/lambda,[wrapTo180(azd);-eld]); % Calculate the steering vector for null directions. % Requires Phased Array System Toolbox. wn = steervec(getElementPosition(ant)/lambda,[wrapTo180(azn)';-eln']); % Compute the response of desired steering at null direction. rn = (wn'*wn)\(wn'*wd); % Sidelobe canceler - remove the response at null direction. w = wd-wn*rn; % Assign the weights to the phased array. pointAt(rxGs,'Weights',w); end end```

### Plot Downlink Closure Status Neglecting Interference

Determine the closure status of the desired downlink from the MEO satellite. The `linkStatus` function neglects interference from other transmitters. Any time the downlink is closed, the status is true. Otherwise, the status is false. The status is indicated by 1 and 0, respectively in the plot.

```[downlinkStatus,t] = linkStatus(downlink); plot(t,downlinkStatus,"-g","LineWidth", 2); xlabel("Time"); ylabel("Downlink Closure Status"); title("Link Status as a Function of Time"); grid on;```

Although the `linkStatus` function neglects interference when determining the times when the downlink is closed, manually calculate the interference based on data that can be extracted from the scenario. To do this manual calculation, understanding how `linkStatus` calculates the link closure, as shown in these steps, is necessary.

1) Calculate the effective isotropic radiated power (EIRP):

$EIR{P}_{Tx}={P}_{Tx}-LOS{S}_{Tx}+{G}_{TxAntenna}$,

where:

• $EIR{P}_{Tx}$ is the EIRP of the transmitter antenna (in dBW).

• ${P}_{Tx}$ is the transmitter power (in dBW).

• $LOS{S}_{Tx}$ is the total system loss of the transmitter (in dB).

• ${G}_{TxAntenna}$ is the gain of the transmitter antenna in the direction of the receiver antenna (in dB).

2) In the satellite scenario, all path loss computations assume a free space propagation model. Calculate the free space path loss from the transmitter to the receiver antenna as

$FSPL=10{\mathrm{log}}_{10}\left({\left(\frac{4\pi df}{c}\right)}^{2}\right)$,

where:

• $FSPL$ is the free space path loss from the transmitter to the receiver antenna (in dB).

• $d$ is the distance between the transmitter and the receiver antenna (in m).

• $f$ is the transmitter frequency (in Hz).

• $c$ is the speed of light in vacuum (in m/s).

3) Calculate the received isotropic power as

$RI{P}_{Rx}=EIR{P}_{Tx}-FSPL$,

where $RI{P}_{Rx}$ is the received isotropic power at the received antenna (in dBW).

4) Calculate the carrier to noise density ratio as

$C/{N}_{0}=RI{P}_{Rx}+{\left(G/T\right)}_{Rx}-10{\mathrm{log}}_{10}{k}_{B}-LOS{S}_{RxSystem}$,

where:

• $C/{N}_{0}$ is the carrier to noise density ratio (in dB).

• ${\left(G/T\right)}_{Rx}$ is the gain to noise temperature ratio of the receiver antenna (in dB/K).

• ${k}_{B}$ is the Boltzmann constant (in J/K).

• $LOS{S}_{Rx}$ is the total system loss of the transmitter.

The receiver antenna gain is computed in the direction of the transmitter antenna. The noise temperature is assumed to be a constant and is derived from the `GainToNoiseTemperatureRatio` property of the receiver, which in turn is based on the receiver antenna gain along the $z$-axis of the receiver. In essence:

${\left(G/T\right)}_{z-axis}={\left({G}_{Rx}\right)}_{z-axis}-10{\mathrm{log}}_{10}T$,

where:

• ${\left(G/T\right)}_{z-axis}$ is the receiver antenna gain to noise temperature ratio along the $z$-axis of the receiver (in dB).

• ${\left({G}_{Rx}\right)}_{z-axis}$ is the receiver antenna gain in the direction of the $z$-axis of the receiver (in dB).

• $T$ is the noise temperature (in K).

Rearranging the above equation results in

$10{\mathrm{log}}_{10}T={\left({G}_{Rx}\right)}_{z-axis}-{\left(G/T\right)}_{z-axis}$.

Consequently,

${\left(G/T\right)}_{Rx}=\left({G}_{Rx}\right)-10{\mathrm{log}}_{10}T$.

5) Calculate the receiver energy per bit to noise power spectral density ratio as

${E}_{b}/{N}_{0}=C/{N}_{0}-10{\mathrm{log}}_{10}\left(BITRATE\right)-60$,

where:

• ${E}_{b}/{N}_{0}$ is the received energy per bit to noise power density ratio (in dB).

• $BITRATE$ is the bit rate of the link (in Mbps).

The 60 value appears in the equation because the bit rate is in Mbps.

6) Calculate the link margin as

$MARGIN={E}_{b}/{N}_{0}-{\left({E}_{b}/{N}_{0}\right)}_{Required}$,

where:

• $MARGIN$ is the link margin (in dB).

• ${\left({E}_{b}/{N}_{0}\right)}_{Required}$ is the minimum received energy per bit to noise power spectral density ratio that is required to close the link (in dB).

The link is closed when the link margin is greater than or equal to 0 dB.

To account for interference, the signal received at the ground station antenna from each interfering transmitter must be treated as noise and must be added to the noise power. To compute the new received Eb/No and link margin, the received signal power from each transmitter in the scenario must be calculated.

The received power after antenna is the quantity $RI{P}_{Rx}+{G}_{RxAntenna}$. This received power can be obtained by starting from ${E}_{b}/{N}_{0}$ and using the equations in the previous section backward. First, the received signal power corresponding to the transmitter on board the MEO satellite must be computed. Retrieve the received ${E}_{b}/{N}_{0}$ corresponding to this transmitter.

`ebnoDownlink = ebno(downlink); % In dB`

Use these equations to calculate the corresponding received signal power after antenna.

`$C/{N}_{0}={E}_{b}/{N}_{0}+10{\mathrm{log}}_{10}\left(BITRATE\right)+60$`

`$RI{P}_{Rx}+{G}_{RxAntenna}=C/{N}_{0}+10{\mathrm{log}}_{10}{k}_{B}+10{\mathrm{log}}_{10}T+LOS{S}_{Rx}$`

```T = HelperGetNoiseTemperature(txMEOFreq,rxGs); % In K bitRate = txMEOSat.BitRate; CNoDownlink = ebnoDownlink + 10*log10(bitRate) + 60; kb = physconst("Boltzmann"); downlinkSigPower = CNoDownlink + 10*log10(kb) + 10*log10(T) + rxGs.SystemLoss; % In dBW```

### Calculate Total Interfering Signal Power After Receiver Antenna from All Interfering Transmitters

The total interfering signal power after the receiver antenna from all interfering transmitters is calculated using these steps.

1) Calculate $RI{P}_{Rx}+{G}_{Rx}$, which corresponds to each interfering transmitter, using the same equations used for the transmitter from the MEO satellite.

2) Convert the quantities to Watts.

3) Add the quantities in Watts and the final sum is the total interfering power, ${I}_{W}$, in Watts.

```% Retrieve the interfering links. lnkInterference = txInterferingSat.Links; % Retrieve the Eb/No history corresponding to each interfering transmitter % and store it in the array. ebnoInterference = ebno(lnkInterference); % Calculate the interfering signal power corresponding to each interfering % transmitter in Watts (in this example, the bit rate of each interfering % transmitter is the same as that of that of the MEO satellite). CNoInterference = ebnoInterference + 10*log10(bitRate) + 60; interferenceSigPower = CNoInterference + 10*log10(kb) ... + 10*log10(T) + rxGs.SystemLoss; interferenceSigPowerW = 10.^(interferenceSigPower/10); % In W % Add the interfering signal power from each transmitter. interferenceSigPowerSumW = sum(interferenceSigPowerW); % In W```

### Calculate Contribution of Interfering Signal Power in Overlapped Bandwidth

Calculate the amount of total interfering signal power that contributes to interference in the signal bandwidth by following these steps.

1) Calculate the overlapping portion of the signal bandwidth with the bandwidth of the interferers. This example considers the transmission power of interfering satellites and the MEO satellite as constant across the whole bandwidth of respective MEO satellite and interfering satellites.

2) Calculate the amount of interference power that acts as interference to signal bandwidth.

This diagram shows the power spectral density (PSD) plot, which shows the actual interference power and modeled interference power when the transmission bandwidth and interfering bandwidth overlap. The actual interference power is the area occupied by the interference power density in the overlapped bandwidth region. This actual interference power is then spread across the entire transmission bandwidth and assumed to be noise-like.

This example assumes that the transmission (or signal) bandwidth of the MEO satellite is 30 MHz and that the bandwidth of the interfering signal is 20 MHz.

```txBandwidth = 30e6; % In Hz interferenceBandWidth = 20e6; % In Hz % Get the overlap portion of the interfering bandwidth and the bandwidth of % interest. The assumption is to have same power across the whole % bandwidth. overlapFactor = getOverlapFactor(txMEOFreq,txBandwidth, ... interferenceFreq,interferenceBandWidth); % Get the interference power that contributes as interference to the signal % of interest from the total interference power interferenceSigPowActual = interferenceSigPowerSumW*overlapFactor; % In W```

### Calculate Downlink Closure Status That Accounts for Interference

Calculate the downlink closure status that accounts for interference by following these steps.

1) Calculate the carrier to noise plus interference power density ratio as

$C/\left({N}_{0}+{I}_{0}\right)=RI{P}_{Rx}+{G}_{Rx}-10{\mathrm{log}}_{10}\left(\frac{{I}_{W}}{TxBandwidth}+{k}_{B}T\right)-LOS{S}_{Rx}$,

where:

• $C/\left({N}_{0}+{I}_{0}\right)$ is the carrier to noise plus interference power density ratio (in dB).

• ${I}_{W}$ is the interference signal power after receiver antenna that interferes with the signal bandwidth (in W).

• $TxBandwidth$ is the downlink transmission bandwidth from MEO satellite (in Hz).

2) Calculate the energy per bit to noise plus interference power spectral density ratio as

${E}_{b}/\left({N}_{0}+{I}_{0}\right)=C/\left({N}_{0}+{I}_{0}\right)-10{\mathrm{log}}_{10}\left(BITRATE\right)-60$,

where ${E}_{b}/\left({N}_{0}+{I}_{0}\right)$ is the energy per bit to noise plus interference power spectral density ratio (in dB).

3) Calculate the link margin accounting for interference:

$MARGIN={E}_{b}/\left({N}_{0}+{I}_{0}\right)-{\left({E}_{b}/{N}_{0}\right)}_{Required}$.

```% Calculate link status in the presence of interference CNoPlusInterference = downlinkSigPower - ... 10*log10((interferenceSigPowActual/txBandwidth) + T*kb) - rxGs.SystemLoss; ebNoPlusInterference = CNoPlusInterference - 10*log10(bitRate) - 60; marginWithInterference = ebNoPlusInterference - rxGs.RequiredEbNo; downlinkStatusWithInterference = marginWithInterference >= 0;```

### Plot Downlink Closure Status Accounting for Interference

Plot the new downlink closure status that accounts for interference. Compare the new link status with the previous case when interference was neglected.

```plot(t,downlinkStatusWithInterference,"-r",t,downlinkStatus,"--g","LineWidth",2); legend("Interference accounted","Interference neglected"); xlabel("Time"); ylabel("Downlink Closure Status"); title("Link Status as a Function of Time"); ylim([0 1.2]); grid on```

#### When Gaussian Antenna or Parabolic Reflector are Chosen

The plot shows that at 10:54 PM, the downlink cannot be closed because of excessive interference. This occurs because `Satellite 10` of the LEO constellation flies overhead, and its transmission is picked up by its main lobe. This can also be visually confirmed by setting the current time of the viewer to 10:54 PM and clicking on the satellite near the main lobe of the antenna. Note that you require Antenna Toolbox to select Parabolic Reflector.

```if groundStationAntennaType == "Gaussian Antenna" || groundStationAntennaType == "Parabolic Reflector" v.CurrentTime = datetime(2021,3,17,22,54,0); end```

Gaussian Antenna

Parabolic Reflector

#### When Uniform Rectangular Array with Interference Cancellation Is Chosen

If you selected Uniform Rectangular Array (requires Phased Array System Toolbox), the plot shows that the downlink can be closed for the duration of the scenario because the array is pointing nulls towards the direction of the interfering LEO satellites. This can also be visually confirmed by setting the current time of the viewer to 10:54 PM and 10:55 PM. To be able to manually set the viewer `CurrentTime`, you must change `AutoSimulate` to true. Note that this will clear the simulation data. Also, you will be required to re-compute the weights for these times and assign them to the array using `pointAt`. The satellite that is overflying the ground station is `Satellite 10`. Click on it to see its name and orbit. Drag the mouse while holding down on the left mouse button or scroll button to bring the camera to the desired position and orientation. Rotate the scroll wheel to control camera zoom. Additionally, make the radiation pattern opaque to clearly visualize the position of `Satellite 10` with respect to the lobes. You can see that at both times, `Satellite 10` is in between lobes. This is because the array is pointing a null towards the satellite, thereby cancelling interference from it.

```if groundStationAntennaType == "Uniform Rectangular Array" % Set AutoSimulate to true. sc.AutoSimulate = true; % Set viewer CurrentTime to 10:54 PM. time = datetime(2021,3,17,22,54,0); v.CurrentTime = time; % Calculate the weights and assign them to the array. currentInterferingSat = interferingSat(accessStatus(ac,time) == true); [azd,eld] = aer(rxGs,meoSat,time,'CoordinateFrame','body'); [azn,eln] = aer(rxGs,currentInterferingSat,time,'CoordinateFrame','body'); % Requires Phased Array System Toolbox. wd = steervec(getElementPosition(ant)/lambda,[wrapTo180(azd);-eld]); wn = steervec(getElementPosition(ant)/lambda,[wrapTo180(azn)';-eln']); rn = (wn'*wn)\(wn'*wd); w = wd-wn*rn; pointAt(rxGs,'Weights',w); % Make the radiation pattern opaque. pattern(rxGs,txMEOFreq, ... 'Size',1000000,'Transparency',1); end```

At 10:54 PM UTC

You can run the above code with time set to 10:55 PM and observe the nulls pointing towards the new positions of the interfering satellites.

At 10:55 PM UTC

### Calculate Carrier to Noise Ratio and Carrier to Noise Plus Interference Ratio

Calculate the carrier to noise ratio (CNR) and carrier to noise plus interference ratio (CNIR) from the carrier to noise density ratio and carrier to noise plus interference power density as:

$C/N=C/{N}_{0}-10{\mathrm{log}}_{10}\left(TxBandwidth\right)$ and

$C/\left(N+I\right)=C/\left({N}_{0}+{I}_{0}\right)-10{\mathrm{log}}_{10}\left(TxBandwidth\right)$,

where:

• $C/N$ is the carrier to noise ratio

• $C/\left(N+I\right)$ is the carrier to noise plus interference ratio.

• $TxBandwidth$ is the downlink transmission bandwidth from the MEO satellite (in Hz).

```cByN = CNoDownlink - 10*log10(txBandwidth); cByNPlusI = CNoPlusInterference - 10*log10(txBandwidth);```

Plot $C/N$ and $C/\left(N+I\right)$.

```plot(t,cByNPlusI,"-r",t,cByN,"--g","LineWidth",2); legend("C/(N+I)", "C/N","Location","south"); xlabel("Time"); ylabel("C/N or C/(N+I) (dB)"); title("CNR and CNIR vs. Time for " + groundStationAntennaType); grid on```

When Uniform Rectangular Array (requires Phased Array System Toolbox) with MEO satellite tracking and interference cancellation is chosen, both CNR and CNIR overlap because there is no interference from the LEO satellites. This is because the array is pointing nulls towards the LEO satellites. This can be confirmed by noting that the maximum Eb/N0 from the interfering satellites is about -30.4 dB, which is very low. For all other antennas used in this example, the maximum Eb/N0 is much higher (7.56 dB for Gaussian Antenna, and 5.87 dB for Parabolic Reflector).

```maxEbNoFromLEOSat = max(ebnoInterference,[],'all'); disp("The maximum Eb/N0 from the interfering LEO satellites over the entire scenario duration is " + maxEbNoFromLEOSat + " dB.");```
```The maximum Eb/N0 from the interfering LEO satellites over the entire scenario duration is 7.5581 dB. ```

### Compare Link Margins with and without Interference

Calculate the link margin without interference.

`marginWithoutInterference = ebnoDownlink - rxGs.RequiredEbNo;`

Plot the link margins with and without interference.

```plot(t,marginWithInterference,"-r",t,marginWithoutInterference,"--g","LineWidth",2); legend("With interference","Without interference","Location","south"); xlabel("Time"); ylabel("Margin (dB)"); title("Link Margin vs. Time for " + groundStationAntennaType); grid on```

Any time the link margin is greater than or equal to 0 dB, the downlink is closed. With Gaussian Antenna, Parabolic Reflector (requires Antenna Toolbox), and Uniform Rectangular Array (requires Phased Array System Toolbox) without interference cancellation, there exist times when the link margin dips below 0 dB because of interference. At these times, the downlink is broken.

### Further Exploration

This example demonstrates how to analyze interference on a satellite communication link. The link closure times are a function of these parameters:

• The orbit of the satellites

• The position of the ground station

• The specifications of the transmitters and the receiver

• The specifications of the transmitter and receiver antennas

• Weights if using a Uniform Rectangular Array

• The signal and interference bandwidth

Modify these parameters to observe their influence on the level of interference on the link. You can also choose the different antennas from Antenna toolbox and Phased Array System Toolbox for transmitters and receivers and observe the link performance. When using phased arrays and if you are only interested in making the main lobe track a single target and not deal with pointing nulls, you can use `pointAt` to automatically track other satellites, ground stations, and geographic locations without having to manually simulate by setting `AutoSimulate` to false. The limitation of calling `play` when using dynamically steered phased arrays is that you cannot visualize the variation of their radiation pattern over the course of the simulation.

### Helper Functions

The example uses the helper function HelperGetNoiseTemperature to obtain the noise temperature of the receiver antenna.

The example also uses this local function to compute the amount of overlap between the transmission bandwidth and the interfering bandwidth.

```function overlapFactor = getOverlapFactor(txFreq,txBW,interferenceFreq,interferenceBW) % getOverlapFactor provides the amount of interference bandwidth overlapped % with transmission bandwidth txFreq_Limits = [txFreq-(txBW/2) txFreq+(txBW/2)]; interferenceFreq_Limits = [interferenceFreq-(interferenceBW/2) ... interferenceFreq+(interferenceBW/2)]; if (interferenceFreq_Limits(2) < txFreq_Limits(1)) || ... (interferenceFreq_Limits(1) > txFreq_Limits(2)) % If no overlap exists between transmission bandwidth and % interfering bandwidth, then overlap factor is 0 overlapFactor = 0; elseif (interferenceFreq_Limits(2) <= txFreq_Limits(2)) && ... (interferenceFreq_Limits(1) >= txFreq_Limits(1)) % If interfering bandwidth lies completely within transmission % bandwidth, then overlap factor is 1 overlapFactor = 1; elseif (interferenceFreq_Limits(2) > txFreq_Limits(2)) && ... (interferenceFreq_Limits(1) < txFreq_Limits(1)) % If transmission bandwidth lies completely within interfering % bandwidth, then overlap factor is the ratio of transmission % bandwidth with that of interference bandwidth overlapFactor = txBW/interferenceBW; elseif (interferenceFreq_Limits(2) <= txFreq_Limits(2)) && ... (interferenceFreq_Limits(1) <= txFreq_Limits(1)) % If the start edge of transmission bandwidth lies within % interfering bandwidth, then overlap factor is the ratio of % difference from last edge of interfering bandwidth and first edge % of signal bandwidth, with that of interference bandwidth overlapFactor = (interferenceFreq_Limits(2)-txFreq_Limits(1))/interferenceBW; else % If the last edge of transmission bandwidth lies within % interfering bandwidth, then overlap factor is the ratio of difference % from last edge of signal bandwidth and first edge of interfering % bandwidth, with that of interference bandwidth overlapFactor = (-interferenceFreq_Limits(1)+txFreq_Limits(2))/interferenceBW; end end```