IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and...

27
Introduction Power and Energy d-functions Revisited IB Paper 6: Signal and Data Analysis Handout 1: Introduction and Preliminaries S Godsill Signal Processing and Communications Group, Engineering Department, Cambridge, UK Lent 2015 1 / 73

Transcript of IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and...

Page 1: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

IB Paper 6: Signal and Data AnalysisHandout 1: Introduction and Preliminaries

S Godsill

Signal Processing and Communications Group,Engineering Department,

Cambridge, UK

Lent 2015

1 / 73

Page 2: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Course structure

7 lectures on Signal and Data Analysis – continuous and discreteFourier techniques for frequency domain analysis:

• Introduction

• Section 1: Review of energy, power, delta functions andFourier Series.

• Section 2: The Fourier Transform and its properties.

• Section 3: Sampling and the Discrete Time Fourier Transform(DTFT)

• Section 4: The Discrete Fourier Transform (DFT)

2 / 73

Page 3: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Paper 6, Information engineering, will be divided into two sections,and candidates will be expected to answer two questions from each.

Section A will consist of three questions on linear systems andcontrol.

Section B will consist of three questions on communications andsignal and data analysis.Section B may consist of

1. 2 communications questions and 1 signal and data analysisquestion, or

2. 1 communications question and 2 signal and data analysisquestions, or

3. 1.5 comms questions and 1.5 signal and data analysis questions(not necessarily evenly weighted).

3 / 73

Page 4: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Recommended Books

The books given on the booklist are

• Proakis and Manolakis: Digital Signal Processing – Principles,Algorithms and Applications. Prentice Hall, 3rd Edition, 1996.

• Bracewell: The Fourier Transform – McGraw Hill, 3rd Edition,2000.

• McLellan, Schafer and Yoder: Signal Processing First – Pearson,Prentice Hall, 1st Edition, 2003

Another short useful book is

James, J.F: A Student’s Guide to Fourier Transforms, withapplications in physics and engineering. CUP, 2nd Edition, 2002.

4 / 73

Page 5: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Recommended Books cont....

Note that notation and conventions differ slightly between thevarious books and that used in this course.

McLellan et al. introduces the discrete theory before thecontinuous theory, while in this course we do the continuous theoryand lead on to the discrete theory.

Lecture notes will appear at:http://www-sigproc.eng.cam.ac.uk/Main/IBP6

5 / 73

Page 6: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Overview of Section 1

• Introduction

- Motivation for signal analysis.

- Some examples of typical datasets.

• Power and Energy

• Revision and extension of δ-functions.

• Revision and extension of Fourier series

- definition and properties

- examples

Main body of text in handouts will be complete, some gaps will beleft for derivations of equations and examples.

6 / 73

Page 7: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Motivation

What is Signal and Data Analysis?

Signals and data are continuously being generated and measured inall walks of life, e.g.

• Mobile phones record and generate sounds, images and video.They then analyse and code the data for efficient storage or forwireless transmission.

• In engineering environments signals can involve measurements ofvibrations from mechanical structures, recording of speech or audiodata, data from patient monitoring machines in hospitals,measurements of natural phenomena (temperatures, tide heights,emissions from distant galaxies....).

.

7 / 73

Page 8: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Motivation cont...

• One of the most important tasks in analysing and processing ofthese signals is to determine which frequency components arepresent in the data.

• You already have some methods for analysing frequency content:

• Fourier Series - but only applicable for periodic and continuous-timewaveforms

• Frequency response of linear system - more applicable, but we needto analyse signals as well as systems

This course will introduce new concepts in frequency analysiswhich allow you to determine the frequency content of general(non-periodic) signals, in both continuous-time (‘analogue’) anddiscrete-time (‘digital’).

8 / 73

Page 9: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Motivation cont...

Nowadays data will mostly be measured in digital form and oftenprocessed by computers. This gives many advantages, includingrepeatability, guaranteed levels of accuracy, flexibility and power ofprocessing.

In this course we will also study the basics of digital signal processing,including the principles of digital sampling.For example, we will study aclassic result – The Nyquist Sampling Theorem – which shows that it ispossible to reconstruct an original analogue signal perfectly fromcorrectly digitised data [ recall (??) the debate over changing from LPsto CDs in the 80s].

9 / 73

Page 10: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Examples of Data

We may have to deal with data which is

• continuous or discrete

• real or complex / scalar or vector valued

• deterministic or random

• periodic or non-periodic

10 / 73

Page 11: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Power and Energy

We define the total energy content of a signal f (t) as follows:

Ef =∫ +∞

−∞|f (t)|2dt

Often more convenient to compute as a limit:

Ef = limT→∞

∫ +T/2

−T/2|f (t)|2dt

11 / 73

Page 12: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

and similarly the average power content of the signal is defined as

Pf = limT→∞

1

T

∫ T/2

−T/2|f (t)|2dt. (1)

Note that Pf is the average power of the signal estimated over thewhole time interval

12 / 73

Page 13: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Example: Consider a decaying exponential signal f (t), where

f (t) =

