CT Correlation (2B) 8/5/4
Copyright (c) 2-24 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using OpenOffice and Octave. 8/5/4
Correlation How signals move relative to each other Positively correlated the same direction Average of product > product of averages Negatively correlated the opposite direction Average of product < product of averages Uncorrelated CT Correlation (2B) 3 8/5/4
CrossCorrelation for Power Signals Energy Signal R xy (τ) = = x(t) y (t+ τ) d t x (t τ) y (t) d t Power Signal R xy ( τ) = lim T = lim T T T T T x(t) y (t+ τ) d t x(t τ) y (t) d t Energy Signal R xy (τ) = = real x(t), y(t) x(t) y(t+ τ) d t x (t τ) y(t) d t Power Signal R xy (τ) = lim T = lim T real x(t), y(t) T T T T x(t) y(t+ τ) d t x(t τ) y(t ) d t Periodic Power Signal R xy (τ) = T T x(t ) y(t+ τ) d t CT Correlation (2B) 4 8/5/4
Correlation and Convolution real x(t), y(t) Correlation R xy (τ) = x(t) y(t+ τ) d t = x(t τ) y (t) d t Convolution x(t ) y(t) = x(t τ) y(τ) d τ R xy (τ) = x( τ) y(τ) x( t) X ( f ) R xy (τ) X ( f )Y ( f ) CT Correlation (2B) 5 8/5/4
Correlation for Periodic Power Signals R xy (τ) = T T x(t ) y(t+ τ) d t Periodic Power Signal R xy (τ) = T [ x( τ) y(τ)] Circular Convolution CTFS x(t ) y(t ) T X [ k ]Y [k ] CTFS R xy (τ) X [k ]Y [k ] CTFS x[n] y [n] N Y [ k ] X [k ] R xy (τ) = x(t) y(t+ τ) d t R xy (τ) = T T x(t ) y(t+ τ) d t CT Correlation (2B) 6 8/5/4
Correlation for Power & Energy Signals One signal a power signal The other an energy signal Use the Energy Signal Version R xy (τ) = x(t) y(t+ τ) d t CT Correlation (2B) 7 8/5/4
Autocorrelation Energy Signal R xx (τ) = total signal energy R xx () = x(t) x(t+ τ) d t x 2 (t) d t Power Signal R xx (τ) = lim T T T average signal power + R xx () = lim T T x 2 (t ) d t x(t ) x(t+ τ) d t R xx () R xx ( τ) max at zero shift R xx () R xx ( τ) R xx ( τ) = R xx (+ τ) = x(t) x (t τ) d t s = t τ R xx ( τ) = lim T x( s+ τ) x(s) d s d s = d t R xx (+ τ) = lim T T T T T x (t) x(t τ) d t x(s+ τ) x(s) d s R yy ( τ) = R xx ( τ) = x(t t ) x(t t + τ) d t x(s) x(s+ τ) d s y(t) = x(t t ) R yy ( τ) = lim T T R xx ( τ) = lim T T x(t t ) x(t t + τ) d t x(s) x(s+ τ) d s CT Correlation (2B) 8 8/5/4
AutoCorrelation for Power Signals Positively correlated R xx ( τ) = 2π 2 π sin(t)sin(t+ τ) d t Positively correlated.8.8.6.6.4.4.2.2 -.2 -.2 -.4 -.4.5 -.6 -.6.4 -.8.3 -.8 - - -5 5 x.8 (sin(t)/4-(sin(t)-4*%pi*cos(t))/4)/(2*%pi).2. -. -.2 - - -5 5 x.8.6.6 -.3.4.4 -.4.2.2 -.5 - -5 5 t -.2 -.2 -.4 -.4 -.6 -.6 -.8 -.8 - - - -5 5 - -5 5 x x Uncorrelated Negatively correlated CT Correlation (2B) 9 8/5/4
Autocorrelation of Sinusoids x(t ) = A cos(ω t + θ ) + A 2 cos(ω 2 t + θ 2 ) = x (t) + x 2 (t) x(t) x(t+ τ) = {A cos(ω t + θ ) + A 2 cos(ω 2 t + θ 2 )} {A cos(ω (t+ τ) + θ ) + A 2 cos(ω 2 (t+ τ) + θ 2 )} = A cos(ω t + θ ) A cos(ω (t+ τ) + θ ) + A 2 cos(ω 2 t + θ 2 ) A 2 cos(ω 2 (t+ τ) + θ 2 ) + A cos(ω t + θ ) A 2 cos(ω 2 (t+ τ) + θ 2 ) + A 2 cos(ω 2 t + θ 2 ) A cos(ω (t+ τ) + θ ) T A cos(ω t + θ ) A 2 cos(ω 2 (t+ τ) + θ 2 )d t = T A 2 cos(ω 2 t + θ 2 ) A cos(ω (t+ τ) + θ )d t = R x ( τ) = R x (τ) + R x2 ( τ) x k (t) = A k cos(2 π f k t + θ k ) CT Correlation (2B) 8/5/4
Autocorrelation of Random Signals N x(t ) = k= N R x (τ) = k= A k cos(ω k t + θ k ) R k (τ) autocorrelation of a k cos(ω k t + θ k ) independent of choice of θ k random phase shift the same amplitudes the same frequencies θ k a ω x k (t) different look R k (τ) similar look the amplitudes a the frequencies ω can be observed in the autocorrelation R k (τ) similar look but not exactly the same describes a signal generally, but not exactly suitable for a random signal CT Correlation (2B) 8/5/4
Autocorrelation Examples AWGN signal changes rapidly with time current value has no correlation with past or future values even at very short time period random fluctuation except large peak at τ = ASK signal : sinusoid multiplied with rectangular pulse regardless of sin or cos, the autocorrelation is always even function cos wave multiplied by a rhombus pulse CT Correlation (2B) 2 8/5/4
CrossCorrelation R xy (τ) = R xy ( τ) The largest peak occurs at a shift which is exactly the amount of shift Between x(t) and y(t) The signal power of the sum depends strongly on whether two signals are correlated Positively correlated vs. uncorrelated CT Correlation (2B) 3 8/5/4
Pearson's product-moment coefficient ρ XY = E [( X m x)(y m Y )] σ X σ Y regardless of slopes CT Correlation (2B) 4 8/5/4
Correlation Example Sum () x (t) = sin(ωt) x 2 (t) = sin(ωt+ π ) = cos(ωt ) 2 x 3 (t) = sin(ωt+ π ) 4 x 4 (t) = sin (ωt+ π) R 2 () = 2 π sin (ωt )cos(ωt) d t = 2 π R 3 () = 2 π sin (ωt )sin(ωt+ π/ 4) d t =.354 2 π R 4 () = 2π sin(ωt )sin (ωt+ π) d t =.5 2 π f (t) = x (t) + x 2 (t) = sin (ωt ) + sin(ωt+ π 2 ) (2 ω t+π /2) = 2sin( 2 )cos( π/ 4) = 2sin(ωt + π 4 )cos( π 4 ) =.77 2sin(ω t + π 4 ) sum of uncorrelated signals g(t ) = x (t) + x 3 (t ) = sin(ωt) + sin(ωt+ π 4 ) (2 ω t+π /4) = 2sin( 2 ) cos( π/8) = 2sin(ωt + π 8 )cos( π 8 ) =.924 2sin(ωt + π 4 ) sum of positively correlated signals The signal power of the sum depends strongly on whether two signals are correlated positively correlated vs. uncorrelated h(t ) = x (t) + x 4 (t) = sin (ωt ) + sin(ωt+ π) = sin(ωt) sin(ωt) = sum of negatively correlated signals CT Correlation (2B) 5 8/5/4
Correlation Example Sum (2) R 2 () = 2 π sin (ω t)cos(ω t ) d t = + R 3 () = sin (ω t)sin(ω t+ π/ 4) d t =.354 2 π 2π 2 π +.5.5 -.5 -.5.77 2 - - -5 5 x (t) + x 2 (t) 2.5.5 -.5 - -.5-2 x (t) + x 2 (t ) - -5 5 both signals increase or decrease - - -5 5 x (t) + x 3 (t) 2.5.5 -.5 - -.5-2 x (t) + x 3 (t) - -5 5.924 2 R 4 () = sin (ω t)sin(ω t+ π) d t =.5 2 π 2π.5 + +.5.4 autocorrealation R (τ) R 2 () = R ( π 2 ).3 -.5 - - -5 5 x (t) + x 4 (t) 2.5.5 -.5 - -.5-2 x (t) + x 4 (t) - -5 5 one increases, the other decreases (sin(t)/4-(sin(t)-4*%pi*cos(t))/4)/(2*%pi).2. -. -.2 -.3 -.4 -.5 - -5 5 t R 3 () = R ( π 4 ) R 4 () = R (π) CT Correlation (2B) 6 8/5/4
Correlation Example Product product of uncorrelated signals sin(%omega t).5 -.5 - sin(%omega t + %pi/2) - -5 5.5 -.5 - sin(%omega t) * sin(%omega t + %pi/2) - -5 5.5 -.5 - - -5 5 product of negatively correlated signals sin(%omega t).5 -.5 - sin(%omega t + %pi) - -5 5.5 -.5 - sin(%omega t) * sin(%omega t + %pi) - -5 5.5 -.5 - - -5 5 E[ x (t)] E[ x 2 (t)] E[ x (t) x 2 (t)] E[ x (t)] E[ x 4 (t )] E[ x (t) x 4 (t )] product of positively correlated signals sin(%omega t).5 -.5 - sin(%omega t + %pi/4) - -5 5.5 -.5 - sin(%omega t) * sin(%omega t + %pi/4) - -5 5.5 -.5 - - -5 5 Positively correlated the same direction Average of product > Product of averages Negatively correlated the opposite direction Average of product < Product of averages Uncorrelated Average of product Product of averages E[ x (t)] E[ x 3 (t)] E[ x (t) x 3 (t)] CT Correlation (2B) 7 8/5/4
Correlation Example Mean, Variance σ 2 = 2π sin 2 (ω t) d t =.5 m 2π = σ 2 2 = 2π sin 2 (ω t+ π 2 π 2 ) d t =.5 m =.5.5 E[ x (t)] E[ x 2 (t)] -.5 -.5 - - -5 5 sin 2 (t) - - -5 5 sin 2 (t+pi/2).5 E[ x 2 (t)].5 E[ x 22 (t)] -.5 -.5 - - -5 5 - - -5 5 σ 2 3 = 2 π sin 2 (ω t+ π 2 π 4 ) d t =.5 m = σ 2 3 4 = 2π sin 2 (ω t+ π) d t =.5 m 2 π 4 =.5 E[ x 3 (t)].5 E[ x 4 (t )] -.5 -.5 - - -5 5 sin 2 (t+pi/4) - - -5 5 sin 2 (t+pi).5 E[ x 32 (t)].5 E[ x 42 (t )] -.5 -.5 - - -5 5 - - -5 5 CT Correlation (2B) 8 8/5/4
Correlation Example Correlation Coefficients x (t) = sin(ωt) x 2 (t) = sin(ωt+ π 2 ) x 3(t) = sin(ωt+ π 4 ) x 4(t) = sin (ωt+ π) σ 2 = 2π 2π sin 2 (ω t) d t =.5 m = σ 2 2 = 2π 2π sin 2 (ω t+ π 2 ) d t =.5 m = σ 3 2 = 2π 2π sin 2 (ω t+ π 4 ) d t =.5 m 3 = σ 4 2 = 2 π 2π sin 2 (ω t+ π) d t =.5 m 4 =.5.5 sin(t+pi/2) sin(t+pi/4) sin(t+pi) x 3 (t ) R 2 () = sin (ω t)cos(ω t) d t = 2π 2π R 3 () = sin (ω t)sin(ω t+ π/ 4) d t =.354 2 π 2π R 4 () = sin (ω t)sin(ω t+ π) d t =.5 2 π 2π ρ XY = E [( X m x)(y m Y )] σ X σ Y ρ 2 = E [ x (t) x 2 (t)] = R 2() σ σ 2.5 = -.5 x 2 (t) ρ 3 = E [ x (t) x 3 (t)] = R 3() σ σ 3.5 =.77 - x 4 (t) -.5 -.5 - -.5.5.5 sin(t) x (t) ρ 4 = E [ x (t) x 4 (t)] = R 4() σ σ 4.5 = CT Correlation (2B) 9 8/5/4
Correlation Example Auto & Cross Correlation x (t) = sin(ωt) x 2 (t) = sin(ωt+ π ) 2 x 3 (t) = sin(ωt+ π ) 4 x 4 (t) = sin (ωt+ π) special case: sinusoidal signals x (t+ π 2 ω ) = sin(ω(t+ π 2 ω )) x (t+ π 4 ω ) = sin(ω(t+ π 4 ω )) x (t+ π ω ) = sin(ω(t+ π ω )) R 2 () = 2 π sin (ωt )cos (ωt) d t = 2 π R 3 () = 2 π sin (ωt )sin(ωt+ π/ 4) d t =.354 2 π R 4 () = 2π sin(ωt )sin (ωt+ π) d t =.5 2 π CrossCorrelation R ( π 2ω ) R ( π 4 ω ) R ( π ω ) AutoCorrelation CT Correlation (2B) 2 8/5/4
Random Signal Random Signal No exact description of the signal But we can estimate Autocorrelation Energy spectral densities (ESD) Power spectral densities PSD) Total Energy Average Power E x = Ψ x ( f ) d f P x = G x ( f ) d f energy spectral densities power spectral densities ψ x ( f ) G x ( f ) Δ f Δ f f + f f + f CT Correlation (2B) 2 8/5/4
Energy Spectral Density (ESD) Parseval s Theorem ψ x ( f ) E x = x(t) 2 d t = X ( f ) 2 d f Δ f Energy Spectral Density X ( f ) 2 = Ψ x ( f ) Real x(t) even, non-negative, real Ψ x ( f ) E x E y = 2 Ψ x ( f ) d f = 2 Ψ y ( f ) d f = 2 H ( f ) X ( f ) 2 d f = 2 H ( f ) 2 Ψ x ( f ) d f = 2 Y ( f ) 2 d f Ψ y ( f ) = H ( f ) H ( f )Ψ x ( f ) = 2 H ( f ) X ( f ) 2 d f f + f The distribution of signal energy versus frequency x(t ) h(t) y(t) Ψ x ( f ) Ψ y ( f ) H ( f ) 2 CT Correlation (2B) 22 8/5/4
Conceptual ESD Estimation Parseval s Theorem E x = x(t) 2 d t = X ( f ) 2 d f Energy Spectral Density X ( f ) 2 = Ψ x ( f ) x(t ) H ( f ) y(t) E y = y(t) 2 d t E y /Δ f Ψ x ( f ) H ( f ) ψ x ( f ) Δ f f + f f + f CT Correlation (2B) 23 8/5/4
ESD and Autocorrelation R x (t) Ψ ( = X ( f ) 2 x ( f ) ) R x (t) X ( f ) X ( f ) R x (t) = x ( t ) x(t) = x( τ) x(t τ) d τ R x (t) = x(τ) x(τ+ t) d τ CT Correlation (2B) 24 8/5/4
Power Spectral Density (PSD) Many signals are considered as a power signal The steady state signals activated for a long time ago will expected to continue x T (t ) = rect ( t T ) x(t) = x(t ) t < T 2 The truncated version of x(t) X T ( f ) = Ψ xt ( f ) = X T ( f ) 2 x T (τ)e 2 π f t d t + T /2 = T /2 x T (τ)e 2 π f t d t The ESD of a truncated version of x(t) G X T ( f ) = Ψ X T T = T X T ( f ) 2 The PSD of a truncated version of x(t) G x ( f ) = lim G X T ( f ) = lim T T T X T ( f ) 2 The estimated PSD f H 2 G( f )d f f L The power of a finite signal power signal in a bandwidth f L to f H CT Correlation (2B) 25 8/5/4
Conceptual PSD Estimation Parseval s Theorem E xt = x T (t) 2 d t = X T ( f ) 2 d f Energy Spectral Density X T ( f ) 2 = Ψ xt ( f ) G X T ( f ) = Ψ X T T = T X T ( f ) 2 x(t ) H ( f ) y(t) P y = y(t) 2 d t P T y /Δ f G x ( f ) H ( f ) G x ( f ) Δ f f + f f + f CT Correlation (2B) 26 8/5/4
ESD and Band-pass Filtering E y E y = 2 Ψ y ( f ) d f = 2 Y ( f ) 2 d f = 2 H ( f ) 2 Ψ x ( f ) d f f H = 2 f L Ψ x ( f )d f = 2 H ( f ) X ( f ) 2 d f Ψ y ( f ) = H ( f ) 2 Ψ x ( f ) = H ( f ) H ( f )Ψ x ( f ) A description of the signal energy versus frequency How the signal energy is distributed in frequency CT Correlation (2B) 27 8/5/4
PSD and Band-pass Filtering G y ( f ) = H ( f ) 2 G x ( f ) = H ( f )H ( f )G x ( f ) A description of the signal energy versus frequency How the signal energy is distributed in frequency CT Correlation (2B) 28 8/5/4
References [] http://en.wikipedia.org/ [2] M.J. Roberts, Signals and Systems, 8/5/4