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.
- 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
andreceive 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 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 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.
- yaml_tag: Optional[str] = 'USRP'¶
YAML serialization tag