主要内容

Burst-Mode Buffering

在里面Communications Toolbox™ Support Package for USRP™ Radio, if the SDRu blocks or SDRu System object™ cannot keep up with the radio hardware, the model or code is not processing data in real time.Burst modeenables you to buffer a set of contiguous samples without losing samples by setting the number of frames in a burst.

Determine If You Need Burst Mode

建议当您的应用程序需要新鲜样品或保证连续样品时,启用爆发模式。

查看传输或接收的数据是否在SDRU块中连续:

To see if the transmitted or received data is contiguous for an SDRu System object:

  • Check the卧底output when you callCOMM系统对象。

  • Check the超支output when you callcomm.SDRuReceiver系统对象。

有关更多信息,请参阅检测远处和超支

Tip

If your model is not running in real time, you can:

  • 使用突发模式

  • Use vector-based processing

  • 随着代码生成加速

Any combination of these techniques may be applied to approach or achieve real-time performance.

启用爆发模式

Use burst mode when your model is experiencing underruns or overruns because it cannot keep up with the amount of transmitted or received data in real time. Burst mode allows you to buffer a minimum set of contiguous samples without underruns or overruns.

Note

Overruns and underruns can still happen between bursts, especially with large burst sizes. Therefore, enabling the burst mode feature is recommended only if your model cannot keep up in real time.

最大突发尺寸(以框架为单位)由操作系统和USRP设备UHD™施加。UHD施加的最大尺寸约为1 GB,或256兆扫。MATLAB执行了最大数量的样品®。为example, with a frame size of 4000 samples, the maximum burst is approximately 67k frames. Depending on the memory constraints on a specific host, a lower limit might be required. Exceeding the limit will be flagged by an error saying'unable to allocate memory'。对于N3XX-和X3XX-系列收音机,爆发的最大尺寸计算为分解器XNumFrameInburstX number of frames per burst XSampleSperframe,对于支持RFNOC的设备。金宝app默认的突发大小为100帧。

启用爆发模式in SDRu System objects

Receiver Burst Mode Processing

When you use the burst mode for data reception, the first SDRu receiver System object call transfers a whole burst to the host computer memory and then the SDRu receiver System object processes the first frame. Subsequent SDRu receiver System object calls process the rest of the burst, one frame at a time, from the host computer memory (not from the radio). When all the frames in the transferred data have been processed, the next SDRu receiver System object call transfers another whole burst to the host computer memory and the first frame of data is processed by the SDRu receiver System object.

为example, Set the启用Burstmodeproperty to真的,NumFrameInburstproperty to10, 和SampleSperframeto100000。对于第一个SDRU接收器系统对象调用,将整个爆发(1,00,000个样本/框架x 10帧/爆发= 1,000,000个样本/爆发)转移到主机计算机内存,SDRU接收器系统对象是第一个数据框架。对于随后的SDRU接收器系统对象调用(第二次通话),一次是从主机计算机内存处理的。处理整个爆发后,在第十一SDRU接收器系统对象调用上,另一个整体突发从收音机转移到主机计算机内存,第一帧数据帧由SDRU接收器系统对象处理。

爆发模式缓冲以克服接收器的超支

配置带有序列号的B200收音机设置为'30FD838'. Set the radio to receive at 2.5 GHz with a decimation factor of 125 and master clock rate of 56 MHz. Enable burst-mode buffering to overcome overruns. Set number of frames in a burst to 20 and samples per frame to 37500.

Create a SDRu receiver System object to use for data reception.

rx = comm.SDRuReceiver(。。。'平台','B200',。。。'SerialNum',“30 fd838”,。。。“中心频率”,2.5e9,。。。'MasterClockRate',56e6,。。。'DecimationFactor',125,。。。'OutputDataType','双倍的');rx.enableburstmode = true;rx.numframeinburst = 20;rx.samplesperframe = 37500;

使用COMM捕获信号数据。DPSKDEMODULATOR系统对象。

解调器= comm.dpskdemudulator('BitOutput',true);

Inside a for loop, receive the data using the rx System object.

numframes = 100;forframe = 1:numFrames [data,overrun] = rx();if~(overrun) demodulator(data);endendrelease(rx)

发射机突发模式处理

When you use burst mode for data transmission, the data is not transferred to the radio until the SDRu transmitter System object has been calledNumFrameInburst时代。SDRU发射机系统对象被要求NumFrameInburst时间,整个爆发被转移到收音机,然后传输。

Burst-Mode Buffering to Overcome Underruns at Transmitter

配置带有序列号的B200收音机设置为“30 fd838”。设置无线电传输2.5GHz with an interpolation factor of125主时钟速率为56 MHz。启用爆发模式缓冲以克服远处。设置爆发中的帧数20

创建一个用于数据传输的SDRU发送器系统对象。

tx = comm。。。。'平台','B200',。。。'SerialNum',“30 fd838”,。。。“中心频率”,2.5e9,。。。“ InterpolationFactor”,125,。。。'MasterClockRate',56E6);tx.enableburstmode = true;tx.numframeinburst = 20;

使用DPSK调制器作为数据源创建comm.dpskmodulator系统对象。

调制器= comm.dpskmodulator(“位点”,true); data = randi([0 1],37500,1); modSignal = modulator(data);

Inside aforloop, transmit the data using thetx系统对象。

numframes = 100;forframe = 1:numFrames underrun = tx(modSignal);end
没有TX ACK
释放(TX)

在SDRU块中启用突发模式

TheSDRu TransmitterSDRu Receiverblocks have anEnable burst modeparameter. When you select this parameter, the block produces a set of contiguous frames without underruns or overruns. Enable burst mode to simulate models that cannot run in real time. Specify the amount of contiguous data by using the突发中的帧数parameter. The default number of frames in a burst is100

相关的例子

More About