time varying signals cross and auto correla5on
play

Time-varying signals: cross- and auto-correla5on, - PowerPoint PPT Presentation

Time-varying signals: cross- and auto-correla5on, correlograms NEU 466M Instructor: Professor Ila R. Fiete Spring 2016 Sta5s5cal measures We


  1. Time-­‑varying ¡signals: ¡ ¡ cross-­‑ ¡and ¡auto-­‑correla5on, ¡ correlograms ¡ NEU ¡466M ¡ Instructor: ¡Professor ¡Ila ¡R. ¡Fiete ¡ Spring ¡2016 ¡

  2. Sta5s5cal ¡measures ¡ • We ¡first ¡considered ¡simple ¡sta5s5cal ¡measures ¡ for ¡single ¡variables ¡(mean, ¡variance). ¡ • We ¡next ¡considered ¡measures ¡for ¡the ¡ rela5onship ¡between ¡two ¡(sta5onary) ¡random ¡ variables ¡(covariance, ¡Pearson’s ¡correla5on ¡ coefficient; ¡regression). ¡ ¡ • Extension ¡to ¡ K ¡variables: ¡pairwise ¡rela5onships ¡ (covariance ¡matrix). ¡ • Now, ¡extension ¡to ¡5me-­‑series: ¡rela5onships ¡ between ¡different ¡5me-­‑varying ¡signals. ¡ ¡

  3. Time-­‑series ¡data ¡ g: ¡a ¡temporally ¡varying ¡signal ¡ ¡ {· · · g t − 1 , g t , g t +1 · · · } sampled ¡at ¡discrete ¡intervals ¡ h: ¡another ¡5me-­‑varying ¡signal, ¡ ¡ {· · · h t − 1 , h t , h t +1 · · · } sampled ¡at ¡the ¡same ¡5mes ¡ How ¡many ¡variables? ¡In ¡ g ¡alone? ¡ ¡

  4. Time-­‑series ¡data ¡ g: ¡a ¡temporally ¡varying ¡signal ¡ ¡ {· · · g t − 1 , g t , g t +1 · · · } sampled ¡at ¡discrete ¡intervals ¡ • Time-­‑series ¡not ¡sta5onary. ¡ ¡ • Could ¡think ¡of ¡response ¡at ¡each ¡5me ¡point ¡as ¡separate ¡ (though ¡typically ¡not ¡independent) ¡variable. ¡ • If ¡length( g ) ¡= ¡ T , ¡then ¡ T ¡variables ¡in ¡ g . ¡ ¡ ¡ • Same ¡5me-­‑point ¡in ¡repe55ons ¡of ¡the ¡series ¡from ¡same ¡ ini5al ¡condi5on: ¡mul5ple ¡samples ¡of ¡that ¡variable. ¡

  5. Finding ¡structure ¡between ¡5me-­‑series ¡ g: ¡a ¡temporally ¡varying ¡signal ¡ ¡ {· · · g t − 1 , g t , g t +1 · · · } sampled ¡at ¡discrete ¡intervals ¡ h: ¡another ¡5me-­‑varying ¡signal, ¡ ¡ {· · · h t − 1 , h t , h t +1 · · · } sampled ¡at ¡the ¡same ¡5mes ¡ How ¡about ¡trying ¡previously ¡seen ¡sta5s5cal ¡measures? ¡ ¡ compute cov ( g, h )

  6. Example ¡of ¡two ¡5me-­‑series ¡ dt = 0 . 001 t = [ 0 : dt : 1 − dt ]; g = sin ( 20 ∗ pi ∗ t ); h = cos ( 20 ∗ pi ∗ t ); figure ; hold on ; plot ( g ); plot ( h , 0 r 0 ); ylabel ( 0 response 0 ) 1 xlabel ( 0 time 0 ) 0.8 0.6 0.4 0.2 response 0 − 0.2 − 0.4 − 0.6 − 0.8 − 1 0 100 200 300 400 500 600 700 800 900 1000 time C ( g, h ) = 0 , h gh i ⇡ 0 Correct ¡but ¡unsa5sfying: ¡ ¡ g, ¡h ¡similarly ¡5me-­‑varying ¡func5ons: ¡the ¡same ¡func5on ¡with ¡a ¡π/2 ¡shi[. ¡ ¡

  7. Defini5on: ¡cross-­‑correla5on ¡func5on ¡ ∞ X C g,h ( n ) = g ∗ ( m ) h ( m + n ) m = −∞ n = 0 : [ · · · g ∗ − 3 g ∗ − 2 g ∗ − 1 g ∗ 0 g ∗ 1 g ∗ 2 g ∗ 3 · · · ] [ · · · h − 3 h − 2 h − 1 h 0 h 1 h 2 h 3 · · · ] take time-by-time product, add all terms

  8. Defini5on: ¡cross-­‑correla5on ¡func5on ¡ ∞ X C g,h ( n ) = g ∗ ( m ) h ( m + n ) m = −∞ n = 1 : [ · · · g ∗ − 3 g ∗ − 2 g ∗ − 1 g ∗ 0 g ∗ 1 g ∗ 2 g ∗ 3 · · · ] [ · · · h − 2 h − 1 h 0 h 1 h 2 h 3 h 4 · · · ] h − tape shifted leftwards by 1

  9. Measure ¡of ¡relatedness ¡at ¡different ¡5me ¡shi[s ¡ ∞ X C g,h ( n ) = g ∗ ( m ) h ( m + n ) m = −∞ • The ¡cross-­‑correla5on ¡func5on ¡is ¡a ¡measure ¡of ¡covariance ¡ between ¡ g, ¡h ¡at ¡different ¡rela5ve ¡5me-­‑shi[s ¡(for ¡zero-­‑ mean ¡or ¡mean-­‑subtracted ¡signals). ¡ ¡ ¡ ¡ • How ¡is ¡ g ¡at ¡any ¡5me ¡(linearly) ¡related ¡to ¡h ¡n ¡5me-­‑steps ¡ away? ¡ ¡

  10. Cross-­‑correla5on ¡func5on ¡for ¡finite-­‑length ¡signals ¡ { g 1 , · · · , g N } g, ¡h: ¡5me-­‑series ¡of ¡length ¡N ¡ { h 1 , · · · , h N } N − n X C g,h ( n ) = g ∗ ( m ) h ( m + n ) m =1 average ¡over ¡ ¡ Total ¡length ¡of ¡cross-­‑correla5on: ¡ 2N-­‑1 ¡ (N-­‑|n|) ¡terms ¡ Zero-­‑shi[ed ¡entry: ¡ N ¡

  11. Proper5es ¡of ¡the ¡cross-­‑correla5on ¡ ¡ • ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡: ¡ ¡does ¡not ¡commute ¡(contrast ¡ C gh ( n ) 6 = C hg ( n ) with ¡covariance). ¡ ¡ • In ¡fact, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡: ¡ ¡shi[ing ¡ h ¡to ¡ right ¡ C gh ( n ) = C hg ( − n ) rela5ve ¡to ¡ g: ¡equivalent ¡to ¡shi[ing ¡ g ¡to ¡ le5 ¡rela5ve ¡ to ¡ h . ¡(Same ¡plot, ¡flipped ¡5me ¡axis.) ¡ ¡ • Ordering ¡mabers: ¡tells ¡which ¡signal ¡leads ¡the ¡other. ¡ ¡

  12. (Previous) ¡example ¡ 1 0.8 0.6 0.4 0.2 response 0 − 0.2 − 0.4 − 0.6 − 0.8 − 1 0 100 200 300 400 500 600 700 800 900 1000 time 5me ¡index ¡

  13. Cross-­‑correla5on ¡of ¡example ¡series ¡ figure ; plot ( xcorr ( h , g ) , 0 k 0 ) xlabel ( 0 time index ( n ) 0 ) ylabel ( 0 C gh ( n ) 0 ) 500 400 300 200 100 C gh (n) 0 − 100 − 200 − 300 − 400 − 500 0 200 400 600 800 1000 1200 1400 1600 1800 2000 time index (n) 5me ¡index ¡ Signals ¡of ¡length ¡ N ¡= ¡1000 . ¡Cross-­‑correla5on ¡of ¡length ¡ 2N-­‑1. ¡ ¡

  14. Cross-­‑correla5on ¡of ¡example ¡series ¡ figure ; plot ( xcorr ( h , g ) , 0 k 0 ) Matlab: ¡signals ¡of ¡length ¡ N ¡have ¡0-­‑shi[ ¡at ¡ N ¡in ¡xcorr ¡ xlabel ( 0 time index ( n ) 0 ) ylabel ( 0 C gh ( n ) 0 ) 500 400 300 200 100 C gh (n) 0 − 100 − 200 − 300 − 400 − 500 600 700 800 900 1000 1100 1200 1300 1400 time index (n) • In ¡ C gh (n) : ¡peak ¡at ¡le[. ¡Interpreta5on: ¡ h ¡leads ¡ g , ¡or ¡ h ¡must ¡be ¡shi[ed ¡right ¡ (nega5ve ¡ n ) ¡to ¡line ¡up ¡with ¡ g . ¡In ¡present ¡example, ¡cosine ¡( h ) ¡leads ¡sine ¡( g ) ¡in ¡ phase. ¡ ¡ ¡ • Mul5ple ¡peaks: ¡periodic ¡re-­‑alignment ¡of ¡cos ¡with ¡sin ¡at ¡mul5ples ¡of ¡period ¡ • Cau5on! ¡ C gh (t) ¡is ¡ ¡xcorr(h,g) ¡in ¡Matlab: ¡note ¡reversed ¡order ¡of ¡g , ¡h ! ¡ ¡ ¡

  15. Cross-­‑correla5on ¡of ¡example ¡series ¡ figure ; plot ( xcorr ( h , g ) , 0 k 0 ) xlabel ( 0 time index ( n ) 0 ) ylabel ( 0 C gh ( n ) 0 ) 500 400 300 200 100 C gh (n) 0 − 100 − 200 − 300 − 400 − 500 0 200 400 600 800 1000 1200 1400 1600 1800 2000 time index (n) 5me ¡index ¡ Decay ¡in ¡amplitude ¡due ¡to ¡finite ¡length ¡of ¡ g, ¡h : ¡shi[ ¡ n ¡ is ¡ a ¡sum ¡over ¡N-­‑|n| ¡ terms, ¡so ¡ amplitude ¡will ¡go ¡to ¡0 ¡as ¡shi[ ¡goes ¡to ¡ N. ¡ ¡

  16. Autocorrela5on ¡func5on ¡ • Special ¡case ¡of ¡cross-­‑correla5on: ¡signal ¡ correla5on ¡with ¡itself ¡at ¡all ¡5me ¡shi[s. ¡ ¡ • Commonly ¡used ¡to ¡detect ¡temporal ¡paberns ¡ (periodic ¡or ¡otherwise) ¡within ¡noisy ¡5me-­‑ series ¡data. ¡ ¡ • Symmetric; ¡central ¡peak ¡always ¡at ¡0 ¡5me-­‑lag. ¡

  17. Autocorrela5on ¡example ¡ 500 400 300 200 100 C gg (n) 0 − 100 − 200 − 300 − 400 − 500 600 700 800 900 1000 1100 1200 1300 1400 time index (n) 5me ¡index ¡

  18. Overview ¡ BACK ¡TO ¡A ¡MODELING ¡ PERSPECTIVE ¡

  19. Time-­‑series ¡data ¡ g: ¡a ¡temporally ¡varying ¡signal ¡ ¡ { g 1 , · · · , g N } sampled ¡at ¡discrete ¡intervals ¡ • If ¡ g ¡is ¡5me-­‑series ¡of ¡length ¡ N , ¡then ¡ N ¡variables ¡within ¡ g . ¡ ¡ • But ¡then ¡should ¡construct ¡ NxN ¡covariance ¡matrix ¡with ¡ (α,β) ¡ entry ¡given ¡by ¡ cov(g α g β ) , ¡and ¡ N(N+1)/2 ¡dis5nct ¡entries. ¡ ¡ • Autocorrela5on: ¡only ¡(2N-­‑1)/2 ¡dis5nct ¡entries ¡(1/2 ¡because ¡ of ¡symmetry ¡about ¡0-­‑5me ¡lag). ¡ ¡

  20. Autocorrela5on ¡and ¡5me-­‑series ¡data ¡ ¡ What ¡are ¡we ¡throwing ¡out ¡when ¡studying ¡only ¡the ¡autocorrelaIon ¡ of ¡a ¡Ime-­‑series ¡g ¡(N ¡disInct ¡entries), ¡compared ¡to ¡the ¡NxN ¡ ¡ covariance ¡matrix ¡of ¡its ¡components ¡(N(N+1)/2 ¡disInct ¡entries)? ¡ ¡ ¡ ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend