This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Detect Underruns and Overruns

Detect Lost Samples Using SDRu Transmitter Block

The lost samples port is disabled by default. To enable it:

  • On the SDRu transmitter block, select the Enable underrun output port parameter.

To detect underruns during the transmission of radio signals, check the underrun output port on the SDRu transmitter block.

During the simulation, to see if any data loss is occurring, check the underrun output port of the transmitter.

  • 0 — Indicates that no data samples were lost.

  • 1 — Indicates that data samples were lost.

This port is a useful diagnostic tool for determining real-time operation of the blocks. If your model is not running in real time, see Burst-Mode Buffering. The reporting resolution depends on the frame size.

Detect Lost Samples Using SDRu Receiver Block

The lost samples port is disabled by default. To enable it:

  • On the SDRu receiver block, select the Enable overrun output port parameter.

To detect overruns during the reception of radio signals, check the overrun output port on the SDRu receiver block.

During the simulation, to see if any data loss is occurring, check the overrun output port of the receiver.

  • 0 — Indicates that no data samples were lost.

  • 1 — Indicates that data samples were lost.

This port is a useful diagnostic tool for determining real-time operation of the blocks. If your model is not running in real time, see Burst-Mode Buffering. The reporting resolution depends on the frame size.

Note

With burst mode enabled an overrun occurs in between bursts as the streaming resumes, because it is not possible to get continuous data when starting and stopping streaming.

Detecting Lost Samples Using SDRu Transmitter System Object

With SRDu transmitter System objects, the underrun output indicates data loss. This output is a useful diagnostic tool for determining real-time operation of the System object™.

To see if any data loss is occurring, check underrun.

  • 0 — Indicates no data loss.

  • 1 — Indicates an underrun at the transmitter.

If your design is not running in real time, see Burst-Mode Buffering.

Detect SDRu Transmitter System Object Underruns

Create a transmitter System object.

tx = comm.SDRuTransmitter(...
              'IPAddress', '192.168.10.2', ...
              'CenterFrequency', 2.2e9, ...
              'InterpolationFactor', 256);
tx.EnableBurstMode = true;
tx.NumFramesInBurst = 20;

Create transmitter data.

numFrames = 60;
txData = zeros(375000,60);

Transmit the data with tx, and return underrun as an output argument.

for frame = 1:numFrames
    underflow = tx(txData(:,frame));
    if (underflow)
        msg = ['Transmitter underrun indicated in frame # ',...
                int2str(frame),', verify if data has been lost.'];
            disp(msg)
    end
release(tx);
no tx ack
Transmitter underrun indicated in frame # 20, verify if data has been lost.
Transmitter underrun indicated in frame # 40, verify if data has been lost.
Transmitter underrun indicated in frame # 60, verify if data has been lost.

Underruns are indicated at the last frame of transmission for each burst. It is not possible to get continuous data when starting and stopping streaming, therefore an underrun occurs in between bursts when you have burst mode enabled.

Detect Lost Samples Using SDRu Receiver System Object

With SRDu receiver System objects, the overrun output indicates data loss. This output is a useful diagnostic tool for determining real-time operation of the System object.

To see if any data loss is occurring, check overrun.

  • 0 — Indicates that no data samples were lost.

  • 1 — Indicates that data samples were lost.

If your design is not running in real time, see Burst-Mode Buffering.

Note

With burst mode enabled an overrun occurs in between bursts as the streaming resumes, because it is not possible to get continuous data when starting and stopping streaming.

Detect SDRu Receiver System Object Overruns

Create a receiver System object.

rx = comm.SDRuReceiver('192.168.10.2', ...
         'CenterFrequency', 2.2e9, ...
         'DecimationFactor', 256, ...
         'FrameLength', 19200);
rx.EnableBurstMode = true;
rx.NumFramesInBurst = 20;

Capture signal data.

numFrames = 100;
burstCaptures = zeros(19200,numFrames);

Receive the data with rx, and check the overrun output argument.

len = 0;
for frame = 1:numFrames
    while len == 0
        [data,len,overrun] = rx();
        burstCaptures(:,frame) = data;
        if (overrun)
            msg = ['Receiver overrun indicated in frame # ',...
                int2str(frame),', verify if data has been lost.'];
            disp(msg)
        end
    end
    len = 0;
end
release(rx);
Receiver overrun indicated in frame # 1, verify if data has been lost.
Receiver overrun indicated in frame # 21, verify if data has been lost.
Receiver overrun indicated in frame # 41, verify if data has been lost.

Overruns are indicated at the start frame of reception for each burst. It is not possible to get continuous data when starting and stopping streaming, therefore an overrun occurs in between bursts when you have burst mode enabled.

Related Topics