{exp(−t) t > 00 t ≤ 0

−4 −2 0 2 4 6 8−0.2

0

0.2

0.4

0.6

0.8

1

Figure 1 : The function: e−t for t > 0, and 0 for t ≤ 0

Calculate the energy for this function

Energy :∫ ∞

0|e−t |2dt =

∫ ∞

0e−2tdt = −1

2[exp(−2t)]∞0 =

1

2

13 / 73

Page 14: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Consider now the power of this function:

Power : limT→∞

1

T

∫ T/2

0e−2tdt

= limT→∞

−1

2T

[e−2t

]T/20−→ 0

We see here therefore that while the average energy for this signalis well defined, the average power is zero and is therefore not ahelpful quantity in this case. Looking at the form for energy it isreasonable to suppose that we might run into problems when weconsider a signal such as a sine wave which does not decay ast −→ ∞.

14 / 73

Page 15: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Example: Consider the signal f (t) = sin(t) :

−6 −4 −2 0 2 4 6−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Now try to evaluate the energy in this signal. First look at theenergy in just one half-period of sine, from 0 to π:∫ π

0| sin(t)|2dt =

1

2

∫ π

0(1− cos(2t))dt

=1

2

[t − 1

2sin(2t)

0

2

15 / 73

Page 16: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Now, the total energy involves adding together the energy of all ofthe half-period intervals:∫ ∞

−∞| sin(t)|2dt =

n=+∞

∑n=−∞

∫ (n+1)π

nπ| sin(t)|2dt

=+∞

∑n=−∞

π/2−→ ∞

and the energy is therefore infinite.But, is the power well-defined?

16 / 73

Page 17: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Evaluating power in this signal gives:

limT→∞

1

T

∫ T/2

−T/2| sin(t)|2dt = lim

T→∞

1

2T[t − sin(2t)/2]T/2

−T/2

= limT→∞

1

2T[T − sin(T )]

= limT→∞

1

2

[1− sin(T )

T

]=

1

2.

Power is therefore well-defined. We should therefore be aware thatthe nature of the signal determines whether it is the energy or thepower that is the useful quantity to deal with.

17 / 73

Page 18: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

δ-functions revisited

δ-functions (also known as the Dirac δ-function or the impulsefunction) are fundamental to the understanding of signal analysis.Consider the rectangular pulse f1(t ; ε), where ε can vary from 0 to∞, illustrated below;

−ε/2 ε/2

1/ε

t

The pulse is designed such that it has unit area, i.e.

∫ ∞−∞ f1(t ; ε)dt = 1, for all ε > 0.

18 / 73

Page 19: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

The δ-function, δ(t) can be defined as a limiting case: {f1(t; ε)}as ε→ 0:

δ(t) = limε→0

f1(t ; ε). (2)

Two familiar properties are

a) δ(t) = 0 for t 6= 0.

b)∫ ∞

−∞δ(t)dt = 1.

19 / 73

Page 20: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

The sifting property

Now consider the following integral

∫ ∞−∞ g(t)δ(t − a)dt.

a

δ(t − a)

t

g(t)

20 / 73

Page 21: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Since δ(t − a) is zero for all values of t except t = a, we have:∫ ∞

−∞g(t)δ(t − a)dt =

∫ ∞

−∞g(a)δ(t − a)dt

= g(a)∫ ∞

−∞δ(t − a)dt = g(a).

We therefore have the VERY USEFUL result that integrating afunction with δ(t − a) picks out the value of the function at a:

∫ +∞

−∞g(t)δ(t − a)dt = g(a)

This will be referred to as the Sifting Property

21 / 73

Page 22: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Other definitions of the delta function

The delta-function can be defined as limiting cases of otherfunctions as well as the family of rectangular pulses f1(t; ε)considered above.Consider for example the two functions:

f2(t ; ε) =ε

ε2π2 + t2

f3(t ; a) =sin(at)

πt

22 / 73

Page 23: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

It can be shown that we can also produce a delta function using f2or f3:

δ(t) = limε→0

f2(t ; ε) = lima→∞

f3(t ; a)

Let us concentrate on the family of functions f3(t ; a). Thefunction sin(t)/t, is known as the sinc function or sinc(t), whichoscillates like a sine-wave, but decays to zero as t goes to ±∞, seefigure 2.

−50 −40 −30 −20 −10 0 10 20 30 40 50−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

sin(t)/t

t

Figure 2 : The sinc function sin(t)/t

23 / 73

Page 24: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

Its integral (not derived here) is equal to π:

∫ +∞

−∞

sin(t)

tdt = π (3)

Hence, integrating by substitution, the pulse f3(t ; a) has area 1, asrequired.

Now see figure 3 to see sin(at)πt converging to a δ-function.

24 / 73

Page 25: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

−50 0 50−0.5

0

0.5

1

−50 0 50−1

0

1

2

−50 0 50−2

0

2

4

−50 0 50−5

0

5

10

−50 0 50−10

0

10

20

−50 0 50−20

0

20

40

−50 0 50−50

0

50

−50 0 50−50

0

50

100

a=1 a=2

a=4 a=8

a=16 a=32

a=64 a=128

Figure 3 :sin(at)

πt for various values of a

25 / 73

Page 26: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

A useful integral

We can use the previous result to evaluate the following integral,which will be used several times later in the course:

I =∫ ∞

−∞exp(jωt)dω = lim

A→∞

∫ A

−Aexp(jωt)dω (4)

Standard integration gives

I = limA→∞

[ejωt

jt

]A−A

= limA→∞

(2

sin(At)

t

)= lim

A→∞2πf3(t;A) = 2πδ(t)

(5)where the last line follows from the definition of the δ-function asthe limit of a sequence of functions f3() (see previous section).

26 / 73

Page 27: IB Paper 6: Signal and Data Analysis - Handout 1 ... · Course structure 7 lectures on Signal and Data Analysis { continuous and discrete Fourier techniques for frequency domain analysis:

Introduction Power and Energy δ-functions Revisited

This gives the useful result:

limA→∞

∫ A

−Aejωtdω = 2πδ(t) (6)

or ∫ ∞

−∞exp(jωt)dω = 2πδ(t) (7)

27 / 73