6.003: signal processing lecture 1 september 6, 2018...6.003: signal processing lecture 1 september...

6
6.003: Signal Processing Lecture 1 September 6, 2018 1 6.003: Signal Processing Working with Signals Overview of Subject Signals: Definitions, Examples, and Operations Basis Functions and Transforms September 6, 2018 Welcome to 6.003 Piloting a new version of 6.003 focused on Signal Processing. Combines theory analysis and synthesis of signals, time and frequency domains, convolution and deconvolution, filtering and noise reduction, with authentic, real-world applications in music, imaging, video. Role of Analysis in Science and Engineering Our common goal with other science / engineering endeavors is to model some aspect of the world analyze the model, and interpret results to gain better understanding. Model Result World New Understanding make model analyze (math, computation) interpret results Classical analyses use a variety of maths, especially calculus. We will also use computation which is applicable in many real-world problems that are difficult or impossible to solve analytically strengthens ties to the real world. Design as the Reverse of Analysis 1 We are interested not only in analyzing the behaviors of pre-existing systems, but also in designing new systems. System Behavior analysis design Analysis and Design are different and complementary activities. Analysis starts with a precise statement of the problem and proceeds to a precise statement of a result. conventional problem sets Design is more open-ended, with multiple possible solutions that differ along idiosyncratic dimensions that were not even part of the original problem statement. Engineering Design Problems adapted from R. David Middlebrook 1 Course Mechanics Lecture: Tuesdays and Thursdays 2-3pm in 1-190 Labs: Tues. and Thur. 3-5pm in 4-145, 1-150, 4-153, 1-190 Homework – issued Tuesdays, due following Tuesday at noon Drills: facts, definitions, and simple concepts - online with immediate feedback (not graded) - intended as practice and self-assessment Problems – intended to improve problem solving skills - Exam-Type Problems: proveably correct solutions - Engineering Design Problems: real-world applications (more open ended) Two Midterms and a Final Exam Advisory Group Weekly meetings with class representatives help staff understand student perspective learn about teaching Tentatively meet on Wednesdays at 3pm. Interested? ... Send email to [email protected]

Upload: others

Post on 11-Mar-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

1

6.003: Signal Processing

Working with Signals

• Overview of Subject

• Signals: Definitions, Examples, and Operations

• Basis Functions and Transforms

September 6, 2018

Welcome to 6.003

Piloting a new version of 6.003 focused on Signal Processing.

Combines theory

• analysis and synthesis of signals,

• time and frequency domains,

• convolution and deconvolution,

• filtering and noise reduction,

with authentic, real-world applications in

• music,

• imaging,

• video.

Role of Analysis in Science and Engineering

Our common goal with other science / engineering endeavors is to

• model some aspect of the world

• analyze the model, and

• interpret results to gain better understanding.

Model Result

World New Understanding

make model

analyze

(math, computation)

interpret results

Classical analyses use a variety of maths, especially calculus.

We will also use computation which is applicable in many real-world

problems that are difficult or impossible to solve analytically

→ strengthens ties to the real world.

Design as the Reverse of Analysis1

We are interested not only in analyzing the behaviors of pre-existing

systems, but also in designing new systems.

System Behavior

analysis

design

Analysis and Design are different and complementary activities.

Analysis starts with a precise statement of the problem and proceeds

to a precise statement of a result. → conventional problem sets

Design is more open-ended, with multiple possible solutions that

differ along idiosyncratic dimensions that were not even part of the

original problem statement. → Engineering Design Problems

adapted from R. David Middlebrook1

Course Mechanics

Lecture: Tuesdays and Thursdays 2-3pm in 1-190

Labs: Tues. and Thur. 3-5pm in 4-145, 1-150, 4-153, 1-190

Homework – issued Tuesdays, due following Tuesday at noon

• Drills: facts, definitions, and simple concepts

− online with immediate feedback (not graded)

− intended as practice and self-assessment

• Problems – intended to improve problem solving skills

