Digital Signal Processing
Foundation
DSP Ksharing: Rajesh Sharma
www.rajeshsharma.co.in sharma.rajesh@gmail.com
Analog Myth; Hilbert Space; Fourier; ODE; Convolution
18/11/2008 2
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
18/11/2008 3
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Course Contents
Motivation for Digital Signal Processing ( Go To Topic )
– Signal Classification (CT/DT Signals)
– Analog Signal Processing
– DSP System: Components
Vector Space: Foundation of DSP (Go To Topic )
– Basis Vectors, Vector Operations, Linear Independence
– Orthogonal Basis Vectors- Orthonormality
– Basis Search- Signal Decomposition
CT Signals & Systems Analysis (Go To Topic )
– Signal Decomposition- Fourier/Laplace Transform
– LTI System: ODE, Poles/Zeros, Impulse Response
– Time Domain: Convolution. Correlation
Right Click Mouse to Open Hyper Link
Go To Topic
18/11/2008 4
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Motivation for
Digital Signal Processing
Go 2 Top
18/11/2008 5
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
DSP System Overview
DSP Algorithms
DSP Journey
Starts with
Signals
DigitalAnalog
18/11/2008 6
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signals
Mathematically signal is described as a function of one or
more independent variables
Signal in physical world is any time varying or spatial
varying quantity.
Signal in EE system are in the form of electrical voltage
Variations in signal carry the information
various types of signals….
– Audio signals : f(t) => variation of air pressure in time
– Image signals : f(x,y) => variation of intensity in space
– Video signals : f(x,y,t) => variation of intensity in space & time
– Seismic signals : f1(t),f2(t),f3(t) => 3-channel ground acceleration
– Radar Signals….
– EEG,ECG etc…
Signals have only one value for the given value of independent variable
18/11/2008 7
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Typical Multimedia Signals
Audio – f(t)
Image – f(x,y)
x
y
x
y
Brightness – f(x,y)
x
Video – f(x,y,t)
y
t
Brightness – f(x,y,t)
18/11/2008 8
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Classifications
Multi-Channel Signals are
generated from multiple sources
– represented in vector form
Multi-Dimensional Signals are
function of more than one
independent variables.










