SlideShare a Scribd company logo
1 of 106
Download to read offline
Time Series Analysis:
Introduction to Signal Processing
Concepts
Liam Kilmartin
Discipline of Electrical & Electronic
Engineering,
NUI, Galway
Aims of Course
•  To introduce some of the basic concepts
of digital signal processing
– Where possible to avoid getting too
mathematical!
– In many cases looking at concepts you have
already studied from a slightly different
perspective
•  To complete some workshop exercises
using MATLAB to gain an basic
appreciation of what MATLAB offers
•  Examine applications in a number of
application areas
Workshop Syllabus
•  The DSP topics which we will cover
include some basic topics:
– Sampling waveforms
– Time domain:
•  Digital filters
•  Energy estimation
•  Periodicity estimation
– Frequency domain analysis
•  Fourier Analysis
•  Wavelet Analysis
•  Coherence and Synchrony
– Applications
Background Material
Where to start ?
•  Before we actually start looking at signal
processing, we need to familiarise
ourselves with some basic terminology
•  As will be seen presently, sinusoidal
waveforms are very important in signal
processing so firstly a primer on these
waveforms
What is a Sine Wave ?
•  A sine wave has three basic parameter that
define its behaviour
–  Amplitude (A) (the “height” of the oscillation)
–  Frequency (f)
•  The signal “repeats” itself exactly over and over.
•  Its frequency is the “number” of complete oscillations/cycles
completed in a single second. Measured in Hertz (s-1)
•  Directly related to the Period (T) of the waveform which is the
time it takes to complete one full oscillation
–  Frequency=1/Period (f=1/T)
•  An alternate measure termed angular frequency (ω)
measured in radians per second is sometimes used (ω=2πf)
•  But in some application areas, e.g. financial time series,
talking about frequencies in units of Hz is nonsensical
–  Consider time series of closing prices of a exchange index (1 “sample”
per day!)
–  Phase (φ)
•  The relevance of this quantity is often misunderstood
Sine Wave Parameters
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (s)
Amplitude=1
Period=0.1 seconds
Frequency=1/0.1=10 Hz
Phase of a Sine Wave
•  Phase is an angular measurement and hence can be
quantified in units of either degrees or radians
–  Remember 360° is the same as 2π radians and this represents
one full cycle of the waveform!
•  The term phase is often used quite loosely
•  It can have two distinct meanings
–  When you are referring to a single sine wave then you can refer
to the instantaneous phase
•  This reflects the current point that the sine wave is at in its cycle at a
specific moment in time
–  When you are referring to two sine waves (of the same
frequency) then you can talk about a phase difference
•  This can be measured by measuring the time difference between
the points where each sine waves passes through the axis. This
value is then represented as a phase angle by comparing it to the
period (The period is viewed as being the equivalent of 360°)
Instantaneous Phase
•  When you draw a graph of a single sine wave, it typically has a value of 0 at
the start of the graph (i.e. time=0)
•  In such a case, the instantaneous phase at time=0 will be 0° (i.e. the “start”
of a cycle)
•  When the waveform hit its first positive peak value (i.e. one quarter way
through the cycle), this is deemed to be the time where the instantaneous
phase is 90°
•  When the waveform returns to zero next (i.e. half way through the cycle),
this is deemed to be when the instantaneous phase is 180°
•  And so on until the moment when one complete cycle has been completed
which is deemed to be the time where the instantaneous phase in 360°
–  What happens after this point when the “next” cycle starts?
•  One option:
–  The measure of phase continues on past 360° (i.e. 450°, 540° etc.) which is
termed unwrapped phase. However, such a measure is unbounded and hence
difficult to represent graphical
•  So instead we more commonly use wrapped phase
–  Once 360° is reached we start again at 0° or once 180° is reached we start again
at -180°
•  The latter range is more commonly used
•  Wrapped phase is more commonly used simply because it makes drawing graphs of
phase more manageable)
Graphs of Instantaneous Phase
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (s)
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
0
100
200
300
400
500
600
700
800
Degrees
Time (s)
Unwrapped Phase
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-200
-150
-100
-50
0
50
100
150
200
Degrees
Time (s)
Wrapped Phase
Phase Difference
•  Typically (though not exclusively) used to
quantify the “timing difference” between two
sine waves at the same frequency
–  To complicate matters this measure is often applied to
only a single sine wave where the “second” sine
wave is assumed to be an implied “reference” sine
wave
•  Two sine waves are said to be “in phase” if their
phase difference is 0° and completely “out of
phase” if their phase difference is 180°
Graphs of Phase Difference
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (s)
Comparison of Two Sinusoids
Time Difference=0.25 sec
Phase Difference=0.025/0.1*360 degrees=90 degrees
Phase Difference of red wave relative to blue wave is +90 degrees
Phase Difference of blue wave relative to red wave is -90 degrees
Phase of a Single Sine Wave
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (s)
Assumption is that phase is being measured relative to a similar sinusoid
whose value at time 0 seconds was 0
Time Difference in this case is clearly 0.05 seconds and hence phase relative
to this notional second (red) sine wave is 0.05/0.5*360=180 degrees
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (s)
Comparison of Two Sinusoids
So Why the Emphasis on Sine
Waves ?
•  A basic understanding of the terminology of sine waves
is essential because mathematically all real world
waveform can be viewed as being formed by adding
together a carefully selected sequence of sine waves
–  Each sine wave having a carefully selected amplitude and phase
difference
–  This approach is known as Fourier Analysis
•  For real world signals, it offers an analysis methodology
rather than a synthesis approach
–  By viewing any signal as being a sum of sine waves, we can
analyse or alter the signal by considering these individual sine
wave components rather than the complex complete signal
•  There is loads of mathematical theory and techniques for
processing/analysing sine waves
Illustration of Fourier Analysis
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
0 2 4 6 8 10 12 14 16 18
-1
-0.5
0
0.5
1
New Component
Time (s)
0 2 4 6 8 10 12 14 16 18 20
-1
-0.5
0
0.5
1
Composite Waveform
Time (s)
We will illustrate how a more complex waveform (square wave) can be
formed by adding together specific sine waves
With each component that is added the composite waveform is getting “nearer”
to the desired square wave
Comments
•  The approach just outlined is a nice
illustration of how a more “complex” signal
can be formed by adding together a series
of simple “basis” signals (sinusoids)
•  But some points to note
– The “complex” signal that we are try to form
must be periodic
•  very few real world signal exhibit anything
approximating this behaviour
Comments (2)
– This approach only produces an
approximation
•  The more (higher frequency) basis signals we
added the closer the approximation gets to the
desired complex signal
– The basis signals as all periodic with a
frequency that is an integer multiple of the
frequency of the desired complex signal
•  Harmonics
•  Consider notionally what happens to this
approach if we consider “real world”
signals that are not strictly periodic ?
Sampling Signals
Typical DSP Configuration
“Real World” Signals
Pressure:
• Speech
• Music
• SONAR
Bio-Electric:
• EEG
• ECG
Electromagnetic:
• Radio
• RADAR
Images:
• Camera
• MRI
Other:
• Seismic
Sensor/
Transducer
Electrical Waveform which
ideally should be an analogue
of the “real world” signal
Not always an exact “copy” due
to distortions introduced by sensor
Anti
Aliasing
Filter
Sampling
Circuit
Sequence
of Digital
Samples
for
Processing
FinancialEconomic “Signals”
What is Sampling ?
•  Sampling Circuits (also known as Analogue to Digital Converters [ADC])
–  Instantaneously measure the current value of the electrical voltage waveform
(e.g. output from a physiological electrode or sensor, a micro-phone etc.)
–  Represents this voltage by a number
•  This number reflects the voltage level
–  If the voltage is positive then the number should be “positive”
–  If the voltage is negative then the number should be “negative”
–  If the voltage is large then the number should be “large”… etc.
•  This process is repeated over and over again at a fixed interval known as
the sampling period (Ts)
–  The number of times that this sampling process occurs every second is known as
the sampling frequency (fs)
•  One important point:
–  The real electrical voltage waveform can have ANY voltage level in a continuum
between its maximum and minimum value
–  However, there will be a finite set of “numbers” (defined by the number of bits in
the ADC) by which the voltage measures can be represented
•  Thus this process may/will introduce an error (known as quantisation error) in the
digitised representation of the analogue waveform but this is unavoidable!
•  The quantisation error can be made smaller by using an ADC which has a larger
number of bits but this has cost/storage(?) implications
Example of Sampling
Let’s look at sampling this sine wave with a frequency of 10 Hz
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (sec)
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (sec)
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
In this example the sampling frequency of 200 Hz is used (Ts=0.005 sec)
How do you choose the Sampling
Frequency?
•  There is a criteria that must be satisfied when selecting a
sampling frequency to use
–  Nyquist Criteria or Shannon’s Theorem
•  The sampling frequency (fs) must be AT LEAST TWICE
(a factor of 2.5 is sometimes used as a rule of thumb!)
the highest frequency present in the waveform being
sampled
–  Remember real world signals can be viewed as being
formed by a sum of sine waves of different frequencies
•  However … in some application spaces…. It is
impossible to quantify as there is no “analogue” signal
to measure or, arguably more correctly, it is not practical
to measure the underlying signal
–  e.g. Financial data
Aliasing
•  What happens if this criteria is NOT adhered to ?
•  If there are frequency components present in the waveform being
sampled which have a frequency greater than fs/2 (the Nyquist
frequency) then a distortive effect known as aliasing will occur
•  Aliasing results in a sine wave whose frequency is greater than the
Nyquist frequency (say fs/2+a) appear as if it were a completely
different frequency which is less than the Nyquist frequency (say fs/
2-a)
•  Thus, once a signal is sampled it only makes sense to talk about
frequencies in the range of 0Hz up to fs/2 Hz
•  The function of the anti-aliasing filter/circuit is to ensure that this
criteria is met
–  It is an electronic circuit which “blocks” all frequencies above fs/2
–  Well, approximately blocks them – in reality it attenuates them heavily
Example of Aliasing
0 0.005 0.01 0.015 0.02 0.025
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (sec)
This time we consider sampling a 150 Hz sine wave with a sampling
frequency of 200 Hz – Clearly the Nyquist criteria is NOT met!
0 0.005 0.01 0.015 0.02 0.025
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Time (sec)
0 0.005 0.01 0.015 0.02 0.025
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
0 0.005 0.01 0.015 0.02 0.025
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
The original 150 Hz sine wave now actually appears like a 50 Hz sine wave!
Note: It “aliases” to 50 Hz = 150Hz-200Hz/2
Some Notation
•  “Real World” signals are termed continuous waveforms
–  They have a value at all moments in time
–  They are generally represented by notation in the form x(t) or y(t)
•  The “t” indicates it exists at all times!
•  The process of sampling results in the continuous waveform now only
existing at the specific sampling points t=0, t=Ts, t=2Ts, t=3Ts….. t=nTs
–  Therefore we now have a sequence of samples x(t=0), x(t=Ts), x(t=2Ts), x(t=3Ts)
…. x(t=nTs)
–  This is more commonly noted as x[0],x[1],x[2],x[3] or x[n] in general
•  n is known as the sample index
•  Consider a continuous sine wave the equation of which is:
–  x(t)=sin(2πft)
•  The equivalent equation for the sampled sinusoid is got by replacing t with
nTs
–  x[n]=x(nTs)= sin(2πfnTs)= sin(n2πfTs)= sin(n2πf/fs)= sin(nθ)
–  The term θ=2πf/fs is known as digital frequency
–  Since f (analogue frequency) can only have values between 0 and fs/2, hence θ
can only have a value between 0 and 2πfs/2/fs=π
Digital Filters
What is a filter ?
•  In some applications, the terms “filter” and
“model” are often synonymous
•  Most introductory DSP courses have a far
more restrictive definition of a filter
– Operates on a sequence of input samples x[n]
and generates a sequence of output samples
y[n] by means of a static difference equation
– These “basic” filters are
•  Linear
•  Causal
•  Time invariant
Why use a digital filter ?
•  Can be used to model an existing data set but,
initially, we will use them to process a sequence
of data samples that have either been previously
recorded and stored or perhaps process them in
“real time” (i.e. as they are sampled)
•  The aim of time domain filtering is typically to
enhance certain frequencies that may be
present in x[n] (the “signal”) and/or to attenuate
other frequencies that may be present in x[n]
(“noise”)
•  Of course there are cases where it may not work
that well!
Difference Equation
•  So how is y[n] produced from x[n]?
–  Difference Equation
•  A difference equation is an iterative equation which defines how the samples of y[n]
are calculated
•  Examples:
–  y[n]=0.5x[n]+0.5x[n-1]
•  Current output sample y[n] is got by adding 0.5 times the current input sample x[n] and 0.5 times the
previous input sample x[n-1]
–  y[n]=0.2x[n]+0.8y[n-1]
•  Current output sample y[n] is got by adding 0.2 times the current input sample x[n] and 0.8 times the
previous output sample y[n-1]
•  We will restrict the types of filters that we will look at:
–  Time invariant (the difference equation does NOT change over time)
–  Linear (difference equation will NEVER have a term of the form x[n-1]y[n-3] or x[n]x[n-5] or
anything like this!)
•  Have you seen this before ?
–  Moving Averages !!!
•  Difference Equations clearly explain how to calculate y[n] from x[n] but you cannot tell
what the filter does in terms of frequency content
FIR and IIR Filters
•  There are two classes of digital filters
•  Finite Impulse Response (FIR) have difference equations
which only contain terms with x[n] and previous x[n]
samples
–  y[n]=0.25x[n]+0.25x[n-1]+ 0.25x[n-2]+ 0.25x[n-3]
–  Also called non-recursive filters
•  Infinite Impulse Response (IIR) have difference
equations which contain BOTH terms with x[n] and
previous x[n] AND previous y[n] samples
–  y[n]=0.2x[n]+0.8y[n-1]
–  Also called recursive filters
•  What’s the difference ?
–  Different characteristics that make one type preferable to the
other under certain scenarios
Calculation of Difference
Equation – Non-Recursive
n x[n] -0.5x[n-1] 2x[n-3] y[n]
0 0.5 0 0 0.5
1 1.0 -0.25 0 0.75
2 -0.2 -0.5 0 -0.7
3 -0.8 0.1 1 0.3
4 -1.2 0.4 2 1.2
Difference equation: y[n]=x[n]-0.5x[n-1]+2x[n-3]
Calculation of Difference
Equation - Recursive
n x[n] -2x[n-1] 0.5y[n-2] y[n]
0 0.5 0 0 0.5
1 1.0 -1.0 0 0
2 -0.2 -2 0.25 -1.95
3 -0.8 0.4 0 -0.4
4 -1.2 1.6 -0.975 -0.575
Difference equation: y[n]=x[n]-2x[n-1]+0.5y[n-2]
Frequency Response
•  So, knowledge of a difference equations allows you to write a program to
implement the filter
–  But how are these difference equations determined to start with ?
•  A small number of basic filters are commonly known
–  Moving average FIR filters!
•  All other digital filters have to be designed
•  There are a variety of techniques which can be used to generate a
difference equation which implements a desired filter
•  “Desired” is what sense ?
–  The filter will implement a desired “frequency response”
•  It will attenuate the desired frequency range(s) and/or enhance a different desired
frequency range
•  So the Frequency Response is another alternate way of describing the
behaviour of a filter
–  It is can be determined as an equation (and engineering student do indeed learn
how to calculate such an equation from knowing the difference equation)
–  More commonly (and more usefully) the frequency response is shown graphically
Frequency Response
•  The two graphs which constitute a frequency response
are:
–  Magnitude response
–  Phase response
•  If x[n]=sin(nθ)
–  Input to the filter is a sampled sine wave
•  Then y[n]=G(θ) sin(nθ+φ(θ))
–  Output of the filter is a sampled sine wave at the same frequency
but whose amplitude has been scaled and which has undergone
a phase change
•  More correctly this is the “stable” output after a certain amount of time after
the input was applied!
•  The amplitude scaling factor is the magnitude response
for that frequency whilst the phase change is the phase
response for that frequency
•  The magnitude response is often quantified in decibels
–  20log(Magnitude Response) = decibels (dB)
Frequency Response - FIR
-4 -3 -2 -1 0 1 2 3 4
-5
0
5
Frequency (Theta)
Magnitude Frequency Response of y[n]=x[n]+x[n-1]+x[n-2]
-4 -3 -2 -1 0 1 2 3 4
-50
0
50
Frequency (Theta)
Magnitude(dB)
-4 -3 -2 -1 0 1 2 3 4
-5
0
5
Frequency (Theta)
PhaseAngle(radians)
Frequency Response - IIR
-4 -3 -2 -1 0 1 2 3 4
0
2
4
Frequency (Theta)
Magnitude
Frequency Response of y[n]=x[n]+0.7y[n-1]
-4 -3 -2 -1 0 1 2 3 4
-20
0
20
Frequency (Theta)
Magnitude(dB)
-4 -3 -2 -1 0 1 2 3 4
-1
0
1
Frequency (Theta)
PhaseAngle(radians)
Filter’s Response to Sinusoidal
Input
0 20 40 60 80 100
-1
-0.5
0
0.5
1
Sample Number (n)
Samplevalue
Input sinusoid to filter y[n]=x[n]+0.7y[n-1] : x[n]=sin(n*0.25)
0 20 40 60 80 100
-2
0
2
Sample Number (n)
Samplevalue
Note : Scaling and phase shift of output signal
Filter’s Response to Sinusoidal
Input
0 20 40 60 80 100
-1
-0.5
0
0.5
1
Sample Number (n)
Samplevalue
Input sinusoid to filter y[n]=x[n]+0.7y[n-1] : x[n]=sin(n*1)
0 20 40 60 80 100
-2
-1
0
1
2
Sample Number (n)
Samplevalue
Note : Scaling and phase shift of output signal and short “transient” signal
Importance of Frequency
Response
•  Clearly, the magnitude response of a filter is
VERY important as it indicates how the filter
“attenuates” or “enhances” particular
frequencies
•  In many applications, the phase response of
a filter is not that important
–  However, if the signal being filtered is composed
of several different frequencies (as most “real
world” signals are) then the phase response of a
filter may be important
–  Also filters introduce a “delay” which is directly
associated with this phase response
Phase Response
•  The phase response indicates the phase shift
which a sinusoid at a particular frequency
suffers
•  If the phase response of a filter is a straight
line then it is said to have a linear phase
response
–  Linear phase responses mean that another
quantity known as group delay is constant for all
frequencies
•  This may be important when a signal
composed of many different frequencies is
applied to the filter
Linear Phase Filters
•  If each of the frequencies present do NOT suffer
the same group delay then the signal will be
distorted in the time domain event if the filter does
NOT alter their respective amplitudes
•  Only certain FIR filters have a linear phase
responses
•  The are certain applications where this type of
distortion is important and others where it is not!
Distortion due to Non-Linear
Phase Response
0 50 100 150 200
-2
0
2
"Square wave" applied to filters
0 50 100 150 200
-2
0
2
Output of FIR (Linear Phase) Filter
0 50 100 150 200
-5
0
5
Output of All-Pass IIR (Non-Linear Phase) Filter
Designing Filters
•  Usually it is a case that you will have some idea
of the desired frequency response of the filter
you need
–  Low Pass Filter (LPF)
–  High Pass Filter (HPF)
–  Band Pass Filter (BPF)
–  Band Stop Filter (BSF)
•  Many “design tools” allow you to specify the
desired frequency response characteristics and
they generate the coefficients of a difference
equation that delivers this frequency response
Correlation as a Signal
Processing Tool
•  Correlation is an often used in a signal
processing setting to investigate temporal
relationships between two signals
•  Consider an application like radar or sonar
– Sonar emits an acoustic pulse (containing a
number of cycles of a pure tone)
– After travelling through the medium (e.g.
water) the acoustic wave will bounce off an
object and travel back to the sonar unit
•  Getting smaller and corrupted by “noise” along the
way
Correlation
•  We want to determine the distance of the
target from the sonar device by reliably
estimating the time difference between the
“ping” and the “echo” back
– More generally, we have two sampled signals
(the “ping” and the “echo”) that we knowfell
are “similar” except for a time “lag”
The solution!
•  Calculate the (cross-)correlation of the
“ping” samples (y[n]) and the “echo”
samples (x[n]) at a number of sample “lag”
or delay values (τ)
•  Search for the “lag” which has the largest
(positive or negative) cross-correlation
value
Simple problem ?
0 10 20 30 40 50 60 70 80 90 100
-1
-0.5
0
0.5
1
Time (ms)
Transmitted Sonar Ping (Sampling freq=10kHz)
0 10 20 30 40 50 60 70 80 90 100
-1
-0.5
0
0.5
1
Time (ms)
Received Return Signal (Target at 30m)
0 100 200 300 400 500 600
-1
-0.5
0
0.5
1
Cross Correlation
Lag
0 5 10 15 20 25 30 35 40 45
-1
-0.5
0
0.5
1
Cross Correlation (labelled in units of distance)
Distance (m)
-600 -400 -200 0 200 400 600
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Lag
SampleCrossCorrelation
Sample Cross Correlation Function
Bit more challenging in the real
world though!
0 10 20 30 40 50 60 70 80 90 100
-1
-0.5
0
0.5
1
Time (ms)
Transmitted Sonar Ping (Sampling freq=10kHz)
0 10 20 30 40 50 60 70 80 90 100
-4
-2
0
2
4
Time (ms)
Received Return Signal (Target at 30m)
0 100 200 300 400 500 600
-0.4
-0.2
0
0.2
0.4
Cross Correlation
Lag
0 5 10 15 20 25 30 35 40 45
-0.4
-0.2
0
0.2
0.4
Cross Correlation (labelled in units of distance)
Distance (m)
-600 -400 -200 0 200 400 600
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Lag
SampleCrossCorrelation
Sample Cross Correlation Function
Noise !
Periodicity Estimation
0 500 1000 1500 2000 2500 3000 3500 4000 4500
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Samples (n)
/ahh/ sound sampled at 44.1 kHz
0 1 2 3 4 5 6 7 8 9 10
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
Time (s)
ECG signal recorded at 1kHz sampling frequency
• Periodicity estimation is a multi-domain
problem
• (Auto)-correlation and “related”
algorithms offer elegant and
computationally “simple” means of getting
robust estimates
0 1 2 3 4 5 6 7 8 9 10
-10
-5
0
5
10
15
Time (s)
AccelerometerForceMagnitude
Android Accelerometer Magnitude sampled at 50 Hz
Use Autocorrelation
•  Calculate the autocorrelation function for
various lag values
•  Maximum (positive!) value in
autocorrelation should happen when the
lag is equal to the period of the signal
Example
•  The largest peak in this case occurs at a
time lag of 410 samples
•  Thus the period is 410/44100= 9.3 ms or
107 Hz
0 500 1000 1500 2000 2500 3000 3500 4000 4500
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Samples (n)
/ahh/ sound sampled at 44.1 kHz
0 100 200 300 400 500 600 700 800 900 1000
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Lag
SampleAutocorrelation
Sample Autocorrelation Function
AMDF – Alternative to
Autocorrelation
0 0.2 0.4 0.6 0.8 1 1.2 1.4
0
100
200
300
400
500
600
Time (s)
AMDF of ECG sampled at 1kHz
0 200 400 600 800 1000 1200
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Lag
SampleAutocorrelation
Sample Autocorrelation Function
• Average Magnitude Difference Function (AMDF) may offer a “simpler” and
more obvious means to autocorrelation for period estimation
• Often will perform better in cases where “harmonics” of the “fundamental”
frequency can cause problems for autocorrelation
Some Caveats!
•  Carefully avoided some of the more challenging aspects
of developing a robust period estimator
•  Many (perhaps most) signals, signal periodicity will be an
intermittent property
–  speech – only when “voiced” sounds are being produced
–  accelerometer – only when user is actually walking/running/
cycling
•  If fact ECG is probably the only application where the
signal will be periodic most of the time
–  At least you hope so if its your ECG!
•  Application specific detection algorithms to identify time
intervals containing periodic behaviour are required
–  Along with custom heuristics for accepting valid/sane results
from AC or AMDF
Frequency Domain Analysis
Frequency Domain Representation
•  So far, we have introduced the concept of a
frequency domain representation of a digital
filter’s operation
–  Frequency Response
•  However, it would be very useful if we had a tool
for estimating the frequency content (i.e. both
magnitude and phase) of any sequence of
samples
•  The Discrete Fourier Transform (DFT) is such a
mathematically tool
Discrete Fourier Transform
•  The DFT is an equation which allows use to analyse a
block or frame of samples in order to estimate the
component present at ANY particular digital frequency
(θ)
–  Mathematically speaking, the output of this equation is a
complex number which can be represented by a magnitude
and a phase value
–  The magnitude is the “amplitude” of the component at that
frequency
–  The phase is the “phase angle” of the component at that
frequency
–  As noted previously, only digital frequency values between 0 and
π have meaning (equivalent to 0 Hz to fs/2 Hz)
•  However, typically you will be interested in knowing such
information for more that just one frequency
Fast Fourier Transform
•  Typically, you will want to quantify the frequency
components is a signal for a whole set of discrete
frequencies in the range of possible digital frequencies
•  This would require you to use the basic DFT equation
repeatedly for EACH frequency
–  Computationally very demanding!
•  The Fast Fourier Transform (FFT) addresses this issue
by carrying out the DFT calculation for a certain specific
set of frequencies in a computationally efficient manner
–  FFT is NOT a different type of analysis to DFT – just an efficient
way of calculating the DFT for a specific set of frequencies
Properties of FFT
•  The FFT uses as its input a block or frame of N
consecutive samples
–  For an FFT there is a restriction that N=2k where k is
some integer value!
•  Why ? This is a “restriction” results in the mathematical
equations that calculate the FFT being much “faster” to
complete
•  N is termed the FFT “order” (e.g. “512 point” (29) FFT)
–  However, if you can use frame sizes which do not
meet this criteria but before the FFT is calculated the
frame is padded with extra zero samples to meet this
criteria
•  This does NOT effect the result in ANY way!
Properties of FFT
•  The output of the FFT will be exact same result
that you would have got if you calculated the
DFT for these specific set of N digital
frequencies
–  In other words, it tells you information on the
components present at these N frequencies
–  Just much more “quickly”!
•  N points in time à N frequency points after
the FFT
FFT Frequency Resolution
•  What are these N specific frequencies ?
•  For mathematical reasons, this set of digital
frequencies cover the range of θ=0 (0 Hz) to
θ=2π (fs Hz)
•  The set of N frequencies start at θ=0 (i.e. 0 Hz)
and are spaced 2π/N (fs/N) apart
–  Therefore there will only be N/2 of these points
covering frequencies within the standard digital
frequency range of θ=0 (0 Hz) to θ=π (fs/2 Hz)
•  Starting at 0 Hz with the last one at fs/2-fs/N Hz
•  Allow you to view the “spectrum” of the
signal
Example of FFT
0 0.05 0.1 0.15 0.2 0.25
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
Time domain Sine Wave
Time (sec)
SampleValues
0 1 2 3 4 5 6
5
10
15
20
25
30
35
40
45
50
55
FFT
Digital Frequency
0 1 2 3 4 5 6
5
10
15
20
25
30
35
40
45
50
55
FFT
Digital Frequency
Time Domain
Waveform
FFT Result (θ)
(Magnitude Only)
FFT Result (Hz)
(Magnitude Only)
Example of FFT
0 50 100 150 200 250
0
10
20
30
40
50
60
Frequency (Hz)
Fundamental Frequency Range Only
0 50 100 150 200 250
-40
-20
0
20
40
60
80
100
Frequency (Hz)
Magnitude in Decibels (dB)
0 50 100 150 200
-2
-1.5
-1
-0.5
0
0.5
Frequency (Hz)
Phase (Radians)
FFT for Fundamental
Frequency Range
Only
Magnitude Displayed
In Decibels
FFT Phase
Result
What if I want more resolution ?
•  If you want more “points” in the output of
the FFT (i.e. you want to see what is going
on at finer spaced frequencies)
– Increase the FFT order (N)
– Does not mean that you need more time
domain points to do this !!!
– Be clear in your mind of the difference
between the FFT order (and how it can be
increased by padding) and the “frame size” of
signal samples you are analysing
•  You can take a frame of 300 samples of a signal and pad
them to 512 points in order to complete a 512 point FFT!
Some Caveats about FFT!
•  Often your signal samples will span quite an extended
period of time so you may want to break up this time
period into a number of smaller individual frames and
complete and FFT on each the smaller frames
–  Rather than just doing one FFT for a complete EEG duration
•  There is a complete loss of time resolution capabilities in
the FFT output
–  You can tell if a frequency component was present in the frame
but not when it was present in the frame!
•  Mathematically speaking the frequency content/spectrum
should be stationary for the duration of the frame
–  In other words, the frequency content should not be changing
during the frame duration
–  Not always the case!
Spectrogram
•  A spectrogram is used to show how the
FFT magnitude evolves over time
– Or more specifically for each frame of N
samples (in which case the FFT is often
referred to as calculating the “Short Term
Fourier Transform (STFT) of each block)
•  Remember each block of N samples
provides N/2 frequency points (of interest)
•  Spectrogram displays these over time with
the colour of the plot being used to
indicate the “size” of each component
Spectrogram Example
050100150200250
0.5
1
1.5
2
2.5
3
3.5
4
4.5
Frequency(Hz)
Time
-0.500.5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Time (s)
Samples
Presents a
“time-frequency”
representation of the
signal
Segments the time
domain signal into short
term “blocks” or
“frames” with FFT used
to calculate spectrum of
each frame
Impact of Frame Size
•  The issue of time resolution can be
addressed by making the frame size (N)
smaller
– This however has a negative impact on the
ability to resolve information in the frequency
domain – more later!
•  The issue of the signal being stationary
during the N samples can also have a
impact of what can be deduced from the
FFT output
Example Impact of Frame Size
•  Consider a signal made up of TWO sine waves
(sampled at 500 Hz)
–  First wave is at 50 Hz and starts at time t=0
–  Second wave is at 60 Hz is present only for a burst
starting at t=0.25 sec and ending at 0.75 sec
•  Consider spectrogram for different frame sizes
–  Watch out for:
•  Time Resolution
•  Frequency Resolution
Spectrogram N=32
0 50 100 150 200 250
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Frequency (Hz)
Spectrogram with N=32
Time
Spectrogram N=64
0 50 100 150 200 250
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Frequency (Hz)
Spectrogram with N=64
Time
Spectrogram N=128
0 50 100 150 200 250
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Frequency (Hz)
Spectrogram with N=128
Time
Spectrogram N=256
0 50 100 150 200 250
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
Frequency (Hz)
Spectrogram with N=256
Time
Windows
•  There is a trade-off between achieving time and frequency
resolution with the FFT
•  The more accurate the time resolution the less accurate the
frequency resolution
•  Mathematically, this is due to the actual process of breaking the
overall set of samples in frames of N samples
•  This process is termed windowing
•  In the simple case, a window of N samples moves along the overall
signal in “jumps” of N samples for each time the FFT is calculated
•  The window itself has a “non-perfect” frequency content and this
distorts (“smears”) the frequency content of the signal being
analysed
–  The longer the window (larger N) the less frequency distortion occurs
–  The shorter the window (smaller N) the more frequency distortion
occurs
Other Windows
•  The example of windowing previously shown uses what
is known as a rectangular window of size N
–  The frame can be viewed as the multiplication of the original
complete set of signal samples multiplied by an equal length
window signal
–  This window signal has samples which are all 0 except for N
samples centred around the current frame of interest
•  There are other windows more commonly used that offer
less “distortion”
–  Hamming Window
–  Hanning Window
–  Kaiser Window
–  Etc.
Impact of Window Type on
frequency resolution
0 200 400 600 800 1000 1200
-1
-0.5
0
0.5
1
Sample (n)
Sine Wave with frequency=0.5 with Reactangular window applied
0 0.5 1 1.5 2 2.5 3 3.5
-20
0
20
40
60
Digital Frequency (theta)
Magnitude(dB)
0 200 400 600 800 1000 1200
-1
-0.5
0
0.5
1
Sample (n)
Sine Wave with frequency=0.5 with Hamming window applied
0 0.5 1 1.5 2 2.5 3 3.5
-50
0
50
Digital Frequency (theta)
Magnitude(dB)
Ability to Identify Frequency
Components
0 50 100 150 200 250
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Frequency (Hz)
Time
0 50 100 150 200 250
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Frequency (Hz)
Time
FFT for N=64 with
Rectangular Window
(Two Sine Waves
F=50Hz and f=60Hz)
FFT for N=64 with
Kaiser Window
(Two Sine Waves
F=50Hz and f=60Hz)
Power Spectral Density
•  The Power Spectral Density (PSD) is
closely associated with the FFT
•  Theoretically it can be related to either a
stochastic signal’s autocorrelation function
or its Fourier TransformFrequency
Spectrum
•  It offers a more statistically valid means of
representing where signal power is
distributed in the frequency spectrum
– Typically at the expense of frequency
resolution
PSD Calculation
•  Common methods for calculating PSD use
the following steps:
– Subdivide the frame of N signal samples into
P frames with M samples in them (M<N) and
(P>=N/M)
– For each of these P frames of M samples
•  Calculate the FFT of the frame of M samples
•  Square the magnitude of the resulting frequency
points in the FFT (and “weight” them)
– Average (perhaps with some weighting factor
or using overlapping frames) corresponding
frequency points in the P frames
Comments on PSD
•  Does the PSD tell you anything new that
you would not “know” from looking at the
FFT?
– Probably not!
•  Does the PSD offer a “more valid”
measure of the frequency make-up of a
signal ?
– Yes and certainly to journal paper reviewers!
Interpolation and Decimation
•  Sometimes you may feel that you have
“too” many or “too” few sample points after
you have sampled your signal
•  In these cases you may want to decimate
or interpolate the samples
– Reduce the number of samples/sampling
frequency by a factor of N
– Increase the number of samples/sampling
frequency by a factor of N
Decimation
•  Intuitively this may seem trivial
– e.g. If you need to drop33 half the samples
then just select every second sample
•  Partially correct but there may be an issue
with “aliasing”
– In dropping every 2nd sample in this example
we have effectively reduced the sampling
frequency by 2
– Aliasing will occur if there were (significant)
frequency components in the original signal
above half the NEW sampling frequency
Undesired Aliasing Effect
•  Two (sine wave) components at 2 kHz and 5 kHz in the original signal
sampled at 16 kHz
•  When we decimate by a factor or 2, we can only have a signal with
components up to 4 kHz (i.e. half the NEW sampling frequency)
•  However, it now looks like we have a 2nd “phantom” component at 3 kHz as
well as the “valid” component at 2 kHz
•  We should have filtered (LPF) the original signal before decimation!
0 500 1000 1500 2000 2500 3000 3500 4000
0
500
1000
1500
2000
2500
3000
3500
4000
4500
ComponentMagnitude
Frequency (Hz)
Frequency Spectrum after decimation
0 1000 2000 3000 4000 5000 6000 7000 8000
0
500
1000
1500
2000
2500
3000
3500
4000
ComponentMagnitude
Frequency (Hz)
Frequency Spectrum of original signal
More Advanced Topics
Interpolation
•  There may be cases where we need to
increase the number of samplessampling
frequency (Say by 2)
•  Again an intuitive solution would be to
insert “zero values” between each current
sample and “smooth” the resulting signal
•  But “smooth” really means that we apply a
digital filter
– So what filter is suitable and what happens if
we don’t use one?
Interpolation Steps
0 500 1000 1500 2000 2500 3000 3500 4000
0
500
1000
1500
2000
2500
3000
3500
4000
ComponentMagnitude
Frequency (Hz)
Frequency Spectrum of original signal
0 1000 2000 3000 4000 5000 6000 7000 8000
0
500
1000
1500
2000
2500
3000
3500
4000
ComponentMagnitude
Frequency (Hz)
Frequency Spectrum after zero insertion
0 1000 2000 3000 4000 5000 6000 7000 8000
0
500
1000
1500
2000
2500
3000
3500
ComponentMagnitude
Frequency (Hz)
Frequency Spectrum after smoothing zeros (Poor choice of LPF)
A poor LPF smoothing filter was
deliberately apply to illustrate
how an interpolation “artefact”
can remain in the frequency
spectrum after smoothing
Time-Frequency Resolution
Trade-off
•  So with the FFT you can localise in time
(Δt) OR localise in frequency (Δf) but not
both at the same time
Δt Δf = constant
– Short time windows offer better time
resolution
– Long time windows offer better frequency
resolution
– But whichever we choose – it’s applicable to
all frequencies which often is not desirable!
Wavelet Transform
•  In some applications however, it may be
desirable to trade-off time and frequency
resolution to different degrees at
difference frequencies
•  A quite common requirement would be to
want
– Better time resolution at “higher” frequencies
at the expense of frequency resolution
– Better frequency resolution at “lower”
frequencies at the expense of time resolution
Limitation of Fourier Transform
•  The limitation of the (Short Term) Fourier
Transform relates back to its mathematical
foundations
– Sampled signal could (in theory) be formed by
summation of an infinite number of equal
length sine waves each with a different
amplitude scaling factor (magnitude of the
STFT) and each with a different phase shift
(phase of the STFT)
– All these “basis functions” have the same
length and hence time resolution!
Wavelet Transform (WT)
•  Wavelet analysis has a similar foundation
except that the lengthduration of the
“basis” functions can be different at
difference frequencies (called “scales in
WT parlance)
– Short “duration” basis functions used at
“higher” frequencies
– Longer “duration basis functions used at
“lower” frequencies
Comparing STFT and WT for
Time-Frequency Analysis
•  Highlights how wavelet analysis can
achieve a trade-off in time-frequency
resolution compared with traditional STFT
analysis
When to use WT and what
needs to be done ?
•  Wavelet analysis may prove a useful tool if you feel
that STFT is failing to “accurately” capture localised
characteristic either in frequency (low frequency
spectral separation) or time (high frequency
temporal resolution)
•  A huge array of difference wavelet “families” have
been used and it is often a question of “trial and
error” to determine which is best suited to an
application
•  But before you start with WT – you need to ask
yourself whether there is evidence in STFT analysis
to make you think that WT will uncover something
new in your signal
AR(MA) Prediction Models
•  AR(MA) models have already been examined in detail as
linear predictors in the time domain
•  These techniques also provide a complimentary analysis
techniques to STFT
•  The sampled signal is segmented into frames of N
samples (during which the signal is assumed to be
stationary)
•  AR(MA) models produce a set of coefficients for a (filter)
difference equation
–  AR models result in a difference equation in x[n] and y[n-k] terms
–  ARMA models result in addition terms in the difference equation
contains terms in x[n-l]
•  Like all filtersdifference equation, we can examine the
frequency response of the model
Frequency Response of an AR
Model of an EEG signal
0 5 10 15 20 25 30 35 40 45 50
100
200
300
400
500
600
700
EEG Frame Spectrum
Frequency (Hz)
ComponentMagnitude
0 5 10 15 20 25 30 35 40 45 50
5
10
15
20
AR Model Spectrum
Frequency (Hz)
ComponentMagnitude
STFT Magnitude
AR(p=12) Model
Magnitude Response
AR(MA) Model Frequency
Response
•  The frequency magnitude response of an AR(MA) model
is effectively a smoothed approximation of the STFT
magnitude response
•  As such, it highlights the main “resonant” frequencies of
the signal rather than the finer detail of the STFT
STFT for word /ahh/
Frequency (Hz)
Time(s)
0 500 1000 1500 2000 2500 3000 3500
0
1
2
3
4
5
6
Frequency response of AR(12) model for /ahh/
Frequency (Hz)
Time(s)
0 500 1000 1500 2000 2500 3000 3500
0
1
2
3
4
5
6
AR(p=12) EEG Model
Spectrogram
0 20 40 60 80 100 120 140 160
-500
0
500
1000
Time (s)
EEGSampleValues
FFT Analysis
Time (s)
Frequency(Hz)
20 40 60 80 100 120 140 160 180
0
20
40
0 20 40 60 80 100 120 140 160
-500
0
500
1000
Time (s)
EEGSampleValues
AR Model Analysis
Time (s)
Frequency(Hz)
20 40 60 80 100 120 140 160 180
0
20
40
FFT Based Spectrogram
AR(p=12) Model
Spectrogram
ARMA EEG Model Performance
0 20 40 60 80 100 120 140 160
-500
0
500
1000
Time (s)
EEGSampleValues
FFT Analysis
Time (s)
Frequency(Hz)
20 40 60 80 100 120 140 160 180
0
20
40
FFT Based Spectrogram
ARMA(10,4) Model
Spectrogram
0 20 40 60 80 100 120 140 160
-500
0
500
1000
Time (s)
EEGSampleValues
ARMA Model Analysis
Time (s)
Frequency(Hz)
20 40 60 80 100 120 140 160 180
0
20
40
SP applications of AR(MA)
models
•  Like STFT and WT, it offers a valid frequency
domain representation of the signal
•  Because of the smoother “surface”, it often offers
a means of more easily tracking the temporal
trajectory of key resonant frequencies or
components
•  For some applications, the resonant frequencies
identified by AR(MA) models can be associated
with physical parameters of the system that
produced the signal
Synchrony
•  Correlation offers a time domain “similarity”
measure
•  Synchrony measures attempt to quantify the
level of synchronisation between certain
frequencies (or frequency bands) in two
difference signals
•  Large number of different measures of linear
and non-linear “synchrony”
–  http://www.dauwels.com/Papers/NeuroImage2009.pdf
provides an excellent overview of many different
measures
–  Commonly used in EEG signal analysis
Cross Coherence
•  Cross coherence is one of the simpler
measures of synchrony and can be easily
calculated from the STFT of the two
signals being analysed
•  Fa(t,f) is the STFT of signal “a” at time t and
frequency f
•  Fb(t,f) is the complex conjugate of the
STFT of signal “b” at time t and frequency f
Cross Coherence (2)
•  Resultant complex value has a magnitude value
between 1 (meaning the two signals are
perfectly synchronised at that frequency
component) and 0 (meaning there is a complete
absence of synchronisation at that frequency
component)
•  The phase angle of the cross coherence can be
easily converted into a corresponding time
advance/delay between the two signals at that
frequency
Sample EEG Cross Coherence
0
0.24
0.48
0.72
0.96
-200 0 200 400 600 800
0
1
Time (ms)
coh.
20
40
60
0 0.8
Freq.(Hz)
coh.
Freq.(Hz)
Time (ms)
-200 0 200 400 600 800
20
40
60
-180
-90
0
90
180
Event-Related Coherence
See Matlab add on toolbox EEGlab: http://sccn.ucsd.edu/eeglab/
Independent Component
Analysis (ICA)
•  ICA techniques are used in scenarios
where it is possible to measure N different
signals which are formed by a linear
combination of M underlying (but not
measurable) signals of interest
We can measure xi[n] but we actually want to know sj[n] and/or aij
ICA (2)
•  If certain conditions are valid concerning
the statistical independence of the source
signals”factors”, then ICA can be used to
estimate them
•  Large variety of different ICA algorithms
depending on particular requirements
(under-, over-stated, real time, single
channel,…)
•  http://cnl.salk.edu/~tewon/Blind/
blind_audio.html
Applications of ICA
•  Most common application of ICA are in:
– Wireless communication
– EEG analysis
– Separation of biosignals
•  Maternal and foetal ECG separation
– Investigation of hidden factors in financial data
signals
– Image Noise reduction
ICA Resources
•  http://www.ee.columbia.edu/~dpwe/e6820/
papers/HyvO00-icatut.pdf (Tutorial paper)
•  http://www.bsp.brain.riken.jp/ICALAB/
(Matlab ICA toolbox)
Thank You!