− Exam-Type Problems: proveably correct solutions

− Engineering Design Problems: real-world applications (more

open ended)

Two Midterms and a Final Exam

Advisory Group

Weekly meetings with class representatives

• help staff understand student perspective

• learn about teaching

Tentatively meet on Wednesdays at 3pm.

Interested? ... Send email to [email protected]

Page 2: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

2

Signals

Signals are functions that are used to convey information.

– may have 1 or 2 or 3 or even more independent variables

t

sou

nd

pre

ssu

re(t

)

x

y brightness (x, y)

Signals

Signals are functions that are used to convey information.

– dependent variable can be a scalar or a vector

x

yscalar: brightnessat each point (x, y)

x

y

vector: (red,green,blue)at each point (x, y)

Signals

Signals are functions that are used to convey information.

– dependent variable can be real, imaginary, or complex-valued

t

x(t) = ej2πt = cos 2πt +j sin 2πt

1

0

−1

1 2

Signals

Continuous “time” (CT) versus discrete “time” (DT)

t

x(t)

0 0.1 0.2 0.3 0.4 0.5n

x[n]

0 2 4 6 8 10

Signals from physical systems are often of continuous domain:

• continuous time – measured in seconds

• continuous spatial coordinates – measured in meters

Computations usually manipulate functions of discrete domain:

• discrete time – measured in samples

• discrete spatial coordinates – measured in samples

Signals

Sampling: converting CT signals to DT

t

x(t)

0T 2T 4T 6T 8T 10Tn

x[n] = x(nT )

0 2 4 6 8 10

T = sampling interval

Important for computational manipulation of physical data.

• digital representations of audio signals (as in MP3)

• digital representations of images (as in JPEG)

Signals

Reconstruction: converting DT signals to CT

zero-order hold

n

x[n]

0 2 4 6 8 10t

x(t)

0 2T 4T 6T 8T 10T

T = sampling interval

commonly used in audio output devices

Page 3: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

3

Signals

Reconstruction: converting DT signals to CT

piecewise linear

n

x[n]

0 2 4 6 8 10t

x(t)

0 2T 4T 6T 8T 10T

T = sampling interval

commonly used in rendering images

Signals

Periodic signals consist of repeated cycles (periods).

t

x(t) = x(t+ T )

0 T

periodic

t

x(t)

0

aperiodic

n

x[n] = x[n+N ]

0 Nn

x[n]

0

Signals

Right-sided signals are zero before some starting time.

Left-sided signals are zero after some ending time.

Signals with finite duration are zero except for some range of times.

right-sided left-sided

t

x(t)

0 Tst

x(t)

0Te

n

x[n]

0 Ns

n

x[n]

0Ne

Signals

The minima and maxima of bounded signals are finite.

bounded unbounded

t

x(t)

0t

x(t)

0

n

x[n]

0n

x[n]

0

Signals

Even signals are symmetric about time zero.

Odd signals are antisymmetric about time zero.

even odd

t

x(t) = x(−t)

0

t

x(t) = −x(−t)

n

x[n] = x[−n]

0

n

x[n] = −x[−n]

0

Check Yourself

Computer generated speech (by Robert Donovan)

t

f(t)

Listen to the following four manipulated signals:

f1(t), f2(t), f3(t), f4(t).How many of the following relations are true?

• f1(t) = f(2t)• f2(t) = −f(t)• f3(t) = f(2t)• f4(t) = 1

3f(t)

Page 4: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

4

Check Yourself

−250 0 250

−25

00

250

y

x

f1(x, y)=f(2x, y) ?−250 0 250

−25

00

250

y

x

f2(x, y)=f(2x−250, y) ?−250 0 250

−25

00

250

y

x

f3(x, y)=f(−x−250, y) ?

−250 0 250

−25

00

250

y

x

f(x, y)

How many images match the expressions beneath them?

Musical Sounds as Signals

Signals are functions that are used to convey information.

Example: a musical sound can be represented as a function of time.

sou

nd

pre

ssu

re

t

Although this time function is a complete description of the sound,

it does not expose many of the important properties of the sound.

Musical Sounds as Signals

Even though these sounds have the same pitch, they sound different.

piano

t

cello

t

bassoon

t

oboe

t

horn

t

altosax

t

violin

t

bassoon

t1262 sec

It’s not clear how the differences relate to properties of the signals.

(from http://theremin.music.uiowa.edu)

Musical Signals as Sums of Sinusoids

One way to characterize differences between these signals is express

each as a sum of sinusoids.

f(t) =∞∑k=0

(ck cos kωot+ dk sin kωot

)

2πωo

t

cos0t

2πωo

t

sin0t

2πωo

t

cosω

ot

2πωo

t

sinωot

2πωo

t

cos2ωot

...2πωo

t

sin2ω

ot

...Since these sounds are (nearly) periodic, the frequencies of the dom-

inant sinusoids are integer multiples of a fundamental frequency ωo.

Harmonic Structure

The weights of the components (ck and dk) describe the harmonic

structure of the signal.

f(t) =∞∑k=0

(ck cos kωot+ dk sin kωot

)

ωωo 2ωo 3ωo 4ωo 5ωo 6ωo

√c2k+d2

k

0 1 2 3 4 5 6 ← harmonic #

DC→

fun

da

me

nta

l→

sec

on

dh

arm

on

ic→

thir

dh

arm

on

ic→

fou

rth

harm

on

ic→

fift

hh

arm

on

ic→

six

thh

arm

on

ic→

Harmonic Structure

Harmonic structure plays an important role in generating the char-

acteristic sounds of musical instruments.

piano

t

piano

k

bassoon

t

bassoon

k

violin

t

violin

k

(from http://theremin.music.uiowa.edu)

Page 5: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

5

Two Views of the Same Signal

The harmonic expansion provides an alternative view of the signal.

f(t) =∞∑k=0

(ck cos kωot+ dk sin kωot

)We can view the musical signal as

• a function of time f(t), or

• as a sum of harmonics with amplitudes [c0, d0, c1, d1, . . .].

Both views are useful. For example,

• the peak sound pressure is more easily seen in f(t), while

• consonance is more easily analyzed by comparing harmonics.

We call such an alternative view of a signal a transform.

Transforms

There are many kinds of transforms and expansions based on differ-

ent types of basis functions.

Examples: expansions based on derivatives of functions.

Maclaurin expansion:

f(t) = f(0) + f ′(0)1! t+ f ′′(0)

2! t2 + f ′′′(0)3! t3 + · · ·

The function of time f(t) is represented by its derivatives at t = 0.

Taylor expansion about t = a:

f(t) = f(a) + f ′(a)1! (t− a) + f ′′(a)

2! (t− a)2 + f ′′′(a)3! (t− a)3 + · · ·

The function of time f(t) is represented by its derivatives at t = a.

Series Representations of Signals

Maclaurin series

f(t) = f(0) 10! + f ′(0) t1! + f ′′(0) t

2

2! + f ′′′(0) t3

3! + · · ·

Basis functions:

1−1t

1/0!

1−1t

t/1!

1−1t

t2/2!

1−1t

t3/3!

1−1t

t4/4!

...1−1t

t5/5!

...Notice that even powers of t are even functions of time, and odd

powers of t are odd functions of time.

The expansion for t > 0 implicitly determines the function for t < 0.

Series Representations of Signals

To model a signal that starts at a particular time (say t = 0),

we need a different set of basis functions.

f(t) = f(0+)u0(t) + f ′(0+)u1(t) + f ′′(0+)u2(t) + f ′′′(0+)u3(t) + · · ·

Basis functions:

1−1t

u(t) = u0(t)

1−1t

u1(t) = t

1!u(t)

1−1t

u2(t) = t2

2!u(t)

1−1t

u3(t) = t3

3!u(t)

1−1t

u4(t) = t4

4!u(t)

...1−1t

u5(t) = t5

5!u(t)

...The first of these functions is the unit step u(t) = u0(t). Subsequent

functions are integrals of their predecessors un+1(t) =∫ t−∞ un(τ)dτ .

Series Representations of Signals

This set of functions [u0(t), u1(t), u2(t), . . .] is closed under integra-

tion, i.e., if f(t) can be expressed as a sum of these functions, then

the integral of f(t) can also.

Example:

f(t) = cos(t)u(t) = u(t)− t2

2!u(t) + t4

4!u(t)− t6

6!u(t) + t8

8!u(t)−+ · · ·

= 1u0(t)− 1u2(t) + 1u4(t)− 1u6(t) + 1u8(t)−+...

g(t) =∫ t

−∞f(τ)dτ = sin(t)u(t) = tu(t)− t3

3!u(t) + t5

5!u(t)− t7

7!u(t) + t9

9!u(t)−+ · · ·

= 1u1(t)− 1u3(t) + 1u5(t)− 1u7(t) + 1u9(t)− . · · ·

Since f(t) can be written as a sum of functions from the set, it

follows that g(t) =∫ t−∞ f(τ)dτ can also.

f(t) is represented by the sequence of coefficients [1, 0,−1, 0, 1, 0,−1, 0, . . .]

g(t) is represented by the sequence of coefficients [0, 1, 0,−1, 0, 1, 0,−1, . . .]

Series Representations of Signals

Same set [u0(t), u1(t), u2(t), . . .] is not closed under differentiation.

Is there a meaningful way to define the time derivative of a step?

Let u∆(t) represent the following signal.

0 ∆

u∆(t)

t

1

and u̇∆(t) represent its derivative:

0 ∆

u̇∆(t)

t

1∆

then lim∆→0

u∆(t) = u(t) and lim∆→0

u̇∆(t) = an impulse

Page 6: 6.003: Signal Processing Lecture 1 September 6, 2018...6.003: Signal Processing Lecture 1 September 6, 2018 2 Signals Signals are functions that are used to convey information. { may

6.003: Signal Processing Lecture 1 September 6, 2018

6

Impulse Function

Let δ(t) represent an impulse, which is defined by two properties:

• δ(t) = 0 for all t 6= 0, and

•∫ ∞−∞

δ(t)dt = area under impulse = 1.

0

δ(t)

t

1

These definitions only make sense as limits.

While motivated by a square pulse (u∆(t)), any function with unit

area and finite duration also works.

With all of its area in the shortest possible interval of time δ(t) is

complementary to the broadest signal x(t) = constant.

Focus on Fourier Representations (Sinusoidal Bases)

Harmonic structure determines consonance and dissonance.

octave (D+D’) fifth (D+A) D+E[

t ime(per iods of "D")

harmonics

0 1 2 3 4 5 6 7 8 9 101112 0 1 2 3 4 5 6 7 8 9 101112 0 1 2 3 4 5 6 7 8 9 101112

–1

0

1

D

D'

D

A

D

E

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7

Focus on Fourier Representations (Sinusoidal Bases)

Sinusoidal decompositions are useful throughout physics.

Diffusion equation:

∂f

∂t∝ ∂2f∂x2

examples: heat transfer (original application), chemical transport

Wave equation:

∂2f∂t2∝ ∂2f∂x2

examples: light, radio waves, x-rays, acoustics, fluid dynamics

Reason:∂nf(x, t)∂tn

∝ ∂nf(x, t)∂xn

where f(x, t) = ej(ωt−kx) = cos(ωt−kx) + j sin(ωt−kx)

Labs Focus on Applications

The broad applicability of Fourier methods provides many interesting

applications.

Examples include

• music – e.g., music fingerprinting ala Shazam

• image processing – e.g., MRI

• video – e.g. motion magnification

Today’s Lab: Sounds as Signals

Generate audio signals and investigate their properties.

Break into sections. Find your section number on the 6.003 website:

http://mit.edu/6.003

under Week 1, Lab B.