Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

A1 2011 1/1

A1 Time-Frequency Analysis

David Murray

david.murray@eng.ox.ac.uk
www.robots.ox.ac.uk/∼dwm/Courses/2TF

Hilary 2011
A1 2011 2/1

Course Contents

1 From Signals to Complex Fourier Series

2 From Complex Fourier Series to the Fourier Transform

3 Convolution. The impulse response and transfer functions

4 From Modulation to Sampling, Aliasing & Reconstruction

5 Power & Energy Spectra, and Correlation

6 Random Processes and Signals


A1 2011 3/1

Topic 5. Introduction

In Topic 1 we reviewed the notion of average signal power in a


periodic signal, and related it to An and Bn , the coefficients of a
Fourier series.

In this lecture we want to revisit power for the continuous time


domain, with a view to expressing it in terms of the frequency
spectrum.

First though, we should find out how to express average power


using the complex Fourier series.
A1 2011 4/1

Discrete Parseval for the Complex Fourier Series


Recall that the average power in a periodic signal with period
T = 2π/ω is
Z +T /2 Z +T /2
1 1
Ave power = |f (t)|2 dt = f ∗ (t)f (t) dt .
T −T /2 T −T /2

Now replace f (t) with its complex Fourier series



X
f (t) = Cn einωt .
n=−∞

It follows that
Z +T /2 ∞ ∞
1 X X
∗ −imωt
Ave power = Cn einωt Cm e dt
T −T /2 n=−∞ m=−∞
A1 2011 5/1

Discrete Parseval for the Complex Fourier Series /ctd

This can be simplified ...


Z +T /2 ∞ ∞
1 X X
∗ −imωt
Ave power = Cn einωt Cm e dt
T −T /2 n=−∞ m=−∞

X
= Cn Cn∗ (because of orthogonality)
n=−∞
X∞
= |Cn |2
n=−∞

X

= |C0 |2 + 2 |Cn |2 , using Cn = C−n .
n=1
A1 2011 6/1

Finite Energy signals


It is necesssary to distinguish between signals that have finite
energy, and those that have infinite energy but finite power
First let us be absolutely clear that ALL signals f (t) are such
that |f (t)|2 is a power.

An energy signal is one where the total energy is finite:


Z ∞
ETot = |f (t)|2 dt 0 < ETot < ∞ .
−∞

f (t) is “square integrable”.


As ETot is finite, dividing by the infinite duration shows that energy
signals have zero average power.
Among other things, an Energy signal f (t)
always has a Fourier transform F (ω)
A1 2011 7/1

Finite Power signals


A power signal is one where the total energy is infinite, and
instead we consider average power
Z T
1
PAve = lim |f (t)|2 dt 0 < PAve < ∞ .
T →∞ 2T −T

A Power signal f (t)


may, but does not have to have a Fourier transform F (ω)

The distinction is all to do with avoiding infinities, but it results in


quantities called the auto-correlation and cross-correlation
having different dimensions.

We discuss finite energy signals first.


A1 2011 8/1

Parseval revisited

Let us first recall a general result from Lecture 3:

1
FT [f (t)g(t)] = F (ω) ∗ G(ω) .

Writing out fully, this is
Z ∞ Z ∞
1
f (t)g(t)e−iωt dt = F (p)G(ω − p) dp .
−∞ 2π −∞

Note that ω is not involved in the integrations above — it just a


free variable on both the left and right of the above equation —
and we can give it any value we wish to.
A1 2011 9/1

Signal energy in the continuous domain ctd


Choosing ω = 0, it must be the case that
Z ∞ Z ∞
1
f (t)g(t)dt = F (p)G(−p) dp .
−∞ 2π −∞

Now suppose g(t) = f ∗ (t). We know that


Z ∞
f (t)e−iωt dt = F (ω)
−∞
Z ∞
⇒ f ∗ (t)e+iωt dt = F ∗ (ω)
−∞

Now swap ω for −ω (not involved in integration ...)


The Fourier Transform of a complex conjugate is
Z ∞
f ∗ (t)e−iωt dt = F ∗ (−ω)
−∞
A1 2011 10 / 1

Signal energy in the continuous domain /ctd