More Related Content

What's hot

Association Rule Learning Part 1: Frequent Itemset Generation
Association Rule Learning Part 1: Frequent Itemset GenerationAssociation Rule Learning Part 1: Frequent Itemset Generation
Association Rule Learning Part 1: Frequent Itemset GenerationKnoldus Inc.
 
Introduction to Information Theory and Coding.pdf
Introduction to Information Theory and Coding.pdfIntroduction to Information Theory and Coding.pdf
Introduction to Information Theory and Coding.pdfJimma University
 
Time Series - Auto Regressive Models
Time Series - Auto Regressive ModelsTime Series - Auto Regressive Models
Time Series - Auto Regressive ModelsBhaskar T
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep LearningYan Xu
 
Lect5 principal component analysis
Lect5 principal component analysisLect5 principal component analysis
Lect5 principal component analysishktripathy
 
回帰モデルとして見る信号検出理論
回帰モデルとして見る信号検出理論回帰モデルとして見る信号検出理論
回帰モデルとして見る信号検出理論Shushi Namba
 
Performance Analysis Of Different Digital Modulation Scheme
Performance Analysis Of Different Digital Modulation SchemePerformance Analysis Of Different Digital Modulation Scheme
Performance Analysis Of Different Digital Modulation SchemeAjay Walia
 
