Introduction to Signal Processing

Similar documents
Advanced Econometrics

Time Series: Theory and Methods

Lecture 1: Fundamental concepts in Time Series Analysis (part 2)

Problem Set 2 Solution Sketches Time Series Analysis Spring 2010

Statistics of Stochastic Processes

Chapter 4: Models for Stationary Time Series

Linear models. Chapter Overview. Linear process: A process {X n } is a linear process if it has the representation.

STAT 443 Final Exam Review. 1 Basic Definitions. 2 Statistical Tests. L A TEXer: W. Kong

Sparse linear models

Basics: Definitions and Notation. Stationarity. A More Formal Definition

Lecture 2: Univariate Time Series

Stat 248 Lab 2: Stationarity, More EDA, Basic TS Models

Dynamic Approaches: The Hidden Markov Model

Some Time-Series Models

Problem Set 1 Solution Sketches Time Series Analysis Spring 2010

Lecture 4 - Spectral Estimation

Elements of Multivariate Time Series Analysis

A time series is called strictly stationary if the joint distribution of every collection (Y t

Chapter 3: Regression Methods for Trends

1. Fundamental concepts

Automatic Autocorrelation and Spectral Analysis

LECTURES 2-3 : Stochastic Processes, Autocorrelation function. Stationarity.

MCMC analysis of classical time series algorithms.

Econometría 2: Análisis de series de Tiempo

Statistics 349(02) Review Questions

Time Series Analysis -- An Introduction -- AMS 586

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University

3. ARMA Modeling. Now: Important class of stationary processes

If we want to analyze experimental or simulated data we might encounter the following tasks:

FE570 Financial Markets and Trading. Stevens Institute of Technology

Spectral Analysis. Jesús Fernández-Villaverde University of Pennsylvania

Lesson 7: Estimation of Autocorrelation and Partial Autocorrela

Time Series Examples Sheet

Reliability and Risk Analysis. Time Series, Types of Trend Functions and Estimates of Trends

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles

Stochastic Processes: I. consider bowl of worms model for oscilloscope experiment:

Computational Data Analysis!

18.S096 Problem Set 4 Fall 2013 Time Series Due Date: 10/15/2013

Time Series I Time Domain Methods

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

{ } Stochastic processes. Models for time series. Specification of a process. Specification of a process. , X t3. ,...X tn }

Classic Time Series Analysis

Ch3. TRENDS. Time Series Analysis

at least 50 and preferably 100 observations should be available to build a proper model

Linear Prediction 1 / 41

Time Series Examples Sheet

Empirical Market Microstructure Analysis (EMMA)

Solar irradiance forecasting for Chulalongkorn University location using time series models

Module 3. Descriptive Time Series Statistics and Introduction to Time Series Models

Forecasting locally stationary time series

A SARIMAX coupled modelling applied to individual load curves intraday forecasting

Wavelet Methods for Time Series Analysis

Econometrics I: Univariate Time Series Econometrics (1)

Forecasting. Simon Shaw 2005/06 Semester II

E 4101/5101 Lecture 6: Spectral analysis

Lesson 2: Analysis of time series

Wavelet Neural Networks for Nonlinear Time Series Analysis

Lecture 2: ARMA(p,q) models (part 2)

Wavelet Methods for Time Series Analysis. Part IX: Wavelet-Based Bootstrapping

Lecture 3: Autoregressive Moving Average (ARMA) Models and their Practical Applications

Time Series Analysis

Econ 623 Econometrics II Topic 2: Stationary Time Series

IDENTIFICATION OF ARMA MODELS

Pure Random process Pure Random Process or White Noise Process: is a random process {X t, t 0} which has: { σ 2 if k = 0 0 if k 0

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45

Autoregressive Moving Average (ARMA) Models and their Practical Applications

Econ 424 Time Series Concepts

CCNY. BME I5100: Biomedical Signal Processing. Stochastic Processes. Lucas C. Parra Biomedical Engineering Department City College of New York

Applied Time. Series Analysis. Wayne A. Woodward. Henry L. Gray. Alan C. Elliott. Dallas, Texas, USA

Time Series Analysis. Solutions to problems in Chapter 5 IMM

Scientific Computing: An Introductory Survey

The autocorrelation and autocovariance functions - helpful tools in the modelling problem

Econometría 2: Análisis de series de Tiempo

Lecture 10. Applied Econometrics. Time Series Filters. Jozef Barunik ( utia. cas. cz

Time Series Analysis - Part 1

A Hybrid Time-delay Prediction Method for Networked Control System

These slides follow closely the (English) course textbook Pattern Recognition and Machine Learning by Christopher Bishop

Review of Concepts from Fourier & Filtering Theory. Fourier theory for finite sequences. convolution/filtering of infinite sequences filter cascades

MAT3379 (Winter 2016)

LINEAR STOCHASTIC MODELS

5 Transfer function modelling

Gaussian processes. Basic Properties VAG002-

LES of Turbulent Flows: Lecture 3

Wavelet Methods for Time Series Analysis. Motivating Question

Nonlinear time series

The Discrete Fourier Transform (DFT) Properties of the DFT DFT-Specic Properties Power spectrum estimate. Alex Sheremet.

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

An algorithm for robust fitting of autoregressive models Dimitris N. Politis

STAT Financial Time Series

SOLUTIONS to ECE 2026 Summer 2017 Problem Set #2

Marcel Dettling. Applied Time Series Analysis SS 2013 Week 05. ETH Zürich, March 18, Institute for Data Analysis and Process Design

Note: The primary reference for these notes is Enders (2004). An alternative and more technical treatment can be found in Hamilton (1994).

Time series analysis of activity and temperature data of four healthy individuals

AR, MA and ARMA models

Exercises - Time series analysis

IV. Covariance Analysis

Module 7:Data Representation Lecture 35: Wavelets. The Lecture Contains: Wavelets. Discrete Wavelet Transform (DWT) Haar wavelets: Example

White Noise Processes (Section 6.2)

Module 4. Stationary Time Series Models Part 1 MA Models and Their Properties

Introduction to Biomedical Engineering

Transcription:

to Signal Processing Davide Bacciu Dipartimento di Informatica Università di Pisa bacciu@di.unipi.it Intelligent Systems for Pattern Recognition

Signals = Time series Definitions Motivations A sequence of measurements in time Medicine Financial Meteorology Geology Biometrics Robotics IoT Biometrics...

Formalization Definitions Motivations A time series x is a sequence of measurements in time t x = x 0, x 1,..., x t,..., x N where x t (or x(t)) is the measurement at time t. Observations can be observable at irregular time intervals Time series analysis assumes weakly stationary (or second-order stationary) data E[x t ] = µ for all t Cov(x t+τ, x t ) = γ τ for all t (γ does only depend on lag τ)

Goals Definitions Motivations Description - Summary statistics, graphs Analysis - Identify and describe dependencies in data Prediction - Forecast the next values given information up to time t Control - Adjust the parameters of the generative process to make the time series fit a target The goal of this lecture is providing knowledge on some basic techniques that can be useful as Baseline Preprocessing Building blocks

Key Methods Definitions Motivations Time domain analysis - Assesses how a signal changes over time Correlation and Convolution Autoregressive models Spectral domain analysis - Assesses the distribution of the signal over a range of frequencies Fourier Analysis Wavelets

Mean and Autocovariance Statistics Time-Series Similarity Autoregressive models Some interesting estimators for time series statistics are Sample mean ˆµ = 1 N N t=1 x t Autocovariance for lag N τ N ˆγ x (τ) = 1 N N τ (x t τ ˆµ)(x t ˆµ) t=1

Autocorrelation Statistics Time-Series Similarity Autoregressive models Autocovariance serves to compute autocorrelation, i.e. the correlation of a signal with itself ˆρ x (τ) = ˆγ x(τ) ˆγ x (0) Autocorrelation analysis can reveal repeating patterns such as the presence of a periodic signal hidden by noise

Autocorrelation Plot Statistics Time-Series Similarity Autoregressive models A revealing view on timeseries statistics What do you see in this time series? Autocorrelogram reveals a sine wave

Cross-Correlation (Discrete) Statistics Time-Series Similarity Autoregressive models A measure of similarity of x 1 and x 2 as a function of a time lag τ min{(t 1 1+τ),(T 2 1)} φ x 1 x 2(τ) = t=max{0,τ} x 1 (t τ) x 2 (t) τ [ (T 1 1),..., 0,..., (T 1 1)] The maximum φ x 1 x 2(τ) w.r.t. τ identifies the displacement of x 1 vs x 2

Cross-Correlation (Discrete) Statistics Time-Series Similarity Autoregressive models Normalized cross-correlation returns an amplitude independent value φ x 1 x 2(τ) = φ x 1 x 2(τ) T 1 1 t=0 (x 1 (t)) 2 [ 1, +1] T 2 1 t=0 (x 2 (t)) 2 φ x 1 x2(τ) = +1 The two time-series have the exact same shape if aligned at time τ φ x 1 x2(τ) = 1 The two time-series have the exact same shape but opposite sign if aligned at time τ φ x 1 x2(τ) = 0 Completely uncorrelated signals

Statistics Time-Series Similarity Autoregressive models Cross-Correlation - Something already seen... What is this? M (f g)[n] = f (n t)g(t) t= M Discrete convolution on finite support [ M, +M] Similar to cross-correlation but one of the signals is reversed (i.e. t in place of t) Convolution can be seen as a smoothing operator (commutative!)

Statistics Time-Series Similarity Autoregressive models A View of Time Domain Operators Image Credit: Wikipedia

Autoregressive Process Statistics Time-Series Similarity Autoregressive models A timeseries Autoregressive process (AR) of order K is the linear system K x t = α k x t k + ɛ t k=1 Autoregressive x t regresses on itself α k linear coefficients s.t. α < 1 ɛ t sequence of i.i.d. values with mean 0 and fixed variance

ARMA Statistics Time-Series Similarity Autoregressive models Autoregressive with Moving Average process (ARMA) K Q x t = α k x t k + β q ɛ t q k=1 q=0 ɛ t Random white noise (again) The current timeseries value is the result of a regression on its past values plus a term that depends on a combination of stochastically uncorrelated information Accounts for innovations or spikes in the data

Statistics Time-Series Similarity Autoregressive models Estimating Autoregressive Models Need to estimate The values of the linear coefficients α t (and β t ) The order of the autoregressor K (and Q) Estimation of the α is performed with the Levinson-Durbin recursion, e.g. in Matlab a = levinson(x,k) The order is often estimated with a Bayesian model selection criterion, e.g. BIC, AIC, etc. The set of autoregressive parameters α1 i,..., αi K fitted to a specific timeseries x i is used to confront it with other timeseries

Comparing Timeseries by AR Statistics Time-Series Similarity Autoregressive models Timeseries clustering Novelty/anomaly detection d(x 1, x 2 ) = α 1 α 2 2 M Test Err(x t, ˆx t ) < ξ where ˆx t is the AR predicted value Encode time series as a set of α i vectors and feed them to a flat ML model

Fourier Analysis Wavelets Analysing time series in the frequency domain Key Idea Decompose a time series into a linear combination of sinusoids (and cosines) with random and uncorrelated coefficients Time domain - Regression on past values of the time series Frequency domain - Regression on sinusoids Use the framework of Fourier Analysis

Fourier Transform Fourier Analysis Wavelets Discrete Fourier transform (DFT) Transforms a time series from the time domain to the frequency domain Can be easily inverted (back to the time domain) Useful to handle periodicity in the time series Seasonal trends Cyclic processes

Representing Functions Fourier Analysis Wavelets We (should) know that, given an orthonormal system {e 1 ; e 2,... } for E, we can represent any function f E by a linear combination of the basis < f, e k > e k. k=1 Given the orthonormal system { } 1 2, sin(x), cos(x), sin(2x), cos(2x),... the linear combination above becomes the Fourier Series a 0 /2 + [a k cos(kx) + b k sin(kx)] k=1 with a k, b k being coefficients resulting from integrating f (x) with the sin and cos functions

Fourier Analysis Wavelets Representing Functions in Complex Space Using cos(kx) i sin(kx) = e ikx with i = 1 we can rewrite the Fourier series as c k e ikx k= on the orthonormal system { } 1, e ix, e ix, e i2x, e i2x,... and c k integrates f (x) with e ikx.

Fourier Analysis Wavelets Representing Discrete Time series 1 Consider a discrete time series x = x 0, x 1,..., x N 1 of length N and x n R 2 Using the exponential formulation the orthonormal system is made of {e 0, e 1,..., e N 1 } vectors e k C N 3 The n-th component of the k-th vector is [e k ] n = e 2πink N

Graphically Fourier Analysis Wavelets A basis e k at frequency k has N elements sampled from the roots of the unitary circle in imaginary-real space

Discreet Fourier Transform Fourier Analysis Wavelets Given a time series x = x 0, x 1,..., x N 1 its Discrete Fourier Transform (DFT) is the sequence (in frequency domain) X k = N 1 n=1 The DFT has an inverse transform x n = 1 N to go back to the time domain. N 1 k=1 x n e 2πink N X k e 2πink N

Amplitude Fourier Analysis Wavelets A measure of relevance/strenght of a target frequency k A k = Re 2 (X k ) + Im 2 (X k )

DFT in Action Fourier Analysis Wavelets Use the DFT elements X 1,..., X K as representation of the signal to train predictor/classifier Representation in spectral domain can reveal patterns that are not clear in time domain

Limitations of DFT Fourier Analysis Wavelets Sometimes we might need localized frequencies rather than global frequency analysis

Graphical Intuition Fourier Analysis Wavelets Split signal in frequency bands only if they exist in specific time-intervals

Wavelets Fourier Analysis Wavelets Split the signal using an orthonormal basis generated by translation and dilation of a mother wavelet f (x) = Ψ t,k (x) t Z k Z Terms k and t regulate scaling and shifting of the wavelet Ψ t,k (x) = 2 k/2 Ψ(2 k x t) with respect to the mother Ψ( ). E.g. k < 1 Compresses the signal k > 1 Dilates the signal Many different possible choices for the mother wavelet function: Haar, Daubechies, Gabor,...

Take Home Messages Conclusions Old-school pattern recognition on timeseries is about learning coefficients that describe properties of the time series Autoregressive coefficients (time domain) Fourier coefficient (frequency domain) Often linear methods Autocorrelation reveals similitude of a signal with delayed versions of itself Cross-correlation provides hints on time series similarity and how to align them Fourier analysis allows to identify recurring patterns and to identify key frequencies in the signal

Next Lecture Conclusions to image processing Representing images and visual content Identify informative parts of an image Spectral analysis in 2D