But in the earlier expression we had
Z ∞ Z ∞
1
f (t)g(t)dt = F (p)G(−p)dp
−∞ 2π −∞
Z ∞ Z ∞
1
⇒ f (t)f ∗ (t)dt = F (p)F ∗ (p)dp
−∞ 2π −∞
Now p is just any parameter, so it is possible to tidy the
expression by replacing it with ω.
Then we arrive at the following important result
Parseval’s Theorem: The total ENERGY in a signal is
Z ∞ Z ∞ Z ∞
2 1 2
ETot = |f (t)| dt = |F (ω)| dω = |F (ω)|2 df
−∞ 2π −∞ −∞

(NB! The df = dω/2π is a bit of frequency, and is nothing to do


with the signal being called f (t).)
A1 2011 11 / 1

The ENERGY spectral density


Reminder ...
Z ∞ Z ∞ Z ∞
1
ETot = |f (t)|2 dt = |F (ω)|2 dω = |F (ω)|2 df
−∞ 2π −∞ −∞

So |F (ω)|2 has units of energy per Hz, and


The Energy Spectral Density of an energy signal f (t) ⇔ F (ω)
is
E(ω) = |F (ω)|2

If you integrate the energy spectral density over all frequency f ,


you get the total energy.

This makes sense!


A1 2011 12 / 1

♣ Example
Q: Determine the energy in the signal f (t) = u(t)e−t (i) in the time
domain, and (ii) by determining the energy spectral density and
integrating over frequency.
A: Part (i): To find the total energy in the time domain
Z ∞ Z ∞  ∞
2 exp(−2t)
|f (t)| dt = exp(−2t)dt = dt
−∞ 0 −2 0
1 1
= 0− =
−2 2
Part (ii): In the frequency domain
Z ∞ Z ∞
F (ω) = u(t) exp(−t) exp(−iωt)dt = exp(−t(1 + iω))dt
−∞ 0
 ∞
exp(−t(1 + iω)) 1
= − =
(1 + iω)
0 (1 + iω)
1
Hence the energy spectral density (ESD) is |F (ω)|2 =
1 + ω2
A1 2011 13 / 1

♣ Example /ctd
Integration of ESD over all frequency f (not ω remember!!) gives
the total energy of
Z ∞ Z ∞
1 1
|F (ω)|2 df = dω
−∞ 2π −∞ 1 + ω2

Substitute tan θ = ω
Z ∞ Z π/2
1 1
|F (ω)|2 df = sec2 θdθ
−∞ 2π −π/2 1 + tan2 θ
Z π/2
1
= dθ
2π −π/2
1 1
= π =
2π 2
Which agrees with our earlier result.
A1 2011 14 / 1

Correlation, intro

Correlation is a tool for analysing whether processes considered


random a priori are in fact related.
Cross-correlation Rfg indicates how similar two different signals
f (t) and g(t) are.
Rfg is found by multiplying f (t) with time-shifted values g(t + τ ),
then summing up the products.
f(t)
t

Low
High High
g(t)
t

1 2 3 4 5 6

Above Rfg will be low if the shift τ = 0, and high if τ = 2 or τ = 5.


A1 2011 15 / 1

Auto-Correlation
Auto-correlation Rff , describes how self-similar a signal is.
Sum the products of the signal f (t) and a copy of the signal at a
shifted time f (t + τ ).

An auto-correlation with a high magnitude means that the value


of the signal f (t) at one instant signal has a strong bearing on the
value at the next instant.

The cross- and auto-correlations can be derived for both finite


energy and finite power signals, but

They have different definitions

They have different dimensions (energy and power


respectively)
A1 2011 16 / 1

The Auto-correlation of a finite energy signal


The auto-correlation of a finite energy signal f (t)
Z ∞ Z ∞

Rff (τ ) = f (t)f (t + τ )dt =(for real signals) f (t)f (t + τ )dt
−∞ −∞

The result is an energy


f(t)

then sum

f(t +τ )

f(t)

f(t)
A1 2011 17 / 1

Properties of the Auto-correlation


1. Symmetry. The auto-correlation function is an even function

Rff (τ ) = Rff (−τ ) .

Proof: Substitute p = t + τ into the definition, and you will get


