예제 #1
0
def model():
    return pylink.DAGModel([pylink.Geometry(),
                            pylink.Antenna(is_rx=True),
                            pylink.Interconnect(is_rx=True),
                            pylink.Receiver(),
                            pylink.Transmitter(),
                            pylink.Interconnect(is_rx=False),
                            pylink.Antenna(is_rx=False),
                            pylink.Channel(),
                            pylink.Modulation(name='QPSK', perf=perf),
                            pylink.LinkBudget()])
예제 #2
0
                               is_rx=True,
                               tracking=True)

gs_tx_antenna = pylink.Antenna(gain=25,
                               polarization='RHCP',
                               is_rx=False,
                               tracking=True)

sat_receiver = pylink.Receiver(rf_chain=sat_rf_chain,
                               implementation_loss_db=2,
                               name='Satellite SBand Receiver')

gs_receiver = pylink.Receiver(rf_chain=gs_rf_chain,
                              name='Ground SBand Receiver')

gs_transmitter = pylink.Transmitter(tx_power_at_pa_dbw=23,
                                    name='Ground SBand Transmitter')

sat_transmitter = pylink.Transmitter(tx_power_at_pa_dbw=1.5,
                                     name='Satellite XBand Transmitter')

rx_interconnect = pylink.Interconnect(is_rx=True)

tx_interconnect = pylink.Interconnect(is_rx=False)

