The USRP® radio samples the signals received at the antenna. The radio then transports the
samples to the host computer. By default, the transport data rate uses 16 bits for the
in-phase component and 16 bits for the quadrature component, making each sample require 32
bits to transport. You can increase the transfer speed by reducing the signal precision to 8
bits. Using the
int8 setting for transport data type makes the transfer
speed about 2x faster, and helps you avoid overruns and burst mode failures.
When you use 8-bit transport, make sure that your gain setting is sufficiently high for the signal to use the entire 8-bit range. This setting results in a quantization step that is 256 times bigger.
The SDRu Receiver and SDRu Transmitter blocks each contain
the parameter Transport data type for setting the transport type. The
default transport data type is
Set 16-Bit Transport Data Type in SDR Blocks
Set 8-Bit Transport Data Type in SDR Blocks
comm.SDRuTransmitter System objects each contain the
TransportDataType property for setting the transport type. Set
int8 for 8-bit transport, or
int16 for 16-bit transport. The default transport data type is
This code example demonstrates how the quantization step size is increased when you use 8-bit transport. Enter this code in the MATLAB® command window and observe the differences in the plots.
Before you run this example, set up your USRP® hardware and make sure that the host PC is communicating with the radio.
Create radio object. This example uses a B210 radio with the seruial number
'F5BA6A'. When you run this code, configure the System
object™ for the type of radio that you have, and include the appropriate IP
address or serial number. If necessary, adjust the center frequency for the best
radio = comm.SDRuReceiver('Platform','B210','SerialNum','F5BA6A');
Set radio properties.
radio.CenterFrequency = 102.5e6; radio.Gain = 65; radio.MasterClockRate = 20e6; radio.DecimationFactor = 100; radio.FrameLength = 4000; radio.OutputDataType = 'double'; radio.EnableBurstMode = true; radio.NumFramesInBurst= 20;
Use 16-bit transport.
radio.TransportDataType = 'int16'; data1 = zeros(4000,20); for i = 1:20 len = 0; while len <= 0 [data1(:,i), len] = radio(); end end
Plot received signals and release radio.
figure plot(data1(:),'x') title('Received Signal (TransportDataType = ''int16'')') xlabel('In-phase Component'); ylabel('Quadrature Component'); axis([-0.04 0.04 -0.04 0.04]); release(radio)
Use 8-bit transport.
radio.TransportDataType = 'int8'; data2 = zeros(4000,20); for i = 1:20 len = 0; while len <= 0 [data2(:,i), len] = radio(); end end
Plot received signals.
figure plot(data2(:),'x') title('Received Signal (TransportDataType = ''int8'')') xlabel('In-phase Component'); ylabel('Quadrature Component'); axis([-0.04 0.04 -0.04 0.04]);
Compare quantization step sizes.
r = real(data1(:)); qstep1 = min(r(r>0))
qstep1 = 3.0519e-05
r = real(data2(:)); qstep2 = min(r(r>0))
qstep2 = 0.0078
ans = 256
Th quantization step size is 256 times larger when 8-bit transport is used.
Quantization Step Plot Using 16-Bit Transport
Quantization Step Plot Using 8-Bit Transport
 USRP, USRP2, UHD, and Ettus Research are trademarks of National Instruments Corp.