Z ∞ Z ∞
Rff (τ ) = f (t)f (t + τ )dt = f (p − τ )f (p)dp
−∞ −∞
Z ∞ Z ∞
= f (p)f (p − τ )dp = f (t)f (t − τ )dp = Rff (−τ )
−∞ −∞

2. For a non-zero signal, Rff (0) > 0.


Proof: For any non-zero signal there is at least one instant t1 for
which f R(t1 )=0, and f (t1 )f (t1 ) > 0.

Hence −∞ f (t)f (t)dt > 0.
A1 2011 18 / 1

Properties of the Auto-correlation /cdt


3. The value at τ = 0 is largest: Rff (0) ≥ Rff (τ ).

Proof: Consider any pair of real numbers a1 and a2 . As


(a1 − a2 )2 ≥ 0, we know that a12 + a22 ≥ a1 a2 + a2 a1 .

Now take the pairs of numbers at random from the function f (t).
Our result shows that there is no rearrangement, random or ordered,
of
R the function Rvalues into φ(t) that would make
f (t)φ(t)dt > f (t)2 dt.

Using φ(t) = f (t + τ ) is an ordered rearrangement, and so for any τ


Z ∞ Z ∞
2
f (t) dt ≥ f (t)f (t + τ )dt
−∞ −∞

Hence Rff (0) ≥ Rff (τ ).


A1 2011 19 / 1

♣ Synchronising to heartbeats in an ECG


A1 2011 20 / 1

♣ The search for Extra Terrestrial Intelligence


SETI have been looking for extra terrestrial intelligence by
examining the autocorrelation of signals from radio telescopes.
One project scans the sky around nearby (200 light years)
sun-like stars chopping up the bandwidth between 1-3 GHz into
2 billion channels each 1 Hz wide.
They determine the autocorrelation of each channel’s signal. If
the channel is noise, one would observe a very low
autocorrelation for all non-zero τ .
But if there is, say, a repeated message, one would observe a
periodic rise in the autocorrelation.
τ
increasing
A1 2011 21 / 1

The Wiener-Khinchin Theorem


RLet us take the Fourier transform of the cross-correlation
f (t)g(t + τ )dt, then switch the order of integration,
Z ∞  Z ∞ Z ∞
FT f (t)g(t + τ )dt = f (t)g(t + τ ) dt e−iωτ dτ
−∞ τ =−∞ t=−∞
Z ∞ Z ∞
= f (t) g(t + τ ) e−iωτ dτ dt
t=−∞ τ =−∞
But t is a constant for integration wrt τ . Substitute p = t + τ into it
...
Z ∞  Z ∞ Z ∞
FT f (t)g(t + τ )dt = f (t) g(p) e−iωp e+iωt dpdt
−∞ t=−∞ p=−∞
Z ∞ Z ∞
= f (t)eiωt dt g(p) e−iωp dp
−∞ −∞

= F (ω)G(ω).
Now specialize so that g(t) = f (t) ...
A1 2011 22 / 1

The Wiener-Khinchin Theorem

We find that ...

For a finite energy signal


Wiener-Khinchin says
The Fourier Transform of the Auto-Correlation is
the Energy Spectral Density

FT [Rff (τ )] = |F (ω)|2 = Eff (ω)

This statement and proof are only valid for finite energy signals

The proof rather trivializes Wiener-Khinchin. The fundamental


derivation lies in the theory of stochastic processes.
A1 2011 23 / 1

Corollary of Wiener-Khinchin

This corollary just confirms a result obtained earlier.


We have just shown Rff (τ ) ⇔ Eff (ω)
Z ∞
1
Rff (τ ) = Eff (ω)eiωτ dω
2π −∞

where τ is used by convention. Now set τ = 0


The auto-correlation at τ = 0 is
Z ∞
1
Rff (0) = Eff (ω)dω = ETot
2π −∞

This is exactly as expected! Z ∞


1
Earlier we defined the p.s.d. ETot = Eff (ω)dω , and we
2π −∞ R

know that for a finite energy signal Rff (0) = −∞ |f (t)|2 dt = ETot .
A1 2011 24 / 1

How is the ESD affected by passing through a


system?

If f (t) and g(t) are in the input and output of a system with
transfer function H(ω), then

G(ω) = H(ω)F (ω) .

But Eff (ω) = |F (ω)|2 , and so