A brief introduction to mutual information and its application
A brief introduction to mutual information and its applicationA brief introduction to mutual information and its application
A brief introduction to mutual information and its applicationHyun-hwan Jeong
 
Linear Regression With R
Linear Regression With RLinear Regression With R
Linear Regression With REdureka!
 
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...Waqas Afzal
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsArvind Devaraj
 
Lasso and ridge regression
Lasso and ridge regressionLasso and ridge regression
Lasso and ridge regressionSreerajVA
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochasticsohail40
 

What's hot (20)

Association Rule Learning Part 1: Frequent Itemset Generation
Association Rule Learning Part 1: Frequent Itemset GenerationAssociation Rule Learning Part 1: Frequent Itemset Generation
Association Rule Learning Part 1: Frequent Itemset Generation
 
5 linear block codes
5 linear block codes5 linear block codes
5 linear block codes
 
Introduction to Information Theory and Coding.pdf
Introduction to Information Theory and Coding.pdfIntroduction to Information Theory and Coding.pdf
Introduction to Information Theory and Coding.pdf
 
Time Series - Auto Regressive Models
Time Series - Auto Regressive ModelsTime Series - Auto Regressive Models
Time Series - Auto Regressive Models
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
 
Topology ppt
Topology pptTopology ppt
Topology ppt
 
