Locally Optimal Invariant Detector for Testing Equality of Two Power Spectral Densities

This work addresses the problem of determining whether two multivariate random time series have the same power spectral density (PSD), which has applications, for instance, in physical-layer security and cognitive radio. Remarkably, existing detectors for this problem do not usually provide any kind of optimality. Thus, we study here the existence under the Gaussian assumption of optimal invariant detectors for this problem, proving that the uniformly most powerful invariant test (UMPIT) does not exist. Thus, focusing on close hypotheses, we show that the locally most powerful invariant test (LMPIT) only exists for univariate time series. In the multivariate case, we prove that the LMPIT does not exist. However, this proof suggests two LMPIT-inspired detectors, one of which outperforms previously proposed approaches, as computer simulations show.


INTRODUCTION
The problem of determining whether two multivariate time series possess the same (matrix-valued) power spectral density (PSD) at every frequency finds many diverse applications, ranging from the comparison of gas pipes [1], earthquake-explosion discrimination [2] or light-intensity emission stability determination [3], to physical-layer security [4] and spectrum sensing [5]. Thus, this problem has originated an active field of research since it was first studied by Coates and Diggle [1].
The original work in [1] developed parametric and non-parametric tests for univariate time series. The statistics for both kinds of tests are based on the log-ratio of the periodograms of each time series, and several ways of fusing the information at different frequencies are considered. A similar idea is used in [3], where the authors proposed a semi-parametric log-linear model for the ratio of the periodograms. The work in [6] derives the generalized likelihood ratio test (GLRT) for testing whether the PSD of two real multivariate time series are equal at a given frequency, and the GLRT for two complex multivariate time series, which combines information from all frequencies into a single statistic, is considered in [7]. All of the aforementioned detectors were developed in the frequency domain. However, time-domain detectors are also possible, like the ones in [8] and references therein. Additionally, the problem addressed in this work may be seen as an extension of the classical problem of testing the homogeneity of covariance matrices [9]. Specifically, we may apply the statistics for homogeneity at each frequency, and then many ad-hoc detectors may be developed by appropriately choosing the function to fuse them.
The aforementioned tests rely either on ad-hoc principles or asymptotic criteria, such as the GLRT, but little can be said about their optimality for finite data records. In particular, to the best of our knowledge, neither the uniformly most powerful invariant test (UMPIT) nor the locally most powerful invariant test (LMPIT) have been investigated for the problem at hand. Typically, the derivation of these optimal tests involve the identification of the maximal invariant statistic and its distributions, which are usually very involved, if not impossible, to determine. Hence, similar to our previous works [10,11], we use in this paper Wijsman's theorem [12,13], which allows us to derive the UMPIT or the LMPIT, if they exist, without the aforementioned distributions, and even without identifying the maximal invariant statistic. Exploiting this powerful theorem and assuming Gaussianity, the main contribution of this paper is to formally show that the UMPIT does not exist for testing equality of PSD matrices, the LMPIT only exists for univariate time series, whereas it does not exist for multivariate processes. The proof of this (negative) result, however suggests two LMPITinspired detectors, one of which presents better performance than previously proposed schemes.

PROBLEM FORMULATION
Given two L-variate time series, x1[n] ∈ C L and x2[n] ∈ C L for n = 0, . . . , N − 1, which are realizations of zero-mean proper Gaussian processes, the problem is to determine whether they have the same power spectral density matrix at all frequencies or, equivalently, the same matrix-valued covariance function at all lags. Defining now the vectors yi = [x T i [0] · · · x T i [N − 1]] T , and y = [y T 1 y T 2 ] T ∈ C 2N L , the problem is to decide between the following hypotheses: where CN (0, RH i ) denotes a zero-mean circular complex Gaussian distribution with covariance matrix RH i . The covariance matrices under both hypotheses are given by Block-Toeplitz covariance matrices do not allow the derivation of closed-form detectors, as we have showed in our previous works [11,14,15]. To avoid this problem, these works considered an asymptotic approximation of the likelihood, which converges in the mean-square sense to the true likelihood and is based on a blockcirculant approximation of Ri. Given M independent and identically distributed (i.i.d.) realizations 1 of y, say y (0) , . . . , y (M −1) , the first step to obtain the asymptotic likelihood is to define the with IL being the identity matrix of size L and FN the Fourier matrix of size N , i.e., zi[k] is the discrete Fourier transform of xi[n] at frequency θ k = 2πk/N . Hence, the asymptotic approximation of the log-likelihood is where ∝ denotes equality up to constant terms, det(·) and tr(·) are, respectively, the determinant and the trace, Here, Si is a N L × N L block-diagonal matrix whose L × L blocks are given by the power spectral density, i.e., Mi[n]e −jθ k n .
1 If a single realization is given, it is possible to divide this realization in M windows, keeping in mind that the realizations will be no longer i.i.d. as the window borders are correlated. This resembles the Welch method for PSD estimation.

