USRP B210 for real-time sensing application
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am working with a USRP B210 for real-time sensing application.
I have built the sensor and connected it to the USRP.
I want to 1) sweep the frequency from 5 to 6 GHz and 2) detect where the least reflection is.
I am stuck at the first part. I tried it by producing a chirp signal of 5-6 GHz and sending it through the Transmitter.
I want to continuously sweep from 5-6 GHz and gather the data at Rx and save it in a file.
So, both the lights should remain 'ON' all the time.
While the RX remains 'ON' all the time, the problem is that chirp signal at the TX takes some time to produce and only blinks once in approx. 30 secs.
Here is the code:
connectedRadios = findsdru;
addressRX = '30AC288';
platformRX = 'B210';
addressTX = '30AC288';
platformTX = 'B210';
tx = comm.SDRuTransmitter(...
'Platform','B210', ...
'SerialNum','30AC288', ...
'CenterFrequency',5.7537e9, ...
'Gain',55, ...
'MasterClockRate', 1e7, ...
'InterpolationFactor',512);
chirp = dsp.Chirp(...
'SweepDirection', 'Unidirectional', ...
'TargetFrequency', 6e9, ...
'InitialFrequency', 5e9, ...
'TargetTime', 1, ...
'SweepTime', 1, ...
'SamplesPerFrame', 256, ...
'SampleRate', 1/8000);
rx = comm.SDRuReceiver(...
'Platform','B210', ...
'SerialNum','30AC288', ...
'ChannelMapping',2, ...
'CenterFrequency',5.7537e9, ...
'DecimationFactor',100, ...
'Gain',55, ...
'SamplesPerFrame',256, ...
'MasterClockRate', 1e7);
sampleRate = rx.MasterClockRate/rx.DecimationFactor; % Calculate baseband sample rate
rxWriter = comm.BasebandFileWriter('b210_capture.bb', ...
sampleRate, rx.CenterFrequency);
for counter = 1:20000
chirp = dsp.Chirp();
tx(chirp());
[data, len] = rx();
if len>0
rxWriter(data);
end
end
0 Kommentare
Antworten (1)
Sai Sri Pathuri
am 8 Mai 2020
Since you are using a single USRP, you transmit and receive in the same loop. Receiving the signal and writing it to the file might be consuming some time and hence, Tx might be taking time between transmissions. If you think it is because of generation of chirp signal, you may generate chirp signal outside the loop and use those values
chirpSignal = chirp();
for counter = 1:20000
tx(chirpSignal);
[data, len] = rx();
if len>0
rxWriter(data);
end
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Communications Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!