# Phase Measurements with LimeSDR

Hi everyone, how are you? Hope you’re doing fine. I’m working to use the LimeSDR to perform (time varying) phase measurements. I would like to ask the community and also the LimeSDR team (@andrewback, @Zack, @joshblum, etc.) what are the considerations that I have to take into account about the LimeSDR configuration to do such a task.
Let’s suppose the concept shown in this figure:

Ideally, In the Tx side, the lime transmits (for example) a pure sinusoid with a frequency $\omega_0$, so the signal that enters in the Rx side will be:

The first thing I tried to do is to transmit the sinusoid with the test signal (DC Source in TxTSP) in TDD Mode. Here (if i’m not mistaken), the PLL that synthetize the Tx Signal is the same at the Rx side, trying to make coherent detection. In this case, the samples retrieved by the lime will be, Q(t)+j I(t). I can obtain the phase doing atan[I(t)/Q(t)] or another DSP. This is not working and I don’t know what i’m missing. I’m only obtaining noise.

Lucas.

I think you may want to give us little more details:

1. You did not write what kind of software you are using to control the LimeSDR board: LimeSuite, custom SoapySDR-based app, or maybe something different, like UHD-based app or some framework like GNURadio?
2. Also, did you try to force TDD mode manually or just set the same TX and RX center frequency, hoping that the driver will enable TDD automatically?

As for the latter, I believe at the moment it has to be set manually, and some tips how to do that were given in this topic. That being said, I tried to force using the same PLL to drive both mixers via SoapySDR API in the way which is described there, but with no luck so far. Unfortunately, at the moment I got no time for further investigation, but got it on my TODO list.

Yes, I force manually TDD mode with the guide provided by @Zack.

Before writing a specific software, I tried these “easiest” ways to accomplish that:
a) With LimeSuiteGUI: Setting the DC Source Test Signal in TxTSP and then acquiring the samples directly from the FFT viewer & processing the samples with Matlab/Python/Octave etc. (without luck).
b) Controlling the LimeSDR with Octave: pre-configuring the LimeSDR with LimeSuiteGUI (Gain, TDD Mode, Calibration, etc) and saving the settings in a .ini file. Then, I load that file in Octave and send,receive & process the samples. (without luck).

Hi @Lucas,

Let us do it step by step. Ir I understand correctly, you need only CW of some frequency from Tx part (no modulation, etc), correct? If yes, then I suggest:

1. Configure TDD mode;
2. Set SXT to the desired frequency;
3. Pypass all the modules in TxTSP tab, Bypass group in LimeSuiteGUI;
4. Set TSGMODE to DC source in TxTSP tab;
5. Set Input source to Test signal in TxTSP tab;
6. Type 7FFF to DC_REG field and press Load to DC I and Load to DC Q buttons in TxTSP tab.

Now check Tx RF output using a spectrum analyzer. You should see tone at your desired frequency. The idea of this is to generate the frequency using SXT instead of TSG.

Hello @Zack. Yes, I tried that too and it with no luck.
If I try to make zero-IF conversion phase measurements, I only obtain noise. If I made IF conversion, it works very well.
I don’t know if its a problem with phase noise (made by Tx side, Rx side or both) or with 1/f noise, or If i’m doing something wrong with the LimeSDR configuration.

Hi @Lucas,

Do you mean you see nothing coming from TxRF on spectrum analyzer? If this is true, then there is no point to go further. You have to resolve this first.

Sorry, I mean that I cannot measure the phase as I described in the first post. I can see the Tx signal well in an Oscilloscope.

Hello,
make sure that DC correctors in both TXTSP and RXTSP are disabled because you are sending constant IQ values.

I tried to configure LimeSDR using LimeSuite and I see single point in constellation when running FFTviewer not noise.
Here is my configuration saved to INI file. Ports are set to RX1_H and TX1_1 in INI file.

Apologies for my delay in responding in this thread.
From the start, using TDD mode, the LimeSDR was always working fine to measure phase. I’d just forgotted completely the series capacitors at the output of the mixers of the receivers and at the input of the ADCs, so, as a direct conversion phase demodulator the change in the phase (in time) must be faster than the RCs time constants of those filters.