Salta al contenuto
Note per Studenti Power Spectral Density and LTI Filtering Report

Power Spectral Density and LTI Filtering

In questa pagina 5

Setting: weakly stationary processes, see Weakly Stationary Processesa second order process is weakly stationary when its mean is constant and its autocorrelation depends only on the time difference; this note gives the equivalent conditions, consequences, symmetry of the autocorrelation, an example and the Toeplitz structure of covariance matrices.Weakly Stationary Processes →. The definitions come first; the physical interpretation of the PSD follows.

Definition of the PSD

Discrete time. If (Xn)n∈Z(X_n)_{n\in\mathbb Z} is a weakly stationary discrete SP, define RX(f)≜∑k=−∞+∞rX(k) e−j2πfkthe PSD of (Xn).R_X(f)\triangleq\sum_{k=-\infty}^{+\infty}r_X(k)\,e^{-j2\pi fk}\qquad\text{the PSD of }(X_n). Note that RX(f)=FD(rX(k))R_X(f)=\mathcal F_D\big(r_X(k)\big), the discrete time Fourier transform, where f∈[−12,12]f\in[-\frac12,\frac12]. Since rX(k)r_X(k) is real and even, also RX(f)R_X(f) is real and even (and periodic in ff of period 11).

Continuous time. If (Xt)t∈R(X_t)_{t\in\mathbb R} is a weakly stationary continuous SP, define RX(f)=∫−∞+∞rX(τ) e−j2πfτ dτthe PSD of (Xt).R_X(f)=\int_{-\infty}^{+\infty}r_X(\tau)\,e^{-j2\pi f\tau}\,d\tau\qquad\text{the PSD of }(X_t). Note that RX(f)=F(rX(τ))R_X(f)=\mathcal F\big(r_X(\tau)\big) is the (usual) Fourier transform of rX(τ)r_X(\tau). Since rX(τ)r_X(\tau) is real and even, also RX(f)R_X(f) is real and even. In continuous time RX(f)R_X(f) is not periodic (in general) and f∈Rf\in\mathbb R.

Inversion formulas. Under some regularity assumptions (e.g. Dirichlet conditions for pointwise convergence, see Signals and Systems) the inversion formulas hold and one can write rX(k)=∫−1/21/2RX(f) ej2πfk df(discrete case),rX(τ)=∫−∞+∞RX(f) ej2πfτ df(continuous case).r_X(k)=\int_{-1/2}^{1/2}R_X(f)\,e^{j2\pi fk}\,df\quad\text{(discrete case)},\qquad r_X(\tau)=\int_{-\infty}^{+\infty}R_X(f)\,e^{j2\pi f\tau}\,df\quad\text{(continuous case)}.

Remark. At zero lag: rX(0)=∫−∞+∞RX(f) df=E(Xt2) (continuous),rX(0)=∫−1/21/2RX(f) df=E(Xn2) (discrete).r_X(0)=\int_{-\infty}^{+\infty}R_X(f)\,df=E(X_t^2)\ \text{(continuous)},\qquad r_X(0)=\int_{-1/2}^{1/2}R_X(f)\,df=E(X_n^2)\ \text{(discrete)}.

Examples

  1. WGN. (Xn)∼WGN(σ2)⇒rX(k)=σ2δ(k)(X_n)\sim\mathrm{WGN}(\sigma^2)\Rightarrow r_X(k)=\sigma^2\delta(k), therefore RX(f)=∑krX(k)e−j2πfk=σ2.R_X(f)=\sum_kr_X(k)e^{-j2\pi fk}=\sigma^2 . The PSD is flat (constant σ2\sigma^2 on [−12,12][-\frac12,\frac12]), which is why the noise is called "white".

  2. MA(1). For this process (see Basic Discrete-Time Processesfour standard discrete time second order processes built from white Gaussian noise (white noise itself, the Gaussian random walk, the moving average MA(1) and the autoregressive AR(1)) with their mean, autocorrelation and stationarity, followed by the effect of LTI filtering.Basic Discrete-Time Processes →) rX(k)=σ2(1+b2)δ(k)+σ2b δ(k−1)+σ2b δ(k+1)r_X(k)=\sigma^2(1+b^2)\delta(k)+\sigma^2b\,\delta(k-1)+\sigma^2b\,\delta(k+1), therefore RX(f)=∑krX(k)e−j2πfk=σ2(1+b2)+σ2b e−j2πf+σ2b ej2πf=σ2(1+b2)+2σ2bcos⁡2πf.R_X(f)=\sum_kr_X(k)e^{-j2\pi fk}=\sigma^2(1+b^2)+\sigma^2b\,e^{-j2\pi f}+\sigma^2b\,e^{j2\pi f}=\sigma^2(1+b^2)+2\sigma^2b\cos2\pi f . (The sketch shows a bump over [−12,12][-\frac12,\frac12] with maximum σ2(1+b)2\sigma^2(1+b)^2 at f=0f=0, for b>0b>0.)

  3. Random-amplitude sinusoid. Xt=Acos⁡2πf0t+Bsin⁡2πf0tX_t=A\cos2\pi f_0t+B\sin2\pi f_0t with rX(τ)=σ2cos⁡(2πf0τ)r_X(\tau)=\sigma^2\cos(2\pi f_0\tau) (as in Weakly Stationary Processesa second order process is weakly stationary when its mean is constant and its autocorrelation depends only on the time difference; this note gives the equivalent conditions, consequences, symmetry of the autocorrelation, an example and the Toeplitz structure of covariance matrices.Weakly Stationary Processes →, with given frequency f0f_0). The PSD is RX(f)=F(σ2cos⁡2πf0τ)=σ2(δ(f−f0)+δ(f+f0)),R_X(f)=\mathcal F\big(\sigma^2\cos2\pi f_0\tau\big)=\sigma^2\big(\delta(f-f_0)+\delta(f+f_0)\big), two Dirac deltas at ±f0\pm f_0 (sketch: two arrows).

Interpretation of the PSD, part 1

Define the process restricted to [−N,N][-N,N]: XnN≜Xn 1[−N,N](n),X_n^N\triangleq X_n\,\mathbb 1_{[-N,N]}(n), and let X^N(f)≜FD(XnN)=∑k=−NNXkN e−j2πfk.\widehat X^N(f)\triangleq\mathcal F_D\big(X_n^N\big)=\sum_{k=-N}^{N}X_k^N\,e^{-j2\pi fk}. X^N(f)\widehat X^N(f) is the discrete time Fourier transform of the [−N,N][-N,N] chunk of the SP trajectory.

Theorem. If (Xn)(X_n) is weakly stationary and if rX(k)∈ℓ1r_X(k)\in\ell^1 (i.e. ∑k∣rX(k)∣<∞\sum_k|r_X(k)|<\infty), then lim⁡N→∞12N+1E(∣X^N(f)∣2)=RX(f),RX(f)=∑k=−∞+∞rX(k)e−j2πfk.\lim_{N\to\infty}\frac1{2N+1}E\big(|\widehat X^N(f)|^2\big)=R_X(f),\qquad R_X(f)=\sum_{k=-\infty}^{+\infty}r_X(k)e^{-j2\pi fk}. (Proof omitted in the lectures.)

Corollary. RX(f)≥0R_X(f)\ge0 for all f∈[−12,12]f\in[-\frac12,\frac12].

Remark. The theorem and corollary are valid also in continuous time, but are more difficult to prove.

Filtered second order processes

We analyze the behavior of a SP through an LTI system, concentrating on the continuous time case to fix ideas. Let (Xt)(X_t) be a second order SP and h(t)h(t) the impulse response of an LTI system with (Xt)(X_t) at its input. The output process is Yt=∫−∞+∞h(t−τ)Xτ dτ.Y_t=\int_{-\infty}^{+\infty}h(t-\tau)X_\tau\,d\tau .

Lemma. YtY_t is a second order SP with

  1. mY(t)=h(t)∗mX(t)m_Y(t)=h(t)*m_X(t), and
  2. rY(t+τ,t)=∬h(s)h(σ) rX(t+τ−s, t−σ) ds dσr_Y(t+\tau,t)=\iint h(s)h(\sigma)\,r_X(t+\tau-s,\,t-\sigma)\,ds\,d\sigma.

Proof.

  1. mY(t)=E(Yt)=E(∫h(t−τ)Xτdτ)=∫h(t−τ)mX(τ)dτ=h∗mX(t)m_Y(t)=E(Y_t)=E\Big(\int h(t-\tau)X_\tau d\tau\Big)=\int h(t-\tau)m_X(\tau)d\tau=h*m_X(t).
  2. rY(t+τ,t)=E([∫h(s)Xt+τ−sds][∫h(σ)Xt−σdσ])=∬h(s)h(σ)E(Xt+τ−sXt−σ) ds dσ=∬h(s)h(σ) rX(t+τ−s,t−σ) ds dσ. □r_Y(t+\tau,t)=E\Big(\Big[\int h(s)X_{t+\tau-s}ds\Big]\Big[\int h(\sigma)X_{t-\sigma}d\sigma\Big]\Big)=\iint h(s)h(\sigma)E(X_{t+\tau-s}X_{t-\sigma})\,ds\,d\sigma=\iint h(s)h(\sigma)\,r_X(t+\tau-s,t-\sigma)\,ds\,d\sigma.\ \square