The ESD of the output of system H(ω) is

Egg (ω) = |H(ω)|2 |F (ω)|2 = |H(ω)|2 Eff (ω)


A1 2011 25 / 1

Cross-correlation

The cross-correlation describes the dependence between two


different signals.
Cross-correlation for finite energy signals
Z ∞
Rfg (τ ) = f (t)g(t + τ )dt
−∞

Symmetries
The cross-correlation does not in general have a definite
reflection symmetry. However, we can swap the functions,
Rfg (τ ) = Rgf (τ ).
Independent signals
If Rfg (0) = 0, the signal f (t) and g(t) have no dependence on
one another.
A1 2011 26 / 1

♣ Example
[Q] Determine Rfg (τ ) f(t) g(t)
1 1
[A] Start by sketching g(t + τ ) as
function of t (four sketches t t
2a 2a 3a 4a
needed).
Red f (t): f = 0 then f = t/2a then f = 0
Blue g(t + τ ): g = 0 then g = t/a − (2 + τ /a) then g = 1 then g = 0

1 1 1 1

t t t t
2a+ τ 4a+ τ 2a+ τ 4a+ τ 2a+ τ 4a+ τ 2a+ τ 4a+ τ
0 2a 0 2a 0 2a 0 2a
Left-most non-zero config valid for 0 ≤ 4a + τ ≤ a, so that
For −4a ≤ τ ≤ −3a:
∞ 4a+τ
(4a + τ )2
Z Z
t
Rfg (τ ) = f (t)g(t + τ )dt = · 1 dt =
−∞ 0 2a 4a
A1 2011 27 / 1

♣ Example /ctd
1 1 1 1

t t t t
2a+ τ 4a+ τ 2a+ τ 4a+ τ 2a+ τ 4a+ τ 2a+ τ 4a+ τ
0 2a 0 2a 0 2a 0 2a

For −3a ≤ τ ≤ −2a:


Z ∞ 3a+τ    Z 4a+τ
t t t
Z
τ
Rfg (τ ) = f (t)g(t +τ )dt = · − 2+ dt + ·1 dt
−∞ 0 2a a a 3a+τ 2a

For −2a ≤ τ ≤ −a:


Z ∞ 3a+τ    2a
t t t
Z Z
τ
Rfg (τ ) = f (t)g(t +τ )dt = · − 2+ dt + ·1 dt
−∞ 2a+τ 2a a a 3a+τ 2a

For −a ≤ τ ≤ 0:
Z ∞ Z 2a t

t

τ

Rfg (τ ) = f (t)g(t + τ )dt = · − 2+ dt
−∞ 2a+τ 2a a a
The integrals and finding the maximum is a DIY exercise ...
A1 2011 28 / 1

Application

Obvious that cross-correlation is useful for detecting occurences


of a “model” signal f (t) in another signal g(t).
This is a 2D example where the model signal f (x, y ) is the back
view of a footballer, and the test signals g(x, y ) are images from
a match.

f (x, y ) Cross-Correlation g(x, y )


A1 2011 29 / 1

W-K and Cross- Energy Spectral Density


If we looked back, we’d see that we started the finite energy
derivation of Wiener-Khinchin theorem using the cross
correlation:
Z ∞ 
FT f (t)g(t + τ )dt = much grinding
−∞
= F ∗ (ω)G(ω).

The Wiener-Khinchin Theorem shows that, for a finite energy


signal,

The FT of the Cross-Correlation is


the Cross-Energy Spectral Density

FT Rfg (τ ) = F ∗ (ω)G(ω) = Efg (ω)


 
A1 2011 30 / 1

Finite power signals


Let us use f (t) = sin ω0 t to motivate a discussion about finite
power signals.

First
R ∞ why is it2finite power? Because one cannot evaluate
−∞
| sin ω0 t| dt. It is not “square-integrable”.

However, by sketching the function sin ωo t and using the notion


of self-similarity we would hope that the auto-correlation
is positive, but decreasing, for small but increasing τ ; then negative
as the the curves are in anti-phase and dissimilar in an “organized”
way, then return to being similar.

has the same period as its parent function, and large when τ = 0

Rff proportional to cos(ω0 τ ) would not be unreasonable?


A1 2011 31 / 1

Finite power signals /ctd