EXISTENCE OF OPTIMAL INVARIANT TESTS
A well-established rule yielding detectors for hypothesis tests with unknown parameters, like the one in (2), is the generalized likelihood ratio test (GLRT). This approach has been adopted in [6][7][8] to solve the problem considered in this work under different assumptions regarding the signals: univariate/multivariate and real/complex. However, it is well known that the GLRT does not guarantee optimality for finite data records [16]. In this section, we study the existence of optimal tests: the uniformly most powerful invariant test (UMPIT) and the locally most powerful invariant test (LMPIT). The first step for deriving invariant detectors is to identify the problem invariances [17]. A clear invariance consists in identical MIMO filtering of both time series, defined asxi[n] = (H * xi)[n], where H[n] ∈ C L×L is a filtering matrix and * denotes convolution. Another invariance is the permutation of the time series at each frequency, that is, it does not matter how we label the processes on a frequency-by-frequency basis. Finally, since Si, i = 1, 2, are block-diagonal matrices, we may permute their blocks with the same permutations, i.e., we apply the same frequency reordering to both processes. To sum up, the detection problem in (2) where P k ⊗ IL is a matrix that permutes z1[k] and z2[k], I2 ⊗ T ⊗ IL is a matrix that permutes the frequencies of both processes, and G is a block-diagonal matrix with L × L invertible blocks G k , which accounts for the frequency-domain counterpart of the MIMO filtering. That is, P k ∈ P k , T ∈ T, and G k ∈ G, where P k and T are the set of permutation matrices formed by P k and T, respectively, and G is the set of L × L invertible matrices.
Once the group of invariant transformations has been defined, the typical approach [17] for deriving the UMPIT would involve finding the maximal invariant statistic, its distributions under both hypotheses and their ratio. Nonetheless, this process is usually intractable, which could preclude the derivation of the UMPIT. As an alternative, Wijsman's theorem [12,13] allows us to derive the UMPIT, if it exists, without the need of finding the maximal invariant statistic and its distributions. This theorem states that the ratio of the distributions of the maximal invariant statistic is given by where G N = G × · · · × G and dG is an invariant measure on the set G N . If L , or a monotone transformation thereof, does not depend on unknown parameters it yields the UMPIT. If it does, we may still find the optimal invariant detector for close hypotheses, namely the LMPIT. The next step is to simplify L , which is done in the following lemma.

Lemma 1 The ratio of the distributions of the maximal invariant statistic simplifies to
where β(G k ) = |det(G k )| 4M exp −2M tr G H k G k , the matrix W i,k is given by and Π[·] being, respectively, permutations in the sets P k and T.

Sketch of proof: Let's start by multiplyingŜ by the permutation matrices and applying the change of variables
to the integrals in the numerator and denominator of L . Subsequently, we also apply the change of variables G k → S 1/2 0,k G k to the integral in the denominator, which yields (Ĉi,1, . . . ,Ĉi,N ) also being a block-diagonal matrix. The proof concludes by applying the change of variables G k → G k , exploiting the block-diagonal structure of the matrices and the decomposition in (4).
To provide some intuition about Lemma 1, note that L in (3) depends on the observations only throughĈπ, which is similar to a coherence matrix. However, it is not exactly a coherence matrix since it is not whitened by its individual blocks but by the average thereof. Under H0,Ĉπ ≈ I, whereas it is expected to significantly differ from I under H1. Thus, any detector for this problem should measure how closeĈπ is to I. How we measure this distance will reach different detectors and our objective is therefore finding the measure that results in an optimal detector.
Unluckily, as can be seen in (3), the ratio L depends on SH 1 , which is unknown, therefore proving that the UMPIT does not exist for this problem. Hence, we focus hereafter on the case of close hypotheses, i.e., the PSD matrix of x1[n] is very similar to that of x2 [n]. In this case, S 1,k ≈ S 2,k , which in turn implies that W i,k ≈ 0. Under this assumption, the exponent term in (3) becomes small and allows us to perform a Taylor series expansion of exp(−α) around α = 0, yielding Let us now simplify (5) exploiting the next lemma.

