Communication Protocol between a Drone and USRP - labview

I am working on a project wherein a signal (preferably ISM) will be sent by a Hackrf one module mounted on a drone. The SNR of the transmitted signal will be calculated by a USRP 2900 placed on the ground. If the calculated SNR is below a certain percentage or a value, then the drone should lower its height; otherwise, it should hover at the same height.
I want to ask is how I can make a link between the USRP on the ground and the drone to achieve this? What are the hardware and software I will need for this?

Related

PSK Modulation in GNU Radio in USRP N310

Currently I am working with the Ettus Research's N310 on the implementation of different PSK modulation schemes. I am interested on measuring the Bit Error Rate -BER- for each scheme when I transmit data between two USRPs located one beside the other. Therefore, I am employing GNU Radio Companion for the SW development. In the case of the BPSK transceiver, I am using a standard configuration of a vector source and a constellation modulator to create the PSK symbols, which are transmitted at 2.45GHz using the VERT2450 antennas. These antennas work in the frequency range from 2.4 - 2.5 GHz and from 4.9 - 5.9 GHz. Since I have a desktop computer with only one ethernet port, I am using the NetGear GS108 switch, which has 16Gbps bandwidth and a forwarding rate of 10Mbps port. The current SW setup is shown in the following figure:
I am using as input a vector of only zeros since I am interested to probe that my transceiver detects correctly one constellation. However, I am having continious jumps between the constellation points as you can see from the picture in the left side. I have several questions about my setup:
What is the correct baud rate for each modulation scheme? It means how many symbols per second should I use for BPSK, QPSK, 8PSK and 16 QAM.
Since the USRP N310 has a default sample rate of 125MSamples/second, and my desktop machine can only deal with 5MSamples/second, then I have a decimation rate of 25(sample_rate_usrp/sample_rate_desktop). What is the value for the sps -samples per symbol- parameter that I should assign in each block of the transceiver?
When is the CMA equalizer necessary? Since the USRPs have a static position, then there is no frequency changes due to the Doppler effect. Consequently, an equalizer should not be necessary. Why is this reasoning not correct? I suppressed the equalizer and the constellation diagram is presented as a circle.
Does the Polyphase Clock Synchonization really synchronize the received signal with the transmitted signal or can I supprime it and replace it with an equalizer?
I would really appreciate if someone could help me to bring some light to all of this questions.
Thanks in advance
See my response at https://lists.gnu.org/archive/html/discuss-gnuradio/2020-08/msg00172.html
The 'correct' baud rate is anything you want to use.
You need to check the minimum sample rate for the N310.
The CMA Equalizer is optional under your conditions. I left it out of the BPSK to simplify the flowgraph.
The Polyphase Clock Sync Block recovers the timing of the received signal. The equalization is for fading and is a separate function.
It looks like you're modulating with 8 SPS but then demodulating 16 SPS -- 8:1 on the PCSync and 2:1 on the CMA eq.

No RTC pin signals with SparkFun nRF52832 Breakout

I'm using the SparkFun nRF52832 Breakout to use the RTC signal for a sensor pressure clock line.
Unfortunately, on the two RTC pins, there are no signals. To verify this point, I used an oscilloscope to read pins 0 and 1.
Besides, I also created a sketch on another pin to generate my own square signal close to 33.333kHz, and I saw it on the oscilloscope.
I understand according to this tutorial that I do not need to modify the hardware.
RTC-EN - Connect/Disconnect the 32.768kHz Crystal
The nRF52832 Breakout equips the chip with a 32.768kHz crystal – connected to GPIO pins 0 and 1. Unfortunately, those pins make up a quarter > of the available ADC inputs. So, if your application doesn’t require an RTC – and you need those pins to for another purpose – grab a hobby knife and cut the two traces between their pads to disconnect the crystal.
Maybe I need to init the RTC pin with a dedicated method, but which one?
Could you provide me a link to any tutorial?
Any ideas what I'm missing here? What is my misunderstanding?

Frequency components less than centre frequency of USRP

I have two USRP N210s connected together as a receiver and transmitter and I'm trying to send multi tone signals across the channel. However, I am finding extra frequency spikes mirrored about the centre frequency for when I send a signal with more than 2 tones.
I am using a low pass filter at the output with a cutoff frequency of 200kHz and the signal I am sending is constrained to 0-200kHz. I have an out of tree module that creates the multi tone signals that are evenly distributed within this bandwidth.
As I increase the number of tones the reflected frequency components become more and more prominent to the point at which I can barely correlate the input and output signals.
This is what the transmitted multi tone signals looks like
And here is the flowchart at the receiver end
The center frequency of the USRP source (receiver) is given by
uhd.tune_request(center_freq, rf_freq=(center_freq + lo_offset),rf_freq_policy=uhd.tune_request.POLICY_MANUAL)
which evaluates to 2.48GHz for which is the baseband frequency for the transmitting USRP
It may be something to do with the down conversion in the USRP or when GNURadio is actually sampling from the receiver with respect to this process.
Removing the LPF and connecting the FFT sink to the USRP source doesn't fix anything. The extra frequency spikes are still there (assuming the number of tones > 2)
You're not specifying how you transmit your tones into the RX port of your USRP, but the most likely thing to have happened here is that you didn't use sufficient attenuation between TX and RX – and you're saturating the RX amplifier chain (hopefully not damaging it).
By saturating, you drive them into nonlinear operation, which would lead to a broadband intermodulation.

GFSK modulation/demodulation with GNU Radio and USRP

