I/Q Data Question
Posted: Mon Jul 21, 2014 8:08 pm
Is the data showing changes in magnitude (or amplitude) and phase of received signals available using a bladeRF? If so, what is the best way to access it?
Thanks,
Brian
Thanks,
Brian
Code: Select all
/**
* Signed, Complex 16-bit Q11. This is the native format of the DAC data.
*
* Values in the range [-2048, 2048) are used to represent [-1.0, 1.0).
* Note that the lower bound here is inclusive, and the upper bound is
* exclusive. Ensure that provided samples stay within [-2048, 2047].
*
* Samples consist of interleaved IQ value pairs, with I being the first
* value in the pair. Each value in the pair is a right-aligned,
* little-endian int16_t. The FPGA ensures that these values are
* sign-extended.
*
* When using this format the minimum required buffer size, in bytes, is:
* <pre>
* buffer_size_min = [ 2 * num_samples * sizeof(int16_t) ]
* </pre>
*
* For example, to hold 2048 samples, a buffer must be at least 8192 bytes
* large.
*/
Code: Select all
$ bladeRF-cli -i
bladeRF> set samplerate rx 1M
Setting RX sample rate - req: 1000000 0/1Hz, actual: 1000000 0/1Hz
bladeRF> rx config file=~/Desktop/samples.csv format=csv n=2M
bladeRF> rx start
bladeRF> rx wait
bladeRF> quit
Code: Select all
octave> samples = load('/home/jon/Desktop/samples.csv');
octave> signal = (samples(:,1) + i * samples(:,2)) ./ 2048.0;
octave> magnitude_db = 20 * log10(abs(signal));
octave> num_points = size(magnitude_db)(1);
octave> samplerate = 1e6;
octave> time = linspace(0, num_points - 1, num_points) ./ samplerate;
octave> plot(time, magnitude_db);
octave> xlabel('Time (s)')
octave> ylabel('dB')
octave> title('OOK signal from a 433MHz temperature sensor')
octave> axis([0 1.25 -30 0])
I looked at the schematic for the BladeRF and it looks like they're running it at 3.3 V for the receiver size. So it looks like 0.8 mV per bit.sophiekovalevsky wrote: ↑Fri Aug 04, 2017 9:23 am Hello everyone!
There is something that I do not still understand about the IQ samples coming off from the bladeRF. I am taking measurements with the device but I have seen in this thread and in other sources that, most of the time, what you get are normalized samples. However, this measurements are not telling you how much power you are getting, this is why:
If we have the ADC with a 12 bit resolution. We will obtain values between [-2048, 2047] this is okey. But, what is the equivalent in terms of voltage of these values? What I mean by that is that I need to have what are the voltage values that the bladeRF is receiving. This can be done if I know what is the reference voltage that the ADC is using to create the steps. I took a time to analyze the datasheet of the LMS but I am not able to find out what reference votlage they are using.
How this can be approached?