Main Content

Change Transport Data Rate

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.

Note

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.

Set Transport Data Type in Simulink

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 int16.

Set 16-Bit Transport Data Type in SDR Blocks

16-bit transport data type in SDR blocks

Set 8-Bit Transport Data Type in SDR Blocks

8-bit transport data type in SDR blocks

Set Transport Data Type in MATLAB

The comm.SDRuReceiver and comm.SDRuTransmitter System objects each contain the TransportDataType property for setting the transport type. Set TransportDataType to int8 for 8-bit transport, or to int16 for 16-bit transport. The default transport data type is int16.

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.

Note

Before you run this example, set up your USRP hardware and make sure that the host PC is communicating with the radio.

  1. Create radio object. This example uses a B210 radio with the serial 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 results.

    radio = comm.SDRuReceiver('Platform','B210','SerialNum','F5BA6A');
    
  2. 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;
  3. 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
    
  4. 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)
    
  5. 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
    
  6. 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]);
    
  7. 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
    qstep2/qstep1
    
    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 by using 16-bit transport datatype

Quantization Step Plot Using 8-Bit Transport

Quantization step plot by using 8-bit transport datatype

Related Topics