Ejemplo n.º 1
0
 def sfd_channel_at_uplink_location(self, uplink_gt):
     """
     Returns SFD per channel at uplink location
     """
     if self.operating_mode == "FGM":
         return -(self.sfd_max_atten_fgm + uplink_gt) - (
             self.transponder.dynamic_range - self.attenuation)
     elif self.operating_mode == "ALC":
         return -(self.sfd_max_atten_alc + uplink_gt)
     else:
         raise LinkCalcError(
             "No valid operating mode specified for channel {0}".format(
                 self.name))
Ejemplo n.º 2
0
 def power_at_antenna_feed(self, ifl=None, obo=None, upc=None):
     """
     Returns output power at antenna feed
     """
     if not ifl:
         ifl = self.ifl
     if not obo:
         obo = self.output_backoff
     if not upc:
         upc = self.upc
     if ifl > 0:
         raise LinkCalcError(
             "IFL of HPA {0} ({1} dB) should be less than zero.".format(
                 self.name, str(ifl)))
     if obo > 0:
         raise LinkCalcError(
             "OBO of HPA {0} ({1} dB) should be less than zero".format(
                 self.name, str(obo)))
     if upc < 0:
         raise LinkCalcError(
             "UPC of HPA {0} ({1} dB) should be more than zero.".format(
                 self.name, str(upc)))
     return 10**((self.output_power + obo + ifl - upc) / 10)
Ejemplo n.º 3
0
 def seek_optimized_pfd_uplink(self, carrier_bandwidth, uplink_gt):
     """
     Seek an optimized PFD uplink of the uplink station
     """
     # In FGM mode, maximum allowable EIRP is equal to an amount that drives the amplifier to get required OBO
     # Default OBO = 0 dB
     if self.operating_mode == "FGM":
         backoff_per_carrier = 10 * log10(
             self.bandwidth / carrier_bandwidth)
         return self.sfd_channel_at_uplink_location(
             uplink_gt) + self.operating_ibo - backoff_per_carrier
     # In ALC mode, maximum allowable is equal to an amount that drives the amplifier at desired deepin
     elif self.operating_mode == "ALC":
         return self.sfd_channel_at_uplink_location(uplink_gt) - self.transponder.dynamic_range + self.transponder.\
             design_alc_deepin
     else:
         raise LinkCalcError(
             "No valid operating mode specified for channel {0}".format(
                 self.name))
Ejemplo n.º 4
0
 def obo_per_carrier(self, uplink_pfd, uplink_gt, carrier_bandwidth):
     """
     Returns output backoff per carrier from given PFD
     """
     if self.operating_mode == "FGM":
         # OBO is sought from linear graph
         ibo_per_carrier = uplink_pfd - self.sfd_channel_at_uplink_location(
             uplink_gt)
         return ibo_per_carrier - self.operating_ibo + self.operating_obo
     elif self.operating_mode == "ALC":
         # Check if given PFD reaches deep-in or not
         deepin = self.deepin_per_carrier(uplink_pfd, uplink_gt,
                                          carrier_bandwidth)
         if deepin < 0:
             return self.operating_obo - 10 * log10(
                 self.bandwidth / carrier_bandwidth) + deepin
         else:
             return self.operating_obo - 10 * log10(
                 self.bandwidth / carrier_bandwidth)
     else:
         raise LinkCalcError(
             "No valid operating mode specified for channel {0}".format(
                 self.name))
Ejemplo n.º 5
0
    def efficiency(self, frequency):
        """
        Returns antenna efficiency at given frequency in GHz
        """
        band = FrequencyBand.get_frequency_band(frequency)
        if band:
            # Seek if there is antenna gain data at this band (from the spec sheet)
            gain_at_frequency = self.antennagain_set.filter(
                frequency__gt=band.start, frequency__lt=band.stop)

            # If the gain data exists, loop all the gain values to find closest frequency
            # This step is to differentiate between Tx and Rx frequency
            if gain_at_frequency:
                gain_difference = 100
                for g in gain_at_frequency:
                    if abs(g.frequency - frequency) < gain_difference:
                        gain = g
                return 10**(gain.value / 10) * (
                    SPEED_OF_LIGHT /
                    (pi * gain.frequency * 10**9 * self.diameter))**2
            else:
                return 0.6
        else:
            raise LinkCalcError("Invalid frequency range.")