Im currently creating a satellite ground station which will be used to control our cubesat in coming months. The modulation scheme used is GFSK and the baud rate is 9600. I have tried to run some tests by using a USRP board before I could try to communicate with the satellite by directly connecting the tx and rx blocks in the flowgraph.I was able to send and receive a png file using this flowgraph.
However, when I connect the tx and rx output to my USRP B210 TX/RX(transmission sink) and RX2(reception source) as shown below, I receive no data even though the two the source and sinks have been connected to each other carefully by RF cables with attenuators.
Below are the assumptions I took into account when I was making the second flowgraph. Please tell me if im on the right path.
Transmitter side : The packet decoder and GFSK mod blocks use 20 samples per symbol. Baud rate is 9600 and sample rate is 20*baud rate = 192K. Since the expected symbol rate by the satellite is baud_rate = 9600, I included a rational resampler and set UHD symbol rate to baud_rate. Is my logic correct?
GFSK mod and demod : For both of these blocks, I calculated sensitivity as S = Pi * Modulation_index/Samples_Per_Symbol. The default BT value of 0.5 is used. Are my calculations sound? Is there a link for to find documentation for GFSK blocks? My derivations are based on the GFSK python source code which is a poor substitute for documentation.
Packet Encoder/Decoder : The output of packet decoder is null even though the GFSK demod block give some kind of output which is rather meaningless. Is this normal? What is the meaning of the threshold variable and why its value is -1?
I'm a newbie in GNU Radio as well as GFSK in general. So please drop me any further references.
Thanks in advance.
Moses.
I was finally able to solve the problem. All I did was re-implementing the GFSK demod in GRC. If you go into source of gfsk.py, you will find out that the blocks used are Quadrature Demod --> M&M Clock recovery --> Binary slicer which can easily be connected in GRC directly. As Marcus suggested in my other thread, GFSK demodulation with Xlating filter in GNU Radio , I replaced the M&M Clock recovery block with PFB block. My flowgraph is shown below.
Even if I can not answer all of your questions, I provide below some thoughts:
When using hardware devices the Throttle MUST be removed from the flow-graph. The hardware device is now responsible for the rate limiting. Mixing hardware device and the Throttle block may break the real-time boundary of your flow-graph required by the device. Underflows or Overflows messages should be produced by the UHD driver in such a case.
Are you sure that the USRP can support the requested sampling rate? You may need also to change the master_clock_rate of the device, if the requested sampling rate is not an integer decimation of the clock. If this is not possible consider some kind of re-sampling.
EDIT: The B200 can not provide 192e3 sampling rate with the default clock. You can set the master_clock_rate at 19.2e6. The hardware will apply then the proper decimation. The master_clock_rate can be changed either by the device specific arguments or the Clock Rate field of the UHD Sink/Source blocks that presents in the latests GNU Radio versions.

Labview: I can't read the voltage from more than one channel (DAQmx read)

I have a SCB 68A connector from National Instruments and I want to read out the open voltage from it. So I used the example code provided by National Instruments (https://decibel.ni.com/content/docs/DOC-28502):
I got 5 mV which is a reasonable value (I measured the noise signal with an oscilloscope). Now I want to read out the noise signal from few channels. So I sightly changed the VI (according to the documentation I need to create an array of channels and flatten them):
But now I read out approximately 200 mV on both channels (and one of them is the same as in the first VI). It doesn't make any sense.
What am I doing wrong?
I want the user to be able to choose the channels, so I can't just write "Dev1/ai0:4".
Edit: I'm using the DAQ 14.0.0.
Edit 2: 1) There is nothing connected to the deivce - I just want to read out the noise signal.
2) I'm using the connector in the MIO with the disabled temperature sensor mode (the default configuration).
You are observing charge injection from the DAQ device's multiplexer. Connect each aiN terminal to aignd and you will be able to measure the noise of the DAQ device.
Charge Injection
Most NI DAQ boards have a single analog to digital converter (ADC) and provide multiple input channels by using a multiplexer (MUX) to switch the input of the ADC to the different analog input terminals ai0, ai1, etc:
As NI explains, when the DAQ device's multiplexer moves from one channel to the next, it can introduce a small charge on each channel. Since the open channel does not have a path for this charge to dissipate, the voltage of the channel will increase. This can also cause the channel to rail, slowly floating up to the maximum input voltage (usually 10 V).
Characterizing Noise
You can determine the noise of each component in your system by:
Measuring the noise of the DAQ device
Measuring the noise of the DAQ device and terminal block
Subtracting the DAQ device noise (step 1) from the system noise (step 2)
When you're finished, the value from step 1 is the noise of the DAQ device, and the value from step 3 is the noise of the SCB-68.
To measure the noise of an electric path, there must be a complete circuit for the ADC to sample. For step 1, connect each aiN terminal to aignd and run your VI. For step 2, connect the terminal block to the DAQ device, disconnect the sensor, and connect the terminal block's channel terminals to its ground terminal and run your VI.
Minimizing Noise
In addition to charge injection, noise can be introduced to a DAQ system from several sources, including the environment. Open terminals act like small antennas and receive radiated energy from other electronics, lights, and the AC mains.
The link also outlines how to find and minimize noise, but the gist is:
Systematically identify the sources of the noise.
Remove sources of noise that aren't necessary for your measurements.
Depending on the nature and source of the remaining noise, use appropriate shielding, cabling, and terminal configuration.
Over-sample and average the signal.
Please have a look on the links below:
http://forums.ni.com/t5/Multifunction-DAQ/How-to-use-DAQmx-Read-to-measure-multiple-analog-channels/td-p/2620949
http://digital.ni.com/public.nsf/allkb/A3A05920BF915F1486256D210069BE49
There is the complete solution to your question.