Lemma 2
The linear term is zero.
Sketch of proof: The linear term may be rewritten as W i,k and we have used π k f (π k [n]) = l k f (l k ). The proof concludes by noting thatW k = 0.
Taking into account Lemma 2, L only depends on the quadratic term, which will be simplified in the following theorem. Due to space constraints, the proof is omitted.
Theorem 1 The ratio of the distributions of the maximal invariant statistic is given by where · 2 denotes the Frobenius norm and α is a constant that depends on SH 1 .
Since L still depends on the unknown parameters of the distribution (through the constant α), it follows that the LMPIT does not exist. However, there exists one exception, and for univariate time series, the LMPIT does indeed exist, as we show next.
Hence, in this particular case, the LMPIT exists and is given by Due to the non-existence of the LMPIT for multivariate processes, we propose to use each of the two terms in (7) independently as detectors, which can be regarded as LMPIT-inspired detectors. These two detectors are whereĈi(e jθ ) =Ŝ i(e jθ ))/2. Let us provide some insight for these two detectors. Under H0, similar to what has been said before, we have that Ci(e jθ ) ≈ I, ∀θ. Thus, these two detectors are just different ways of measuring the distance betweenĈi(e jθ ) and I. The first one uses the Frobenius norm to fuse the information, whereas the last one uses the trace. Hence, L1 exploits more efficiently the information provided by cross-spectral densities within each multivariate time series, and this results in a better performance as we will show later. For this reason, we encourage to only use L1.

NUMERICAL RESULTS
In this section, we analyze the performance of the two proposed detectors by means of numerical simulations and compare them with the GLRT derived in [7], which may be expressed as In particular, we consider the following model where si[n] ∈ C Q are independent multivariate signals whose components are QPSK with unit energy, vi[n] ∈ C L are independent noises with variance σ 2 , which are spatially and temporally white, and H1 sharing the same properties as H1[n]. Thus, ∆ h = 0 implies that the signals have the same PSD (H0), and 0 < ∆ h ≤ 1 measures the distance between both hypotheses. For the simulations, we have considered L = 5, T = 20 taps, ρ = 0.75, and ∆ h = 0.1.
In the first example, we compare the probability of missed detection (for p f a = 10 −2 ) of the GLRT and the two LMPITinspired detectors against the signal-to-noise ratio, which is defined as SNR (dB) = −10 log 10 σ 2 . Concretely, we have considered Q = 1 and just one realization of 512 samples, which was divided into M = 4 windows of length N = 128 samples. As can be seen in Figure 1, the LMPIT-inspired detector L1 presents the best performance for the studied range of SNRs, even better than the GLRT. Moreover, detector L2 performs very poorly, which suggests that this trace-based detector is not a good choice.
The second example compares again the probability of missed detection (for p f a = 10 −2 ) of the previous detectors for Q = 5 and one realization of 1024 samples, which was divided into M = 8 windows of length N = 128 samples. Even in this scenario, which should be more favorable for the GLRT, L1 still presents the best performance, as shown in Figure 2. Note that L2 does not perform well again. In the light of these results, we recommend using L1. One final comment is in order regarding the threshold selection. Due to the test invariance to MIMO filtering, the detection thresholds may be obtained via Monte Carlo simulations for the case of S1(e jθ ) = I and S2(e jθ ) = I, which are also valid for any other case.

CONCLUSIONS
In this work we have addressed the problem of testing whether two multivariate time series have the same power spectral density (PSD). Contrary to previous works, we have assessed the existence of optimal invariant detectors. Concretely, we proved that the uniformly most powerful invariant test (UMPIT) does not exist. Then, focusing on close hypothesis (i.e. similar PSD matrices), we proved that the locally most powerful invariant test (LMPIT) only exists for univariate processes, while in the general multivariate case it does not exist. Nonetheless, inspired by the proof of this result, we have studied two detectors, one of which exhibits very good performance. This fact was confirmed by extensive Monte Carlo simulations.