Application for using the 2 RX channels simultaneously

So, powers-that-be, any plans to merge the PhaseAlignment updates into master?

@IgnasJ, do we know when this will be merged?

There is no planned date for merging PhaseAlignment into master.
However, master has been merged to PhaseAlignment recently, so it is basically master+phase alignment updates,

Does this in turn mean that we do not have a date for binary builds with PhaseAlignment fixes?

So, I would argue, correctly I think, that you cannot claim that your platform does MIMO unless you have phase coherence. I’ve ONLY been able to achieve that with the PhaseAlignment branch, so the code in this branch is NOT a “trivial obscure customer-special requirement.”

  1. As far as I see PhaseAlignment branch has already been merged into master almost month ago.
  2. I don’t agree, if you are able to simultaneously transmit (with 2 TX antennas) and receive (with 2 RX antennas), then the device is obviously MIMO-capable. Phase coherence is totally different subject and you cannot say that sdr is not MIMO-capable anymore only because channels are not aligned in terms of phase difference.

Can you briefly describe the alignment process? What needs to be done in order to align channels? It might be useful for custom firmware applications. Is the alignment process made in fpga/fx3cpu/limemcu? Is there need to access IQ samples to make the alignment?

I apologize. I knew that PhaseAlignment had pulled in Master a while ago, but I didn’t realize that it had subsequently been merged.

Without the PhaseAlignment code, I observed that there was an absence of ongoing phase-coherence, that is, there existed high-level mutual phase-noise that would preclude even MIMO apps (which don’t required static alignment, but DO required quality ongoing phase-coherence) from working correctly.

With the PhaseAlignment code, I was able to see mutual coherence between the two RX channels with very low offset. The offset part isn’t particularly important to me, but the ongoing mutual coherence (or, put another way, lack of ongoing mutual phase-noise) is very important to my applications. This is for interferometry. Dealing with an initial phase offset is pretty normal, but there’s no way to algorithmically “factor out” high mutual phase-noise, unless it has an easily-modeled profile.

So, I’m happy that PhaseAlignment was merged into Master, and I apologize for “looking in the wrong place”. And I agree that for MIMO apps, initial phase-offset is not that important.

Hi, I think this might come as a bit off topic, if so, I will move this question to a new thread.

I am currently using the PhaseAlignment branch but I am observing that, if I continuosly use the StartStream and StopStream functions, the phase sometimes suffers a 180º jump. The thing is that our code needs to operate some electronics and should stop the stream so no invalid samples are read. Is it possible to clear the contents of the stream buffer without calling Stop/Start again? Or is this an issue that can be solved by some other means? (By removing the random ±180º jump when stopping and starting again).

Kind regards,

I have same question as @modimo. How can I get the phase aligned I/Q samples with SoapySDR or LMS API? Can I simply setup two RX streams and read buffers like @mleech’s, or do I need some extra initialization or calibration steps to activate this feature?

@IgnasJ, could we provide some example code for this? Would be good to add to:

You don’t need to do any additional steps. Alignment is run automatically on stream start when 2 Rx channels are used.


Ah, good to know!

Thank you for the confirmation.

Hi IgnasJ,

I’m using LimeSDR v1.4 to receive two channels coherently, using “phase alignment” branch.
I would like to ask if the automatic channel alignment is merged in Master, and if I Can use it without loosing coherence.


phase alignment is merged into master.

Thanks @IgnasJ.

One more question.
I keep experiencing the 180º phase jump (for example, in the 10% of the cases).

Is there a way to detect the phase jump at the StartStream, without using an external calibration signal?
It would solve a lot of problems for me.


To detect the 180º phase jump, you need to feed the same signal into both Rx channels but there is no way to do it using LimeSDR board only without external components (using leakage does not seem to be reliable). I think that to detect it reliably, you need to connect either external signal or signal from one of Tx outputs via splitter to both Rx channels and then check phase offset between channels.

Hi @IgnasJ , in order to use the phase alignment branch do I have to activate anything?
How can I know if this feature is active?

Thanks In advance

We are developing array processing algorithms and we would like to use LimeSDR-USB as a hardware platform.
I tried to check the time allignment and the phase coherence between Rx0 and Rx1.
For this purpose the following experiment was performed:
During one run a sequence of chirp waveforms [Fc-Fdev, Fc+Fdev] was sent from Tx0.
Then, based on the received signals from Rx0 and Rx1, the phase difference between channels for different frequencies was evaluated.
The experiment was performed several times (several runs) to collect statistics about the behaviour of evaluated parameters.
In the end, I have obtained the following results

This is collection of histograms of phase differences vs frequency. As I understand, the results shows the presence of the time offset between ADCs,

histogram of time offsets in terms of fraction numbers of the sampling interval,

histogram of drift of phase between channels with time for one run - no questions.

System configuration for the experiment:

  • T = 2s or 60s - Total time
  • Fc = 900MHz - Carrier frequency
  • Fs = 2MHz - Sampling rate
  • Fdev = 500kHz - Deviation frequency of the chirp
  • Nstat = 100 or 600 - Number of runs

I used Matlab to write the test program. You can find it by the link:
Library was compiled using source code from the LimeSuite master branch from 05.12.19.

I would like to ask, if there way to fix this time offset for Rx channels?
Thank you in advance for your help!

Best regards,