def computeInterferenceFssBlocking(cbsd_grant, constraint, fss_info, max_eirp): """Computes interference that a grant causes to a FSS protection point. Routine to compute interference neighborhood grant causes to FSS protection point for blocking passband Args: cbsd_grant: A CBSD grant of type |data.CbsdGrantInfo|. constraint: The protection constraint of type |data.ProtectionConstraint|. fss_info: The FSS information of type |data.FssInformation|. max_eirp: The maximum EIRP allocated to the grant during IAP procedure. Returns: The interference contribution(dBm). """ # Get the propagation loss and incident angles for FSS entity # blocking channels db_loss, incidence_angles, _ = wf_itm.CalcItmPropagationLoss( cbsd_grant.latitude, cbsd_grant.longitude, cbsd_grant.height_agl, constraint.latitude, constraint.longitude, fss_info.height_agl, cbsd_grant.indoor_deployment, reliability=-1, freq_mhz=FREQ_PROP_MODEL_MHZ) # Compute CBSD antenna gain in the direction of protection point ant_gain = antenna.GetStandardAntennaGains(incidence_angles.hor_cbsd, cbsd_grant.antenna_azimuth, cbsd_grant.antenna_beamwidth, cbsd_grant.antenna_gain) # Compute FSS antenna gain in the direction of CBSD fss_ant_gain = antenna.GetFssAntennaGains(incidence_angles.hor_rx, incidence_angles.ver_rx, fss_info.pointing_azimuth, fss_info.pointing_elevation, fss_info.max_gain_dbi) # Get the total antenna gain by summing the antenna gains from CBSD to FSS # and FSS to CBSD effective_ant_gain = ant_gain + fss_ant_gain # Compute EIRP of CBSD grant inside the frequency range of # protection constraint eff_bandwidth = ( min(cbsd_grant.high_frequency, constraint.high_frequency) - cbsd_grant.low_frequency) if eff_bandwidth <= 0: raise ValueError( 'Computing FSS blocking on grant fully inside FSS passband') eirp = getEffectiveSystemEirp(max_eirp, cbsd_grant.antenna_gain, effective_ant_gain, eff_bandwidth) # Calculate the interference contribution interference = eirp - getFssMaskLoss(cbsd_grant, constraint) - db_loss return interference
def test_fss_gain(self): # Test the internal GSO gains # - diff in hor plane only hor_dirs = [ 20, 21, 21.4, 21.6, 22.9, 23.1, 26.9, 27.1, 29.1, 29.3, 67, 69 ] ver_dirs = np.zeros(len(hor_dirs)) # * perpendicular gains = antenna.GetFssAntennaGains(hor_dirs, ver_dirs, 20, 0, 30, 0, 1) self.assertAlmostEqual( np.max( np.abs(gains - np.array([ 30, 30, 30, 30, 30, 32 - 25 * np.log10(3.1), 32 - 25 * np.log10(6.9), 32 - 25 * np.log10(7.1), 32 - 25 * np.log10(9.1), 32 - 25 * np.log10(9.3), 32 - 25 * np.log10(47), -10 ]))), 0) # * tangential gains = antenna.GetFssAntennaGains(hor_dirs, ver_dirs, 20, 0, 30, 1, 0) self.assertAlmostEqual( np.max( np.abs(gains - np.array([ 30, 30, 30, 29 - 25 * np.log10(1.6), 29 - 25 * np.log10(2.9), 29 - 25 * np.log10(3.1), 29 - 25 * np.log10(6.9), 8, 8, 32 - 25 * np.log10(9.3), 32 - 25 * np.log10(47), -10 ]))), 0) # - diff in ver plane only gains = antenna.GetFssAntennaGains(ver_dirs, hor_dirs, 0, 20, 30, 0, 1) self.assertAlmostEqual( np.max( np.abs(gains - np.array([ 30, 30, 30, 30, 30, 32 - 25 * np.log10(3.1), 32 - 25 * np.log10(6.9), 32 - 25 * np.log10(7.1), 32 - 25 * np.log10(9.1), 32 - 25 * np.log10(9.3), 32 - 25 * np.log10(47), -10 ]))), 0)
def calculateOobeInterference(grants_cbsds_oobe_info, fss_point, fss_info): """Calculates the OOBE interference value (MCBSDi,ch + GCBSDi + PLinvi + GFSSi). The interference values are calculated based on the grant with the highest highFrequency value, and added back into the grant object under key: 'oobe_interference'. Args: grants_cbsds_oobe_info : List of dictionaries containing the highest grant of their CBSD and a reference to the CBSD. fss_point: The FSS location as a (longitude, latitude) tuple. fss_info: The |data.FssInformation| of the FSS. """ # Get values of MCBSD,GCBSD,GFSS and LCBSD for each CBSD. for grant in grants_cbsds_oobe_info: if not grant['cbsd']['grants']: continue cbsd = data.constructCbsdGrantInfo(grant['cbsd']['registration'], None) # Get the MCBSD (ie the conducted OOBE power) mcbsd = grant['mcbsd'] # Computes the path loss lcbsd, incidence_angle, _ = wf_itm.CalcItmPropagationLoss( cbsd.latitude, cbsd.longitude, cbsd.height_agl, fss_point[1], fss_point[0], fss_info.height_agl, cbsd.indoor_deployment, reliability=-1, freq_mhz=interf.FREQ_PROP_MODEL_MHZ) # The CBSD antenna gain towards FSS gcbsd = antenna.GetStandardAntennaGains( incidence_angle.hor_cbsd, cbsd.antenna_azimuth, cbsd.antenna_beamwidth, cbsd.antenna_gain) # The FSS antenna gain gfss = antenna.GetFssAntennaGains( incidence_angle.hor_rx, incidence_angle.ver_rx, fss_info.pointing_azimuth, fss_info.pointing_elevation, fss_info.max_gain_dbi) # The OOBE interference oobe_interference = mcbsd + gcbsd - lcbsd + gfss - interf.IN_BAND_INSERTION_LOSS grant['oobe_interference'] = oobe_interference
def computePropagationAntennaModel(request): reliability_level = request['reliabilityLevel'] if reliability_level not in [-1, 0.05, 0.95]: raise ValueError('reliability_level not in [-1, 0.05, 0.95]') tx = request['cbsd'] if ('fss' in request) and ('ppa' in request): raise ValueError('fss and ppa in request') elif 'ppa' in request: rx = {} rx['height'] = 1.5 isfss = False coordinates = [] ppa = request['ppa'] arcsec = 1 ppa_points = geoutils.GridPolygon(ppa['geometry'], arcsec) if len(ppa_points) == 1: rx['longitude'] = ppa_points[0][0] rx['latitude'] = ppa_points[0][1] elif len(ppa_points) == 0: raise ValueError('ppa boundary contains no protection point') else: raise ValueError( 'ppa boundary contains more than a single protection point') region_val = drive.nlcd_driver.RegionNlcdVote( [[rx['latitude'], rx['longitude']]]) elif 'fss' in request: isfss = True rx = request['fss'] else: raise ValueError('Neither fss nor ppa in request') # ITM pathloss (if receiver type is FSS) or the hybrid model pathloss (if receiver type is PPA) and corresponding antenna gains. # The test specification notes that the SAS UUT shall use default values for w1 and w2 in the ITM model. result = {} if isfss: path_loss = wf_itm.CalcItmPropagationLoss( tx['latitude'], tx['longitude'], tx['height'], rx['latitude'], rx['longitude'], rx['height'], cbsd_indoor=tx['indoorDeployment'], reliability=reliability_level, freq_mhz=3625., is_height_cbsd_amsl=(tx['heightType'] == 'AMSL')) result['pathlossDb'] = path_loss.db_loss gain_tx_rx = antenna.GetStandardAntennaGains( path_loss.incidence_angles.hor_cbsd, ant_azimuth=tx['antennaAzimuth'], ant_beamwidth=tx['antennaBeamwidth'], ant_gain=tx['antennaGain']) result['txAntennaGainDbi'] = gain_tx_rx if 'rxAntennaGainRequired' in rx: hor_dirs = path_loss.incidence_angles.hor_rx ver_dirs = path_loss.incidence_angles.ver_rx gain_rx_tx = antenna.GetFssAntennaGains(hor_dirs, ver_dirs, rx['antennaAzimuth'], rx['antennaElevation'], rx['antennaGain']) result['rxAntennaGainDbi'] = gain_rx_tx else: path_loss = wf_hybrid.CalcHybridPropagationLoss( tx['latitude'], tx['longitude'], tx['height'], rx['latitude'], rx['longitude'], rx['height'], cbsd_indoor=tx['indoorDeployment'], reliability=-1, freq_mhz=3625., region=region_val, is_height_cbsd_amsl=(tx['heightType'] == 'AMSL')) result['pathlossDb'] = path_loss.db_loss gain_tx_rx = antenna.GetStandardAntennaGains( path_loss.incidence_angles.hor_cbsd, ant_azimuth=tx['antennaAzimuth'], ant_beamwidth=tx['antennaBeamwidth'], ant_gain=tx['antennaGain']) result['txAntennaGainDbi'] = gain_tx_rx return result
incidence_angles.hor_cbsd, cbsd.antenna_azimuth, cbsd.antenna_beamwidth, cbsd.eirp_dbm_mhz) cbsd_rssi[k] = cbsd_effective_eirp - db_loss cbsd_incidence_angles.append(incidence_angles) # - then compute the aggregate average interference for each FSS entity # (ie each different possible FSS antenna pointing) fss_total_rssi = [] for fss_entity in fss_entities: hor_dirs = [inc_angle.hor_rx for inc_angle in cbsd_incidence_angles] ver_dirs = [inc_angle.ver_rx for inc_angle in cbsd_incidence_angles] fss_ant_gains = antenna.GetFssAntennaGains( hor_dirs, ver_dirs, fss_entity.pointing_azimuth, fss_entity.pointing_elevation, fss_entity.max_gain_dbi) # compute aggregated RSSI in linear space (and convert back to dBm) total_rssi = 10 * np.log10(np.sum( 10**((cbsd_rssi + fss_ant_gains) / 10.))) fss_total_rssi.append(total_rssi) #--------------------------------------------------------------- # Print out results print 'For FSS lat=%.7f lon=%.7f: %d CBSDs' % ( base_fss.latitude, base_fss.longitude, len(cbsds)) print ' Max RSSI = %.2f dBm / MHz' % max(fss_total_rssi) print ' RSSI per possible pointing:' print [int(val*100)/100. for val in fss_total_rssi]