x_channel = pylink.Channel(bitrate_hz=1e6,
                           allocation_hz=500e4,
                           center_freq_mhz=8200,
                           atmospheric_loss_db=1,
                           ionospheric_loss_db=1,
                           rain_loss_db=2,
                           multipath_fading_db=0,
예제 #3
0
    def satellite_init(self):

        # build the receive RF chain
        self.sat_rf_chain = [
            pylink.Element(name='Cables',
                           gain_db=self.sampler(self.satellite_configuration,
                                                ['rx', 'cable', 'gain']),
                           noise_figure_db=self.sampler(
                               self.satellite_configuration,
                               ['rx', 'cable', 'noise_figure'])),
            pylink.Element(name='LNA',
                           gain_db=self.sampler(self.satellite_configuration,
                                                ['rx', 'lna', 'gain']),
                           noise_figure_db=self.sampler(
                               self.satellite_configuration,
                               ['rx', 'lna', 'noise_figure'])),
            pylink.Element(name='Filter',
                           gain_db=self.sampler(self.satellite_configuration,
                                                ['rx', 'filter', 'gain']),
                           noise_figure_db=self.sampler(
                               self.satellite_configuration,
                               ['rx', 'filter', 'noise_figure'])),
            pylink.Element(name='Demodulator',
                           gain_db=self.sampler(self.satellite_configuration,
                                                ['rx', 'demodulator', 'gain']),
                           noise_figure_db=self.sampler(
                               self.satellite_configuration,
                               ['rx', 'demodulator', 'noise_figure'])),
        ]

        # if no gain given, calculate from the antenna aperture
        if 'gain' in self.satellite_configuration['nominal']['rx']['antenna']:
            sat_rx_antenna_gain = self.sampler(self.satellite_configuration,
                                               ['rx', 'antenna', 'gain'])

            if 'aperture' in self.satellite_configuration['nominal']['rx'][
                    'antenna'] and self.warn:
                print(
                    "Satellite Rx Antenna: Both gain and aperature provided, will use gain"
                )

        else:
            sat_rx_antenna_gain = 10 * np.log10(
                self.sampler(self.satellite_configuration,
                             ['rx', 'antenna', 'aperture_efficiency']) *
                self.sampler(self.satellite_configuration,
                             ['rx', 'antenna', 'aperture']) * 4 * np.pi *
                (1e6 * self.sampler(self.channel_configuration,
                                    ['uplink', 'center_freq']))**2 /
                scipy.constants.c**2)

        # specify the receive antenna
        self.sat_rx_antenna = pylink.Antenna(
            gain=sat_rx_antenna_gain,
            polarization=self.satellite_configuration['nominal']['rx']
            ['antenna']['polarization'],
            pattern=self.sampler(self.satellite_configuration,
                                 ['rx', 'antenna', 'pattern']),
            is_rx=True,
            tracking=self.satellite_configuration['nominal']['rx']['antenna']
            ['tracking'],
            pointing_loss_db=self.sampler(self.satellite_configuration,
                                          ['rx', 'antenna', 'pointing_loss']),
            rx_noise_temp_k=self.sampler(self.satellite_configuration,
                                         ['rx', 'antenna', 'noise_temp']))

        # if no gain given, calculate from the antenna aperture
        if 'gain' in self.satellite_configuration['nominal']['tx']['antenna']:
            sat_tx_antenna_gain = self.sampler(self.satellite_configuration,
                                               ['tx', 'antenna', 'gain'])

            if 'aperture' in self.satellite_configuration['nominal']['tx'][
                    'antenna'] and self.warn:
                print(
                    "Satellite Tx Antenna: Both gain and aperature provided, will use gain"
                )

        else:
            sat_tx_antenna_gain = 10 * np.log10(
                self.sampler(self.satellite_configuration,
                             ['tx', 'antenna', 'aperture_efficiency']) *
                self.sampler(self.satellite_configuration,
                             ['tx', 'antenna', 'aperture']) * 4 * np.pi *
                (1e6 * self.sampler(self.channel_configuration,
                                    ['downlink', 'center_freq']))**2 /
                scipy.constants.c**2)

        self.sat_tx_antenna = pylink.Antenna(
            gain=sat_tx_antenna_gain,
            polarization=self.satellite_configuration['nominal']['tx']
            ['antenna']['polarization'],
            pattern=self.sampler(self.satellite_configuration,
                                 ['tx', 'antenna', 'pattern']),
            is_rx=False,
            tracking=self.satellite_configuration['nominal']['tx']['antenna']
            ['tracking'],
            pointing_loss_db=self.sampler(self.satellite_configuration,
                                          ['rx', 'antenna', 'pointing_loss']))

        self.sat_receiver = pylink.Receiver(
            rf_chain=self.sat_rf_chain,
            implementation_loss_db=self.sampler(
                self.satellite_configuration,
                ['rx', 'receiver', 'implementation_loss']),
            name='Satellite ' +
            self.channel_configuration['nominal']['uplink']['name'] +
            ' Receiver')

        self.sat_transmitter = pylink.Transmitter(
            tx_power_at_pa_dbw=self.sampler(self.satellite_configuration,
                                            ['tx', 'pa', 'power']),
            name='Satellite ' +
            self.channel_configuration['nominal']['downlink']['name'] +
            ' Transmitter')
예제 #4
0
#!/usr/bin/python

import pylink
"""Illustrations of the precedence order for node definitions.

Nodes are added to the DAG in the order in which they are received.
So you can, if you wish, override a standard definition.
"""

# Vanilla link budget
m = pylink.DAGModel([
    pylink.Geometry(),
    pylink.Transmitter(tx_power_at_pa_dbw=2),
    pylink.Interconnect(is_rx=False),
    pylink.Antenna(is_rx=False),
    pylink.Receiver(),
    pylink.Antenna(is_rx=True),
    pylink.Interconnect(is_rx=True),
    pylink.Channel(),
    pylink.Modulation('DVB-S2X'),
    pylink.LinkBudget()
])
e = m.enum

print 'Link margin in vanilla example: %s' % m.link_margin_db


# let's override the link_margin_db node in the kwargs
def _evil_margin_db(model):
    return -3.0
예제 #5
0
                               is_rx=True,
                               tracking=True)

gs_tx_antenna = pylink.Antenna(gain=79,
                               polarization='LCP',
                               is_rx=False,
                               tracking=True)

sat_receiver = pylink.Receiver(rf_chain=sat_rf_chain,
                               implementation_loss_db=2,
                               name='Satellite Ka-Band Receiver')

gs_receiver = pylink.Receiver(rf_chain=gs_rf_chain,
                              name='Ground Ka-Band Receiver')

gs_transmitter = pylink.Transmitter(tx_power_at_pa_dbw=25,
                                    name='Ground Ka-Band Transmitter')

sat_transmitter = pylink.Transmitter(tx_power_at_pa_dbw=50,
                                     name='Satellite Ka-Band Transmitter')

rx_interconnect = pylink.Interconnect(is_rx=True)


tx_interconnect = pylink.Interconnect(is_rx=False)


ka_channel = pylink.Channel(bitrate_hz=.072,
                           allocation_hz=500e6,
                           center_freq_mhz=32550,
                           atmospheric_loss_db=1,
                           ionospheric_loss_db=1,