For the sake of clarity, we express and discuss each shift retrieval problem in separate subsections.
3.1. Noiseless Shift Retrieval
In this section, we provide a different view on the classic shift retrieval problem and give the following main result:
Result 1 (Noiseless shift retrieval)
. We are given two signals and , and we assume that there is a unique circular shift q between them likethen, assuming that, we have that Proof. Assuming that
, with
, we consider the problem
Use
and to develop
, where
(the
column of the Fourier matrix). If we relax the constraint and allow
to be any circulant matrix, to minimize the Frobenius norm, as the special case of Equation (
3) for
, we have
and therefore
. □
The assumption that
seems restrictive (and is missing in Equation (
6)). We do not need to apply the inverse Fourier transform, but instead compute only
where
, and by inspection of all columns of
on the rows where this quantity was computed, we find the shift
q.
If we want to recover the true shift between signals and , then the following conditions need to hold:
Remark 1 (Necessary conditions for the recovery of the true shift)
. In order to uniquely recover the true shift q from a single measurement i, the following properties need to hold:
- 1.
, so that the ratio is well defined;
- 2.
, which is the DC component;
- 3.
, which excludes the special case for n even.
Proof. Notice that and when n is even are for all columns of the Fourier matrix, and thus they cannot provide an unambiguous answer. In fact, provides no information about the shift, while only establishes the parity of the shift. On the other hand, in the best-case scenario, we need to compute a single to recover the true shift q. Given the ratio , two different shifts q and lead to the same quantity iff and therefore . To avoid having the exponential equal one for , we require . □
By this remark, the complexity of the shift retrieval problem is
, as also observed for the compressive shift retrieval result [
14], which is discussed in the next subsection.
Remark 2 (Connection to the classical circular and phase cross-correlation theorems)
. We can rewrite Equation (9) aswhere computes the square absolute values of each element of the Fourier transform of which we assume are all non-zero. Notice that Equation (9) represents a weighted variant of Equation (6), a type of “whitened” cross-correlation quantity. The expression in Equation (11) naturally relates to the well-known phase correlation formula The normalization performed in the formula above removes the amplitude information, i.e., this is essentially a phase-only calculation because magnitude is removed by the division operation. In our scenario, we are interested in preserving and recovering the amplitude information as well.
If the two signals and are shifted versions of each other, then Equations (6) and (9) provide the same answer. If this is not the case, or the signals are noisy, then Equation (9) seems a weaker result in general since the minimizer in Equation (10) might no longer be , but some other circulant matrix that minimizes Equation (10). In this high-noise case, we might not be able to interpret that the signals are shifted versions of each other. The circulant cross-correlation theorem does not have this feature, as it will always provide the maximum correlation between the signals. We note that the approach to maximize the quadratic form Equation (5) and that of norm minimization Equation (10) are equivalent sinceand then alsowhere is an element from the Fourier matrix and the last quantity is real-valued due to the conjugate valued symmetries of the vectors and , and of the columns . The last summation quantity is equivalent to Equation (6) for a fixed q. The result of Equation (9) is obtained by allowing the unknown to be the overall general circulant matrix denoted , not just the power q. Finally, note that for real-valued and we have that is equivalent to , up to a normalization factor depending on n.
Remark 3 (Calculation of the circular shift from one measurement)
. Notice that Equation (9) is equivalent towhere is the column of the Fourier matrix . We can find the shift by computing a single entry and then inspecting the entries of only the row of the Fourier matrix. In this case, the recovery of the shift is performed viawhere is the modular inverse of i modulo n. This is the result previously developed by the work in [13,14]. Essentially, these results are a consequence of the well-known shift theorem for the Discrete Fourier Transform (DFT), which makes the connection between multiplication by pure phase factors and circular shifts in vectors, i.e., circular shift in a vector corresponds to multiplying its DFT by a linear phase. Treatments of this classic result can be found in fundamental signal processing sources such as ([18], Section 8.6.2). More generally, when the measurement has a different scale and mean than the signal , we have the following remark:
Remark 4 (Necessary conditions for the recovery of the true shift, scale, and mean)
. When the measurements are given by , where are scalars such that and , thenwhere is the ones vector. In general, we need three measurements to recover all parameters . Proof. The mean component is easy to identify by using the previously uninformative DC component. Notice that for a single non-DC component such that
we have that
When
, there is no change in the phase, and therefore the scale and shift can be recovered simultaneously. For any integer
, then we have that the phase of
is not modified (if
is positive) or is modified by
(if
is negative). As a consequence of this phase change we cannot distinguish between the shift-scale pair
and
when
is a valid shift integer in
. In general, this ambiguity cannot be resolved from a single non-DC measurement. To uniquely recover all three parameters, we will require two non-DC components and the DC component (for the calculation of the mean
). Given two distinct non-DC measurements
,
Now take the ratio of the two quantities to eliminate
and reach
Analogously to Remark 1, the necessary condition for the recovery of the true shift is that
. We call the best estimated shift
Then, we compute the other two parameters,
□
Just as the classic shift retrieval of Equation (
5) is indifferent to the sign of the correlation between signals, Remark 4 provides the result indifferent to the sign of the correlation, allowing for both positive and negative
and therefore positive and negative correlations.
The results developed in this section assume no noise is present in the measurements. As already explained in Remark 2, we expect noisy measurements to significantly degrade the performance of the shift retrieval and make impractical the recovery mechanism from a single measurement.
3.2. Noisy Shift Retrieval
We are again given two signals
and
such that there is a noisy circular shift
q between them,
where
is an i.i.d. zero-mean Gaussian noise vector of size
n. Unlike the noiseless scenario, here we will assume the number of measurements
and try to recover the most likely shift parameter. Then we have the following result.
Result 2 (The noisy recovery of the true shift, scale, and mean)
. When the measurements are given bywhere are scalars such that , then given m measurements with indices in the set , such that for any two distinct and , plus the DC component, which is treated separately, we have the following estimates: Proof. Assuming for , define and the following measurement vector , which is of length and contains the Fourier transform of the vector restricted to the indices from the set . Define also the vector , where is again a vector of size whose elements are the quantities for . The parameter is estimated again from the DC component by minimizing for . The scale is estimated by minimizing for which leads to , note that the result is a function of q. Then, in terms of the shift, the minimum residual quantity is given by . Then, the optimal is given by maximizing the numerator in the residual quantity. □
As we increase the number of measurements m, we expect to improve the accuracy of the recovery. It is of interest to investigate if there are ways to choose the index set to improve accuracy. The following remark speaks to this choice.
Remark 5 (Selection criteria for the Fourier measurements)
. Given noisy measurements , in order to recover the shift quantity q while reducing the effects of the noise, one should choose indices such that have the largest values.
Proof. The observation stems from the ratio
whose variance is proportional to
. This follows from
where
is the Fourier transform of the noise vector. Because
is unitary and the noise is zero mean and i.i.d., we have that the variance is
To maximally reduce this quantity we take the largest . □
In the simulation results section, we investigate the impact of this index choice on the accuracy performance of recovering the shift from the noisy measurements. While choosing the highest entries
is desirable, this might be difficult to achieve in general without computing the whole spectrum. Without any information on the spectrum of the signal, the Goertzel algorithm [
19] can be applied to compute a few Fourier coefficients, still obeying
. Still, the indices of these coefficients have to be given a priori. Keeping
means that the set of eligible indices has size
, the Euler totient function. If no information is available about the spectrum then selecting the coefficients randomly is a last method of choice. Approaches such as the Fastest Fourier Transform in the West (FFTW) [
20] allow for the calculation of pruned FFT, which compute only a subset of outputs of the FFT at the cost of
for
s Fourier coefficients.
Furthermore, in some applications where we expect the spectrum to be very sparse (many Fourier coefficients will be zero, or close to zero), the Sparse Fourier Transform (SFT) [
21,
22] can be applied to compute the
s largest magnitude Fourier coefficients with complexity
if the signal is exactly
s-sparse or
if the signal is
s-sparse plus noise. The SFT is probabilistic, so usually, we do not compute just one coefficient, but a few
and select the largest in magnitude. An interesting point here is to note that these SFTs work on the principle of intentionally allowing aliasing to occur in order to group Fourier coefficients in the same bins, allowing conflicts that are subsequently resolved. This is relevant in our case because, by carefully choosing the aliasing, we could group the calculations in bins such that Fourier coefficients that are not of interest are grouped in the same bins, and then in separate bins, we group only the coefficients of interest. Therefore, resolving the collisions occurs only in the bins of interest.
The next remark addresses the issue of comparing, in the noisy case, the classic shift recovery method against the one measurement approach as a function of n and the signal-to-noise ratio.
Remark 6 (Expected accuracy performance and comparison between the circular convolution theorem and the one measurement model)
. Given Result 2, we expect the shift recovery performance to follow:
- 1.
The recovery of the shift by the circular convolutional theorem improves as the length of the signals n increases or the variance of the noise decreases, i.e., it is easier to recover the correct shift under these circumstances;
- 2.
For shift recovery from a single measurement, as n increases, the noise variance for which the recovery accuracy approaches 100% decreases, i.e., it is harder to recover the correct shift under these circumstances;
- 3.
For shift recovery from a single measurement, as the variance decreases to zero, i.e., , the probability of correct recovery is bounded by .
Proof. Assuming the measurement model in Equation (
25), for two different shifts
q and
such that
, and the respective shifted vectors
and
, the idea is to compute the probability of choosing the wrong shift
over the correct
q as
. The inequality is reduced from
to the equivalent
. Because
we have that
. Finally, note that
Therefore, the results depend only on the nonzero differences between the two shifts we consider. Then, if follows that for any shift difference
we have that
where
is the normalized circular autocorrelation coefficient for delay
d. We assume
for all
, i.e., there is no periodicity in the signal
. Then, the probability of error is given by
If we would allow then , describing the inherit uncertainty in the shift recovery between q and .
We have defined the Q-function as the tail distribution function of the standard normal distribution and
. Finally, for
given by Result 2, by a union bound we have
where
is the highest autocorrelation coefficient. This shows that increasing
n or SNR leads to a lower expected error upper bound. Naturally, high magnitude coefficients in the autocorrelation increase the probability of error. In fact,
as
or
.
In the case of a single measurement, the main difficulty is the angular separation between adjacent phases on the unit circle, which is
. As
n increases, this separation decreases, so at any fixed measurement SNR, the success probability of recovery decreases. Assuming that we use the classic approximation
instead of the arc length distance between neighboring phases, correct identification occurs when the phase error in absolute value stays within half the grid spacing, i.e.,
. Therefore, by Remark 5, the probability of error for a single measurement whose estimate
is given by Euqation (
16) is
Note there that the relationship with SNR is the same as in Equation (
35), but the relationship with
n is inverse, i.e., larger
n decreases the probability of correct shift recovery from a single measurement. According to Equation (
36), for signals of length
we need an SNR approximately
dB larger to achieve the same shift recovery accuracy as for
n.
Finally, note that because
has exactly
solutions, and assuming that
q is uniformly distributed among all possible shifts, then the maximum possible probability of exact recovery is at most
. This is because
shifts the map to the same phase and only
distinct phases. Therefore, the probability of Equation (
36) asymptotically tends to one as the SNR
iff
. □
Next, we look at the compressed sensing extension of the shift retrieval problem and several other, more general shift retrieval problems.
3.3. The Compressive Shift Retrieval Problem
The compressive shift retrieval problem has been previously introduced [
13,
14]. In this section, we show how this result can also be described in the overall structure developed in this paper.
Define the sensing matrix
and the compressed measurement signals
and
. Assuming that
is a circular shift in
, the goal is to determine the shift from
and
. Similarly to Equation (
5), consider the test (Corollary 2 in [
13]):
where
. It has been shown that when
is taken to be a partial Fourier matrix, then ([
13], Corollary 4):
recovers the true shift if there exists
such that
(the
coefficient of the Fourier transform of
) and
contain no integers. The set
contains the indices of the rows contained in the partial Fourier matrix
. Following ([
13], Theorem 1), we assume that the sensing matrix
obeys:
,
so that
and all columns of
are different so that there is no ambiguity in the shift in the measurements. Without loss of generality, assume
.
The compressive shift retrieval result is partly based on the fact that . Notice that where the diagonal contains with ones on the positions where the rows of the Fourier matrix are selected (the set ). Notice that is a circulant and thus it commutes with – they have the same eigenspace. Also, given a set of indices, we define the operation for vectors as equality between values and positions of , leaving the rest of the values of indexed in to zero.
Result 3 (Circulant compressive shift retrieval with a proof based on circulant matrices)
. Given and where , assuming , then Proof. We start again from the least squares problem,
With the assumption that
the objective reaches the zero minimum,
where we used the commutativity of circulant matrices and that
. To develop Equation (
40), start again from Equation (
2) and the expression of the matrix multiplication as
. We finally obtain
where the matrix
of size
contains only the columns of the Kronecker product that match the non-zero elements of the diagonal matrix
. The matrix contains the elements of
in positions
. The second equality holds because the
norm is element-wise, and therefore applying the vec operator does not change the value. It follows that
and
The compressive shift retrieval is equivalent to Equation (
9), the regular shift retrieval, on the set of Fourier components
. This is a unified view of the classic and compressed shift retrieval solutions. □
In relation to Equation (
38), we use the circulant structures to reach
where we expressed the matrix multiplications as a linear transformation on
and
is the expression in the parenthesis with
The matrix
is a partial permutation matrix—only positions
are non-zero. The products with
and
produce extended vectors
. Thus, maximizing
reduces to the selection of
.
Due to the natural appearance of the Fourier matrix
in the factorization of circulant matrices its rows are also the natural choice in the rows of the measurement matrix
. Cancelations that occur because of this choice lead to the analytic results found. This shows a simple, but equivalent, alternative way to develop Equation (
38) of [
13].
3.4. The 1-to-N Shift Retrieval Problem
In the previous sections, we have assumed that the signals to be compared are singletons (we could call this the 1-to-1 shift retrieval problem). In this section, we explore what happens when we want to solve the shift retrieval problem between a signal
and a group of signals
, i.e., find the shift for the signal
such that it aligns best with all
N signals from
. Just as before, we can approach this problem as maximizing Equation (
7) or like a minimization problem (Equation (
10)).
In our case, the quantity in Equation (
7) generalizes to
and this is equivalent to the approach:
i.e., we take the index of the maximum entry of the
argument vector. The argument we want is the index where the quantity
is achieved. This is the matrix
∞-norm, i.e.,
. The next result provides the way to compute the optimum shift.
Result 4 (One-to-many shift retrieval)
. We are given a signal and a group of signals , we aim to find the shift that achieves the highest correlation, in absolute value, between and all the vectors from in the sense of Equation (46). The shift q that maximizes this quantity is returned byi.e., we take the index of the maximum entry of the argument vector. Proof. We use Equation (
2) and expand the quantity in Equation (
46),
The matrix-vector product that follows computes the row-wise sums of the absolute value matrix. The computational complexity is dominated by for the Fourier transforms and for the summations. □
This result establishes the circular shift that, on average, aligns the data points as well as possible.
3.5. The N-to-N Shift Retrieval Problem
In the most general case of pairwise shifts, we are given two sets of signals and ; the problem is to find a single shift such that each signal aligns as best as possible with the corresponding signal . This can be seen as the generalization of the problem in the previous sections.
In this case, the quantity in Equation (
45) further generalizes to
We state the following result, as a generalization of Result 4.
Result 5 (Many-to-many shift retrieval)
. We are given the signals and , we aim to find the shift that achieves the highest correlation, in absolute value, between all pairs and in the sense of Equation (49). The shift q that maximizes this quantity is returned by
i.e., we take the index of the maximum entry of the argument vector. Proof. We use Equation (
2), Result 4 and expand the quantity
The last equality leads to the expression in the result statement, as the trace is the sum of the diagonal vector entries. The matrix-vector product that follows computes the row-wise sums in absolute value. The computational complexity is dominated by for the Fourier transforms and for the summations. □
Notice how Results 4 and 5 are generalizations of the multiplicative cross-correlation formula from Equation (
6). In these cases, when we do not expect alignment to be performed exactly, the division approach taken in Result 1 is not appropriate. In the context of these results, if indeed signals are circular shifts in each other, then
is enough to recover the true shift. Thus, these methods actually recover an average shift that maximally aligns the data point pairs.
3.6. Linear Combinations of a Known Circularly Shifted Signal
In all previous sections, our objective was to recover a single shift that maximally aligns data points, either 1-to-1, 1-to-N, or N-to-N. Now, we consider a scenario where a single signal is circularly shifted in multiple positions, and we take linear combinations of these. The task is to recover all the shifts performed and their weights from the minimum number of measurements. Consider the following result, a generalization of Result 1:
Result 6 (Recovery of linear combinations of circular shifts)
. We are given a signal and the measurement , which we assume is a linear combination of an unknown number of weighted circular shifts in such that
then, stacking the real-valued weights in the vector , and assuming holds for all indices, we have that Proof. We start by solving the optimization problem
Note that the optimization variables are the weights
, not the shifts. If a circular shift is missing in the linear combination, then the corresponding weight is zero. We develop the objective function value
here we have used that
. Assuming that Equation (
52) holds, we have
and finally
, to reach the desired result. □
This result establishes that weighted linear combinations of a single known signal, which is circularly shifted, can be efficiently recovered from noiseless linear measurements. Note that we need not use all possible shifts, but only a subset—equivalent to having a sparse weight vector .
A natural question might be what is the minimum number of measurements needed to recover the weights, and what happens when noise is added to the measurements? In general, we will need all
n measurements
, but when the weight vector
is sparse, then well-known results from the signal processing literature provide better insights. First, note that for
, the problem can be seen as a linear measurement problem of the type:
Assuming sparsity
for
, this is now a standard problem in Compressed Sensing (CS) [
23] where we ask how many Fourier measurements we need, from the total
n available, in order to correctly recover the weights
. To understand this problem and its solution, we make use of the following well-established results from the literature:
In the noiseless case, we know that in order to recover an exactly
s-sparse vector
, we need at least
consecutive Fourier measurements. This result is described in ([
23], Theorem 2.15) via a Prony-type reconstruction procedure. Note that this is consistent with the findings of Remark 4 for
, where it is established that two non-DC components are required;
In the noisy measurements case, Prony-type methods cannot be used, as they are not robust against noise. Now, the stable recovery of an
s-sparse
of length
n needs, with high probability, order
random Fourier measurements. The recovery of
is performed via the
optimization problem Basis Pursuit Denoizing (BPD),
where positive
is given and depends on the expected noise level. We have denoted here
the
sub-matrix of the
Fourier matrix consisting of all the columns and only the rows indexed in the set
. For the technical details on this result, the reader can consult ([
23], Chapter 11). In the case of
, note that the solution is computed by finding the largest absolute value correlation between the columns of
and
. Normalizing the columns of
and defining the mutual coherence denoted
, the shift retrieval for
and the recovery of the single weight
is robust against noise whenever
. In general,
decreases with increasing
m [
24].
When the signal
is unknown and we try to recover both the shifts and the signal itself, the problem is much more difficult, as it requires some alternating optimization strategy, in general. This is related to the circulant dictionary learning problem [
16,
17,
25].