f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.94k stars 447 forks source link

Support antenna diversity #2098

Open ThermoNuclear65 opened 6 months ago

ThermoNuclear65 commented 6 months ago

Hi ,

is it at all possible the create a plug-in for the RSP-Duo where someone can de-phase the 2 antenna signals to get rid of the noise in software.

SDR Uno makes a good job out off it , but i just love using SDRAngel.

If not or to big workload I'll understand , but let me know please.

Kind regards , 73,

Patrick

srcejon commented 6 months ago

Good idea, but let me expand the scope to supporting antenna diversity in general, so not just for noise cancellation, but also other forms such as selecting strongest signal / combining signals etc.

Rather than just working with MI devices like the Duo, would be interesting to also be able to use completely different receivers, although phase alignment might be tricky.

ThermoNuclear65 commented 6 months ago

Hi ,

With 2 separate receivers is even a better idea.Please give it a go at your convenience . I live in an urban area polluted with solar panels and cheap inverters.

Daytime is a disaster for noise suppression with just 1 antenna.

Thanks for the quick and honest response.

Kind Regards, 73

Patrick

Op 1 mei 2024, om 19:02 heeft srcejon @.***> het volgende geschreven:

Good idea, but let me expand the scope to supporting antenna diversity in general, so not just for noise cancellation, but also other forms such as selecting strongest signal / combining signals etc.

Rather than just working with MI devices like the Duo, would be interesting to also be able to use completely different receivers, although phase alignment might be tricky.

— Reply to this email directly, view it on GitHub https://github.com/f4exb/sdrangel/issues/2098#issuecomment-2088771883, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWLOWNIN5WGPHYP3ESBJ5DZAEN4BAVCNFSM6AAAAABHCG7UKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYG43TCOBYGM. You are receiving this because you authored the thread.

f4exb commented 6 months ago

For a diversity setup to work correctly you need to have the receivers LOs and DACs synchronized to the same clock which concretely happens only on a few devices that are supported via the MIMO device plugins: BladeRF2, LimeSDR, Pluto+, XTRX. If the RSP duo is able to present a synchronized interleaved stream then it should be possible to support it this way.

would be interesting to also be able to use completely different receivers, although phase alignment might be tricky.

Yes tricky indeed, The most difficult part if even possible at all is to synchronize the USB streams. Therefore the above mentioned devices present the flow of samples by interleaving the samples of both receivers in the same data flow on the USB (or network). The Kraken SDR synchronizes multiple USB streams from several RTL-SDR devices using a common injected signal for synchronization. In addition to the hardware setup there is a fair amount of work to effectively synchronize the streams I haven't looked into this into detail.

For what exists now as MIMO channels the choice is fairly limited to basic interferometry and DOA but could be augmented with signal combination which output could be poured into a "normal" Rx channel using the local input for example.

srcejon commented 6 months ago

Yes tricky indeed, The most difficult part if even possible at all is to synchronize the USB streams.

Yeah, there's two problems: the differing latency from each device and clock drift. While there will be some algorithms that require perfect phase sync to work and need a proper MIMO device, are there some simpler ones that don't? E.g. if we just want to continually select the strongest SSB voice signal from two different devices? Calculating the difference in latency should be fairly straightforward with cross-correlation, and as it's low quality voice, I'd guess that a little bit of phase difference when switching between the two isn't that important.

ThermoNuclear65 commented 6 months ago

Hi All ,

The RSP Duo seems to be able to do this , they have diversity control. Maybe its worth looking at this one .

Kind Regards , 73

Patrick

f4exb commented 6 months ago

You have a demo of the RSP Duo witn SDR uno here: https://youtu.be/omykm0Q_7hQ It looks like the mixing of signals is done in software so I suppose that when the RSP Duo is set in diversity mode it combines the samples of both receivers in an interleaved flow (or maybe it always does that). Of course I suppose there is not too much details on this because they want to keep their software algorithms proprietary. So one would have to peek into the USB flow with distinctive signal sources to get an idea on how the packets are arranged,

E.g. if we just want to continually select the strongest SSB voice signal from two different devices?

Yes some kind of simple algorithm could work with non coherent sources. However as stated above this does not seem to be how the RSP Duo works but if you are not looking at unwanted signals cancellation this could still be interesting.

Note that one may experiment with the already supported MIMO devices (Pluto+ and the like...) to create a signal cancellation MIMO channel plugin working like SDR Uno in diversity mode. Or more generally a complex coherent mixing channel. Once you get both synchronized I/Q flows it is just a matter of mixing signals with controls on the amplitude and phase differences. The interferometer plugin has a A+B channels correlation function so one may already get an idea of how this could look like: https://github.com/f4exb/sdrangel/tree/master/plugins/channelmimo/interferometer#a4-correlation-function There is no amplitude difference control however but that wouldn´t be difficult to add.

Note 2: if you want to play in the HF spectrum I think the Red Pitaya and clones flashed with Pavel Demin's firmware have a coherent dual Rx mode ("SDR transceiver compatible with HPSDR"). This is supported in SDRangel via the Metis MISO plugin.

f4exb commented 6 months ago

Soon to be released. It works! image

image I wish Yaesu or Icom would make it available on their transceivers :wink:

ThermoNuclear65 commented 6 months ago

Perfect , the best at work . Continua Please.

f4exb commented 6 months ago

This is an example setup ... image

It is using a Red Pitaya in "SDR transceiver compatible with HPSDR" mode that has its IN1 and IN2 inputs connected to Rx0 and Rx1 in the Metis MISO plugin (M:0). The M:0 spectrum on the top right shows the spectrum from the main antenna (dipole) connected to the IN2/Rx1 input which signal is affected by noise with peaks every 8 kHz.

The IN1/Rx0 input is connected to an auxiliary wide loop antenna that picks up more of the noise. The Interferometer MIMO channel plugin (M0:0) is taking the Rx0 on channel A and Rx1 on channel B and phase shilft and gain is applied to B in order to eliminate the common noise input to A and B (phase difference of 6 degrees and gain of 1 dB). As you can see the noise has disappeared in the spectrum shown on the Interferometer A+B output. Here we also decimate by two to concentrate on the FT8 range.

The A+B output is sent to a Local Input device (R:1) which spectrum is shown on the bottom left and is identical to the one shown in the Interferometer window. Then we add a FT8 demodulator to the R:1 Rx chain (R1:0) to effectively decode the FT8 messages at 14.074 MHz which is the final result we want to obtain.

f4exb commented 6 months ago

For RSP duo synchronous dual tuner mode support there is an interesting post here: https://sdrplayusers.net/forums/topic/rspduo-using-dual-tuners-with-api-3-06-in-c/

ThermoNuclear65 commented 5 months ago

Hi , I've tested the interferometer with the Red Pitaya 122-16 bit Metis protocol and with the Pavel software running on the Red Pitaya, works perfect on the Mac M1 , but on WIN 11 ,when I want to "Insert" the Interferometer , SDRangel become unresponsive and crashes after 20 seconds. Any Hints or Tips.

Kind Regards. 73

Patrick