τ
increasing
A1 2011 32 / 1

Autocorrelation for Finite power signals


The autocorrelation of a finite power signal is
Z T
1
Rff (τ ) = lim f (t)f (t + τ )dt .
T →∞ 2T −T

For this example


1
Z T
Rff (τ ) = lim sin(ω0 t) sin(ω0 (t + τ ))dt
T →∞ 2T −T
Z T0 /2
1
→ sin(ω0 t) sin(ω0 (t + τ ))dt
2(T0 /2) −T0 /2
Z π/ω0
ω0
= sin(ω0 t) sin(ω0 (t + τ ))dt
2π −π/ω0
Z π
1
= sin(p) sin(p + ω0 τ ))dp
2π −π
Z π h
1 i 1
= sin2 (p) cos(ω0 τ ) + sin(p) cos(p) sin(ω0 τ ) dp = cos(ω0 τ )
2π −π 2
A1 2011 33 / 1

Autocorrelation for Finite power signals


For a finite energy signal, the Fourier Transform of the
autocorrelation was the energy spectral density.
What is the analogous result now?
For our example
 
1 π
FT [Rff ] = FT cos(ω0 τ ) = [δ(ω + ω0 ) + δ(ω − ω0 )]
2 2
This is actually the power spectral density Sff (ω) of our
example function sin ω0 t.
To check, let us integrate over all frequency f :
Z ∞ Z ∞
π
Sff (ω)df = [δ(ω + ω0 ) + δ(ω − ω0 )] df
−∞ −∞ 2
Z ∞
π dω 1 1
= [δ(ω + ω0 ) + δ(ω − ω0 )] = [1 + 1] =
−∞ 2 2π 4 2
A1 2011 34 / 1

Analogous definitions for finite power signals


The autocorrelation of a finiteZ power
T
signal is defined as
1
Rff (τ ) = lim f (t)f (t + τ )dt .
T →∞ 2T −T

The autocorrelation and PSD are a FT Pair


Rff (τ ) ⇔ Sff (ω)

We must NOT write Sff = |F (ω)|2 , as F (ω) may not exist!

The average power is

PAve = Rff (0)

The PSD transfers across a system as

Sgg (ω) = |H(ω)|2 Sff (ω)


A1 2011 35 / 1

Cross-correlation and power signals

Two power signals can be cross-correlated, using a similar


definition
The Cross-Correlation of a finite power signal
Z T
1
Rfg (τ ) = lim f (t)g(t + τ )dt
T →∞ 2T −T

The crosscorrelation and Cross PSD are an FT Pair

Rfg (τ ) ⇔ Sfg (ω)

One very last thought. If one applies an finite power signal to a


system, it cannot be converted into a finite energy signal — or
vice versa.
A1 2011 36 / 1

Summary

An energy signal f (t) has finite total energy and zero average power
Z ∞
ETot = |f (t)|2 dt 0 < ETot < ∞ .
−∞

An energy signal f (t)


always has a Fourier transform F (ω)
always has an energy spectral density (ESD) given by
Eff (ω) = |F (ω)|2
R∞
always has an autocorrelation Rff (τ ) = −∞ f (t)f (t + τ )dt
always has an ESD which is the FT of the autocorrelation
Rff (τ ) ⇔ Eff (ω)
1
R∞
always has total energy ETot = Rff (0) = 2π E (ω)dω
−∞ ff
always has an ESD which transfers as Egg (ω) = |H(ω)|2 Eff (ω)
A1 2011 37 / 1

Summary
A power signal f (t) is one where the total energy is infinite, and we
consider average power
Z T
1
PAve = lim |f (t)|2 dt 0 < PAve < ∞ .
T →∞ 2T −T

A power signal f (t)


may have a Fourier transform F (ω), but should not rely on it.
may have an power spectral density (PSD) given Sff (ω) = |F (ω)|2
always has an autocorrelation
1
RT
Rff (τ ) = limT →∞ 2T −T
f (t)f (t + τ )dt
always has a PSD which is the FT of the autocorrelation
Rff (τ ) ⇔ Sff (ω)
always has integrated average power PAve = Rff (0)
always has a PSD which transfers through a system as
Sgg (ω) = |H(ω)|2 Sff (ω)

You might also like