Lect5 principal component analysis
Lect5 principal component analysisLect5 principal component analysis
Lect5 principal component analysis
 
回帰モデルとして見る信号検出理論
回帰モデルとして見る信号検出理論回帰モデルとして見る信号検出理論
回帰モデルとして見る信号検出理論
 
Performance Analysis Of Different Digital Modulation Scheme
Performance Analysis Of Different Digital Modulation SchemePerformance Analysis Of Different Digital Modulation Scheme
Performance Analysis Of Different Digital Modulation Scheme
 
A brief introduction to mutual information and its application
A brief introduction to mutual information and its applicationA brief introduction to mutual information and its application
A brief introduction to mutual information and its application
 
Sampling Distributions and Estimators
Sampling Distributions and Estimators Sampling Distributions and Estimators
Sampling Distributions and Estimators
 
Linear Regression With R
Linear Regression With RLinear Regression With R
Linear Regression With R
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
 
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...
Signal and System, CT Signal DT Signal, Signal Processing(amplitude and time ...
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier Transforms
 
Lasso and ridge regression
Lasso and ridge regressionLasso and ridge regression
Lasso and ridge regression
 
AR model
AR modelAR model
AR model
 
Deterministic vs stochastic
Deterministic vs stochasticDeterministic vs stochastic
Deterministic vs stochastic
 
Basic concepts
Basic conceptsBasic concepts
Basic concepts
 

Similar to 2014.06.19 Time Series Analysis Workshop ..Signal Processing Methods

A review of time­‐frequency methods
A review of time­‐frequency methodsA review of time­‐frequency methods
A review of time­‐frequency methodsUT Technology
 
Time-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTTime-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTUT Technology
 
Introduction to wavelet transform
Introduction to wavelet transformIntroduction to wavelet transform
Introduction to wavelet transformRaj Endiran
 
Report on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodReport on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodshivam singh
 
Oscilloscope Lab
Oscilloscope LabOscilloscope Lab
Oscilloscope Labcyberns_
 
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computation
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computationDSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computation
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computationDeltares
 
Ultrasonic Range Finder
Ultrasonic Range FinderUltrasonic Range Finder
Ultrasonic Range FinderHicham Berkouk
 
Ms 1341-p touze-final
Ms 1341-p touze-finalMs 1341-p touze-final
Ms 1341-p touze-finalThomasTouz
 
Filter Design Using MATLAB (FDA Tool)
Filter Design Using MATLAB (FDA Tool)Filter Design Using MATLAB (FDA Tool)
Filter Design Using MATLAB (FDA Tool)Yahya Rais
 
Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Xi Qiu
 

Similar to 2014.06.19 Time Series Analysis Workshop ..Signal Processing Methods (20)

H06 elo b
H06 elo bH06 elo b
H06 elo b
 
present
presentpresent
present
 
A review of time­‐frequency methods
A review of time­‐frequency methodsA review of time­‐frequency methods
A review of time­‐frequency methods
 
SENSING WITH CHAOS
SENSING WITH CHAOSSENSING WITH CHAOS
SENSING WITH CHAOS
 
Gyroscope_sensors
Gyroscope_sensorsGyroscope_sensors
Gyroscope_sensors
 
Time-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTTime-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SST
 
Practicas de fisica 1
Practicas de fisica 1Practicas de fisica 1
Practicas de fisica 1
 
Unit 4 ei
Unit 4 eiUnit 4 ei
Unit 4 ei
 
Introduction to wavelet transform
Introduction to wavelet transformIntroduction to wavelet transform
Introduction to wavelet transform
 
Report on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodReport on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm method
 
sampling-alising.pdf
sampling-alising.pdfsampling-alising.pdf
sampling-alising.pdf
 
Upcoming Changes of International Standards for the Classification of Radiome...
Upcoming Changes of International Standards for the Classification of Radiome...Upcoming Changes of International Standards for the Classification of Radiome...
Upcoming Changes of International Standards for the Classification of Radiome...
 
Oscilloscope Lab
Oscilloscope LabOscilloscope Lab
Oscilloscope Lab
 
LDV
LDVLDV
LDV
 
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computation
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computationDSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computation
DSD-INT - SWAN Advanced Course - 02 - Setting up a SWAN computation
 
Ultrasonic Range Finder
Ultrasonic Range FinderUltrasonic Range Finder
Ultrasonic Range Finder
 
Ms 1341-p touze-final
Ms 1341-p touze-finalMs 1341-p touze-final
Ms 1341-p touze-final
 
Filter Design Using MATLAB (FDA Tool)
Filter Design Using MATLAB (FDA Tool)Filter Design Using MATLAB (FDA Tool)
Filter Design Using MATLAB (FDA Tool)
 
Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)
 
Ofdm talk
Ofdm talkOfdm talk
Ofdm talk
 

More from NUI Galway

Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...
Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...
Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...NUI Galway
 
Tom Turner, Tipping the scales for labour in Ireland?
Tom Turner, Tipping the scales for labour in Ireland? Tom Turner, Tipping the scales for labour in Ireland?
Tom Turner, Tipping the scales for labour in Ireland? NUI Galway
 
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...NUI Galway
 
