Pulsed Radar Issue

Off topic threads and discussions

Moderator: robert.ghilduta

Post Reply
bwick
Posts: 2
Joined: Wed Jan 31, 2018 12:51 pm

Pulsed Radar Issue

Post by bwick » Fri Feb 23, 2018 2:46 pm

Hello,

My team and I are working on a pulse-doppler application of the bladeRF x115 and are having some issues. We are developing in matlab 2016a with the following code:

dev.tx.start();
dev.rx.start();

tic
while (toc <= runTime)

for i = 1:x
% transmit a pulse
dev.transmit(pulsedwaveform, 0, 0, true, true);

% recieve a column of data into the slowtime matrix
data(:, i) = dev.receive(y);
end

% process
[target, doppler] = process(data);

imagesc(app.doppler);

end

dev.rx.stop();
dev.tx.stop();

There is more code involved in the process above that is not shown but this is where the issue occurs.

The Issue:
When runTime is low enough, it runs fine for the first couple of times then stops working after that. If runTime is more than about a second, then it breaks on use. What I mean by break is that it gets stuck trying to run tx.stop(). I think it also has some trouble with transmit after a while but I haven't been able to fully diagnose that issue. The end result is that we tend to lose access to the bladeRF, it runs really slow when we do have access, and tx never turns off.

I've been trying to figure out what the issue is but without avail. Any suggestions?

bglod
Posts: 163
Joined: Thu Jun 18, 2015 6:10 pm

Re: Pulsed Radar Issue

Post by bglod » Thu Mar 01, 2018 11:03 am

I'm not sure if it's related to your problem, but MATLAB is single-threaded, so the function calls are blocking. What are your settings for the number and size of the buffers being used, as well as the number of simultaneous transfers? How much data are you trying to push through? If you're not sending/receiving enough data for each burst, it could be that libbladeRF is waiting until the buffer fills to a certain point before pushing the data out, or pulling the data in. If you don't have enough data to fill up your buffer, you can pad with zeroes and increase the number of samples accordingly.

It may help to bump up your log level to either 'debug' or 'verbose' so you can get more information about where it may be getting caught up. I recommend starting with 'debug'. If that's not enough, bump it up to 'verbose' -- this will give you every register read/write that occurs; depending on the scope of the problem, this may be way too much information.

Code: Select all

dev.log_level('debug')
-- or --
dev.log_level('verbose')
The debug output will show up on stderr. If you start matlab from a console, you can redirect stderr to a file for easier viewing later or just let it print to the screen, for example:

Code: Select all

matlab 2> stderr.log &
tail -f stderr.log
Electrical Engineer
Nuand, LLC.

Post Reply