USRP Device

class UsrpDevice(ip, port=5555, carrier_frequency=700000000.0, sampling_rate=None, tx_gain=0.0, rx_gain=0.0, scale_transmission=True, num_prepended_zeros=200, num_appended_zeros=200, selected_transmit_ports=None, selected_receive_ports=None, **kwargs)[source]

Bases: PhysicalDevice, Serializable

Bindung to a USRP device via the UHD library.

Parameters:
  • ip (str) – The IP address of the USRP device.

  • port (int, optional) – The port of the USRP device.

  • carrier_frequency (float, optional) – Carrier frequency of the USRP device. \(700~\mathrm{MHz}\) by default.

  • sampling_rate (float, optional) – Sampling rate of the USRP device. If not provided, the sampling rate is determined from the configured operators.

  • tx_gain (float, optional) – The transmission gain of the USRP device. Zero by default.

  • rx_gain (float, optional) – The reception gain of the USRP device. Zero by default.

  • scale_transmission (bool, optional) – If True, the transmission signal is scaled to the maximum floating point value of the USRP device. This ensures a proper digital to analog conversion.

  • num_prepended_zeros (int, optional) – The number of zeros prepended to the transmission signal. \(200\) by default.

  • num_appended_zeros (int, optional) – The number of zeros appended to the transmission signal. \(200\) by default.

  • selected_transmit_ports (Sequence[int], optional) – Indices of the selected transmit antenna ports. If not specified, i.e. None, only the first antenna port is selected.

  • selected_receive_ports (Sequence[int], optional) – Indices of the selected receive antenna ports. If not specified, i.e. None, only the first antenna port is selected.

  • **kwargs – Additional arguments passed to the PhysicalDevice parent class.

trigger()[source]

Trigger the device.

Return type:

None

property antennas: UsrpAntennas

Antenna array model of the USRP device.

Allows for the further configuration of the antenna elements, however, the number of transmit ports and receive ports is fixed.

property carrier_frequency: float

Central frequency of the device’s emissions in the RF-band.

Returns:

Carrier frequency in Hz.

Return type:

frequency (float)

Raises:

ValueError – On negative carrier frequencies.

property ip: str

Internet protocol address of the remote host.

Returns:

IP adress.

property max_sampling_rate: float

Maximal device sampling rate.

Returns: The samplin rate in Hz.

property num_appended_zeros: int

Number of zero padding samples appended to the transmitted signal.

Returns: Number of appended samples.

Raises:

ValueError – For negative values.

property num_prepeneded_zeros: int

Number of zero padding samples prepended to the transmitted signal.

Returns: Number of prepended samples.

Raises:

ValueError – For negative values.

property num_receive_ports: int

Number of receive ports controlled on the USRP device.

property num_transmit_ports: int

Number of transmit ports controlled on the USRP device.

property port: int

Internet protocol port of the remote host.

Returns:

Port.

property rx_gain: float

Gain of the receiving front-end in dB.

property sampling_rate: float

Sampling rate at which the device’s analog-to-digital converters operate.

Returns:

Sampling rate in Hz.

Return type:

sampling_rate (float)

Raises:

ValueError – If the sampling rate is not greater than zero.

property scale_transmission: bool

Indicates whether the transmission is scaled to the full DAC range.

Returns: Boolean enabled flag.

property selected_receive_ports: Sequence[int]

Indices of the selected receive ports.

property selected_transmit_ports: Sequence[int]

Indices of the selected transmit ports.

property tx_gain: float

Gain of the transmitting front-end in dB.

yaml_tag: Optional[str] = 'USRP'

YAML serialization tag