Stephen Byrne, A non-employment index for Ireland
Stephen Byrne, A non-employment index for IrelandStephen Byrne, A non-employment index for Ireland
Stephen Byrne, A non-employment index for IrelandNUI Galway
 
Sorcha Foster, The risk of automation of work in Ireland
Sorcha Foster, The risk of automation of work in IrelandSorcha Foster, The risk of automation of work in Ireland
Sorcha Foster, The risk of automation of work in IrelandNUI Galway
 
Sinead Pembroke, Living with uncertainty: The social implications of precario...
Sinead Pembroke, Living with uncertainty: The social implications of precario...Sinead Pembroke, Living with uncertainty: The social implications of precario...
Sinead Pembroke, Living with uncertainty: The social implications of precario...NUI Galway
 
Paul MacFlynn, A low skills equilibrium in Northern Ireland
Paul MacFlynn, A low skills equilibrium in Northern IrelandPaul MacFlynn, A low skills equilibrium in Northern Ireland
Paul MacFlynn, A low skills equilibrium in Northern IrelandNUI Galway
 
Nuala Whelan, The role of labour market activation in building a healthy work...
Nuala Whelan, The role of labour market activation in building a healthy work...Nuala Whelan, The role of labour market activation in building a healthy work...
Nuala Whelan, The role of labour market activation in building a healthy work...NUI Galway
 
Michéal Collins, and Dr Michelle Maher, Auto enrolment
 Michéal Collins, and Dr Michelle Maher, Auto enrolment Michéal Collins, and Dr Michelle Maher, Auto enrolment
Michéal Collins, and Dr Michelle Maher, Auto enrolmentNUI Galway
 
Michael Taft, A new enterprise model
Michael Taft, A new enterprise modelMichael Taft, A new enterprise model
Michael Taft, A new enterprise modelNUI Galway
 
Luke Rehill, Patterns of firm-level productivity in Ireland
Luke Rehill, Patterns of firm-level productivity in IrelandLuke Rehill, Patterns of firm-level productivity in Ireland
Luke Rehill, Patterns of firm-level productivity in IrelandNUI Galway
 
Lucy Pyne, Evidence from the Social Inclusion and Community Activation Programme
Lucy Pyne, Evidence from the Social Inclusion and Community Activation ProgrammeLucy Pyne, Evidence from the Social Inclusion and Community Activation Programme
Lucy Pyne, Evidence from the Social Inclusion and Community Activation ProgrammeNUI Galway
 
Lisa Wilson, The gendered nature of job quality and job insecurity
Lisa Wilson, The gendered nature of job quality and job insecurityLisa Wilson, The gendered nature of job quality and job insecurity
Lisa Wilson, The gendered nature of job quality and job insecurityNUI Galway
 
Karina Doorley, axation, labour force participation and gender equality in Ir...
Karina Doorley, axation, labour force participation and gender equality in Ir...Karina Doorley, axation, labour force participation and gender equality in Ir...
Karina Doorley, axation, labour force participation and gender equality in Ir...NUI Galway
 
Jason Loughrey, Household income volatility in Ireland
Jason Loughrey, Household income volatility in IrelandJason Loughrey, Household income volatility in Ireland
Jason Loughrey, Household income volatility in IrelandNUI Galway
 
Ivan Privalko, What do Workers get from Mobility?
Ivan Privalko, What do Workers get from Mobility?Ivan Privalko, What do Workers get from Mobility?
Ivan Privalko, What do Workers get from Mobility?NUI Galway
 
Helen Johnston, Labour market transitions: barriers and enablers
Helen Johnston, Labour market transitions: barriers and enablersHelen Johnston, Labour market transitions: barriers and enablers
Helen Johnston, Labour market transitions: barriers and enablersNUI Galway
 
Gail Irvine, Fulfilling work in Ireland
Gail Irvine, Fulfilling work in IrelandGail Irvine, Fulfilling work in Ireland
Gail Irvine, Fulfilling work in IrelandNUI Galway
 
Frank Walsh, Assessing competing explanations for the decline in trade union ...
Frank Walsh, Assessing competing explanations for the decline in trade union ...Frank Walsh, Assessing competing explanations for the decline in trade union ...
Frank Walsh, Assessing competing explanations for the decline in trade union ...NUI Galway
 
Eamon Murphy, An overview of labour market participation in Ireland over the ...
Eamon Murphy, An overview of labour market participation in Ireland over the ...Eamon Murphy, An overview of labour market participation in Ireland over the ...
Eamon Murphy, An overview of labour market participation in Ireland over the ...NUI Galway
 

More from NUI Galway (20)

Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...
Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...
Vincenzo MacCarrone, Explaining the trajectory of collective bargaining in Ir...
 
Tom Turner, Tipping the scales for labour in Ireland?
Tom Turner, Tipping the scales for labour in Ireland? Tom Turner, Tipping the scales for labour in Ireland?
Tom Turner, Tipping the scales for labour in Ireland?
 
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...
Tom McDonnell, Medium-term trends in the Irish labour market and possibilitie...
 
Stephen Byrne, A non-employment index for Ireland
Stephen Byrne, A non-employment index for IrelandStephen Byrne, A non-employment index for Ireland
Stephen Byrne, A non-employment index for Ireland
 
Sorcha Foster, The risk of automation of work in Ireland
Sorcha Foster, The risk of automation of work in IrelandSorcha Foster, The risk of automation of work in Ireland
Sorcha Foster, The risk of automation of work in Ireland
 
Sinead Pembroke, Living with uncertainty: The social implications of precario...
Sinead Pembroke, Living with uncertainty: The social implications of precario...Sinead Pembroke, Living with uncertainty: The social implications of precario...
Sinead Pembroke, Living with uncertainty: The social implications of precario...
 
Paul MacFlynn, A low skills equilibrium in Northern Ireland
Paul MacFlynn, A low skills equilibrium in Northern IrelandPaul MacFlynn, A low skills equilibrium in Northern Ireland
Paul MacFlynn, A low skills equilibrium in Northern Ireland
 
Nuala Whelan, The role of labour market activation in building a healthy work...
Nuala Whelan, The role of labour market activation in building a healthy work...Nuala Whelan, The role of labour market activation in building a healthy work...
Nuala Whelan, The role of labour market activation in building a healthy work...
 
Michéal Collins, and Dr Michelle Maher, Auto enrolment
 Michéal Collins, and Dr Michelle Maher, Auto enrolment Michéal Collins, and Dr Michelle Maher, Auto enrolment
Michéal Collins, and Dr Michelle Maher, Auto enrolment
 
Michael Taft, A new enterprise model
Michael Taft, A new enterprise modelMichael Taft, A new enterprise model
Michael Taft, A new enterprise model
 
Luke Rehill, Patterns of firm-level productivity in Ireland
Luke Rehill, Patterns of firm-level productivity in IrelandLuke Rehill, Patterns of firm-level productivity in Ireland
Luke Rehill, Patterns of firm-level productivity in Ireland
 
Lucy Pyne, Evidence from the Social Inclusion and Community Activation Programme
Lucy Pyne, Evidence from the Social Inclusion and Community Activation ProgrammeLucy Pyne, Evidence from the Social Inclusion and Community Activation Programme
Lucy Pyne, Evidence from the Social Inclusion and Community Activation Programme
 
Lisa Wilson, The gendered nature of job quality and job insecurity
Lisa Wilson, The gendered nature of job quality and job insecurityLisa Wilson, The gendered nature of job quality and job insecurity
Lisa Wilson, The gendered nature of job quality and job insecurity
 
Karina Doorley, axation, labour force participation and gender equality in Ir...
Karina Doorley, axation, labour force participation and gender equality in Ir...Karina Doorley, axation, labour force participation and gender equality in Ir...
Karina Doorley, axation, labour force participation and gender equality in Ir...
 
Jason Loughrey, Household income volatility in Ireland
Jason Loughrey, Household income volatility in IrelandJason Loughrey, Household income volatility in Ireland
Jason Loughrey, Household income volatility in Ireland
 
Ivan Privalko, What do Workers get from Mobility?
Ivan Privalko, What do Workers get from Mobility?Ivan Privalko, What do Workers get from Mobility?
Ivan Privalko, What do Workers get from Mobility?
 
Helen Johnston, Labour market transitions: barriers and enablers
Helen Johnston, Labour market transitions: barriers and enablersHelen Johnston, Labour market transitions: barriers and enablers
Helen Johnston, Labour market transitions: barriers and enablers
 
Gail Irvine, Fulfilling work in Ireland
Gail Irvine, Fulfilling work in IrelandGail Irvine, Fulfilling work in Ireland
Gail Irvine, Fulfilling work in Ireland
 
Frank Walsh, Assessing competing explanations for the decline in trade union ...
Frank Walsh, Assessing competing explanations for the decline in trade union ...Frank Walsh, Assessing competing explanations for the decline in trade union ...
Frank Walsh, Assessing competing explanations for the decline in trade union ...
 
Eamon Murphy, An overview of labour market participation in Ireland over the ...
Eamon Murphy, An overview of labour market participation in Ireland over the ...Eamon Murphy, An overview of labour market participation in Ireland over the ...
Eamon Murphy, An overview of labour market participation in Ireland over the ...
 

Recently uploaded

VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 

Recently uploaded (20)

VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 