=
)(
)(
)(
)(
3
2
1
ts
ts
ts
tS
),,( tyxIBrightness =
Brightness – I(x,y,t)
Seismic Waves- 3 Sensors
18/11/2008 9
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Classifications
Deterministic signal’s all past,
present and future values are
known without any uncertainty.
– Sine Wave is a pure
deterministic signal
Random Signals are not
expressible through explicit
mathematical formulas
– White noise is a pure
random signal
)3()( tASintS π=
SineWave
WhiteNoise
Stationary Signals: No change in frequency content
18/11/2008 10
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Classifications
Continuous Time Signals or Analog
Signals, are defined for every value of
time
– Take on values in continuous
interval (a,b)
Discrete Time Signals are defined only
at certain specific values of time
– Take on values for a sequence of
numbers
– Obtained by
Sampling of analog signal
Accumulating a variable over
time
∞<<∞−+= tFtACostxa )2()( θπ Analog Sinusoidal Signal
∞<<∞−+= nfnACosnxd )2()( θπ Discrete time Sinusoidal Signal
18/11/2008 11
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Classifications
Continuous valued Signal
takes on all possible values on a
finite or infinite range
Discrete Valued Signal takes
on values from a finite set of
possible values
All possible values
Two Possible Values
)(: pppp VVRangeFinite
onValuesContinuous
−+
][: pppp VVSetFinite
alues fromDiscrete V
−+
18/11/2008 12
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Classifications
Digital Signals---------------------Discrete
Valued
--------------------Analog SignalsContinuous
Valued
Discrete
Time
Continuous
Time
Signals
18/11/2008 13
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Elementary Signal Operations
Signals may be added / subtracted
– Signals maybe integrated / differentiated w.r.t time / space.
Signals may be multiplied
– E.g.
Signals maybe time shifted
–
)()()(),()( tytxtztkxty == Imagine an array
x= [1,2,3,4,5,6,7,8,9,10]
Imagine another array
x1 = [0,0,0,0,1,2,3,4,5,6]
Shift of 4
x1(6) = x(2) = 2
x1(i) == x(i-4)
x1(i) == x(i-n) for shift of n
Instead of new array x1
We use x(i-n)
x(t)
x1(t)=x(t-0.5)
Signal time shifted right by T -> x(t-T), time shifted left -> x(t+T)
18/11/2008 14
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Some more Ops on Signals
Signals may be time dilated /
contracted Imagine an array
x= [1,2,3,4,5,6,7,8,9,10]
Imagine another array
x1 = [2,4,6,8,10]
Contraction by 2
x1(3) = x(6) = 2
x1(i) == x(2*i)
x1(i) == x(n*i) for contraction
of n
Instead of new array x1
We use x(n*i)
x(t)
x1(t)=x(4t)
Signal Contracted by n -> x(nt), dilated by n -> x(t/n)
18/11/2008 15
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Signal Processing
Signals may not
directly convey the
information
Signals may not be
free from disturbances
(noise)
AM Signal
Noisy Signal
Signal
Processing
Demodulation
Noise Filtering
How to get the
signal information ???
18/11/2008 16
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Analog Signal Processing
Signal Processing is carried out inside some System
Signal processing is the analysis, interpretation and
manipulation of signals for…..
– Enhancing the signal to noise ratio (noise filtering)
– Signal Storage (compression)
– Signal Transmission (compression, modulation)
– Signal Analysis (frequency analyzer)
Analog Signal
Processing
System
Analog Input Signal Analog Output Signal
18/11/2008 17
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
System
A system is a process that
performs an operation on Input
Signal and produces an Output
Signal
System is characterized by the
nature of operations it performs
on input.
– e.g. Linear Time Invariant System
– Low Pass Filter is a good
example of LTI systems
System
LPF System
Noisy Input
LP filtered
Output
18/11/2008 18
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Analog System Components
Analog Systems are built
with some basic elements
Resistors, Capacitors &
Inductors.
Moreover OP-AMPS…
These Systems are
governed by Differential
Equations
18/11/2008 19
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Large Systems
Many systems can be put together to build a
large system.
Super-heterodyne Radio Receiver System
ASP is Great
Then
Why DSP
18/11/2008 20
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Analog System Drawbacks
Analog systems uses resistors, capacitors,
inductors and op-amps……. BULKY SIZE
Reconfiguration of an analog system implies a
redesign of the underlying hardware.
It is difficult to control the accuracy of analog
systems due to component tolerances
Analog System performance may change with
time and temperature
Cheap & easy to assemble but difficult to
calibrate, modify and maintain..
This difficulty increases more with filter order….Solution to all these problems is DSP
18/11/2008 21
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Analog Myth ???
MYTH: “As Analog Signals are continuous time/valued
therefore they have infinite resolution”
Analog & Digital Signals both suffer from same problem
Truth: an Analog Signal of bandwidth B and its 2B sampled
version have same resolution (information)
NOT TRUE
Bandwidth & Noise
Besides This, there are very good Techniques for
Digital Signal Processing
18/11/2008 22
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
VLSI & DSP
Powerful, smaller, faster
and cheaper DSPs i.e.
Digital Signal Processors
are available….
These Sophisticated
DSPs can perform
complex Linear & Non-
Linear Mathematical
operations
][
10][ nx
ny =Very Difficult/Expensive
Not Possible for
Analog Systems
Thanks to VLSI
18/11/2008 23
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Welcome ToWelcome ToWelcome ToWelcome To
Digital Signal ProcessingDigital Signal ProcessingDigital Signal ProcessingDigital Signal Processing
DSP is the Mathematics, the Algorithms and the
techniques used to manipulate Digital Signals.
Initially DSP was only used in four key areas:
– Radar & Sonar :: National Security
– Oil Exploration :: Huge Money
– Space Exploration :: Irreplaceable Data
– Medical Imaging :: Human Life is Valuable
PC revolution of 1980s and 1990s exploded DSP
into commercial marketplace…..
– Mobile Phones, CD Players…..
18/11/2008 24
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Applications of DSP
Digital Signal Processing
has revolutionized many
fields of Science &
Engineering
18/11/2008 25
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Advantages of Digital Signal Processing
DSPs are programmable: Many DSP Algorithms
can run on the same hardware
DSP algorithms are implemented through
software, which gives a greater degree of
flexibility in system design
DSP algorithms implemented on hardware do
not vary with time & temperature….
Reconfiguration of Digital System is easy
– Implement the new DSP algorithm on the same
hardware.
– Upgrade the existing digital systems with new
algorithm
Higher level of precision can be achieved….
No tuning of analog components (R,L,C) during
production and maintenance
18/11/2008 26
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Disadvantages of
Digital Signal Processing
The need for ADC and DAC makes DSP not economical
for simple application e.g. only a filter
DSP techniques are limited to signals with relatively Low
Bandwidth
DSP may be too expensive for some smaller applications.
– The cost of high speed ADC/DAC make them impractical
Currently used for signals up to video bandwidths (10MHz)
Best of Both Worlds
Mixed Signal Processing
18/11/2008 27
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
DSP System: Components
We will analyze the components of DSP System shown below
DSP
Algorithms
on Signals
Band-limiting Image Removal
Signal
Analysis
18/11/2008 28
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Vector Space
Foundation of DSP
Go 2 Top
18/11/2008 29
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Vector Space
A VECTOR SPACE is a set of vectors which
is closed under addition and multiplication by
real numbers. i.e.
vectors may be scaled and added….
– Simply Linear Combination / Superposition
Superposition is the Foundation of DSP
Completely specified by a single number
called Dimension
The Dimension can be any Non-Negative
Integer or Infinite
Vector Space over Real Field: n
ℜ
Superposition
of v & w
Euclidean Space
Hilbert Space
Banach Space
Function Space….
18/11/2008 30
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Basis Vectors
The Basis is a set of
vectors that spans (generates) the
whole space
Any vector can be generated as a
linear combination of Basis
No special preference
of basis vectors except
Linear Independence
Bases of spans whole 2D2
ℜ
)1,0.()0,1.(),( yxyx +=
)1,2)(
3
1
3
1
()1,1)(
3
2
3
1
(),( yxyxyx ++−+−= New Bases
(-1,1) & (2,1)
liivB ∈= }{
nnvcvcvcu +++= .......2211
2D Bases
(1,0) & (0,1)
18/11/2008 31
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Vector Representation
A vector in is an ordered
set of n real numbers
– e.g. V = (1,6,3,4) is in
– (1,6,3,4) is a column
vector
n
ℜ
4
ℜ














4
3
6
1
























=














+














+














+














=














4
3
6
1
1000
0100
0010
0001
1
0
0
0
*4
0
1
0
0
*3
0
0
1
0
*6
0
0
0
1
*1
4
3
6
1
Vector V as
Linear Combination of Basis
An audio signal frame of
N samples can be seen as a
VECTOR in N dimensional space
Same applies to any other signal Audio Vector : 256 Dimensional
18/11/2008 32
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Linear Independence
Vectors are linearly independent
if implies
No one vector from the set can be obtained by the
linear combination of other vectors from the set.
Basis is the Maximal set
of linearly independent
vectors and Minimal set
of spanning vectors
kvvv ,......, ,21
0.......2211 =+++ kkvcvcvc 0........21 ==== kccc
Linearly Independent Basis
Implies Unique Representation










=










−=










−
=










=
3
2
4
;
1
2
1
;
2
2
0
;
9
0
0
4321 vvvv
Linearly Independent
Linearly Dependent
4321 45 vvvv +−−=
18/11/2008 33
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Linear Independence Testing
Vectors are linearly independent
if implies
Method-1
– Write simultaneous equations using above condition
– If above condition hold true for some non zero value of
c1, c2…ck then vectors are not linearly independent
Method-2
– Find the determinant of matrix formed by using given
basis column vectors of matrix
– The vectors are linearly independent if and only if the
determinant is non-zero.
kvvv ,......, ,21
0.......2211 =+++ kk vcvcvc 0........21 ==== kccc
Similarly we can find the components of
given vector on this space
18/11/2008 34
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Inner Products
Inner product, generalization of Dot Product, is used
– To find projection of one vector onto another vector
– To find Projection of given Vector on Basis Vectors: Decomposition
a
r<v,uy>
<v,ux>
b
r
θ
θcosbaba
rrrr
=•
yyxx bababa +=•
rr
If θθθθ = 0 -> a .... b is max
a & b are totally similar (in same direction)
If θθθθ = 90o -> a .... b is zero
a & b are totally dissimilar (perpendicular)
i.e. How similar is vector a to vector b: Correlation ?
18/11/2008 35
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
More on Inner Products
The inner product of two
vectors A & B is defined as….
Inner Products can be used to
filter out vectors similar to a
given vector
∑=
=
















•
















=•
n
i
ii
nn
ba
b
b
b
a
a
a
BA
0
2
1
2
1
[ ]
[ ]
10584
0,1,2,4
3,5,4,1
:
=++−=•
−−=
−−=
BA
B
A
Example
Dot product maximum
Inner Product
is the Foundation
of Filtering
18/11/2008 36
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Yet More on Inner Products
t
0<i<nix
)(tx
∆t
],,[ 321 nxxxxx L
r
=
],,[ 321 nyyyyy L
r
=
Let the values of x(t) at time intervals of ∆∆∆∆t be collected in an array vector
Do similarly for another function y(t)
∑∑
∞
==
=•∞→=•
11 i
ii
n
i
ii yxyxnforyxyx
rrrr
0→∆tLet
∫
∞
=•
0
)()( dttytxyx
rrThis is like a dot product
on the vector space of functions
each function is a vector
x(t) can be used
to filter y(t)
Formally called Inner Product Space: This is Hilbert Space
18/11/2008 37
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Orthogonal Basis
Vectors A & B are orthogonal if their inner
product is zero
Orthogonal Bases consist of Orthogonal
vectors
Orthonormal Bases are Orthogonal vectors of
unit length
Advantage of Orthogonal Decomposition
– Lead to best Independent Signal
Decomposition
– Inner Product Usage for Signal
Decomposition (Transformation)
– Signal Reconstruction in function space is
possible using Inner Products & Linear
Combination of Orthogonal Basis**
Orthogonality Implies Linear Independence
Vice versa is not true
Orthonormal Basis
Linearly Independent Basis
**(check out detailed comments below)
18/11/2008 38
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Orthogonal Functions
The inner product of two function f(x) & g(x) is defined for
interval as below:
– The functions are orthogonal if their Inner Product is zero:
functionve weightnon-negatiw(x) is a
dxxwxgxfxgxf
b
axw ∫= )()()()()( *
)(
bxa ≤≤
Y(x) = Sin(2x)*Sin(7(x))
Weight function w(x) is Identity
Y(x)
functionsOrthogonaldxxy →=∫
+
−
:0)(
π
π
1)(
)2()7( =xw
xSinxSin
18/11/2008 39
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Norm
{ }
)ker(
0
1
:
)()()()()(:
)()()()()()()(:
,....3,2,1:)(
)()()(
,
,
*
,
2
,
2*
)(
*
)(
deltaKronec
jif i
jif i
where
xwxfxfxfxfiflOrthonorma
xfxfxwxfxfxfxfifOrthogonal
are:ixfsetof aThe member
xfxfxff(x)Norm
ji
jijiji
jijjiijiji
i
xwxw



≠
=
=
==
===
=
==
∫
∫
∞
∞−
∞
∞−
δ
δ
δδ
18/11/2008 40
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Basis Search: Signal Decomposition
Vector Decomposition is necessary
for generic analysis, design and
tweaking of signals & systems using
basic building elements.
– Projectile direction control
– ECG/EEG signal analysis
– PSD estimation of telecom signals
– Signal compression DFT/DCT/DWT
Signal Decomposition is also necessary for
gaining more information e.g. frequency,
phase, power spectral density
The set of Basic signals can be used to
construct a broad and useful
class of signals
Basis vectors for function spaces are
called Basis Functions
Small Waves…..or
Long Waves…..or
Square Waves.. or
Sinusoidal Waves…
or what ???
Projectile Direction
Control
},,{: θφrBasisOrthogonal
OrdinatesCoSpeherical −
Example
18/11/2008 41
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Orthogonal Basis Search
Small Waves: Wavelets used
in multiresolution analysis.
Long Waves: Square waves,
Sinusoidal waves etc..
Morlet Wavelet Haar Wavelet
Wavelet: Non-Stationary
Signal Analysis
Waves: Stationary
Signal Analysis
All of these Wavelets/Waves
and their time scaled versions
{at least harmonics}
are orthogonal w.r.t. that signal
Now which one to choose ???
Possible Long Wave Orthogonal Basis
Small Wave Orthogonal Basis
18/11/2008 42
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Requirement: LTI System Analysis
All Wavelet & Wave functions shown on previous slide are
orthogonal to their respective time scaled and shifted
versions ( at least Harmonics )
– Signal Decomposition: Each of given basis fits the criteria
Choice depends on specific signal being analyzed
– System Analysis: Require more than this ??
LTI SystemA basis function
as system Input
Amplitude Scaled version
of same basis function as
system output
A * Sin(wt)
System Gain/Delay
g(w)/d(w)
g(w)*A * Sin( wt + d(w) )
Possibility of
System Response
Basis Function
distortion Is not good
No Basis Distortion
18/11/2008 43
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Sinusoidal Fidelity
Signal Decomposition may be done with anyone of
orthogonal wavelets or waves shown earlier
– Choice depends on signal nature
stationary, periodicity, shape etc…
Sinusoidal signals are special: LTI System Analysis
– LTI system does not behave similarly for any other basis
functions.
you know what can happen to square basis
– They are very smooth functions i.e. no discontinuity
– Their derivatives (1st, 2nd, 3rd, …. ) do not have any discontinuity
– Hence good for analysis of Stationary Signals & LTI Systems
Welcome To Fourier
System Invariant
Subspace
A sinusoidal signal of frequency f as input to
LTI system will only output a scaled, delayed
sinusoidal signal of same frequency
18/11/2008 44
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Continuous Time
Signals & Systems Analysis
Go 2 Top
18/11/2008 45
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
JBJ Fourier
Jean Baptiste Joseph Fourier (1768-1830)
– Pronounced foo-ri-ye
He developed a mathematical theory of heat
transfer
– Théorie Analytique de la Chaleur (1822)
Studied solutions of heat transfer equation
under different initial conditions
– Conducting ring heated to initial temperature
profile and left to cool
– What is temperature profile after sometime ?
f(x,0) = φ(x) f(x,t) = φ1(x)
2
2
),(),(
x
xtf
t
xtf
∂
∂
=
∂
∂
κ
θ
T
Expressed initial condition function as a sum of sinusoids
Studied the effect of system eqn on each sinusoid separately
At time = t summed all component sinusoids to get final profile
18/11/2008 46
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
A little More history
1919thth / 20/ 20thth centurycentury: two paths for Fourier analysistwo paths for Fourier analysis -- Continuous & Discrete.Continuous & Discrete.
CONTINUOUSCONTINUOUS
→ Fourier extends the analysis to arbitrary function (Fourier Transform).
→ Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.
→ Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).
DISCRETE: Fast calculation methods (FFT)DISCRETE: Fast calculation methods (FFT)
→ 18051805 - Gauss, first usage of FFT (manuscript in Latin went unnoticed!!!
Published 1866).
→ 19651965 - IBM’s Cooley & Tukey “rediscover” FFT algorithm (“An algorithm for
the machine calculation of complex Fourier series”).
→ Other DFT variants for different applications (ex.: Warped DFT - filter design &
signal compression).
→ FFT algorithm refined & modified for most computer platforms.
18/11/2008 47
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Fourier analysis: why?
• Fast & efficient insight on signal’s building blocks.
• Simplifies original problem - ex.: solving Part. Diff. Eqns. (PDE).
• Powerful & complementary to time domain analysis techniques.
• Several transforms in DSPing: Fourier, Laplace, z, etc.
time, t frequency, f
F
s(t) S(f) = F[s(t)]
analysisanalysis
synthesissynthesis
s(t), S(f) :
Transform Pair
General Transform asGeneral Transform as
problemproblem--solving toolsolving tool
18/11/2008 48
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Fourier analysis - applications
Applications wide ranging and ever present in modern lifeApplications wide ranging and ever present in modern life
•• TelecommsTelecomms - GSM/cellular phones,
•• Electronics/ITElectronics/IT - most DSP-based applications,
•• EntertainmentEntertainment - music, audio, multimedia,
•• Accelerator controlAccelerator control (tune measurement for beam steering/control),
•• Imaging, image processing,Imaging, image processing,
•• Industry/researchIndustry/research - X-ray spectrometry, chemical analysis (FT
spectrometry), PDE solution, radar design,
•• MedicalMedical - (PET scanner, CAT scans & MRI interpretation for sleep
disorder & heart malfunction diagnosis,
•• Speech analysisSpeech analysis (voice activated “devices”, biometry, …).
18/11/2008 49
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Fourier analysis - tools
Input Time Signal Frequency spectrum
∑
−
=
−
⋅=
1N
0n
N
nkπ2
j
es[n]
N
1
kc~
Discrete
DiscreteDFSDFSPeriodic
(period T)
ContinuousDTFT
Aperiodic
DiscreteDFTDFT
nfπ2je
n
s[n]S(f) −⋅
∞+
−∞=
= ∑
0
0.5
1
1.5
2
2.5
0 2 4 6 8 10 12
time, tk
0
0.5
1
1.5
2
2.5
0 1 2 3 4 5 6 7 8
time, tk
∑
−
=
−
⋅=
1N
0n
N
nkπ2
j
es[n]
N
1
kc~
**
**
Calculated via FFT
**
dt
tfπj2
es(t)S(f)
−∞+
∞−
⋅= ∫
dt
T
0
tωkjes(t)
T
1
kc ∫
−⋅⋅=Periodic
(period T)
Discrete
ContinuousFTFTAperiodic
FSFS
Continuous
0
0.5
1
1.5
2
2.5
0 1 2 3 4 5 6 7 8
time, t
0
0.5
1
1.5
2
2.5
0 2 4 6 8 10 12
time, t
Note: j =√√√√-1, ωωωω = 2ππππ/T, s[n]=s(tn), N = No. of samples
18/11/2008 50
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Fourier Bases
Sines and Cosines make orthogonal bases for fourier
21
21
11
21
21
0)cos()sin(
0)cos()sin(
0)cos()cos(
0)sin()sin(
ωω
ωω
ωω
ωω
ωω
≠













=
=
=
=
∫
∫
∫
∫
∞
∞−
∞
∞−
∞
∞−
∞
∞−
dttt
dttt
dttt
dttt
Integration limits
show the inherent
assumption of
stationarity in
Fourier Transform
18/11/2008 51
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
OrthoNormality of Fourier Bases
Fourier series basis functions are orthogonal
0)2sin(),2sin( >=< mftnft ππ
What happens if n=m?
∫−
=>=<
π
π
ππππ dtnftnftnft )2(sin)2sin(),2sin( 2
Square of unit vector length
But unit vectors must have length = 1
– Like centimetre graduations on graph paper
So divide the basis functions by ππππ
Treat n=0 specially
– So divide by 2ππππ
∫∫ −−
==
π
π
π
π
ππ 21)02(cos2
dtdtftQ
Finally we get basis vectors
un(t) s.t. 


=
≠
>=<
mnif
mnif
tutu mn
1
0
)(),(
Resolving to orthonormal bases preserves amplitude and energy of signal
OrthoNormality
18/11/2008 52
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Sinusoid & Phase
amplitude
radian frequency
frequency
phase
period fT
f
f
A
/1
2
=
=
φ
πω
A
B
BAR
tRtBtA
122
tan);(
)cos()sin()cos(
−
=+=
−=+
φ
φωωω
Resultant
amplitude
Resultant
phase
18/11/2008 53
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Periodic Signals -- Fourier Series
** see next slidesee next slide
AA periodicperiodic function s(t) satisfying Dirichlet’s conditionsfunction s(t) satisfying Dirichlet’s conditions ** can be expressed as acan be expressed as a
Fourier series, with harmonically related sine/cosine terms.Fourier series, with harmonically related sine/cosine terms.
[ ]∑
∞+
=
⋅−⋅+=
1k
t)ω(ksinkbt)ω(kcoska0as(t)
a0, ak, bk : Fourier coefficients.
k: harmonic number,
T: period, ωωωω = 2π/TFor all t but discontinuitiesFor all t but discontinuities
Note: {cos(kωt), sin(kωt) }k
form orthogonal base of
function space.
∫⋅=
T
0
s(t)dt
T
1
0a
∫ ⋅⋅=
T
0
dtt)ωsin(ks(t)
T
2
kb-
∫ ⋅⋅=
T
0
dtt)ωcos(ks(t)
T
2
ka
(signal average over a period, i.e. DC term & zero-
frequency component.)
analysis
analysis
synthesis
synthesis
18/11/2008 54
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FS convergence
s(t) piecewise-continuous;
s(t) piecewise-monotonic;
s(t) absolutely integrable , ∞<∫
T
0
dts(t)
(a)
(b)
(c)
Dirichlet conditions
In any period:
Example:
square wave
T
(a) (b)
T
s(t)
(c)
if s(t) discontinuous then
|ak|<M/k for large k (M>0)
Rate of convergenceRate of convergence
18/11/2008 55
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FS analysis
* Even & Odd functions
Odd :
s(-x) = -s(x)
x
s(x)
s(x)
x
Even :
s(-x) = s(x)
FS of odd* function: square wave.
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
2 π
0
π
0
2π
π
1)dt(dt
2π
1
0a =








−+⋅= ∫ ∫
0
π
0
2π
π
dtktcosdtktcos
π
1
ka =








−⋅= ∫ ∫
{ }=−⋅
⋅
==








−⋅= ∫ ∫ kπcos1
πk
2
...
π
0
2π
π
dtktsindtktsin
π
1
kb-







⋅
=
evenk,0
oddk,
πk
4
1ω2πT =⇒=
(zero average)(zero average)
(odd function)(odd function)
...t5sin
π5
4
t3sin
π3
4
tsin
π
4
sw(t) +⋅⋅
⋅
+⋅⋅
⋅
+⋅=
18/11/2008 56
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FS analysis (little more)
-π/2
f1 3f1 5f1 f
f1 3f1 5f1 f
rk
θk
4/π
4/3π
fk=k ω/2π
rK = amplitude,
θθθθK = phase
rk
θk
ak
bk
θk = arctan(bk/ak)
rk = ak
2
+ bk
2
zk = (rk , θk)
vk = rk cos (ωk t + θθθθk)
Polar
Fourier spectrumFourier spectrum
representationsrepresentations
∑
∞
=
=
0k
(t)kvs(t)
Rectangular
vk = akcos(ωk t) - bksin(ωk t)
4/π
f1 2f1 3f1 4f1 5f1 6f1 f
f1 2f1 3f1 4f1 5f1 6f1 f
4/3π
ak
-bk
Fourier spectrumFourier spectrum
of squareof square--wave.wave.
18/11/2008 57
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
[ ]∑
=
⋅=
7
1k
sin(kt)kb-(t)7sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
[ ]∑
=
⋅=
5
1k
sin(kt)kb-(t)5sw [ ]∑
=
⋅=
3
1k
sin(kt)kb-(t)3sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
[ ]∑
=
⋅=
1
1k
sin(kt)kb-(t)1sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
[ ]∑
=
⋅=
9
1k
sin(kt)kb-(t)9sw
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
[ ]∑
=
⋅=
11
1k
sin(kt)kb-(t)11sw
FS synthesis
Square wave reconstructionSquare wave reconstruction
from spectral termsfrom spectral terms
Convergence may be slow - ideally need infinite terms.
Practically, series truncated when remainder below computer tolerance
(⇒⇒⇒⇒ errorerror). BUTBUT … Gibbs’ Phenomenon.
18/11/2008 58
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Gibbs phenomenon
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
[ ]∑
=
⋅=
79
1k
k79 sin(kt)b-(t)sw
Overshoot exist @ eachOvershoot exist @ each
discontinuitydiscontinuity
• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.
Just a minor annoyance.
• FS converges to mean of the positive & negative limits at points of
discontinuity.
• (-1+1)/2 = 0 @ discontinuities, in this casein this case.
• First observed by Michelson, 1898. Explained by Gibbs.
18/11/2008 59
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FS time shifting
-1.5
-1
-0.5
0
0.5
1
1.5
0 2 4 6 8 10
t
squaresignal,sw(t)
2 πFS of even function:FS of even function:
ππ/2/2--advanced sadvanced squarequare--wavewave
π
f1 3f1 5f1 7f1 f
f1 3f1 5f1 7f1 f
rk
θk
4/π
4/3π
00a =
0=kb-









=
⋅
−
=
⋅
=
even.k,0
11...7,3,kodd,k,
πk
4
9...5,1,kodd,k,
πk
4
ka
(even function)
(zero average)
phase
phase
am
plitude
am
plitude
Note: amplitudes unchanged BUTBUT
phases advance by k⋅π/2.
18/11/2008 60
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Complex FS
Complex form of FS (Laplace 1782). Harmonics
ck separated by ∆∆∆∆f = 1/T on frequency plot.
r
θ
a
b
θ = arctan(b/a)
r = a2
+ b2
z = r e
jθ
2
ee
cos(t)
jtjt −
+
=
j2
ee
sin(t)
jtjt
⋅
−
=
−
Euler’s notation:
e-jt = (ejt)* = cos(t) - j·sin(t) “phasor”
NoteNote: c-k = (ck)*
( ) ( )kbjka
2
1
kbjka
2
1
kc −⋅−−⋅=⋅+⋅=
0a0c =
Link to FS real coeffs.Link to FS real coeffs.
∑
∞
−∞=
⋅=
k
tωkjekcs(t)
∫ ⋅⋅=
T
0
dttωkj-es(t)
T
1
kc
analysis
analysis
synthesis
synthesis
18/11/2008 61
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FS properties
Time FrequencyTime Frequency
Homogeneity a·s(t) a·S(k)
Additivity s(t) + u(t) S(k)+U(k)
Linearity a·s(t) + b·u(t) a·S(k)+b·U(k)
Time reversal s(-t) S(-k)
Multiplication * s(t)·u(t)
Convolution * S(k)·U(k)
Time shifting
Frequency shifting S(k - m)
∑
∞
−∞=
−
m
m)U(m)S(k
td)t
T
0
u()ts(t
T
1
∫ ⋅−⋅
S(k)e T
tk2π
j
⋅
⋅
−
s(t)T
tm2π
j
e ⋅
+
)ts(t −
18/11/2008 62
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
0 50 100 150 200
k f
Wk/W0
10
-3
10
-2
10
-1
1
2
Wk = 2 W0 sync2(k δ)
W0 = (δ sMAX)2







 ∞
=
+⋅= ∑
1k 0W
kW
10WW
FS - power
•• FS convergenceFS convergence ~1/k~1/k
⇒⇒⇒⇒⇒⇒⇒⇒ lower frequency terms
Wk = |ck|2 carry most power.
•• WWkk vs.vs. ωωkk: Power density spectrum: Power density spectrum.
Example
sync(u) = sin(π u)/(π u)
Pulse train, duty cyclePulse train, duty cycle δδ = 2= 2 ττ / T/ T
T
2 ττττ
t
s(t)
bk = 0 a0 = δ sMAX
ak = 2δsMAX sync(k δ)
Average power WAverage power W : s(t)s(t)
T
o
dt
2
s(t)
T
1
W ⊗≡= ∫
∑∑
∞
=




 ++=
∞
−∞=
=
1k
2
kb2
ka
2
12
0a
k
2
kcW
Parseval’s TheoremParseval’s Theorem
18/11/2008 63
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Aperiodic Signal -- Fourier Integral
Fourier analysis tools for
aperiodic signals.
{ }∫
∞+
⋅+⋅=
0
dωt)sin(ω)B(ωt)cos( ω)A(ωs(t)
Any aperiodic signal s(t) can be expressed as a Fourier
integral if s(t) piecewise smooth(1) in any finite interval (-
L,L) and absolute integrable(2).
Fourier Integral TheoremFourier Integral Theorem
(3)
+∞<
∞+
∞∫ dt
-
s(t)(2)
s(t) continuous,
s’(t) monotonic(1)
∫
∞+
∞−
⋅= dtt)cos( ωs(t)
π
1
)A(ω ∫
∞+
∞−
⋅= dtt)sin(ωs(t)
π
1
)B(ω(3)
FourierFourier
TransformTransform
(Pair)(Pair) -- FTFT
dt
tωj
es(t))S(ω
−∞+
∞−
⋅= ∫analysis
analysis
ωd
tωj
e)ωS(
π2
1
s(t) ∫
∞+
∞−
⋅⋅=
synthesis
synthesis
Complex formComplex form
RealReal--toto--complex linkcomplex link
[ ])B(ωj)A(ωπ)S(ω ⋅−⋅=
18/11/2008 64
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Let’s summarise a little
FS
Signal →→→→
Time
Frequency
FI
ak, bk A(ωωωω), B(ωωωω)
Periodic Aperiodic
ck C(ωωωω)
Domain
↓↓↓↓
real
complex
FT
18/11/2008 65
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
From FS to FT
FS moves to FT as period T increases:
continuous spectrum
2 ττττ
0 50 100 150 200
f
|S(f)|
FT
0
0.2
0.4
0.6
0.8
1
0 50 100 150 200
k f
|ak|
T = 0.05
0
0.1
0.2
0.3
0.4
0.5
0 50 100 150 200
k f
|ak|
T = 0.1
0
0.05
0.1
0.15
0.2
0.25
0 50 100 150 200
k f
|ak|
T = 0.2
Pulse train, width 2 τ = 0.025
T
2 ττττ
t
s(t)
Note: |ak|→2 a0 as k→0 ⇒ 2 a0 is plotted at k=0
Frequency spacingFrequency spacing →0 !0 !
18/11/2008 66
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Getting FT from FS
∫
−
⋅⋅=
T/2
T/2
dttωkj-es(t)
T
1
kc
∑
∞
−∞=
⋅=
k
tωkjekcs(t)
∆f = ∆ω/(2π) = 1/T
frequency spacingfrequency spacing
As ∆∆∆∆f →→→→0 , replace ∆∆∆∆f , ωωωωK ,
by df, 2ππππf,
∑
∞
−∞=kω
∫
∞+
∞−
FSFS defineddefined
∫
−
⋅=≡
T/2
T/2
dttωj-es(t)
∆f
ωc
ωΓ kk
k
∑
∞
−∞=
⋅=
k
k
k
ω
∆ftωjeωΓs(t)
2
k
k
ωc
T/2
T/2
dttωj-es(t)∆fkc ≡
−
⋅⋅= ∫
∑
∞
−∞=
⋅=
k
k
k
ω
tωjeωcs(t)
1 dttωjes(t)ωΓ
0∆f
limS(f) k
−⋅
∞+
∞−
=
→
= ∫
∫
∞+
∞−
⋅= dfftj2πeS(f)s(t)
FTFT defineddefined
18/11/2008 67
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FT & Gibbs Phenomenon
1.09
-1.09
2πf1-2πf1
2*2πf1
FT
FT
FT
tf
tf
1
1
2
2sin
π
π
1
1
f
FT
2πf2-2πf2
2*2πf2
FT
tf
tf
2
2
2
2sin
π
π
2
1
f
18/11/2008 68
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Gibbs Phenomenon (more)
2πf1-2πf1
2*2πf1
FT
FT
tf
tf
1
1
2
2sin
π
π
N1 terms
N2 terms
2πf2-2πf2
2*2πf2
FT
tf
tf
2
2
2
2sin
π
π
mult
mult
conv
conv
18/11/2008 69
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Gibbs Phenomenon (still…..)
Effect of the time domain convolution
Width=1/(Nf), becomes
vanishingly small with N->inf
Amplitude remains same (9%) as sinc amplitude is 1 for all N
18/11/2008 70
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FT & Dirac’s Delta
The FT of the generalised impulseThe FT of the generalised impulse δδδδδδδδ
(Dirac) is a complex exponential(Dirac) is a complex exponential




 <<
=−⋅∫
otherwise,0
b0taif,)0y(t
dt)0t(tδ
b
a
y(t)





=
≠
=−
0ttundefined,
0ttif,0
)0t(tδ
Dirac’sDirac’s δδ defineddefined
)0y(tdt)0t(tδ
-
y(t) =−
∞+
∞
⋅∫Hence
FT of an infinite train ofFT of an infinite train of δδ::
t
T
f
1/T
∑∑∑
∞+
−∞=
∞+
−∞=
∞+
−∞=
⋅−==








−
mm
Tωmj
k
m)
T
π2
(ωδ
T
2π
ekT)(tδFT
a.k.a. Sampling function, Shah(T) = Щ(T) or “comb”a.k.a. Sampling function, Shah(T) = Щ(T) or “comb”
NoteNote:: δδ && Щ = “generalised “functionsЩ = “generalised “functions
{ } 0tfπ2je)0t(tδFT −=−
FT of Dirac’sFT of Dirac’s δδδδδδδδ propertyproperty
{ } )α(ωδ2πeFT tαj
−=
18/11/2008 71
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FT properties
Linearity a·s(t) + b·u(t) a·S(f)+b·U(f)
Multiplication s(t)·u(t)
Convolution S(f)·U(f)
Time shifting
Frequency shifting
Time reversal s(-t) S(-f)
Differentiation j2ππππf S(f)
Parseval’s identity ∫∫∫∫ h(t) g*(t) dt ∫∫∫∫ H(f) G*(f) df
Integration S(f)/(j2ππππf )
Energy & Parseval’s
(E is t-to-f invariant)
Time FrequencyTime Frequency
fd)fU()fS(f∫
∞+
∞−
⋅−
td)t
-
u()ts(t∫
∞+
∞
⋅−
S(f)tf2πje ⋅−
s(t)fπ2je ⋅+
)ts(t −
∫∫
∞+
∞
∞+
∞
==
-
df
2
S(f)
-
dt
2
s(t)E
dt
ds(t)
∫
∞
t
-
dus(u)
)f-S(f
18/11/2008 72
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FT & Uncertainty
Fourier uncertainty
principle
⇒⇒⇒⇒ ∆∆∆∆t•∆∆∆∆f ≥≥≥≥ 1/4ππππ
ImplicationsImplications
• Limited accuracy on simultaneous observation of s(t) & S(f).
• Good time resolution (small ∆t) requires large bandwidth ∆f & vice-versa.
For effective duration ∆t & bandwidth ∆f
∃ γ > 0 ∆t•∆f ≥ γ
uncertainty productuncertainty product
Bandwidth TheoremBandwidth Theorem
For Energy Signals:
E=∫∫∫∫ |s(t)|2dt = ∫∫∫∫|S(f)|2df < ∞∞∞∞
dts(t)t
E
1
t
22
∫
+∞
∞−
⋅⋅= dfS(f)f
E
1
f
22
∫
+∞
∞−
⋅⋅=
Define mean valuesDefine mean values
dts(t))t(t
E
1
∆t
22
⋅−⋅= ∫
+∞
∞−
dfS(f))f(f
E
1
∆f
22
⋅−⋅= ∫
+∞
∞−
Define std. dev.Define std. dev.
18/11/2008 73
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
-20 -10 0 10 20
f/Hz
|S(f)|2
10-5
10-4
10-1
-0.1
0
0.1
0.2
-20 -10 0 10 20
f/Hz
S(f)
τ = 0.1
-τ τ t
s(t)1
-0.1
0
0.1
0.2
0.3
0.4
-20 -10 0 10 20
f/Hz
S(f)
-20 -10 0 10 20
f/Hz
|S(f)|2
10-5
10-4
10-1
10-3
10-2
1
τ = 0.2
-τ τ t
s(t)1
τ = 0.4
-τ τ t
s(t)1
-0.2
0
0.2
0.4
0.6
0.8
-20 -10 0 10 20
f/Hz
S(f)
-20 -10 0 10 20
f/Hz
|S(f)|2
10-5
10-4
10-1
10-3
10-2
1
FT - example
FT of 2τ-wide
square window
Choose
∆t = |∫s(t)/s(0) dt| = 2τ,
∆f = |∫S(f)/S(0) df|=1/(2τ) = half distance btwn
first 2 zeroes (f1,-1 = ±1/2τ) of S(f)
then: ∆∆∆∆t · ∆∆∆∆f = 1
Fourier uncertaintyFourier uncertainty
Power Spectral Density
(PSD) vs. frequency f plot.
Note:Note: Phases unimportant!
S(f) = 2τ sMAX sync(2fτ)
18/11/2008 74
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
FT - power spectrum
POTS = Voice/Fax/modem Phone
HPNA = Home Phone Network
Phone signals PSD masksPhone signals PSD masks
US = Upstream
DS = Downstream
From power spectrum we can deduce if signals coexist without interfering!
Power Spectral Density,
PSD(f) = dE/df = |S(f)|2
18/11/2008 75
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Other Bases
Fourier bases are not the only possible bases
– In fact, certain functions cannot be Fourier transformed
– E.g. x(t)=atn, x(t)=eat
Why?
– Because these functions grow faster than ej2πft
– So that
grows without bound and is not integrable
ftjn
eat π2−
Think of the function
tfjftjt
eee )2(2 πσπσ +−−−
=
Falls more rapidly than most functions
– The product
Stays bounded
– Larger set of functions can be dealt with
tfj
etx )2(
)( πσ +−
Gives us Laplace bases
18/11/2008 76
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
Pierre-Simon Laplace(1749-1827)
pronounced – laa-plaa-s
Was professor of Fourier at Univ. of Grenoble
Realised limitations of Fourier Transform
tried to extend the family of functions
that could be transformed
By modifying the basis functions
18/11/2008 77
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
Given by
∫
∞
−
+==
0
2)()( fjswheredtetxsX st
πσ
E.g. for
– s = 2 + j2π10
1/σ
1/f
Basis functions are decaying sinusoids with
– different decay constants
– different frequencies Two degrees of freedom, entire complex plane
Laplace basis
18/11/2008 78
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
x(t) & the Laplace Bases - example
)52cos()( 33.1
tetx t
π−
=
t
Laplace bases
σ const, j2πf varying
18/11/2008 79
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
The Laplace Transform of a function, f(t), is defined as;
∫
∞
−
==
0
)()()]([ dtetfsFtfL st
The Inverse Laplace Transform is defined by
∫
∞+
∞−
−
==
j
j
ts
dsesF
j
tfsFL
σσσσ
σσσσππππ
)(
2
1
)()]([1
*notes
18/11/2008 80
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
We generally do not use the contour integral to take the inverse Laplace.
requires a background in the use of complex variables and
the theory of residues.
Preferred method
by using partial fraction
expansion and recognizing transform pairs.
*notes
18/11/2008 81
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
Common Transform Properties:
f(t) F(s)
)(
1
0
)(
)(
)(
)0(10...)0('2)0(1)(
)(
)()(
)(0
0
),
0
()
0
(
sF
s
t
df
ds
sdF
ttf
fnfsfnsfnssFns
ndt
tfnd
asFtfate
sF
sot
etttuttf
∫
−
−−−−−−−
+−
−
≥−−
λλ
Time shift
Modulation
Systems
18/11/2008 82
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Laplace Transform
Transform Pairs:
____________________________________
)()( sFtf
f(t) F(s)
1
2
!
1
1
1
)(
1)(
++++
−−−−
++++
n
n
st
s
n
t
s
t
as
e
s
tu
tδδδδ
18/11/2008 83
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Other Basis functions: Singularity Functions
The Heaviside Step function u(t)
The Dirac Delta δ(t)
∫dt|
dt
d
|
18/11/2008 84
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Dirac Delta as Signal Basis
A sequence of time shifted Dirac deltas forms a set of orthogonal bases
baba ttifdttttt ≠=−∂−∂∫ 0)()(
0 t0
x(t) δδδδ(t – tb)δδδδ(t) δδδδ(t – ta)
)()()( tntxdttnttx ∆−=∆−∂∫
t
)(tx
∆t
∑
∞
=
∆−∂
→∆
=
0
)()(
0
lim
)(
n
tnttx
t
tx
Dirac Delta Function gives us a basis set for characterising system behaviour
18/11/2008 85
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
System Characterization
For analysis we need to do complete
characterization
Signal characterization already done
Moving to System Characterization…
SystemInput Signal Output Signal
18/11/2008 86
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Ordinary Differential Equations
Differential equations involving only
one independent variable are called
ordinary differential equations (ODE)
Differential equations involving Two
or more independent variable are
called partial differential equations
(PDE)
Objective: Usually the objective is to
solve for unknown function…….
)()()( 2
2
txy
dt
dy
t
dt
yd
t =++ βα
Microsoft
Equation 3.0
2
2
2
2
2
2
2
2
tzyx ∂
∂
=
∂
∂
+
∂
∂
+
∂
∂ ϕϕϕϕ
???).......,,,(
??).....(
:
tzyx
ty
Objective
ϕ
Source Term
Coefficients
Independent Variables
time, space…
18/11/2008 87
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Linear Differential Equation
A differential equation is linear if it can be written as linear combination of
derivatives of source term x(t) and output y(t) …..
– assuming time is our independent variable..
)()()()(
1
0
)()(
txtytaty
N
k
k
k
N
+= ∑
−
=
Variable Coefficients
Source Term
)()()(
1
0
)()(
txtyaty
N
k
k
k
N
+= ∑
−
=
Constant Coefficients
Linear Time Varying
System
Linear Time Invariant
System
<Powerful Tool>
Modeling & Analysis of System Behavior
Linear Differential Equations
)()()(
0
1
0
)()(
txbtyaty k
M
k
k
N
k
k
k
N
∑∑ =
−
=
+=Generic LTI ODE
18/11/2008 88
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
LTI System
DIGITALDIGITAL ANALOGANALOG
(1) Expression
∑∑ ==
−+−=
M
k
k
N
k
k knxbknyany
01
],[][][ ∑∑ ==
+=
M
k
k
k
k
N
k
k
k
k tx
dt
d
bty
dt
d
aty
01
)()()(
(2) Circuit Elements
Adder
Multiplier
Delay
][][ 21 nxnx +
][nxa ⋅
a
]1[ −nx1−
z
R
L
C
VS
CS
iRv ⋅=
dt
di
Lv ⋅=
∫= idt
C
v
1
+
-
18/11/2008 89
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
DIGITALDIGITAL ANALOGANALOG
Time - Domain
Transform - Domain
Direct Summation/Integration Methods
General Solution and Particular Solution
∑
∑
=
−
=
−
−
==
−
N
k
k
k
M
k
k
k
za
zb
zX
zY
zH
zHtransformz
1
0
1
)(
)(
)(
)(,
∑
∑
=
−
=
−
−
==
−
N
k
k
k
M
k
k
k
sa
sb
sX
sY
sH
sHtransformLaplace
1
0
1
)(
)(
)(
)(,
System Transfer Function
Transfer Function
18/11/2008 90
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
System Poles
F(s) of a signal with a pole at -a
and complex conjugate poles at b -
jc and b + jc.is
F(s) -> inf at s=-a, s=-b-jc,s=-b+jc
e-st cancels some component of f(t)
∫∫
∞
∞−
∞
∞−
−
−
−=∞==
=
asfordtdtetfthen
etfif
st
at
.1)(
)(
i.e. signal matches a basis vector
Signal contains a component == this basis vector
18/11/2008 91
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
System Poles
Poles defines….
Q factor of the filter (system) : Response decay Rate
– Neper frequency
Center frequency of filter: Resonance
– Radian frequency g(1/Q)
1/Nffundamental
ωσ js ±=
Neper frequency Radian frequency
18/11/2008 92
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Invariant Subspaces as Basis Vectors
A system is a transformation; input -> output
System
Consider a transformation on R2
























=
2
1
2
1
40
07
40
07
x
x
y
y
orxy
rr
1
1 4
7
Invariant Subspace
Scales only
18/11/2008 93
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Eigenfunctions of LTI Systems
Invariant functions (eigenfunctions) are est
∫ == ststst
st
e
s
dtese
dt
de 1
,Q
So, resolving system ODE to eigenfunctions, we get
∑∑ ==
+=
M
k
k
k
k
N
k
k
k
k tx
dt
d
bty
dt
d
aty
01
)()()( )(
1
)(
1
0
sX
sa
sb
sY N
k
k
k
M
k
k
k
∑
∑
=
−
=
−
−
=
The term sk represent the complex gain applied by system to
eigenfunction est
18/11/2008 94
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
LTI System Solution: Laplace Domain
The I/O ratios for all Laplace Bases est for all s
– Collectively called function H(s)
– OR
System transfer function
v3
v2
v1
v4
a1
a2b1
b2
System i/p
System o/p?
b20
b1o
a2o
a1o
I/P
x(t)
Resolve to Laplace Bases
(L.T.)
X(s) x
H(s)
for all s
Y(s)
o/p y(t)
Sum up LT
components
(ILT)
18/11/2008 95
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
LTI System Solution: Time Domain
So we did )()()( sXsHsY =
Inverse L.T
∫
∞
∞−
−=⊗= τττ dthxthtxty )()()()()(
Impulse
response
)()(
..
sHth
TL
⇔
CONVOLUTION
!!!
18/11/2008 96
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Impulse Response & Convolution
Impulse response is the solution of the system ODE
It is the homogenous part of the system ODE solution
)()(....)()()(
01
ttxtx
dt
d
bty
dt
d
aty
M
k
k
k
k
N
k
k
k
k δ=



+= ∑∑ ==
0 t
x(t) δδδδ(t)
0 t
y(t)
h(t)
δδδδ(t-t0)
h(t-t0)
kδδδδ(t-ττττ)
kh(t-ττττ)
This is a consequence of the Time Invariant behaviour of the system
18/11/2008 97
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Convolution cont’d
What did we do??
Resolved input x(t) into basis functions
– Time shifted impulses δ(t-τ) 0<τ<inf
The system response to impulse is h(t)
Created a version of h(t) for every δ(t-τ)
– Shifted by τ
– Scaled by value of x(t) at τ
x(τ) h(t-τ)
Resolve to bases
Find system effect
on each component
Sum up all components
Summed all these up
∫ −=
t
dthxty
0
)()()( τττ
This is possible only for LTI systems – both in time and s domains
18/11/2008 98
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
The Joy of Convolution
This is an inner product between sys response
and current + some past values of i/p
18/11/2008 99
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
LP Filters & Impulse Response
•1/fc
•Rate of decay indicates
•Freq selectivity of filter (Q)
•fl1 •fh1
•fc
•fl2 •fh2
•Low Q
•high rate of decay
•High Q
•low rate of decay
1/σ
1/f
18/11/2008 100
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Filters and Convolution
Convolution is an inner product between i/p and system impulse response
Convolution can be used to match i/p with impulse response
– If x(t) resembles h(t), convolution o/p will be large
h(t) filters those components of x(t) which look like itself
h(t) =
x(t) = chirp signal
Brutherrr
…
System o/p
18/11/2008 101
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
How Filters Work
Convolution’s fine but how do filters actually work?
Force x(t)= sin(ωt)
Velocity of damper )sin( tk ω
Velocity of mass )cos(
1
t
m
ω
ω
−
Predominates at low freq
Predominates at high freq
Velocity decreases at high freq – crossover determined by m/k
Basically, system becomes too heavy to move fast
18/11/2008 102
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Filter Functioning – Alternative View
T
t
e
−
0.36
1.0
T
Significant area between h(t) & x(t) – high output
average area between h(t) & x(t) low – low o/p
At freq > 1/T, inertia of the system averages out the i/p to zero
18/11/2008 103
www.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.inwww.rajeshsharma.co.in
Correlation
Measure of similarity of two signals, as a function
of time lag
– also called sliding Inner Product
– pattern recognition, pitch prediction………..
)()(*)()(*)()()( thtxdtthtxthtxy ⊗−=+=∗= ∫
∞
∞−
ττ
Convolution
THANK YOU

Dsp foundation part-i