Discussion and technical support related to USRP, UHD, RFNoC
View all threadsHi all,
I'm working on a direction finding project and I'm asking for help on the
phase alignment step.
My configurations are:
4 * N200+XCVR2450 as the receiver array
1 * N200 + SBX as the reference TX
1 * N200 + SBX as the target transmiter
GnuRadio and Matlab code of MUSIC algorithm
The reference TX are connect to receivers' RF2 using SMA splitter
4 receivers have been time and frequency synchronized.
I'm not familiar with signal processing. I've read a lot of posts in the
mailing list and really didn't get how to do phase alignment.
Can anybody give me a hint on how to set the reference TX parameters and
how to do "post-processing phase alignment based on the offsets and gains
observed from the known reference signal"?
Thank you!
--
Best regards!
Charlie
Hi Charlie,
I know I've already answered you in private, but it seemed better to
share this answer:
this really sounds like an interesting project!
I'm not familiar with signal processing.
The GNU Radio project has a list of literature it recommends, [1]. I'd
especially like to point you at Lapidoth's book, which is available for
free [2], if you don't have access to e.g. a university library of
signal processing/signal theory books.
MIT actually has an online course in digital signal processing [3],
which I find quite nice, if a bit short on a few details, but that's
just my personal preferences.
post-processing phase alignment based on the offsets and gains observed from the known reference signal
So, ok, there's multiple aspects to these instructions:
So, first of all, we'll have to define /phase/. It's a property of a
periodic process, in this case the oscillator that is used to mix down
the radio frequency signal to complex baseband. (You really need to
understand complex baseband; if you don't understand it yet, [4] might
be a good and easy start). We can define the periodic process to be
represented by a complex sinusoid, ie.:
$s(t) = A e^{j2\pi f_\text{LO}t + \phi}$,
we say: The signal $s$ at time $t$ has the amplitude $A$, oscillates
with the frequency $f_\text{LO}$ and has the phase $\phi$.
Now, from /observing /the four different RX signals from your
XCVR2450s, you will need to determine the individual $A_1, A_2, A_3,
A_4$, $f_{\text{LO}1}, f_{\text{LO}2}, f_{\text{LO}3}, f_{\text{LO}4}$
and $\phi_1, \phi_2, \phi_3, \phi_4$.
That problem is typically not trivial, because by short-term
observation, you typically can't tell the difference of an effect of
$f_\text{LO}$ and $\phi$. Hence, it's really useful if
$f_{\text{LO}1}\equiv f_{\text{LO}2}\equiv f_{\text{LO}3}\equiv
f_{\text{LO}4}$. The USRPs help with that by offering an external 10MHz
reference input. You will need to use an externel 10MHz clock source and
clock distributor, to feed all four RX USRPs the same clock. Otherwise,
your phase calibration will need to first consist of frequency
estimation, and then of a phase offset calibration. It's definitively
not impossible to do that, but it's both more complicated, and also
requires that you calibrate regularly.
Observing $A$ is relatively simple; you could just compare the digital
power (ie. energy $|s[n]|$ per sample) to that of a sinusoid with $A=1$,
or (see below), by measuring the maximum of the autocorrelation or
cross-correlation with the known TX signal.
The thing you want to observe and later correct are $\phi_1, \phi_2,
\phi_3, \phi_4$. There's a lot of ways to do that. You can, for
example, take $N$ samples from each of the four USRPs, do four N-point
/Discrete Fourier Transforms/, and evaluate and compare the arguments of
the complex numbers representing the frequency DFT bin where you expect
a reference TX sinusoid in. That has a few downsides, so the typical
approach here is to use /correlation/ with a known /*reference
*signal./ I hence strongly recommend understanding correlation, too.
It's very important for the signal model that's behind MUSIC, too, so if
you need to present what MUSIC does, correlation is the analytic tool
behind it. The rest is "just" some estimation theory and linear algebra.
So you'd profit twice from understanding it.
After you obtained $\phi_1, \phi_2, \phi_3, \phi_4$, you will want to
use these to bring all your receive signals to the same phase; luckily,
exponential math allows us to just correct by multiplying with
$e^{-\phi}$, so that the corrected signals look like, including an
amplitude correction term (I use the tilde to identify things that are
based on an estimation based on observation)
\documentclass{article} \usepackage[utf8x]{inputenc}
\usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}
\usepackage{trfsigns} \DeclareMathOperator*{\argmin}{arg,min}
\usepackage{tikz} \usepackage{circuitikz}
\usepackage[binary-units=true]{siunitx} \sisetup{exponent-product =
\cdot} \DeclareSIUnit{\dBm}{dBm} \newcommand{\imp}{\SI{50}{\ohm}}
\newcommand{\wrongimp}{\SI{75}{\ohm}} \pagestyle{empty} \begin{document}
\begin{align*} \tilde s_n(t) &= A_n e^{j2\pi f_\text{LO}t + \phi_n}
\cdot \left(\frac{1}{\tilde A_n} e^{-\phi}\right),\quad n=1,2,3,4\ &=
A_n \frac{1}{\tilde A_n} e^{j2\pi f_\text{LO}t + \phi_n - \tilde \phi_n}
\intertext{assuming $\tilde A_n = A_n$ and $\tilde \phi_n = \phi_n$} &=
e^{j2\pi f_\text{LO}}\text{.} \end{align*} \end{document}
Now, the reference signal should have specific properties to allow for
exact observation of phase; the property most important in a correlation
based approach is that the correlation with itself is as low as possible
everywhere but for the point where it's multiplied with itself without
shift (the correlation with itself is called autocorrelation).
I hope I've explained the signal processing problem you need to solve
well enough, and was a little helpful.
Best regards,
Marcus Müller
[1] https://gnuradio.org/redmine/projects/gnuradio/wiki/SuggestedReading
[2]
http://www.afidc.ethz.ch/A_Foundation_in_Digital_Communication/Getting_The_Book.html
[3]
http://ocw.mit.edu/resources/res-6-008-digital-sgnal-processing-spring-2011/
[4] http://greatscottgadgets.com/sdr/
On 29.07.2015 17:42, Changlai Du via USRP-users wrote:
Hi all,
I'm working on a direction finding project and I'm asking for help on
the phase alignment step.
My configurations are:
4 * N200+XCVR2450 as the receiver array
1 * N200 + SBX as the reference TX
1 * N200 + SBX as the target transmiter
GnuRadio and Matlab code of MUSIC algorithm
The reference TX are connect to receivers' RF2 using SMA splitter
4 receivers have been time and frequency synchronized.
I'm not familiar with signal processing. I've read a lot of posts in
the mailing list and really didn't get how to do phase alignment.
Can anybody give me a hint on how to set the reference TX parameters
and how to do "post-processing phase alignment based on the offsets
and gains observed from the known reference signal"?
Thank you!
--
Best regards!
Charlie
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
On 06/08/15 22:04, Marcus Müller via USRP-users wrote:
MIT actually has an online course in digital signal processing [3],
which I find quite nice, if a bit short on a few details, but that's
just my personal preferences.
[snip]
There is a hard to spot typo in the URL, the correct one is:
http://ocw.mit.edu/resources/res-6-008-digital-signal-processing-spring-2011/
Thanks Marcus for the interesting pointer.
Cheers,
Daniele