2014.06.19 Time Series Analysis Workshop ..Signal Processing Methods

  • 1. Time Series Analysis: Introduction to Signal Processing Concepts Liam Kilmartin Discipline of Electrical & Electronic Engineering, NUI, Galway
  • 2. Aims of Course •  To introduce some of the basic concepts of digital signal processing – Where possible to avoid getting too mathematical! – In many cases looking at concepts you have already studied from a slightly different perspective •  To complete some workshop exercises using MATLAB to gain an basic appreciation of what MATLAB offers •  Examine applications in a number of application areas
  • 3. Workshop Syllabus •  The DSP topics which we will cover include some basic topics: – Sampling waveforms – Time domain: •  Digital filters •  Energy estimation •  Periodicity estimation – Frequency domain analysis •  Fourier Analysis •  Wavelet Analysis •  Coherence and Synchrony – Applications
  • 5. Where to start ? •  Before we actually start looking at signal processing, we need to familiarise ourselves with some basic terminology •  As will be seen presently, sinusoidal waveforms are very important in signal processing so firstly a primer on these waveforms
  • 6. What is a Sine Wave ? •  A sine wave has three basic parameter that define its behaviour –  Amplitude (A) (the “height” of the oscillation) –  Frequency (f) •  The signal “repeats” itself exactly over and over. •  Its frequency is the “number” of complete oscillations/cycles completed in a single second. Measured in Hertz (s-1) •  Directly related to the Period (T) of the waveform which is the time it takes to complete one full oscillation –  Frequency=1/Period (f=1/T) •  An alternate measure termed angular frequency (ω) measured in radians per second is sometimes used (ω=2πf) •  But in some application areas, e.g. financial time series, talking about frequencies in units of Hz is nonsensical –  Consider time series of closing prices of a exchange index (1 “sample” per day!) –  Phase (φ) •  The relevance of this quantity is often misunderstood
  • 7. Sine Wave Parameters 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (s) Amplitude=1 Period=0.1 seconds Frequency=1/0.1=10 Hz
  • 8. Phase of a Sine Wave •  Phase is an angular measurement and hence can be quantified in units of either degrees or radians –  Remember 360° is the same as 2π radians and this represents one full cycle of the waveform! •  The term phase is often used quite loosely •  It can have two distinct meanings –  When you are referring to a single sine wave then you can refer to the instantaneous phase •  This reflects the current point that the sine wave is at in its cycle at a specific moment in time –  When you are referring to two sine waves (of the same frequency) then you can talk about a phase difference •  This can be measured by measuring the time difference between the points where each sine waves passes through the axis. This value is then represented as a phase angle by comparing it to the period (The period is viewed as being the equivalent of 360°)
  • 9. Instantaneous Phase •  When you draw a graph of a single sine wave, it typically has a value of 0 at the start of the graph (i.e. time=0) •  In such a case, the instantaneous phase at time=0 will be 0° (i.e. the “start” of a cycle) •  When the waveform hit its first positive peak value (i.e. one quarter way through the cycle), this is deemed to be the time where the instantaneous phase is 90° •  When the waveform returns to zero next (i.e. half way through the cycle), this is deemed to be when the instantaneous phase is 180° •  And so on until the moment when one complete cycle has been completed which is deemed to be the time where the instantaneous phase in 360° –  What happens after this point when the “next” cycle starts? •  One option: –  The measure of phase continues on past 360° (i.e. 450°, 540° etc.) which is termed unwrapped phase. However, such a measure is unbounded and hence difficult to represent graphical •  So instead we more commonly use wrapped phase –  Once 360° is reached we start again at 0° or once 180° is reached we start again at -180° •  The latter range is more commonly used •  Wrapped phase is more commonly used simply because it makes drawing graphs of phase more manageable)
  • 10. Graphs of Instantaneous Phase 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (s) 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0 100 200 300 400 500 600 700 800 Degrees Time (s) Unwrapped Phase 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -200 -150 -100 -50 0 50 100 150 200 Degrees Time (s) Wrapped Phase
  • 11. Phase Difference •  Typically (though not exclusively) used to quantify the “timing difference” between two sine waves at the same frequency –  To complicate matters this measure is often applied to only a single sine wave where the “second” sine wave is assumed to be an implied “reference” sine wave •  Two sine waves are said to be “in phase” if their phase difference is 0° and completely “out of phase” if their phase difference is 180°
  • 12. Graphs of Phase Difference 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (s) Comparison of Two Sinusoids Time Difference=0.25 sec Phase Difference=0.025/0.1*360 degrees=90 degrees Phase Difference of red wave relative to blue wave is +90 degrees Phase Difference of blue wave relative to red wave is -90 degrees
  • 13. Phase of a Single Sine Wave 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (s) Assumption is that phase is being measured relative to a similar sinusoid whose value at time 0 seconds was 0 Time Difference in this case is clearly 0.05 seconds and hence phase relative to this notional second (red) sine wave is 0.05/0.5*360=180 degrees 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (s) Comparison of Two Sinusoids
  • 14. So Why the Emphasis on Sine Waves ? •  A basic understanding of the terminology of sine waves is essential because mathematically all real world waveform can be viewed as being formed by adding together a carefully selected sequence of sine waves –  Each sine wave having a carefully selected amplitude and phase difference –  This approach is known as Fourier Analysis •  For real world signals, it offers an analysis methodology rather than a synthesis approach –  By viewing any signal as being a sum of sine waves, we can analyse or alter the signal by considering these individual sine wave components rather than the complex complete signal •  There is loads of mathematical theory and techniques for processing/analysing sine waves
  • 15. Illustration of Fourier Analysis 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) 0 2 4 6 8 10 12 14 16 18 -1 -0.5 0 0.5 1 New Component Time (s) 0 2 4 6 8 10 12 14 16 18 20 -1 -0.5 0 0.5 1 Composite Waveform Time (s) We will illustrate how a more complex waveform (square wave) can be formed by adding together specific sine waves With each component that is added the composite waveform is getting “nearer” to the desired square wave
  • 16. Comments •  The approach just outlined is a nice illustration of how a more “complex” signal can be formed by adding together a series of simple “basis” signals (sinusoids) •  But some points to note – The “complex” signal that we are try to form must be periodic •  very few real world signal exhibit anything approximating this behaviour
  • 17. Comments (2) – This approach only produces an approximation •  The more (higher frequency) basis signals we added the closer the approximation gets to the desired complex signal – The basis signals as all periodic with a frequency that is an integer multiple of the frequency of the desired complex signal •  Harmonics •  Consider notionally what happens to this approach if we consider “real world” signals that are not strictly periodic ?
  • 19. Typical DSP Configuration “Real World” Signals Pressure: • Speech • Music • SONAR Bio-Electric: • EEG • ECG Electromagnetic: • Radio • RADAR Images: • Camera • MRI Other: • Seismic Sensor/ Transducer Electrical Waveform which ideally should be an analogue of the “real world” signal Not always an exact “copy” due to distortions introduced by sensor Anti Aliasing Filter Sampling Circuit Sequence of Digital Samples for Processing FinancialEconomic “Signals”
  • 20. What is Sampling ? •  Sampling Circuits (also known as Analogue to Digital Converters [ADC]) –  Instantaneously measure the current value of the electrical voltage waveform (e.g. output from a physiological electrode or sensor, a micro-phone etc.) –  Represents this voltage by a number •  This number reflects the voltage level –  If the voltage is positive then the number should be “positive” –  If the voltage is negative then the number should be “negative” –  If the voltage is large then the number should be “large”… etc. •  This process is repeated over and over again at a fixed interval known as the sampling period (Ts) –  The number of times that this sampling process occurs every second is known as the sampling frequency (fs) •  One important point: –  The real electrical voltage waveform can have ANY voltage level in a continuum between its maximum and minimum value –  However, there will be a finite set of “numbers” (defined by the number of bits in the ADC) by which the voltage measures can be represented •  Thus this process may/will introduce an error (known as quantisation error) in the digitised representation of the analogue waveform but this is unavoidable! •  The quantisation error can be made smaller by using an ADC which has a larger number of bits but this has cost/storage(?) implications
  • 21. Example of Sampling Let’s look at sampling this sine wave with a frequency of 10 Hz 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (sec) 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (sec) 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 In this example the sampling frequency of 200 Hz is used (Ts=0.005 sec)
  • 22. How do you choose the Sampling Frequency? •  There is a criteria that must be satisfied when selecting a sampling frequency to use –  Nyquist Criteria or Shannon’s Theorem •  The sampling frequency (fs) must be AT LEAST TWICE (a factor of 2.5 is sometimes used as a rule of thumb!) the highest frequency present in the waveform being sampled –  Remember real world signals can be viewed as being formed by a sum of sine waves of different frequencies •  However … in some application spaces…. It is impossible to quantify as there is no “analogue” signal to measure or, arguably more correctly, it is not practical to measure the underlying signal –  e.g. Financial data
  • 23. Aliasing •  What happens if this criteria is NOT adhered to ? •  If there are frequency components present in the waveform being sampled which have a frequency greater than fs/2 (the Nyquist frequency) then a distortive effect known as aliasing will occur •  Aliasing results in a sine wave whose frequency is greater than the Nyquist frequency (say fs/2+a) appear as if it were a completely different frequency which is less than the Nyquist frequency (say fs/ 2-a) •  Thus, once a signal is sampled it only makes sense to talk about frequencies in the range of 0Hz up to fs/2 Hz •  The function of the anti-aliasing filter/circuit is to ensure that this criteria is met –  It is an electronic circuit which “blocks” all frequencies above fs/2 –  Well, approximately blocks them – in reality it attenuates them heavily
  • 24. Example of Aliasing 0 0.005 0.01 0.015 0.02 0.025 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (sec) This time we consider sampling a 150 Hz sine wave with a sampling frequency of 200 Hz – Clearly the Nyquist criteria is NOT met! 0 0.005 0.01 0.015 0.02 0.025 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Time (sec) 0 0.005 0.01 0.015 0.02 0.025 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 0.005 0.01 0.015 0.02 0.025 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 The original 150 Hz sine wave now actually appears like a 50 Hz sine wave! Note: It “aliases” to 50 Hz = 150Hz-200Hz/2
  • 25. Some Notation •  “Real World” signals are termed continuous waveforms –  They have a value at all moments in time –  They are generally represented by notation in the form x(t) or y(t) •  The “t” indicates it exists at all times! •  The process of sampling results in the continuous waveform now only existing at the specific sampling points t=0, t=Ts, t=2Ts, t=3Ts….. t=nTs –  Therefore we now have a sequence of samples x(t=0), x(t=Ts), x(t=2Ts), x(t=3Ts) …. x(t=nTs) –  This is more commonly noted as x[0],x[1],x[2],x[3] or x[n] in general •  n is known as the sample index •  Consider a continuous sine wave the equation of which is: –  x(t)=sin(2πft) •  The equivalent equation for the sampled sinusoid is got by replacing t with nTs –  x[n]=x(nTs)= sin(2πfnTs)= sin(n2πfTs)= sin(n2πf/fs)= sin(nθ) –  The term θ=2πf/fs is known as digital frequency –  Since f (analogue frequency) can only have values between 0 and fs/2, hence θ can only have a value between 0 and 2πfs/2/fs=π
  • 27. What is a filter ? •  In some applications, the terms “filter” and “model” are often synonymous •  Most introductory DSP courses have a far more restrictive definition of a filter – Operates on a sequence of input samples x[n] and generates a sequence of output samples y[n] by means of a static difference equation – These “basic” filters are •  Linear •  Causal •  Time invariant
  • 28. Why use a digital filter ? •  Can be used to model an existing data set but, initially, we will use them to process a sequence of data samples that have either been previously recorded and stored or perhaps process them in “real time” (i.e. as they are sampled) •  The aim of time domain filtering is typically to enhance certain frequencies that may be present in x[n] (the “signal”) and/or to attenuate other frequencies that may be present in x[n] (“noise”) •  Of course there are cases where it may not work that well!
  • 29. Difference Equation •  So how is y[n] produced from x[n]? –  Difference Equation •  A difference equation is an iterative equation which defines how the samples of y[n] are calculated •  Examples: –  y[n]=0.5x[n]+0.5x[n-1] •  Current output sample y[n] is got by adding 0.5 times the current input sample x[n] and 0.5 times the previous input sample x[n-1] –  y[n]=0.2x[n]+0.8y[n-1] •  Current output sample y[n] is got by adding 0.2 times the current input sample x[n] and 0.8 times the previous output sample y[n-1] •  We will restrict the types of filters that we will look at: –  Time invariant (the difference equation does NOT change over time) –  Linear (difference equation will NEVER have a term of the form x[n-1]y[n-3] or x[n]x[n-5] or anything like this!) •  Have you seen this before ? –  Moving Averages !!! •  Difference Equations clearly explain how to calculate y[n] from x[n] but you cannot tell what the filter does in terms of frequency content
  • 30. FIR and IIR Filters •  There are two classes of digital filters •  Finite Impulse Response (FIR) have difference equations which only contain terms with x[n] and previous x[n] samples –  y[n]=0.25x[n]+0.25x[n-1]+ 0.25x[n-2]+ 0.25x[n-3] –  Also called non-recursive filters •  Infinite Impulse Response (IIR) have difference equations which contain BOTH terms with x[n] and previous x[n] AND previous y[n] samples –  y[n]=0.2x[n]+0.8y[n-1] –  Also called recursive filters •  What’s the difference ? –  Different characteristics that make one type preferable to the other under certain scenarios
  • 31. Calculation of Difference Equation – Non-Recursive n x[n] -0.5x[n-1] 2x[n-3] y[n] 0 0.5 0 0 0.5 1 1.0 -0.25 0 0.75 2 -0.2 -0.5 0 -0.7 3 -0.8 0.1 1 0.3 4 -1.2 0.4 2 1.2 Difference equation: y[n]=x[n]-0.5x[n-1]+2x[n-3]
  • 32. Calculation of Difference Equation - Recursive n x[n] -2x[n-1] 0.5y[n-2] y[n] 0 0.5 0 0 0.5 1 1.0 -1.0 0 0 2 -0.2 -2 0.25 -1.95 3 -0.8 0.4 0 -0.4 4 -1.2 1.6 -0.975 -0.575 Difference equation: y[n]=x[n]-2x[n-1]+0.5y[n-2]
  • 33. Frequency Response •  So, knowledge of a difference equations allows you to write a program to implement the filter –  But how are these difference equations determined to start with ? •  A small number of basic filters are commonly known –  Moving average FIR filters! •  All other digital filters have to be designed •  There are a variety of techniques which can be used to generate a difference equation which implements a desired filter •  “Desired” is what sense ? –  The filter will implement a desired “frequency response” •  It will attenuate the desired frequency range(s) and/or enhance a different desired frequency range •  So the Frequency Response is another alternate way of describing the behaviour of a filter –  It is can be determined as an equation (and engineering student do indeed learn how to calculate such an equation from knowing the difference equation) –  More commonly (and more usefully) the frequency response is shown graphically
  • 34. Frequency Response •  The two graphs which constitute a frequency response are: –  Magnitude response –  Phase response •  If x[n]=sin(nθ) –  Input to the filter is a sampled sine wave •  Then y[n]=G(θ) sin(nθ+φ(θ)) –  Output of the filter is a sampled sine wave at the same frequency but whose amplitude has been scaled and which has undergone a phase change •  More correctly this is the “stable” output after a certain amount of time after the input was applied! •  The amplitude scaling factor is the magnitude response for that frequency whilst the phase change is the phase response for that frequency •  The magnitude response is often quantified in decibels –  20log(Magnitude Response) = decibels (dB)
  • 35. Frequency Response - FIR -4 -3 -2 -1 0 1 2 3 4 -5 0 5 Frequency (Theta) Magnitude Frequency Response of y[n]=x[n]+x[n-1]+x[n-2] -4 -3 -2 -1 0 1 2 3 4 -50 0 50 Frequency (Theta) Magnitude(dB) -4 -3 -2 -1 0 1 2 3 4 -5 0 5 Frequency (Theta) PhaseAngle(radians)
  • 36. Frequency Response - IIR -4 -3 -2 -1 0 1 2 3 4 0 2 4 Frequency (Theta) Magnitude Frequency Response of y[n]=x[n]+0.7y[n-1] -4 -3 -2 -1 0 1 2 3 4 -20 0 20 Frequency (Theta) Magnitude(dB) -4 -3 -2 -1 0 1 2 3 4 -1 0 1 Frequency (Theta) PhaseAngle(radians)
  • 37. Filter’s Response to Sinusoidal Input 0 20 40 60 80 100 -1 -0.5 0 0.5 1 Sample Number (n) Samplevalue Input sinusoid to filter y[n]=x[n]+0.7y[n-1] : x[n]=sin(n*0.25) 0 20 40 60 80 100 -2 0 2 Sample Number (n) Samplevalue Note : Scaling and phase shift of output signal
  • 38. Filter’s Response to Sinusoidal Input 0 20 40 60 80 100 -1 -0.5 0 0.5 1 Sample Number (n) Samplevalue Input sinusoid to filter y[n]=x[n]+0.7y[n-1] : x[n]=sin(n*1) 0 20 40 60 80 100 -2 -1 0 1 2 Sample Number (n) Samplevalue Note : Scaling and phase shift of output signal and short “transient” signal
  • 39. Importance of Frequency Response •  Clearly, the magnitude response of a filter is VERY important as it indicates how the filter “attenuates” or “enhances” particular frequencies •  In many applications, the phase response of a filter is not that important –  However, if the signal being filtered is composed of several different frequencies (as most “real world” signals are) then the phase response of a filter may be important –  Also filters introduce a “delay” which is directly associated with this phase response
  • 40. Phase Response •  The phase response indicates the phase shift which a sinusoid at a particular frequency suffers •  If the phase response of a filter is a straight line then it is said to have a linear phase response –  Linear phase responses mean that another quantity known as group delay is constant for all frequencies •  This may be important when a signal composed of many different frequencies is applied to the filter
  • 41. Linear Phase Filters •  If each of the frequencies present do NOT suffer the same group delay then the signal will be distorted in the time domain event if the filter does NOT alter their respective amplitudes •  Only certain FIR filters have a linear phase responses •  The are certain applications where this type of distortion is important and others where it is not!
  • 42. Distortion due to Non-Linear Phase Response 0 50 100 150 200 -2 0 2 "Square wave" applied to filters 0 50 100 150 200 -2 0 2 Output of FIR (Linear Phase) Filter 0 50 100 150 200 -5 0 5 Output of All-Pass IIR (Non-Linear Phase) Filter
  • 43. Designing Filters •  Usually it is a case that you will have some idea of the desired frequency response of the filter you need –  Low Pass Filter (LPF) –  High Pass Filter (HPF) –  Band Pass Filter (BPF) –  Band Stop Filter (BSF) •  Many “design tools” allow you to specify the desired frequency response characteristics and they generate the coefficients of a difference equation that delivers this frequency response
  • 44. Correlation as a Signal Processing Tool •  Correlation is an often used in a signal processing setting to investigate temporal relationships between two signals •  Consider an application like radar or sonar – Sonar emits an acoustic pulse (containing a number of cycles of a pure tone) – After travelling through the medium (e.g. water) the acoustic wave will bounce off an object and travel back to the sonar unit •  Getting smaller and corrupted by “noise” along the way
  • 45. Correlation •  We want to determine the distance of the target from the sonar device by reliably estimating the time difference between the “ping” and the “echo” back – More generally, we have two sampled signals (the “ping” and the “echo”) that we knowfell are “similar” except for a time “lag”
  • 46. The solution! •  Calculate the (cross-)correlation of the “ping” samples (y[n]) and the “echo” samples (x[n]) at a number of sample “lag” or delay values (τ) •  Search for the “lag” which has the largest (positive or negative) cross-correlation value
  • 47. Simple problem ? 0 10 20 30 40 50 60 70 80 90 100 -1 -0.5 0 0.5 1 Time (ms) Transmitted Sonar Ping (Sampling freq=10kHz) 0 10 20 30 40 50 60 70 80 90 100 -1 -0.5 0 0.5 1 Time (ms) Received Return Signal (Target at 30m) 0 100 200 300 400 500 600 -1 -0.5 0 0.5 1 Cross Correlation Lag 0 5 10 15 20 25 30 35 40 45 -1 -0.5 0 0.5 1 Cross Correlation (labelled in units of distance) Distance (m) -600 -400 -200 0 200 400 600 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Lag SampleCrossCorrelation Sample Cross Correlation Function
  • 48. Bit more challenging in the real world though! 0 10 20 30 40 50 60 70 80 90 100 -1 -0.5 0 0.5 1 Time (ms) Transmitted Sonar Ping (Sampling freq=10kHz) 0 10 20 30 40 50 60 70 80 90 100 -4 -2 0 2 4 Time (ms) Received Return Signal (Target at 30m) 0 100 200 300 400 500 600 -0.4 -0.2 0 0.2 0.4 Cross Correlation Lag 0 5 10 15 20 25 30 35 40 45 -0.4 -0.2 0 0.2 0.4 Cross Correlation (labelled in units of distance) Distance (m) -600 -400 -200 0 200 400 600 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 Lag SampleCrossCorrelation Sample Cross Correlation Function Noise !
  • 49. Periodicity Estimation 0 500 1000 1500 2000 2500 3000 3500 4000 4500 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 Samples (n) /ahh/ sound sampled at 44.1 kHz 0 1 2 3 4 5 6 7 8 9 10 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 Time (s) ECG signal recorded at 1kHz sampling frequency • Periodicity estimation is a multi-domain problem • (Auto)-correlation and “related” algorithms offer elegant and computationally “simple” means of getting robust estimates 0 1 2 3 4 5 6 7 8 9 10 -10 -5 0 5 10 15 Time (s) AccelerometerForceMagnitude Android Accelerometer Magnitude sampled at 50 Hz
  • 50. Use Autocorrelation •  Calculate the autocorrelation function for various lag values •  Maximum (positive!) value in autocorrelation should happen when the lag is equal to the period of the signal
  • 51. Example •  The largest peak in this case occurs at a time lag of 410 samples •  Thus the period is 410/44100= 9.3 ms or 107 Hz 0 500 1000 1500 2000 2500 3000 3500 4000 4500 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 Samples (n) /ahh/ sound sampled at 44.1 kHz 0 100 200 300 400 500 600 700 800 900 1000 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Lag SampleAutocorrelation Sample Autocorrelation Function
  • 52. AMDF – Alternative to Autocorrelation 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 100 200 300 400 500 600 Time (s) AMDF of ECG sampled at 1kHz 0 200 400 600 800 1000 1200 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Lag SampleAutocorrelation Sample Autocorrelation Function • Average Magnitude Difference Function (AMDF) may offer a “simpler” and more obvious means to autocorrelation for period estimation • Often will perform better in cases where “harmonics” of the “fundamental” frequency can cause problems for autocorrelation
  • 53. Some Caveats! •  Carefully avoided some of the more challenging aspects of developing a robust period estimator •  Many (perhaps most) signals, signal periodicity will be an intermittent property –  speech – only when “voiced” sounds are being produced –  accelerometer – only when user is actually walking/running/ cycling •  If fact ECG is probably the only application where the signal will be periodic most of the time –  At least you hope so if its your ECG! •  Application specific detection algorithms to identify time intervals containing periodic behaviour are required –  Along with custom heuristics for accepting valid/sane results from AC or AMDF
  • 55. Frequency Domain Representation •  So far, we have introduced the concept of a frequency domain representation of a digital filter’s operation –  Frequency Response •  However, it would be very useful if we had a tool for estimating the frequency content (i.e. both magnitude and phase) of any sequence of samples •  The Discrete Fourier Transform (DFT) is such a mathematically tool
  • 56. Discrete Fourier Transform •  The DFT is an equation which allows use to analyse a block or frame of samples in order to estimate the component present at ANY particular digital frequency (θ) –  Mathematically speaking, the output of this equation is a complex number which can be represented by a magnitude and a phase value –  The magnitude is the “amplitude” of the component at that frequency –  The phase is the “phase angle” of the component at that frequency –  As noted previously, only digital frequency values between 0 and π have meaning (equivalent to 0 Hz to fs/2 Hz) •  However, typically you will be interested in knowing such information for more that just one frequency
  • 57. Fast Fourier Transform •  Typically, you will want to quantify the frequency components is a signal for a whole set of discrete frequencies in the range of possible digital frequencies •  This would require you to use the basic DFT equation repeatedly for EACH frequency –  Computationally very demanding! •  The Fast Fourier Transform (FFT) addresses this issue by carrying out the DFT calculation for a certain specific set of frequencies in a computationally efficient manner –  FFT is NOT a different type of analysis to DFT – just an efficient way of calculating the DFT for a specific set of frequencies
  • 58. Properties of FFT •  The FFT uses as its input a block or frame of N consecutive samples –  For an FFT there is a restriction that N=2k where k is some integer value! •  Why ? This is a “restriction” results in the mathematical equations that calculate the FFT being much “faster” to complete •  N is termed the FFT “order” (e.g. “512 point” (29) FFT) –  However, if you can use frame sizes which do not meet this criteria but before the FFT is calculated the frame is padded with extra zero samples to meet this criteria •  This does NOT effect the result in ANY way!
  • 59. Properties of FFT •  The output of the FFT will be exact same result that you would have got if you calculated the DFT for these specific set of N digital frequencies –  In other words, it tells you information on the components present at these N frequencies –  Just much more “quickly”! •  N points in time à N frequency points after the FFT
  • 60. FFT Frequency Resolution •  What are these N specific frequencies ? •  For mathematical reasons, this set of digital frequencies cover the range of θ=0 (0 Hz) to θ=2π (fs Hz) •  The set of N frequencies start at θ=0 (i.e. 0 Hz) and are spaced 2π/N (fs/N) apart –  Therefore there will only be N/2 of these points covering frequencies within the standard digital frequency range of θ=0 (0 Hz) to θ=π (fs/2 Hz) •  Starting at 0 Hz with the last one at fs/2-fs/N Hz •  Allow you to view the “spectrum” of the signal
  • 61. Example of FFT 0 0.05 0.1 0.15 0.2 0.25 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 Time domain Sine Wave Time (sec) SampleValues 0 1 2 3 4 5 6 5 10 15 20 25 30 35 40 45 50 55 FFT Digital Frequency 0 1 2 3 4 5 6 5 10 15 20 25 30 35 40 45 50 55 FFT Digital Frequency Time Domain Waveform FFT Result (θ) (Magnitude Only) FFT Result (Hz) (Magnitude Only)
  • 62. Example of FFT 0 50 100 150 200 250 0 10 20 30 40 50 60 Frequency (Hz) Fundamental Frequency Range Only 0 50 100 150 200 250 -40 -20 0 20 40 60 80 100 Frequency (Hz) Magnitude in Decibels (dB) 0 50 100 150 200 -2 -1.5 -1 -0.5 0 0.5 Frequency (Hz) Phase (Radians) FFT for Fundamental Frequency Range Only Magnitude Displayed In Decibels FFT Phase Result
  • 63. What if I want more resolution ? •  If you want more “points” in the output of the FFT (i.e. you want to see what is going on at finer spaced frequencies) – Increase the FFT order (N) – Does not mean that you need more time domain points to do this !!! – Be clear in your mind of the difference between the FFT order (and how it can be increased by padding) and the “frame size” of signal samples you are analysing •  You can take a frame of 300 samples of a signal and pad them to 512 points in order to complete a 512 point FFT!
  • 64. Some Caveats about FFT! •  Often your signal samples will span quite an extended period of time so you may want to break up this time period into a number of smaller individual frames and complete and FFT on each the smaller frames –  Rather than just doing one FFT for a complete EEG duration •  There is a complete loss of time resolution capabilities in the FFT output –  You can tell if a frequency component was present in the frame but not when it was present in the frame! •  Mathematically speaking the frequency content/spectrum should be stationary for the duration of the frame –  In other words, the frequency content should not be changing during the frame duration –  Not always the case!
  • 65. Spectrogram •  A spectrogram is used to show how the FFT magnitude evolves over time – Or more specifically for each frame of N samples (in which case the FFT is often referred to as calculating the “Short Term Fourier Transform (STFT) of each block) •  Remember each block of N samples provides N/2 frequency points (of interest) •  Spectrogram displays these over time with the colour of the plot being used to indicate the “size” of each component
  • 66. Spectrogram Example 050100150200250 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Frequency(Hz) Time -0.500.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time (s) Samples Presents a “time-frequency” representation of the signal Segments the time domain signal into short term “blocks” or “frames” with FFT used to calculate spectrum of each frame
  • 67. Impact of Frame Size •  The issue of time resolution can be addressed by making the frame size (N) smaller – This however has a negative impact on the ability to resolve information in the frequency domain – more later! •  The issue of the signal being stationary during the N samples can also have a impact of what can be deduced from the FFT output
  • 68. Example Impact of Frame Size •  Consider a signal made up of TWO sine waves (sampled at 500 Hz) –  First wave is at 50 Hz and starts at time t=0 –  Second wave is at 60 Hz is present only for a burst starting at t=0.25 sec and ending at 0.75 sec •  Consider spectrogram for different frame sizes –  Watch out for: •  Time Resolution •  Frequency Resolution
  • 69. Spectrogram N=32 0 50 100 150 200 250 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Frequency (Hz) Spectrogram with N=32 Time
  • 70. Spectrogram N=64 0 50 100 150 200 250 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Frequency (Hz) Spectrogram with N=64 Time
  • 71. Spectrogram N=128 0 50 100 150 200 250 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 Frequency (Hz) Spectrogram with N=128 Time
  • 72. Spectrogram N=256 0 50 100 150 200 250 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 Frequency (Hz) Spectrogram with N=256 Time
  • 73. Windows •  There is a trade-off between achieving time and frequency resolution with the FFT •  The more accurate the time resolution the less accurate the frequency resolution •  Mathematically, this is due to the actual process of breaking the overall set of samples in frames of N samples •  This process is termed windowing •  In the simple case, a window of N samples moves along the overall signal in “jumps” of N samples for each time the FFT is calculated •  The window itself has a “non-perfect” frequency content and this distorts (“smears”) the frequency content of the signal being analysed –  The longer the window (larger N) the less frequency distortion occurs –  The shorter the window (smaller N) the more frequency distortion occurs
  • 74. Other Windows •  The example of windowing previously shown uses what is known as a rectangular window of size N –  The frame can be viewed as the multiplication of the original complete set of signal samples multiplied by an equal length window signal –  This window signal has samples which are all 0 except for N samples centred around the current frame of interest •  There are other windows more commonly used that offer less “distortion” –  Hamming Window –  Hanning Window –  Kaiser Window –  Etc.
  • 75. Impact of Window Type on frequency resolution 0 200 400 600 800 1000 1200 -1 -0.5 0 0.5 1 Sample (n) Sine Wave with frequency=0.5 with Reactangular window applied 0 0.5 1 1.5 2 2.5 3 3.5 -20 0 20 40 60 Digital Frequency (theta) Magnitude(dB) 0 200 400 600 800 1000 1200 -1 -0.5 0 0.5 1 Sample (n) Sine Wave with frequency=0.5 with Hamming window applied 0 0.5 1 1.5 2 2.5 3 3.5 -50 0 50 Digital Frequency (theta) Magnitude(dB)
  • 76. Ability to Identify Frequency Components 0 50 100 150 200 250 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Frequency (Hz) Time 0 50 100 150 200 250 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Frequency (Hz) Time FFT for N=64 with Rectangular Window (Two Sine Waves F=50Hz and f=60Hz) FFT for N=64 with Kaiser Window (Two Sine Waves F=50Hz and f=60Hz)
  • 77. Power Spectral Density •  The Power Spectral Density (PSD) is closely associated with the FFT •  Theoretically it can be related to either a stochastic signal’s autocorrelation function or its Fourier TransformFrequency Spectrum •  It offers a more statistically valid means of representing where signal power is distributed in the frequency spectrum – Typically at the expense of frequency resolution
  • 78. PSD Calculation •  Common methods for calculating PSD use the following steps: – Subdivide the frame of N signal samples into P frames with M samples in them (M<N) and (P>=N/M) – For each of these P frames of M samples •  Calculate the FFT of the frame of M samples •  Square the magnitude of the resulting frequency points in the FFT (and “weight” them) – Average (perhaps with some weighting factor or using overlapping frames) corresponding frequency points in the P frames
  • 79. Comments on PSD •  Does the PSD tell you anything new that you would not “know” from looking at the FFT? – Probably not! •  Does the PSD offer a “more valid” measure of the frequency make-up of a signal ? – Yes and certainly to journal paper reviewers!
  • 80. Interpolation and Decimation •  Sometimes you may feel that you have “too” many or “too” few sample points after you have sampled your signal •  In these cases you may want to decimate or interpolate the samples – Reduce the number of samples/sampling frequency by a factor of N – Increase the number of samples/sampling frequency by a factor of N
  • 81. Decimation •  Intuitively this may seem trivial – e.g. If you need to drop33 half the samples then just select every second sample •  Partially correct but there may be an issue with “aliasing” – In dropping every 2nd sample in this example we have effectively reduced the sampling frequency by 2 – Aliasing will occur if there were (significant) frequency components in the original signal above half the NEW sampling frequency
  • 82. Undesired Aliasing Effect •  Two (sine wave) components at 2 kHz and 5 kHz in the original signal sampled at 16 kHz •  When we decimate by a factor or 2, we can only have a signal with components up to 4 kHz (i.e. half the NEW sampling frequency) •  However, it now looks like we have a 2nd “phantom” component at 3 kHz as well as the “valid” component at 2 kHz •  We should have filtered (LPF) the original signal before decimation! 0 500 1000 1500 2000 2500 3000 3500 4000 0 500 1000 1500 2000 2500 3000 3500 4000 4500 ComponentMagnitude Frequency (Hz) Frequency Spectrum after decimation 0 1000 2000 3000 4000 5000 6000 7000 8000 0 500 1000 1500 2000 2500 3000 3500 4000 ComponentMagnitude Frequency (Hz) Frequency Spectrum of original signal
  • 84. Interpolation •  There may be cases where we need to increase the number of samplessampling frequency (Say by 2) •  Again an intuitive solution would be to insert “zero values” between each current sample and “smooth” the resulting signal •  But “smooth” really means that we apply a digital filter – So what filter is suitable and what happens if we don’t use one?
  • 85. Interpolation Steps 0 500 1000 1500 2000 2500 3000 3500 4000 0 500 1000 1500 2000 2500 3000 3500 4000 ComponentMagnitude Frequency (Hz) Frequency Spectrum of original signal 0 1000 2000 3000 4000 5000 6000 7000 8000 0 500 1000 1500 2000 2500 3000 3500 4000 ComponentMagnitude Frequency (Hz) Frequency Spectrum after zero insertion 0 1000 2000 3000 4000 5000 6000 7000 8000 0 500 1000 1500 2000 2500 3000 3500 ComponentMagnitude Frequency (Hz) Frequency Spectrum after smoothing zeros (Poor choice of LPF) A poor LPF smoothing filter was deliberately apply to illustrate how an interpolation “artefact” can remain in the frequency spectrum after smoothing
  • 86. Time-Frequency Resolution Trade-off •  So with the FFT you can localise in time (Δt) OR localise in frequency (Δf) but not both at the same time Δt Δf = constant – Short time windows offer better time resolution – Long time windows offer better frequency resolution – But whichever we choose – it’s applicable to all frequencies which often is not desirable!
  • 87. Wavelet Transform •  In some applications however, it may be desirable to trade-off time and frequency resolution to different degrees at difference frequencies •  A quite common requirement would be to want – Better time resolution at “higher” frequencies at the expense of frequency resolution – Better frequency resolution at “lower” frequencies at the expense of time resolution
  • 88. Limitation of Fourier Transform •  The limitation of the (Short Term) Fourier Transform relates back to its mathematical foundations – Sampled signal could (in theory) be formed by summation of an infinite number of equal length sine waves each with a different amplitude scaling factor (magnitude of the STFT) and each with a different phase shift (phase of the STFT) – All these “basis functions” have the same length and hence time resolution!
  • 89. Wavelet Transform (WT) •  Wavelet analysis has a similar foundation except that the lengthduration of the “basis” functions can be different at difference frequencies (called “scales in WT parlance) – Short “duration” basis functions used at “higher” frequencies – Longer “duration basis functions used at “lower” frequencies
  • 90. Comparing STFT and WT for Time-Frequency Analysis •  Highlights how wavelet analysis can achieve a trade-off in time-frequency resolution compared with traditional STFT analysis
  • 91. When to use WT and what needs to be done ? •  Wavelet analysis may prove a useful tool if you feel that STFT is failing to “accurately” capture localised characteristic either in frequency (low frequency spectral separation) or time (high frequency temporal resolution) •  A huge array of difference wavelet “families” have been used and it is often a question of “trial and error” to determine which is best suited to an application •  But before you start with WT – you need to ask yourself whether there is evidence in STFT analysis to make you think that WT will uncover something new in your signal
  • 92. AR(MA) Prediction Models •  AR(MA) models have already been examined in detail as linear predictors in the time domain •  These techniques also provide a complimentary analysis techniques to STFT •  The sampled signal is segmented into frames of N samples (during which the signal is assumed to be stationary) •  AR(MA) models produce a set of coefficients for a (filter) difference equation –  AR models result in a difference equation in x[n] and y[n-k] terms –  ARMA models result in addition terms in the difference equation contains terms in x[n-l] •  Like all filtersdifference equation, we can examine the frequency response of the model
  • 93. Frequency Response of an AR Model of an EEG signal 0 5 10 15 20 25 30 35 40 45 50 100 200 300 400 500 600 700 EEG Frame Spectrum Frequency (Hz) ComponentMagnitude 0 5 10 15 20 25 30 35 40 45 50 5 10 15 20 AR Model Spectrum Frequency (Hz) ComponentMagnitude STFT Magnitude AR(p=12) Model Magnitude Response
  • 94. AR(MA) Model Frequency Response •  The frequency magnitude response of an AR(MA) model is effectively a smoothed approximation of the STFT magnitude response •  As such, it highlights the main “resonant” frequencies of the signal rather than the finer detail of the STFT STFT for word /ahh/ Frequency (Hz) Time(s) 0 500 1000 1500 2000 2500 3000 3500 0 1 2 3 4 5 6 Frequency response of AR(12) model for /ahh/ Frequency (Hz) Time(s) 0 500 1000 1500 2000 2500 3000 3500 0 1 2 3 4 5 6
  • 95. AR(p=12) EEG Model Spectrogram 0 20 40 60 80 100 120 140 160 -500 0 500 1000 Time (s) EEGSampleValues FFT Analysis Time (s) Frequency(Hz) 20 40 60 80 100 120 140 160 180 0 20 40 0 20 40 60 80 100 120 140 160 -500 0 500 1000 Time (s) EEGSampleValues AR Model Analysis Time (s) Frequency(Hz) 20 40 60 80 100 120 140 160 180 0 20 40 FFT Based Spectrogram AR(p=12) Model Spectrogram
  • 96. ARMA EEG Model Performance 0 20 40 60 80 100 120 140 160 -500 0 500 1000 Time (s) EEGSampleValues FFT Analysis Time (s) Frequency(Hz) 20 40 60 80 100 120 140 160 180 0 20 40 FFT Based Spectrogram ARMA(10,4) Model Spectrogram 0 20 40 60 80 100 120 140 160 -500 0 500 1000 Time (s) EEGSampleValues ARMA Model Analysis Time (s) Frequency(Hz) 20 40 60 80 100 120 140 160 180 0 20 40
  • 97. SP applications of AR(MA) models •  Like STFT and WT, it offers a valid frequency domain representation of the signal •  Because of the smoother “surface”, it often offers a means of more easily tracking the temporal trajectory of key resonant frequencies or components •  For some applications, the resonant frequencies identified by AR(MA) models can be associated with physical parameters of the system that produced the signal
  • 98. Synchrony •  Correlation offers a time domain “similarity” measure •  Synchrony measures attempt to quantify the level of synchronisation between certain frequencies (or frequency bands) in two difference signals •  Large number of different measures of linear and non-linear “synchrony” –  http://www.dauwels.com/Papers/NeuroImage2009.pdf provides an excellent overview of many different measures –  Commonly used in EEG signal analysis
  • 99. Cross Coherence •  Cross coherence is one of the simpler measures of synchrony and can be easily calculated from the STFT of the two signals being analysed •  Fa(t,f) is the STFT of signal “a” at time t and frequency f •  Fb(t,f) is the complex conjugate of the STFT of signal “b” at time t and frequency f
  • 100. Cross Coherence (2) •  Resultant complex value has a magnitude value between 1 (meaning the two signals are perfectly synchronised at that frequency component) and 0 (meaning there is a complete absence of synchronisation at that frequency component) •  The phase angle of the cross coherence can be easily converted into a corresponding time advance/delay between the two signals at that frequency
  • 101. Sample EEG Cross Coherence 0 0.24 0.48 0.72 0.96 -200 0 200 400 600 800 0 1 Time (ms) coh. 20 40 60 0 0.8 Freq.(Hz) coh. Freq.(Hz) Time (ms) -200 0 200 400 600 800 20 40 60 -180 -90 0 90 180 Event-Related Coherence See Matlab add on toolbox EEGlab: http://sccn.ucsd.edu/eeglab/
  • 102. Independent Component Analysis (ICA) •  ICA techniques are used in scenarios where it is possible to measure N different signals which are formed by a linear combination of M underlying (but not measurable) signals of interest We can measure xi[n] but we actually want to know sj[n] and/or aij
  • 103. ICA (2) •  If certain conditions are valid concerning the statistical independence of the source signals”factors”, then ICA can be used to estimate them •  Large variety of different ICA algorithms depending on particular requirements (under-, over-stated, real time, single channel,…) •  http://cnl.salk.edu/~tewon/Blind/ blind_audio.html
  • 104. Applications of ICA •  Most common application of ICA are in: – Wireless communication – EEG analysis – Separation of biosignals •  Maternal and foetal ECG separation – Investigation of hidden factors in financial data signals – Image Noise reduction
  • 105. ICA Resources •  http://www.ee.columbia.edu/~dpwe/e6820/ papers/HyvO00-icatut.pdf (Tutorial paper) •  http://www.bsp.brain.riken.jp/ICALAB/ (Matlab ICA toolbox)