Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support antenna diversity #2098

Open
ThermoNuclear65 opened this issue May 1, 2024 · 11 comments
Open

Support antenna diversity #2098

ThermoNuclear65 opened this issue May 1, 2024 · 11 comments
Labels

Comments

@ThermoNuclear65
Copy link

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 srcejon changed the title De-phasing with 2 antenna's Support antenna diversity May 1, 2024
@srcejon
Copy link
Collaborator

srcejon commented May 1, 2024

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.

@srcejon srcejon added the feature label May 1, 2024
@ThermoNuclear65
Copy link
Author

ThermoNuclear65 commented May 1, 2024 via email

@f4exb
Copy link
Owner

f4exb commented May 1, 2024

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
Copy link
Collaborator

srcejon commented May 2, 2024

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
Copy link
Author

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
Copy link
Owner

f4exb commented May 2, 2024

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
Copy link
Owner

f4exb commented May 11, 2024

Soon to be released. It works!
image

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

@ThermoNuclear65
Copy link
Author

Perfect , the best at work . Continua Please.

@f4exb
Copy link
Owner

f4exb commented May 13, 2024

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
Copy link
Owner

f4exb commented May 13, 2024

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/

dforsi pushed a commit to dforsi/sdrangel that referenced this issue May 19, 2024
@ThermoNuclear65
Copy link
Author

ThermoNuclear65 commented Jun 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants