DSPRelated.com
Forums

Adding Correlated Variables: What Happens the Spectrum?

Started by porterboy August 17, 2004
Suppose I have a stationary, non-white, zero-mean, Gaussian sequence
u(n) with power spectral density Su(w). If I now construct a sequence
v(n) = u(n)+u(n-1) what will be its psd Sv(w)? If u(n) was white you
would get Sv(w) = 2Su(w). However because u(n) is not white, it may be
that u(n) and u(n-1) are correlated. This non-independence manifests
itself in the cross-covariance Cov(u(n),u(n-1)) = Cov(u(n)) +
Cov(u(n-1)) -  2Cov(u(n)u(n-1)) which I found an earlier post on this
topic. However, I am interested in what happens the spectrum?
porterboy76@yahoo.com (porterboy) writes:

> Suppose I have a stationary, non-white, zero-mean, Gaussian sequence > u(n) with power spectral density Su(w). If I now construct a sequence > v(n) = u(n)+u(n-1) what will be its psd Sv(w)? If u(n) was white you > would get Sv(w) = 2Su(w). However because u(n) is not white, it may be > that u(n) and u(n-1) are correlated. This non-independence manifests > itself in the cross-covariance Cov(u(n),u(n-1)) = Cov(u(n)) + > Cov(u(n-1)) - 2Cov(u(n)u(n-1)) which I found an earlier post on this > topic. However, I am interested in what happens the spectrum?
Sv(w) = Su(w) * |H(w)|^2, where H(w) is the filter's frequency response, or in the case of a digital filter, H(w) = H(z), z=e^(jw/Fs). Note that the distribution does not affect the power spectrum. -- % Randy Yates % "Maybe one day I'll feel her cold embrace, %% Fuquay-Varina, NC % and kiss her interface, %%% 919-577-9882 % til then, I'll leave her alone." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
OK, I had another look at this. 

Sv(w) = (1/N)sum Rv(k) exp(-jwk) where Rv(k) is the autocorrelation of
v.

Now,
Rv(k) = E[(u(n)+u(n+1))(u(n+k)+u(n+1+k)]
      = E[u(n)u(n+k)]
        + E[u(n+1)u(n+1+k)]
        + E[u(n)u(n+1+k)]
        + E[u(n+1)u(n+k)]
      = 2Rv(k) + Rv(k+1) + Rv(k-1) by stationarity

Therefore

Sv(k) = 2Su(w) + Su(w)exp(jw) + Su(w)exp(-jw) by the shift theorem
      = 4Su(w)cos^2(w/2)

---------oOo------------

I'd be interested in getting a more general result than this where,
for example the coloured sequence v(n) is defined by filtering white
noise with a more general filter than  g = [1 1] (which is what is
used above). I'll have a crack at it and post it if I get anywhere.
"porterboy" <porterboy76@yahoo.com> wrote in message
news:c4b57fd0.0408170605.790fa821@posting.google.com...

> <<<<<Much material snipped>>>>>
> I'd be interested in getting a more general result than this where, > for example the coloured sequence v(n) is defined by filtering white > noise with a more general filter than g = [1 1] (which is what is > used above). I'll have a crack at it and post it if I get anywhere.
That's a welcome change from posting questions as you walk out the door in the evening, confidently expecting the Americans to have posted the answer by next morning. We all hope that you will have posted the answer by the time we come in to work tomorrow morning... :-) :-)
porterboy76@yahoo.com (porterboy) wrote in message news:<c4b57fd0.0408170056.7459f994@posting.google.com>...
> Suppose I have a stationary, non-white, zero-mean, Gaussian sequence > u(n) with power spectral density Su(w). If I now construct a sequence > v(n) = u(n)+u(n-1) what will be its psd Sv(w)?
Randy answered that.
> If u(n) was white you > would get Sv(w) = 2Su(w).
Eh, how? ----------------------------------------- Some definitions to ease writing: u0(n) = u(n) u1(n) = u(n-1) Um(w) = FT{um(n)}, m = 0,1 where FT{x} is the Fourier Transform of x Upq(w) = Up(w)*conj(Uq(w)), p,q = 0,1 ----------------------------------------- I get U0(w) = U1(w) = D(w), where D(w) is Dirac's Delta function. However, U01(w)= exp(j\phi)D(w) for some phase shift \phi that is related to w and the delay n; I guess \phi = 2pi/N where N is the number of elements in the spectrum. So what we end up with is that Sv(w) =/= 2Su(w).
> However because u(n) is not white, it may be > that u(n) and u(n-1) are correlated.
They certainly are, no matter whether u(n) is white or not: r01(k) = E[u(n)u(n-1+k)] r00(k) = E[u(n)u(n+k)] By change of variables one sees that r01(k) = r00(k+1). More specifically, since u is white, r01(k) = D(k-1). Which, of course, makes perfect sense: The original time series should be perfectly correlated with a delayed version with itself, at the time lag corresponding to the delay offset.
> This non-independence manifests > itself in the cross-covariance Cov(u(n),u(n-1)) = Cov(u(n)) + > Cov(u(n-1)) - 2Cov(u(n)u(n-1)) which I found an earlier post on this > topic. However, I am interested in what happens the spectrum?
Just find the correct expressions (don't take for granted that my sketches above are correct in every detail!) and squeeze them through the FT. Rune
"Dilip V. Sarwate" <sarwate@YouEyeYouSee.edu> wrote in message news:<cftd30$sui$1@news.ks.uiuc.edu>...
> "porterboy" <porterboy76@yahoo.com> wrote in message > news:c4b57fd0.0408170605.790fa821@posting.google.com... > > > <<<<<Much material snipped>>>>> > > > I'd be interested in getting a more general result than this where, > > for example the coloured sequence v(n) is defined by filtering white > > noise with a more general filter than g = [1 1] (which is what is > > used above). I'll have a crack at it and post it if I get anywhere. > > That's a welcome change from posting questions as you walk out > the door in the evening, confidently expecting the Americans to > have posted the answer by next morning.
That's what makes USENET so useful, isn't it, "get the job done while you sleep"... ;) Rune
> That's a welcome change from posting questions as you walk out > the door in the evening, confidently expecting the Americans to > have posted the answer by next morning. We all hope that you > will have posted the answer by the time we come in to work > tomorrow morning... :-) :-)
ROTFL!!! yes its true, I can be a real lazy bastard. Well, actually the answer is obvious, and was posted by Jerry. I was thinking of a downsampled signal which is why the answer didn't seem obvious initially.
porterboy76@yahoo.com (porterboy) wrote in message news:<c4b57fd0.0408170056.7459f994@posting.google.com>...
> Suppose I have a stationary, non-white, zero-mean, Gaussian sequence > u(n) with power spectral density Su(w). If I now construct a sequence > v(n) = u(n)+u(n-1) what will be its psd Sv(w)? If u(n) was white you > would get Sv(w) = 2Su(w). However because u(n) is not white, it may be > that u(n) and u(n-1) are correlated. This non-independence manifests > itself in the cross-covariance Cov(u(n),u(n-1)) = Cov(u(n)) + > Cov(u(n-1)) - 2Cov(u(n)u(n-1)) which I found an earlier post on this > topic. However, I am interested in what happens the spectrum?
just a quick suggestion: your process is zero-mean, so I am gonna use the correlation from now instead of the covariance. You know the spectrum of the original process, so you know its autocorrelation Ruu. All you now need is the correlation Ruu_1 of u(n)*u(n-1) in terms of the known autocorrelation Ruu. In the end, the unknown expression in our calculation swill be I=int(u(n)*u(n-1+t)dn, n=-infinity..infinity) where we assume that u(n) is real (and get rid of the conjugates) I=int(u(n)*u(n+x)dn, n=-infinity..infinity)=Ruu(x)=Ruu(t-1) (sorry I am messing around with n and t..). We also know that FT[Ruu(t)]=Su(w) (the known spectrum of the process). How about FT[I]=int(Ruu(t-1)exp(-iwt)dt, t=-infinity..infinity)=int(Ruu(t-1)exp(-iw(t-1))exp(-iw)d(t-1))=exp(-iw)*S(w)? I know something is wrong because we end up with a complex spectrum. But, although my maths are not reliable I believe on general this is the approach. A comment. For the spectrum to be real, the autocorrelation function has to be an even function, so apparently I did something wrong in that calculation there. A second comment is about the stationarity of the new process. The notion of the spectrum makes sense only for stationary processes (otherwise you are talking about expecation values in the spectrum). Is the process u(n)+u(n-1) stationary? Apparently I am a bit confused...
Thanks for your input Rune...

> I get > > U0(w) = U1(w) = D(w), where D(w) is Dirac's Delta function.
I guess I was unclear. When I said u(n) is white, I meant it was spectrally white and not temporally white. In that case U0(w) = No/2 not D(w). All this spectral stuff is giving me a headache, not least because Matlab have obsoleted psd.m and are now using pwelch.m (this happened ages ago, but I haven't been on the new version very long), and now my scale factors are all wrong <end whinge :>. As Jerry said Sv(w) = Su(w)|F(e^jw)|^2 which is what I wanted of course. The reason I got confused was that I was considering the following system: ______ u(n) -| f(n) |--(d2)-- v(n) `------' where d2 is a downsampler by 2. In that case Sv(w) is not equal to Su(w)|F|^2. I know that V(z) = 0.5[ U.F(z^0.5) + U.F(-z^0.5) ] and I was trying to work out Sv(w). So far I have Sv(w) = 0.25[ Su(w/2)|F(w/2)|^2 + Su(pi+w/2)|F(pi+w/2)|^2 + E[U.F(w/2).U*.F*(pi+w/2)] + E[U*F*(w/2).U.F(pi+w/2)]] But I dont know how to deal with the last two terms... YET!
porterboy wrote:

>>That's a welcome change from posting questions as you walk out >>the door in the evening, confidently expecting the Americans to >>have posted the answer by next morning. We all hope that you >>will have posted the answer by the time we come in to work >>tomorrow morning... :-) :-) > > > ROTFL!!! yes its true, I can be a real lazy bastard. Well, actually > the answer is obvious, and was posted by Jerry. I was thinking of a > downsampled signal which is why the answer didn't seem obvious > initially.
No credit where not due. This is my only message so far in this thread. Jerry -- ... the worst possible design that just meets the specification - almost a definition of practical engineering. .. Chris Bore &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;