Special case: weakly stationary input. If (Xt)(X_t) is weakly stationary then (Yt)(Y_t) is weakly stationary too. Moreover:

  • mY(t)=H(0) mXm_Y(t)=H(0)\,m_X, where H(0)=F(h(t))∣f=0H(0)=\mathcal F(h(t))\big|_{f=0};
  • rY(t+τ,t)=rY(τ)=h(τ)∗h(−τ)∗rX(τ)r_Y(t+\tau,t)=r_Y(\tau)=h(\tau)*h(-\tau)*r_X(\tau);
  • RY(f)=∣H(f)∣2RX(f)R_Y(f)=|H(f)|^2R_X(f).

Proof.

  • Mean: mY(t)=h(t)∗mX(t)=h(t)∗mX=∫−∞+∞h(τ)mX dτ=mX∫−∞+∞h(τ)dτ=H(0) mXm_Y(t)=h(t)*m_X(t)=h(t)*m_X=\int_{-\infty}^{+\infty}h(\tau)m_X\,d\tau=m_X\int_{-\infty}^{+\infty}h(\tau)d\tau=H(0)\,m_X.
  • Autocorrelation: using rX(t+τ−s,t−σ)=rX(τ+σ−s)r_X(t+\tau-s,t-\sigma)=r_X(\tau+\sigma-s), rY(t+τ,t)=∬h(s)h(σ) rX(τ+σ−s) ds dσ.r_Y(t+\tau,t)=\iint h(s)h(\sigma)\,r_X(\tau+\sigma-s)\,ds\,d\sigma . Change of variable s−σ=s′s-\sigma=s': =∬h(s′+σ)h(σ) rX(τ−s′) ds′ dσ=∫[∫h(s′+σ)h(σ)dσ⏟:=c(s′)]rX(τ−s′) ds′=∫c(s′)rX(τ−s′)ds′=c(τ)∗rX(τ),=\iint h(s'+\sigma)h(\sigma)\,r_X(\tau-s')\,ds'\,d\sigma=\int\Big[\underbrace{\int h(s'+\sigma)h(\sigma)d\sigma}_{:=c(s')}\Big]r_X(\tau-s')\,ds'=\int c(s')r_X(\tau-s')ds'=c(\tau)*r_X(\tau), which does not depend on tt. Here c(t)≜∫h(t+σ)h(σ)dσ=h(t)∗h(−t)c(t)\triangleq\int h(t+\sigma)h(\sigma)d\sigma=h(t)*h(-t) (the notes say to convince yourself of this identity). Therefore rY(t+τ,t)=rY(τ)=c(τ)∗rX(τ)=h(τ)∗h(−τ)∗rX(τ)r_Y(t+\tau,t)=r_Y(\tau)=c(\tau)*r_X(\tau)=h(\tau)*h(-\tau)*r_X(\tau).
  • PSD: recalling that F(h(−τ))=H(−f)\mathcal F\big(h(-\tau)\big)=H(-f), RY(f)=H(f)⋅H(−f)⋅RX(f)=∣H(f)∣2RX(f). □R_Y(f)=H(f)\cdot H(-f)\cdot R_X(f)=|H(f)|^2R_X(f).\ \square (For a real impulse response H(−f)=H(f)‾H(-f)=\overline{H(f)}, hence H(f)H(−f)=∣H(f)∣2H(f)H(-f)=|H(f)|^2.)

Interpretation of the PSD, part 2

Let XtX_t be a current flowing through a resistor R=1 ΩR=1\,\Omega. The instantaneous power is power(t)=tension(t)⋅current(t)=R Xt⋅Xt=Xt2,\text{power}(t)=\text{tension}(t)\cdot\text{current}(t)=R\,X_t\cdot X_t=X_t^2 , so the instantaneous power dissipated on RR is Xt2X_t^2, and E(Xt2)E(X_t^2) is the average (expected value) of the instantaneous power: E(Xt2)=rX(0)=∫−∞+∞RX(f) df.E(X_t^2)=r_X(0)=\int_{-\infty}^{+\infty}R_X(f)\,df .

What is the contribution to the instantaneous average power coming from the different frequencies present in XtX_t? Pass XtX_t through an (ideal) band-pass filter centered at f0f_0, with Δ\Delta the width of the band: H(f)=rect⁡ ⁣(f−f0Δ)+rect⁡ ⁣(f+f0Δ)H(f)=\operatorname{rect}\!\left(\frac{f-f_0}{\Delta}\right)+\operatorname{rect}\!\left(\frac{f+f_0}{\Delta}\right) (two unit-height bands, one around +f0+f_0 and one around −f0-f_0). Then RY(f)=∣H(f)∣2RX(f)=H(f)RX(f)R_Y(f)=|H(f)|^2R_X(f)=H(f)R_X(f) (because H(f)H(f) only takes the values 00 and 11), and E(Yt2)=rY(0)=∫RY(f) df≈RX(f0)⋅2Δ.E(Y_t^2)=r_Y(0)=\int R_Y(f)\,df\approx R_X(f_0)\cdot2\Delta . Therefore RX(f0)=lim⁡Δ→0E(Yt2)2Δ,R_X(f_0)=\lim_{\Delta\to0}\frac{E(Y_t^2)}{2\Delta}, that is, RX(f0)R_X(f_0) is the average power per unit bandwidth coming from the components with frequency around f0f_0.

Versione ripasso

PSD. For a weakly stationary SP:

  • discrete: RX(f)=∑krX(k)e−j2πfkR_X(f)=\sum_kr_X(k)e^{-j2\pi fk}, f∈[−12,12]f\in[-\frac12,\frac12], periodic of period 11;
  • continuous: RX(f)=∫rX(τ)e−j2πfτdτR_X(f)=\int r_X(\tau)e^{-j2\pi f\tau}d\tau, f∈Rf\in\mathbb R.

RXR_X is real and even (because rXr_X is). Inversion (under regularity, e.g. Dirichlet): rX(k)=∫−1/21/2RX(f)ej2πfkdfr_X(k)=\int_{-1/2}^{1/2}R_X(f)e^{j2\pi fk}df, rX(τ)=∫RX(f)ej2πfτdfr_X(\tau)=\int R_X(f)e^{j2\pi f\tau}df. In particular rX(0)=E(X2)=∫RX(f)dfr_X(0)=E(X^2)=\int R_X(f)df.

Examples. WGN(σ2)(\sigma^2): RX=σ2R_X=\sigma^2. MA(1): RX=σ2(1+b2)+2σ2bcos⁡2πfR_X=\sigma^2(1+b^2)+2\sigma^2b\cos2\pi f. Xt=Acos⁡2πf0t+Bsin⁡2πf0tX_t=A\cos2\pi f_0t+B\sin2\pi f_0t: RX=σ2(δ(f−f0)+δ(f+f0))R_X=\sigma^2(\delta(f-f_0)+\delta(f+f_0)).

Theorem. If rX∈ℓ1r_X\in\ell^1: lim⁡N→∞12N+1E∣X^N(f)∣2=RX(f)\lim_{N\to\infty}\frac1{2N+1}E|\widehat X^N(f)|^2=R_X(f), where X^N\widehat X^N is the DTFT of the chunk [−N,N][-N,N]. Corollary: RX(f)≥0R_X(f)\ge0. Also true in continuous time.

Filtering (Yt=∫h(t−τ)XτdτY_t=\int h(t-\tau)X_\tau d\tau).

  • General second order input: mY=h∗mXm_Y=h*m_X, rY(t+τ,t)=∬h(s)h(σ)rX(t+τ−s,t−σ)dsdσr_Y(t+\tau,t)=\iint h(s)h(\sigma)r_X(t+\tau-s,t-\sigma)dsd\sigma.
  • Weakly stationary input ⇒\Rightarrow YY weakly stationary, with mY=H(0)mX,rY(τ)=h(τ)∗h(−τ)∗rX(τ),RY(f)=∣H(f)∣2RX(f).m_Y=H(0)m_X,\qquad r_Y(\tau)=h(\tau)*h(-\tau)*r_X(\tau),\qquad R_Y(f)=|H(f)|^2R_X(f). (Proof: change of variable s−σ=s′s-\sigma=s', c(t)=h(t)∗h(−t)c(t)=h(t)*h(-t), F(h(−τ))=H(−f)\mathcal F(h(-\tau))=H(-f).)

Physical meaning. With R=1 ΩR=1\,\Omega, Xt2X_t^2 is the instantaneous power and E(Xt2)=∫RX(f)dfE(X_t^2)=\int R_X(f)df. Ideal band-pass of width Δ\Delta around ±f0\pm f_0: E(Yt2)≈2ΔRX(f0)E(Y_t^2)\approx2\Delta R_X(f_0), so RX(f0)=lim⁡Δ→0E(Yt2)2ΔR_X(f_0)=\lim_{\Delta\to0}\frac{E(Y_t^2)}{2\Delta} is power per unit bandwidth around f0f_0.

Typical mistakes. Using H(f)H(f) instead of ∣H(f)∣2|H(f)|^2 for the PSD (the phase of HH does not matter); forgetting H(0)H(0) in the mean; computing rYr_Y by convolving only once; restricting ff to [−12,12][-\frac12,\frac12] in continuous time or to all of R\mathbb R in discrete time.

Teoria collegata