[DetnEst] 13. Random Signal Detection

KBC·2024년 12월 11일
0

Detection and Estimation

목록 보기
20/23

Review

  • Neyman-Pearson criteria (max PDP_D s.t. PFA=P_{FA} = constant) : likelihood ratio test, threshold set by PFAP_{FA}
  • Minimize Bayesian risk (assign costs to decisions, have priors of the different hypotheses)
    likelihood ratio test, threshold set by priors+costs
    • minimum probability of error = maximum a posteriori detection
    • maximum likelihood detection = minimum probability of error with equal priors
  • Known deterministic signals in Gaussian noise : correlators

Overview

  • Detecting random Gaussian signals
  • Some processes are better represented as random (e.g. speech)
  • Rather than assume completely random, assume signal comes from a random process a known covariance structure

Estimator-Correlator

Example of energy detector

H0:x[n]=w[n],n=0,1,,N1H1:x[n]=s[n]+w[n],n=0,1,,N1s[n]:zero mean, white, WSS Gaussian random process with variance σs2w[n]:zero mean WGN with variance σ2, independent of the signal\mathcal{H}_0 : x[n] = w[n], \quad n = 0, 1, \cdots, N-1 \\[0.2cm] \mathcal{H}_1 : x[n] = s[n] + w[n], \quad n = 0, 1, \cdots, N-1 \\[0.4cm] s[n] : \text{zero mean, white, WSS Gaussian random process with variance } \sigma_s^2 \\[0.2cm] w[n] : \text{zero mean WGN with variance } \sigma^2, \text{ independent of the signal}
  • NP detector : decide H1\mathcal{H}_1 if
    L(x)=p(xH1)p(xH0)>γx{N(0,σ2I)under H0N(0,(σs2+σ2)I)under H1L(x)=1(2π(σs2+σ2))N/2exp[12(σs2+σ2)n=0N1x2[n]]1(2πσ2)N/2exp[12σ2n=0N1x2[n]]l(x)=N2ln(σ2σs2+σ2)+12(1σ21σs2+σ2)n=0N1x2[n]l(x)=N2ln(σ2σs2+σ2)+12σs2σ2(σs2+σ2)n=0N1x2[n]Decide H1 if T(x)=n=0N1x2[n]>γ:energy detectorL(\mathbf{x}) = \frac{p(\mathbf{x}|\mathcal{H}_1)}{p(\mathbf{x}|\mathcal{H}_0)} > \gamma \\[0.4cm] \mathbf{x} \sim \begin{cases} \mathcal{N}(0, \sigma^2 \mathbf{I}) & \text{under } \mathcal{H}_0 \\[0.2cm] \mathcal{N}(0, (\sigma_s^2 + \sigma^2)\mathbf{I}) & \text{under } \mathcal{H}_1 \end{cases}\\[0.2cm] L(\mathbf{x}) = \frac{\frac{1}{(2\pi (\sigma_s^2 + \sigma^2))^{N/2}} \exp\left[-\frac{1}{2(\sigma_s^2 + \sigma^2)} \sum_{n=0}^{N-1} x^2[n] \right]}{\frac{1}{(2\pi \sigma^2)^{N/2}} \exp\left[-\frac{1}{2\sigma^2} \sum_{n=0}^{N-1} x^2[n] \right]} \\[0.4cm]l(\mathbf{x}) = \frac{N}{2} ln\left(\frac{\sigma^2}{\sigma_s^2 + \sigma^2}\right) + \frac{1}{2} \left( \frac{1}{\sigma^2} - \frac{1}{\sigma_s^2 + \sigma^2} \right) \sum_{n=0}^{N-1} x^2[n] \\[0.4cm] l(\mathbf{x}) = \frac{N}{2} \ln\left(\frac{\sigma^2}{\sigma_s^2 + \sigma^2}\right) + \frac{1}{2} \frac{\sigma_s^2}{\sigma^2 (\sigma_s^2 + \sigma^2)} \sum_{n=0}^{N-1} x^2[n] \\[0.4cm]\rightarrow \text{Decide } \mathcal{H}_1 \text{ if } \\[0.4cm] T(\mathbf{x}) = \sum_{n=0}^{N-1} x^2[n] > \gamma' : \text{energy detector}

Detection Performance

T(x)σ2χN2 under H0,T(x)σs2+σ2χN2 under H1Qχν2(x)=xp(t)dt={2Q(x),ν=1exp(12x)k=1ν12(k1)!(2x)k12(2k1)!,ν>1,ν oddexp(12x)k=0ν21(x)kk!,ν>1,ν evenPFA=Pr(T(x)>γ;H0)=Pr(T(x)σ2>γσ2;H0)=QχN2(γσ2)PD=Pr(T(x)>γ;H1)=QχN2(γσs2+σ2)γ=γσ2    PD=QχN2(γσs2σ2+1)\frac{T(\mathbf{x})}{\sigma^2} \sim \chi^2_N \text{ under } \mathcal{H}_0, \\[0.4cm] \frac{T(\mathbf{x})}{\sigma_s^2 + \sigma^2} \sim \chi^2_N \text{ under } \mathcal{H}_1 \\[0.4cm] Q_{\chi^2_\nu}(x) = \int_x^\infty p(t) dt = \begin{cases} 2Q(\sqrt{x}), & \nu = 1 \\[0.2cm] \exp\left(-\frac{1}{2}x\right)\sum_{k=1}^{\frac{\nu - 1}{2}} \frac{(k-1)! (2x)^{k-\frac{1}{2}}}{(2k-1)!}, & \nu > 1, \nu \text{ odd} \\[0.2cm] \exp\left(-\frac{1}{2}x\right)\sum_{k=0}^{\frac{\nu}{2}-1} \frac{(x)^k}{k!}, & \nu > 1, \nu \text{ even} \end{cases} \\[0.4cm] P_{FA} = \Pr(T(\mathbf{x}) > \gamma' ; \mathcal{H}_0) = \Pr\left(\frac{T(\mathbf{x})}{\sigma^2} > \frac{\gamma'}{\sigma^2}; \mathcal{H}_0\right) = Q_{\chi^2_N}\left(\frac{\gamma'}{\sigma^2}\right) \\[0.4cm] P_D = \Pr(T(\mathbf{x}) > \gamma' ; \mathcal{H}_1) = Q_{\chi^2_N}\left(\frac{\gamma'}{\sigma_s^2 + \sigma^2}\right) \\[0.4cm] \gamma'' = \frac{\gamma'}{\sigma^2} \implies P_D = Q_{\chi^2_N}\left(\frac{\gamma''}{\frac{\sigma_s^2}{\sigma^2} + 1}\right)

  • Generalization of energy detector to signals with arbitrary covariance matrix
    s[n]: zero mean, Gaussian random process with covariance matrix Csw[n]: zero mean WGN with variance σ2, independent of the signalx{N(0,σ2I)under H0N(0,Cs+σ2I)under H1s[n]: \text{ zero mean, Gaussian random process with covariance matrix } \mathbf{C_s} \\[0.4cm] w[n]: \text{ zero mean WGN with variance } \sigma^2, \text{ independent of the signal} \\[0.4cm] \mathbf{x} \sim \begin{cases} \mathcal{N}(\mathbf{0}, \sigma^2 \mathbf{I}) & \text{under } \mathcal{H}_0 \\[0.2cm] \mathcal{N}(\mathbf{0}, \mathbf{C_s} + \sigma^2 \mathbf{I}) & \text{under } \mathcal{H}_1 \end{cases}
  • NP detector : decide H1\mathcal{H}_1 if
    L(x)=1(2π)N/2det(Cs+σ2I)exp(12xT(Cs+σ2I)1x)1(2π)N/2det(σ2I)exp(12σ2xTx)>γ12xT[(Cs+σ2I)11σ2I]x>γL(\mathbf{x}) = \frac{\frac{1}{(2\pi)^{N/2} \sqrt{\det(\mathbf{C_s} + \sigma^2 \mathbf{I})}} \exp\left(-\frac{1}{2} \mathbf{x}^T (\mathbf{C_s} + \sigma^2 \mathbf{I})^{-1} \mathbf{x}\right)} {\frac{1}{(2\pi)^{N/2} \sqrt{\det(\sigma^2 \mathbf{I})}} \exp\left(-\frac{1}{2 \sigma^2} \mathbf{x}^T \mathbf{x}\right)} > \gamma \\[0.4cm] \rightarrow -\frac{1}{2} \mathbf{x}^T \left[ (\mathbf{C_s} + \sigma^2 \mathbf{I})^{-1} - \frac{1}{\sigma^2} \mathbf{I} \right] \mathbf{x} > \gamma'

T(x)=σ2xT[1σ2I(Cs+σ2I)1]x>2γ/σ2T(x)=xT[1σ2(1σ2I+Cs1)1]xT(\mathbf{x}) = \sigma^2 \mathbf{x}^T \left[ \frac{1}{\sigma^2} \mathbf{I} - (\mathbf{C_s} + \sigma^2 \mathbf{I})^{-1} \right] \mathbf{x} > 2 \gamma' / \sigma^2 \\[0.4cm] \rightarrow T(\mathbf{x}) = \mathbf{x}^T \left[ \frac{1}{\sigma^2} \left( \frac{1}{\sigma^2} \mathbf{I} + \mathbf{C_s}^{-1} \right)^{-1} \right] \mathbf{x}
  • Let
    s^=1σ2(1σ2I+Cs1)1x=1σ2[1σ2Cs(Cs+σ2I)Cs1]1x=Cs(Cs+σ2I)1x\hat{\mathbf{s}} = \frac{1}{\sigma^2} \left( \frac{1}{\sigma^2} \mathbf{I} + \mathbf{C_s}^{-1} \right)^{-1} \mathbf{x} = \frac{1}{\sigma^2} \left[ \frac{1}{\sigma^2} \mathbf{C_s} (\mathbf{C_s} + \sigma^2 \mathbf{I}) \mathbf{C_s}^{-1} \right]^{-1} \mathbf{x} \\[0.4cm] = \mathbf{C_s} (\mathbf{C_s} + \sigma^2 \mathbf{I})^{-1} \mathbf{x}
  • Decide H1\mathcal{H}_1 if
    T(x)=xTs^>γ,T(x)=n=0N1x[n]s^[n]T(\mathbf{x}) = \mathbf{x}^T \hat{\mathbf{s}} > \gamma'', \quad T(\mathbf{x}) = \sum_{n=0}^{N-1} x[n] \hat{s}[n]
    • s^\hat s : estimate of the signal \rightarrow estimator-correlator
    • MMSE estimator of the signal : Wiener filter estimator
    • Jointly Gaussian with zero mean   θ^=CθxCxx1x\rightarrow\;\hat \theta=C_{\theta x }C^{-1}_{xx}\text{x}

Example of energy detector

  • If the signal is white, Cs=σs2IC_s=\sigma^2_sI
    s^=Cs(Cs+σ2I)1x=σs2(σs2I+σ2I)1x=σs2σs2+σ2x\hat{\mathbf{s}} = \mathbf{C}_s (\mathbf{C}_s + \sigma^2 \mathbf{I})^{-1} \mathbf{x} = \sigma_s^2 (\sigma_s^2 \mathbf{I} + \sigma^2 \mathbf{I})^{-1} \mathbf{x} = \frac{\sigma_s^2}{\sigma_s^2 + \sigma^2} \mathbf{x}
s^[n]=σs2σs2+σ2x[n]\rightarrow \hat{s}[n] = \frac{\sigma_s^2}{\sigma_s^2 + \sigma^2} x[n]
  • Decide H1\mathcal{H}_1 if
    n=0N1x[n]s^[n]=σs2σs2+σ2n=0N1x2[n]>γ\sum_{n=0}^{N-1} x[n] \hat{s}[n] = \frac{\sigma_s^2}{\sigma_s^2 + \sigma^2} \sum_{n=0}^{N-1} x^2[n] > \gamma''
n=0N1x2[n]>γ(σs2+σ2)σs2energy detector\sum_{n=0}^{N-1} x^2[n] > \frac{\gamma'' (\sigma_s^2 + \sigma^2)}{\sigma_s^2} \quad \rightarrow \text{energy detector}

Example of correlated signal

N=2,  Cs=σs2[1ρρ1],  T(x)=xTs^=xTCs(Cs+σ2I)1xN = 2, \; C_s = \sigma_s^2 \begin{bmatrix} 1 & \rho \\ \rho & 1 \end{bmatrix}, \; T(x) = x^T \hat{s} = x^T C_s (C_s + \sigma^2 I)^{-1} x
Let y=VTx,  where V=[12121212]:orthogonal matrix, VT=V1\text{Let } y = V^T x, \; \text{where } V = \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix} : \text{orthogonal matrix, } V^T = V^{-1}
T(x)=xTVVTCsVVTx(VTx)T(VTCsV)[V1(Cs+σ2I)]1(VTx)T(x) = x^T VV^T C_s VV^T x - (V^T x)^T (V^T C_s V) [V^{-1} (C_s + \sigma^2 I)]^{-1} (V^T x)
=yTΛs(Λs+σ2I)1y= y^T \Lambda_s (\Lambda_s + \sigma^2 I)^{-1} y
as VTCsV=Λs,  where Λs=σs2[1+ρ001ρ]\text{as } V^T C_s V = \Lambda_s, \; \text{where } \Lambda_s = \sigma_s^2 \begin{bmatrix} 1 + \rho & 0 \\ 0 & 1 - \rho \end{bmatrix}
T(x)=σs2(1+ρ)σs2(1+ρ)+σ2y2[0]+σs2(1ρ)σs2(1ρ)+σ2y2[1]\rightarrow T(x) = \frac{\sigma_s^2 (1 + \rho)}{\sigma_s^2 (1 + \rho) + \sigma^2} y^2[0] + \frac{\sigma_s^2 (1 - \rho)}{\sigma_s^2 (1 - \rho) + \sigma^2} y^2[1]
  • The transformation de-correlates x(Cy\text{x}(C_y is diagonal under either hypotheses))
  • The energy detector weights the squares of y[n]y[n] differently

Canonical form of the estimator-correlator

  • V\text{V} : modal matrix for CsC_s (each column is an eigenvector)
  • Λs\Lambda_s : diagonal elements are the eigenvalues of CsC_s
  • Eigen-decomposition : VTCsV=ΛsV^TC_sV=\Lambda_s
    V=[v0v1vN1],Λs=diag(λs0,λs1,,λs(N1)),T(x)=xTCs(Cs+σ2I)1x=yTΛs(Λs+σ2I)1y=n=0N1λsnλsn+σ2y2[n]:canonical formV = \begin{bmatrix} v_0 & v_1 & \cdots & v_{N-1} \end{bmatrix}, \\[0.2cm] \Lambda_s = \text{diag}(\lambda_{s0}, \lambda_{s1}, \cdots, \lambda_{s(N-1)}), \\[0.2cm] T(x) = x^T C_s (C_s + \sigma^2 I)^{-1} x \\[0.2cm] = y^T \Lambda_s (\Lambda_s + \sigma^2 I)^{-1} y \\[0.2cm] = \sum_{n=0}^{N-1} \frac{\lambda_{sn}}{\lambda_{sn} + \sigma^2} y^2[n] \quad : \text{canonical form}
  • The weights λsnλsn+σ2\frac{\lambda_{s_n}}{\lambda_{s_n}+\sigma^2} are Wiener filter weights in a transformed space

Correlated signal example

  • if ρ1\rho\approx1 and σs2>>σ2\sigma^2_s>>\sigma^2, then
    λs0λs0+σ2=σs2(1+ρ)σs2(1+ρ)+σ21,λs1λs1+σ2=σs2(1ρ)σs2(1ρ)+σ20,v0=[1/21/2],v1=[1/21/2]\frac{\lambda_{s0}}{\lambda_{s0} + \sigma^2} = \frac{\sigma_s^2 (1 + \rho)}{\sigma_s^2 (1 + \rho) + \sigma^2} \approx 1, \\[0.2cm] \frac{\lambda_{s1}}{\lambda_{s1} + \sigma^2} = \frac{\sigma_s^2 (1 - \rho)}{\sigma_s^2 (1 - \rho) + \sigma^2} \approx 0, \\[0.2cm] v_0 = \begin{bmatrix} 1 / \sqrt{2} \\ 1 / \sqrt{2} \end{bmatrix}, \quad v_1 = \begin{bmatrix} 1 / \sqrt{2} \\ -1 / \sqrt{2} \end{bmatrix}
  • The component of x\text{x} along v0\text{v}_0 is maintained, while that along v1\text{v}_1 is discarded
  • SNRs for y[0]y[0] and y[1]y[1] components
    η02=E(ys2[0])E(yw2[0])=λs0σ2=σs2(1+ρ)σ22σs2σ21,η12=E(ys2[1])E(yw2[1])=λs1σ2=σs2(1ρ)σ20\eta_0^2 = \frac{\mathbb{E}(y_s^2[0])}{\mathbb{E}(y_w^2[0])} = \frac{\lambda_{s0}}{\sigma^2} = \frac{\sigma_s^2 (1 + \rho)}{\sigma^2} \approx \frac{2 \sigma_s^2}{\sigma^2} \gg 1, \\[0.2cm] \eta_1^2 = \frac{\mathbb{E}(y_s^2[1])}{\mathbb{E}(y_w^2[1])} = \frac{\lambda_{s1}}{\sigma^2} = \frac{\sigma_s^2 (1 - \rho)}{\sigma^2} \approx 0

Linear Model

x=Hθ+wθN(0,Cθ),wN(0,σ2I)H0:x=w,H1:x=Hθ+ws=HθN(0,HCθHT)Estimator-correlator: decide H1 ifT(x)=xTCs(Cs+σ2I)1x>γT(x)=xTHCθHT(HCθHT+σ2I)1x>γequivalent to T(x)=xTs^=xTHθ^where θ^ is the MMSE estimator of θ(θ^=CθxCxx1x)\mathbf{x} = \mathbf{H} \boldsymbol{\theta} + \mathbf{w} \\[0.2cm] \boldsymbol{\theta} \sim \mathcal{N}(\mathbf{0}, \mathbf{C}_{\theta}), \quad \mathbf{w} \sim \mathcal{N}(\mathbf{0}, \sigma^2 \mathbf{I}) \\[0.2cm] \mathcal{H}_0 : \mathbf{x} = \mathbf{w}, \quad \mathcal{H}_1 : \mathbf{x} = \mathbf{H} \boldsymbol{\theta} + \mathbf{w} \\[0.2cm] \mathbf{s} = \mathbf{H} \boldsymbol{\theta} \sim \mathcal{N}(\mathbf{0}, \mathbf{H} \mathbf{C}_{\theta} \mathbf{H}^T) \\[0.2cm] \text{Estimator-correlator: decide } \mathcal{H}_1 \text{ if} \\[0.2cm] T(\mathbf{x}) = \mathbf{x}^T \mathbf{C}_s (\mathbf{C}_s + \sigma^2 \mathbf{I})^{-1} \mathbf{x} > \gamma'' \\[0.2cm] \rightarrow T(\mathbf{x}) = \mathbf{x}^T \mathbf{H} \mathbf{C}_{\theta} \mathbf{H}^T (\mathbf{H} \mathbf{C}_{\theta} \mathbf{H}^T + \sigma^2 \mathbf{I})^{-1} \mathbf{x} > \gamma'' \\[0.2cm] \rightarrow \text{equivalent to } T(\mathbf{x}) = \mathbf{x}^T \hat{\mathbf{s}} = \mathbf{x}^T \mathbf{H} \hat{\boldsymbol{\theta}} \\[0.2cm] \text{where } \hat{\boldsymbol{\theta}} \text{ is the MMSE estimator of } \boldsymbol{\theta} \, (\hat{\boldsymbol{\theta}} = \mathbf{C}_{\theta \mathbf{x}} \mathbf{C}_{\mathbf{xx}}^{-1} \mathbf{x})

General Gaussian Detection

  • Detection of a signal which is composed of a deterministic component and a random component
    H0:x=w,H1:x=s+wwN(0,Cw),sN(μs,Cs):deterministic component becomes the mean.\mathcal{H}_0 : \mathbf{x} = \mathbf{w}, \quad \mathcal{H}_1 : \mathbf{x} = \mathbf{s} + \mathbf{w} \\[0.2cm] \mathbf{w} \sim \mathcal{N}(\mathbf{0}, \mathbf{C}_w), \quad \mathbf{s} \sim \mathcal{N}(\boldsymbol{\mu}_s, \mathbf{C}_s) : \text{deterministic component becomes the mean.}
  • Decide H1\mathcal{H}_1 if
    p(xH1)p(xH0)=1(2π)N/2det(Cs+Cw)exp(12(xμs)T(Cs+Cw)1(xμs))1(2π)N/2det(Cw)exp(12xTCw1x)>γT(x)=xTCw1x(xμs)T(Cs+Cw)1(xμs)=xTCw1xxT(Cs+Cw)1x+2xT(Cs+Cw)1μsμsT(Cs+Cw)1μs\frac{p(\mathbf{x}|\mathcal{H}_1)}{p(\mathbf{x}|\mathcal{H}_0)} = \frac{ \frac{1}{(2\pi)^{N/2} \sqrt{\det(\mathbf{C}_s + \mathbf{C}_w)}} \exp\left(-\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu}_s)^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} (\mathbf{x} - \boldsymbol{\mu}_s) \right) }{ \frac{1}{(2\pi)^{N/2} \sqrt{\det(\mathbf{C}_w)}} \exp\left(-\frac{1}{2} \mathbf{x}^T \mathbf{C}_w^{-1} \mathbf{x} \right) } > \gamma \\[0.2cm] T(\mathbf{x}) = \mathbf{x}^T \mathbf{C}_w^{-1} \mathbf{x} - (\mathbf{x} - \boldsymbol{\mu}_s)^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} (\mathbf{x} - \boldsymbol{\mu}_s) \\[0.2cm] = \mathbf{x}^T \mathbf{C}_w^{-1} \mathbf{x} - \mathbf{x}^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} \mathbf{x} + 2 \mathbf{x}^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} \boldsymbol{\mu}_s - \boldsymbol{\mu}_s^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} \boldsymbol{\mu}_s
  • By matrix inversion lemma
    Cw1(Cs+Cw)1=Cw1Cs(Cs+Cw)1,T(x)=xT(Cs+Cw)1μs+12xTCw1Cs(Cs+Cw)1x.\mathbf{C}_w^{-1} - (\mathbf{C}_s + \mathbf{C}_w)^{-1} = \mathbf{C}_w^{-1} \mathbf{C}_s (\mathbf{C}_s + \mathbf{C}_w)^{-1}, \\[0.2cm] T'(\mathbf{x}) = \mathbf{x}^T (\mathbf{C}_s + \mathbf{C}_w)^{-1} \boldsymbol{\mu}_s + \frac{1}{2} \mathbf{x}^T \mathbf{C}_w^{-1} \mathbf{C}_s (\mathbf{C}_s + \mathbf{C}_w)^{-1} \mathbf{x}.
  • As special cases,
    • If Cs=0C_s=0 or deterministic signal with s=μss=\mu_s
      T(x)=xTCw1μsT'(\text{x})=\text{x}^TC^{-1}_{\text{w}}\mu_s
    • If μs=0\mu_s=0 or a random signal with sN(0,Cs)s\sim\mathcal{N}(0,C_s)
      T(x)=12xTCw1Cs(Cs+Cw)1x=12xTCw1s^T'(\text{x})=\frac{1}{2}\text{x}^TC^{-1}_\text{w}C_s(C_s+C_\text{w})^{-1}\text{x}=\frac{1}{2}\text{x}^TC^{-1}_\text{w}\hat s
      where s^=Cs(Cs+Cw)1x\hat s=C_s(C_s+C_\text{w})^{-1}\text{x} is the MMSE estimator of ss

All Content has been written based on lecture of Prof. eui-seok.Hwang in GIST(Detection and Estimation)

profile
AI, Security

0개의 댓글