Wireless Testbench basebandTr​ansceiver/​capture Error:capture length depends on the device buffer size

In the Wireless Testbench capture function description, when the capture length is larger than the X310 device memory buffer size (2GB), the maximum data samples will be determined by the memory on the host computer. However, I found that this is only in line with the baseband receiver. When I set up a baseband transceiver with the same sample rate and capture length, and without enabling the transmitter, MATLAB 2024b returns an error and terminates the capture process:
savedRadioConfigurations = radioConfigurations;
savedRadioConfigurationNames = [string({savedRadioConfigurations.Name})];
radio = savedRadioConfigurationNames(1) ;
bbtrx = basebandTransceiver(radio);
% bbtrx = basebandReceiver(radio);
bbtrx.DroppedSamplesAction = 'none';
captureLength = 10*2^28;
sampleRates = 100e6;
retryUnsuccessfulCaptures = true;
bbtrx.SampleRate = sampleRates;
disp("Capturing at "+ bbtrx.SampleRate/1e6 + " MHz");
[data,timestamp,droppedSamples] = capture(bbtrx, captureLength);
The error message:
Error using wt.internal.AppBase/allocateHardwareMemory
The combined data capture length across the specified antennas is 2684354560 samples. Reduce to less than or equal to 268435456 samples, or, reduce the transmit waveform size of any ongoing continuous transmission.
Error in wt.internal.basebandTransceiver/capture
Error in basebandTransceiver/capture
Sincerely hope someone can help me to solve this issue.

 채택된 답변

Francisco Salomon
Francisco Salomon 2024년 10월 28일
편집: Francisco Salomon 2024년 10월 28일
Hello Qian,
Thanks for you interest in our product.
As stated in https://mathworks.com/help/wireless-testbench/ref/basebandtransceiver.html, the basebandTransceiver object does captures and transmissions only via the device's DDR.
Thanks,
Francisco

댓글 수: 1

Thanks a lot for your clear reply. You’re absolutely right. Hopefully the capture function of basebandTransceiver could be enhanced in future updates.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Hi @Qian,

The error message indicates that the combined data capture length across specified antennas exceeds the limit (2,684,354,560 samples). According to the documentation ( https://www.mathworks.com/help/wireless-testbench/ref/basebandreceiver.capture.html ) for USRP devices like the X310, if the capture length exceeds the onboard radio buffer size (1 GB), it may bypass buffering and rely on host memory. When using a baseband transceiver, both transmit and receive operations share this buffer space. Hence, if you have an ongoing transmission, it can affect your ability to capture data. To resolve this, adjust your captureLength to ensure it remains within the device limits or manageable by your host's memory:

     captureLength = 2^28; % Example reduction

You can also monitor available memory on your host before initiating a large capture to ensure sufficient space exists.

Given that you have set retryUnsuccessfulCaptures to true, ensure that the retry mechanism appropriately handles captures that fail due to memory issues. After making adjustments, run a test with smaller capture lengths incrementally until you find a stable configuration that works without errors.

If you continue to experience issues, consider checking the configuration of your baseband transceiver and the available memory on your host computer.

Hope this helps.

댓글 수: 4

Hi @Umar,
Thank you very much for your prompt reply, I tested the baseband transceiver with a capture length of 2^28 at a 100 MHz sample rate, and it worked smoothly without any dropped samples or memory errors. However, this approach restricts the capture length to the X310's memory capacity. I would like to capture approximately 5 seconds of data continuously at a 100 MHz sample rate with the transceiver. Is there any alternative method to achieve this?
The host memory information is shown below, indicating that sufficient space should be available:

Hi @Qian,

Glad to know that you made progress. After reviewing your comments, to capture approximately 5 seconds of continuous data at a sample rate of 100 MHz (which translates to 500 MB/s, you would need a total of around 2.5 GB of memory for the entire duration. Since the X310 has a limited onboard memory buffer of 1 GB, you cannot directly achieve this with a single capture command. The alternative method that I can suggest might work which will be utilizing background capture to segment your data into manageable chunks. You can repeatedly call the capture function in a loop, capturing smaller segments (e.g., 1 second each) and saving them incrementally to disk. For example:

     mkdir('basebandData');
     for i = 1:5 % For 5 seconds
         [dataPath,~] = capture(bbrx,seconds(1),SaveLocation=
         ['basebandData/capture' num2str(i) '.mat'],          Background=true);
         pause(1); % Pause to ensure capture completion
     end

Now, I know that some baseband transceivers support streaming modes where data is continuously streamed to host memory without waiting for full captures. Check if your setup allows this mode. You can configure your transceiver to stream data directly to your computer’s memory, handling it in real-time. If local memory is still a concern, consider using external storage solutions such as SSDs or network-attached storage (NAS). This allows you to bypass local RAM limitations by writing captured data directly to an external drive.

Also, if it is possible for you consider second alternative by upgrading your hardware configuration (e.g., using USRP devices with larger buffers like the USRP X410) that can handle larger data captures in one go.

If these alternatives worked out for you, make sure to check the droppedSamples output after each capture command to ensure that no samples are lost during segmentation or streaming. Once data is captured in segments, consider writing scripts for post-processing that can stitch these segments together if needed.

Hope this helps.

Please let me know if you have any further questions.

Hi @Umar,
I sincerely appreciate your patience in helping resolve my issue. The alternative method you suggested is a nice option, though it appears to be supported only for the baseband receiver (based on the background description of Capture). From @Francisco Salomon's response, I finally understand that the baseband transceiver does not currently support streaming mode (hopefully this will be upgraded in the future). Maybe I should use two synchronized X310 devices—one for transmitting and the other for continuous prolong receiving.
Hi @Qian,
Thank you for your thoughtful response and for sharing your insights regarding the alternative method I suggested. I appreciate your understanding of the limitations surrounding the baseband receiver, as highlighted in Francisco Salomon's communication. Your idea of utilizing two synchronized X310 devices—one for transmission and the other for continuous receiving—sounds like a practical solution given the current constraints. This approach may indeed provide a viable workaround until streaming mode support is potentially upgraded in future releases. Please feel free to reach out if you have any further questions or need additional assistance as you explore this option. Your patience and proactive engagement are greatly appreciated.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Communications Toolbox에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2024년 10월 27일

댓글:

2024년 10월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by