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

P

sing terli
s
e
c
t
Signal Processing
ro in VeDigital
P
l
a
t
n
r
g
a
i
tal S i and M
i
g
Module 2: Discrete-time signals
i
D
on 013
d
n
Pra
2
aolo

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

Video Introduction

Module Overview:

sing terli
Vet
P
l
n
i
a
t
n
Mar
the discrete-time complex
l Sig exponential
d
a
t
n
i
Dig doni a 13
n
the Karplus-Strong
20
raalgorithm
P

o
l
Pao

s
Module 2.1: discrete-time signals and operators
roce

Module 2.2:

Module 2.3:

sing terli
s
e
c
t
Signal Processing
ro in VeDigital
P
l
a
t
n
r
g
a
i
tal S i and M
i
g
Module 2.1: Discrete-time signals
i
D
on 013
d
n
Pra
2
aolo

Overview:

2.1

discrete-time signals

signal classes

elementary operators

shifts

energy and power

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

Discrete-time signals
Economics: the Dow Jones industrial average

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

10000

5000

P
0
1891

1916

1941

1966

1991

2016

year

2.1

Discrete-time signals
Astronomy: monthly solar spot activity, 1749 to 2003
200

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

100

P
0
1749

1875

2000

month

2.1

Discrete-time signals
History: world population (billions)
9
8
7
6
5
4
3
2
1
0

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

P
1AD

1700AD

2030AD

year

2.1

Discrete-time signals have a long tradition...


Meteorology (limnology): the floods of the Nile

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

Representations of flood data: circa 2500 BC and today


2.1

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

More formally...

Discrete-time signal: a sequence of complex numbers

2.1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
notation: x[n]
i
S
M
l
igita
i and 3
two-sided sequences: x : ZD C ndon
201
ra
P

o
l
n is dimension-less time
Pao
one dimension (for now)

analysis: periodic measurement

synthesis: stream of generated samples

The delta signal

x[n] = [n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

15

2.1

P
b

10

10

15

The unit step

x[n] = u[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

15

2.1

P
b

10

10

15

The exponential decay

x[n] = |a|n u[n],

|a| < 1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

0
b

15

2.1

P
b

10

10

b
b

15

10

The sinusoid

x[n] = sin(0 n + )

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
n
0 5
10 Pra5
02
10

o
l
ao

15b
b

b
b
b

2.1

15

b
b
b
b

11

Four signal classes

2.1

finite-length

infinite-length

periodic

finite-support

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

12

Four signal classes

2.1

finite-length

infinite-length

periodic

finite-support

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

12

Four signal classes

2.1

finite-length

infinite-length

periodic

finite-support

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

12

Four signal classes

2.1

finite-length

infinite-length

periodic

finite-support

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

12

Finite-length signals

2.1

sing terli
Vet
P
l
n
i
a
t
n
r
vector notation: x = [x0 x1 . . . xN1
l S]Tig nd Ma
a
t
i
Dig doni a 13
practical entities, good for numerical
20 (Matlab and the like)
ran packages
P

o
l
Pao

sequence notation: x[n],

n = 0, 1, . . . , N r1oces

13

Finite-length signals

2.1

sing terli
Vet
P
l
n
i
a
t
n
r
vector notation: x = [x0 x1 . . . xN1
l S]Tig nd Ma
a
t
i
Dig doni a 13
practical entities, good for numerical
20 (Matlab and the like)
ran packages
P

o
l
Pao

sequence notation: x[n],

n = 0, 1, . . . , N r1oces

13

Finite-length signals

2.1

sing terli
Vet
P
l
n
i
a
t
n
r
vector notation: x = [x0 x1 . . . xN1
l S]Tig nd Ma
a
t
i
Dig doni a 13
practical entities, good for numerical
20 (Matlab and the like)
ran packages
P

o
l
Pao

sequence notation: x[n],

n = 0, 1, . . . , N r1oces

13

Infinite-length signals

2.1

sing terli
s
e
c
ro in Vet
P
sequence notation: x[n], n Z
l
a
gn
art
i
S
M
l
d
ta
abstraction, good for theorems
Digi doni an 13
ran 20
P
o
l
Pao

14

Infinite-length signals

2.1

sing terli
s
e
c
ro in Vet
P
sequence notation: x[n], n Z
l
a
gn
art
i
S
M
l
d
ta
abstraction, good for theorems
Digi doni an 13
ran 20
P
o
l
Pao

14

Periodic signals

2.1

sing terli
Vet
P
l
n
i
a
t
gn N Mar
same information as finite-length
lofSilength
d
a
t
i
Dig doni an 13
n infinite2lengths
natural bridge between finiteraand
0
P

o
l
Pao

N-periodic sequence: x[n] = x[n + kN],

ces Z
n, rk,oN

15

Periodic signals

2.1

sing terli
Vet
P
l
n
i
a
t
gn N Mar
same information as finite-length
lofSilength
d
a
t
i
Dig doni an 13
n infinite2lengths
natural bridge between finiteraand
0
P

o
l
Pao

N-periodic sequence: x[n] = x[n + kN],

ces Z
n, rk,oN

15

Periodic signals

2.1

sing terli
Vet
P
l
n
i
a
t
gn N Mar
same information as finite-length
lofSilength
d
a
t
i
Dig doni an 13
n infinite2lengths
natural bridge between finiteraand
0
P

o
l
Pao

N-periodic sequence: x[n] = x[n + kN],

ces Z
n, rk,oN

15

Finite-support signals

2.1

Finite-support sequence:

sing terli
s
e

o n < Nn Vet
x[n] if
0r
P
l
a
arti
x[n] = l Sign
nZ
M

d
ta
n
i
a
g

i
i
0on otherwise
D
3

and 201
r
P
aolo
same information as P
finite-length
of length N

another bridge between finite and infinite lengths

16

Finite-support signals

2.1

Finite-support sequence:

sing terli
s
e

o n < Nn Vet
x[n] if
0r
P
l
a
arti
x[n] = l Sign
nZ
M

d
ta
n
i
a
g

i
i
0on otherwise
D
3

and 201
r
P
aolo
same information as P
finite-length
of length N

another bridge between finite and infinite lengths

16

Finite-support signals

2.1

Finite-support sequence:

sing terli
s
e

o n < Nn Vet
x[n] if
0r
P
l
a
arti
x[n] = l Sign
nZ
M

d
ta
n
i
a
g

i
i
0on otherwise
D
3

and 201
r
P
aolo
same information as P
finite-length
of length N

another bridge between finite and infinite lengths

16

Elementary operators

scaling:
y [n] = x[n]

sum:

product:

Pa

sing terli
s
e
c
ro in Vet
P
l
a
yig
[n]
n = x[n]M+az[n]
rt
S
l
d
ta
Digi doni an 13
ran 20
P
o
l
o
y [n] = x[n] z[n]

shift by k (delay):
y [n] = x[n k]

2.1

17

Elementary operators

scaling:
y [n] = x[n]

sum:

product:

Pa

sing terli
s
e
c
ro in Vet
P
l
a
yig
[n]
n = x[n]M+az[n]
rt
S
l
d
ta
Digi doni an 13
ran 20
P
o
l
o
y [n] = x[n] z[n]

shift by k (delay):
y [n] = x[n k]

2.1

17

Elementary operators

scaling:
y [n] = x[n]

sum:

product:

Pa

sing terli
s
e
c
ro in Vet
P
l
a
yig
[n]
n = x[n]M+az[n]
rt
S
l
d
ta
Digi doni an 13
ran 20
P
o
l
o
y [n] = x[n] z[n]

shift by k (delay):
y [n] = x[n k]

2.1

17

Elementary operators

scaling:
y [n] = x[n]

sum:

product:

Pa

sing terli
s
e
c
ro in Vet
P
l
a
yig
[n]
n = x[n]M+az[n]
rt
S
l
d
ta
Digi doni an 13
ran 20
P
o
l
o
y [n] = x[n] z[n]

shift by k (delay):
y [n] = x[n k]

2.1

17

Shift of a finite-length: finite-support

[x0 x1 x2 x3 x4 x5 x6ing
x7 ]

b
b

b
b

ess etterli
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

0
0

2.1

18

Shift of a finite-length: finite-support


x[n]
. . . x0 x1 x2 x3 x4 x5 x6ingx7 . . .

1
b

b
b

ess etterli
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

18

Shift of a finite-length: finite-support


x[n]
... 0

1
b

b
b

b
b

0 x0 x1 x2 x3 x4 x5 x6ingx7

0 i0
s
s
erl
e
t
c
t
o
e
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

0 ...

18

Shift of a finite-length: finite-support


x[n 1]
... 0

1
b

b
b

b
b

x0 x1 x2 x3 x4 x5ingx6 x7

s
li0
r
s
e
e
t
c
t
l Pro rtin Ve
a
n
g
a
i
tal S i and M
i
g
i
D
don 2013
n
a
r
P
1

aolo

b
b

2.1

b
b

b
b

0
0

0 ...

18

Shift of a finite-length: finite-support


x[n 2]
... 0

1
b

b
b

b
b

0 x0 x1 x2 x3 x4ingx5 x6 xi 7

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

2.1

b
b

b
b

0
0

0 ...

18

Shift of a finite-length: finite-support


x[n 3]
... 0

1
b

b
b

b
b

b
b

0
0

b
b

b
b

2.1

x0 x1 x2 x3ingx4 x5 xi 6 x7 . . .

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

18

Shift of a finite-length: finite-support


x[n 4]
... 0

1
b

b
b

b
b

b
b

b
b

0
0

2.1

0 x0 x1 x2ingx3 x4 xi 5 x6 . . .

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

18

Shift of a finite-length: periodic extension

[x0 x1 x2 x3 x4 x5 x6ing
x7 ]

b
b

b
b

ess etterli
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

0
0

2.1

19

Shift of a finite-length: periodic extension


x[n]
. . . x0 x1 x2 x3 x4 x5 x6ingx7 . . .

1
b

b
b

ess etterli
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

19

Shift of a finite-length: periodic extension


x[n]
. . . x5 x6 x7 x0 x1 x2 x3 x4 x5 x6ingx7 x0 xi 1 x2 . . .

1
b

b
b

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

19

Shift of a finite-length: periodic extension


x[n 1]
. . . x4 x5 x6 x7 x0 x1 x2 x3 x4 x5ingx6 x7 xi 0 x1 . . .

1
b

b
b

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

b
b

19

Shift of a finite-length: periodic extension


x[n 2]
. . . x3 x4 x5 x6 x7 x0 x1 x2 x3 x4ingx5 x6 xi 7 x0 . . .

1
b

b
b

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

0
0

2.1

b
b

19

Shift of a finite-length: periodic extension


x[n 3]
. . . x2 x3 x4 x5 x6 x7 x0 x1 x2 x3ingx4 x5 xi 6 x7 . . .

1
b

b
b

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b

b
b

b
b

b
b

0
0

2.1

19

Shift of a finite-length: periodic extension


x[n 4]
. . . x1 x2 x3 x4 x5 x6 x7 x0 x1 x2ingx3 x4 xi 5 x6 . . .

1
b

b
b

ess etterl
c
o
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20 1
P
o
l
ao

b
b
b

b
b

0
0

2.1

19

Energy and power

2 ng
|x[n]|
essi

erli
t
c
t
o
e
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
N
ran 120 X
P
o
l
|x[n]|2
ao Px = lim
Ex =

n=

2.1

2N + 1

n=N

20

Energy and power

2 ng
|x[n]|
essi

erli
t
c
t
o
e
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
N
ran 120 X
P
o
l
|x[n]|2
ao Px = lim
Ex =

n=

2.1

2N + 1

n=N

20

Energy and power: periodic signals

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
ta
nd
Digi doni aN1
013 2
an
2
r
1 X
P
Px
|
x [n]|
aolo
Ex =

2.1

n=0

21

Energy and power: periodic signals

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
ta
nd
Digi doni aN1
013 2
an
2
r
1 X
P
Px
|
x [n]|
aolo
Ex =

2.1

n=0

21

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

END OF MODULE 2.1


P

sing terli
s
e
c
t
Signal Processing
ro in VeDigital
P
l
a
t
n
r
g
a
i
tal S i and M Module 2.2: the complex exponential
i
g
i
D
don 2013
n
a
r
P

aolo

Overview:

2.2

sing terli
s
e
c
ro in Vet
P
l
a
periodicity
gn
art
i
S
M
l
d
ta
wagonwheel effect and maximum
Digi speed
ni an 13
o
d
ran 20
P
o
l
digital and real-world frequency
Pao
the complex exponential

22

The complex exponential

sing terli
s
e
c
The most important discrete-time signal in the world:
ro in Vet
P
l
a
gn jn+
art
i
S
M
l
ta x[n] = ed
Digi doni an 13
ran 20
P
o
l
Pao

2.2

23

The complex exponential


Recall: e j = cos + j sin
Im

sing terli
s
e
c
ro ineVet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

1
aolo 1
1

2.2

24

The complex exponential


Rotation factor: z = z e j
Im

sing terli
s
e
c
ro inzVet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

25

The complex exponential


Rotation factor: z = z e j
Im

sing terli
s
e
c
ro inzVet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
z
b

2.2

25

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
x[0]
n
0
a
2
r
P

aolo
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro inx[1]
Vet
P
l
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
art
gn
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
x[2]

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im
x[3]

sing terli
s
e
c
ro
Vet
P
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
Pro
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r

olo P
x[4]

Pa

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
x[5]
l
a
ign
art
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
x[6] an
0
2
r
P

aolo
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P
aolo
b

x[7]

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[8]

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

x[9]

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

2.2

x[10]

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[11]

b
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
x[12]
n
0
a
2
r
P

aolo
b

b
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro inx[13]
Vet
P
l
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

b
b

2.2

26

The complex exponential generating machine


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
art
gn
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
x[14]

b
b

2.2

26

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
x[0]
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

ng erli
six[1]
s
e
c
ro in Vett
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im
x[2]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im
x[3]

sing terli
s
e
c
Pro
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
Vet
l Pro
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

x[4]

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
n
art
x[5]
Sig
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r

oP
aolx[6]
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[7]

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[8]

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

x[9]

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

2.2

x[10]

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[11]

b
b
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
x[12]
Re
Digi doni an 13
n
0
a

2
r
P

aolo
b

b
b
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im

ng erli
six[13]
s
e
c
ro in Vett
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b
b

2.2

27

Initial phase
x[n] = e jn+ ;

x[n + 1] = e j x[n],

x[0] = e j
Im
x[14]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b
b

2.2

27

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
x[0]
n
0
a
2
r
P

aolo
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

ing erli
sx[1]
s
e
c
ro in Vett
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im
x[2]

sing terli
s
e
c
ro in Vet

P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
x[3]
o
Vet
al Pr
n
i
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r

oP
aolx[4]
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[5]

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

x[6]

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

x[7]

b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art x[8]
i
S
M
l
d
ta
Re
Digi doni an 13
n
0

a
2
r
P

aolo
b

b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a

gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
x[9]

b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
Pro
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Re
Dig doni a 13
n
0
a
2
r
P

aolo
x[10]
b

b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
M
x[11] al Si
d
t
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2

r
P

aolo
b

x[12]
b
b

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b

x[13]

2.2

28

Careful: not every sinusoid is periodic in discrete time


x[n] = e jn ;

x[n + 1] = e j x[n]
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Re
Digi doni an 13
n
0
a
2
r
P

aolo
b

b
b
b

2.2

x[14]

28

Periodicity

M sing
s M, NtteNrli
e2,
c
o
N
r
Ve
P

e jn periodic =

l
gna Martin
i
S
l
d
ta
Digi doni an 13
an= e j(+2k)
20 k N
rj
P

e
o
l
ao

2.2

29

Periodicity

M sing
s M, NtteNrli
e2,
c
o
N
r
Ve
P

e jn periodic =

l
gna Martin
i
S
l
d
ta
Digi doni an 13
an= e j(+2k)
20 k N
rj
P

e
o
l
ao

2.2

29

Quiz

2.2

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
is the signal e jn periodic?
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
Pao

30

One point, many names


Im

sing terli
s
e
c
ro ineVet
P
l
a
gn
art
i
S
M
l
Re
d
ta
Digi doni an 13
ran 20
P
o
l
ao
b

2.2

31

One point, many names


Im

sing terli
s
e
c
ro ineVet
P
l
a
t
gn
ar2
i
S
M
+ Re
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao
b

2.2

31

One point, many names


Im

sing terli
s
e
c
ro ineVet
P
l
a
gn
art 6 + Re
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao
b

2.2

31

One point, many names


Im

sing terli
s
e
c
ro ineVet
P
l
a
gn
art
i
S
M
l
Re
d
ta
Digi doni an 13
ran 20
P
o
l
ao
b

2.2

32

One point, many names


Im

sing terli
s
e
c
2 +
ro ineVet
P
l
a
gn
art
i
S
M
l
Re
d
ta
Digi doni an 13
ran 20
P
o
l
ao
b

2.2

32

How fast can we go?

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

2.2

33

How fast can we go?


= 2/12
Im

x[2]sing
s
erli
e
t
c
t
o
e
r
V
nal P Martinx[1]
x[5]
g
i
S
d
tal
Digi doni an 13
Re
n
0
2
x[6]Pra
x[0]

aolo
x[3]

x[4]

x[7]

x[11]
b

x[8]

b
b

x[10]

x[9]

2.2

34

How fast can we go?


= 2/6
Im

x[1]sing
s
erli
e
t
c
t
o
e
r
V
nal P Martin
g
i
S
d
tal
Digi doni an 13
Re
n
0
2
x[3]Pra
x[0]

aolo
x[2]

x[4]

2.2

x[5]

35

How fast can we go?


= 2/5
Im

sing terli
s
e
c
ro in Vet
P
x[2]
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[0]
P
aolo
x[1]
b

x[3]
b

x[4]

2.2

36

How fast can we go?


= 2/4
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
n
0
2
x[2]Pra
x[0]

aolo
x[1]
b

x[3]

2.2

37

How fast can we go?


= 2/3
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[0]
P
aolo
x[1]

x[2]

2.2

38

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[0]
P
aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
n
0
2
x[0]Pra

aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[1]
P
aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
n
0
2
x[2]Pra

aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[3]
P
aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
n
0
2
x[4]Pra

aolo
b

2.2

39

How fast can we go?


= 2/2 =
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[5]
P
aolo
b

2.2

39

What if we go faster?
< < 2
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
x[0]
r
P
aolo
b

2.2

x[1]

40

What if we go faster?
< < 2
Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
x[0]
r
P
aolo
b

x[1]

2.2

40

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
x[0]
P
aolo
b

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
x[1]
aolo
b

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
aolo
b

2.2

x[2]

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
aolo
b

x[3]

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
aolo
b

b
b

x[4]

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
n
art
ig
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
aolo
b

b
b
b

x[5]

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
Re
an 20
r
P
aolo
b

b
b
b

x[6]

2.2

41

Lets go really too fast


= 2 ,

small

Im

sing terli
s
e
c
Pro tin Vet
nal
r
l Sig nd Ma
a
t
i
Dig doni a 13
Re
an 20
r
P
aolo
b

b
b
b

x[7]

2.2

41

The wagonwheel effect

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

2.2

42

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

Digital vs physical frequency

Discrete time:

sing terli
s
e
c
Vet
l Prorepeats
periodicity: how many samples beforenpattern
n
i
a
t
r
l Sig nd Ma
a
t
i
Dig doni a 13
Real world:
ran 20
P
o
l
before pattern repeats
periodicity: how many
seconds
Pao
n: no physical dimension (just a counter)

frequency measured in Hz (s 1 )

2.2

43

How your PC plays sounds

x[n]

sing terli
s
e
c
sound card
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
o

Pa

2.2

44

How your PC plays sounds

x[n]

sing terli
s
e
c
sound card
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
o

Pa

2.2

Ts

system clock

44

Digital vs physical frequency

2.2

sing terli
s
e
c
periodicity of M samples periodicity ofPMT
ro s seconds
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Dig doni a 13
real world frequency:
20 1
ran
P
f
=
o
l
MTs
Pao

set Ts , time in seconds between samples

45

Digital vs physical frequency

2.2

sing terli
s
e
c
periodicity of M samples periodicity ofPMT
ro s seconds
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Dig doni a 13
real world frequency:
20 1
ran
P
f
=
o
l
MTs
Pao

set Ts , time in seconds between samples

45

Digital vs physical frequency

2.2

sing terli
s
e
c
periodicity of M samples periodicity ofPMT
ro s seconds
Vet
l
n
i
a
t
n
r
l Sig nd Ma
a
t
i
Dig doni a 13
real world frequency:
20 1
ran
P
f
=
o
l
MTs
Pao

set Ts , time in seconds between samples

45

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

END OF MODULE 2.2


P

sing terli
s
e
c
t
Signal Processing
ro in VeDigital
P
l
a
t
n
r
g
a
i
tal S i and MModule 2.3: the Karplus-Strong algorithm
i
g
i
D
don 2013
n
a
r
P

aolo

Overview:

2.3

sing terli
s
e
c
ro in Vet
P
l
a
n
gloops
art
i
S
M
moving averages and simple feedback
l
d
ta
Digi doni an 13
a sound synthesizer
ran 20
P
o
l
Pao
DSP building blocks

46

Overview:

2.3

sing terli
s
e
c
ro in Vet
Averages and moving averages
P
l
a
gn
art
i
S
M
l
Recursion: Revisiting your bank
taaccount d
Digi doni an 13
ran 20
Building a simple recursive synthesizer
P
o
l
Pao
Examples of sounds
DSP as Lego: The fundamental building blocks

47

DSP as Lego

x[n]

b
b

sing terli
s
e
c
ro in Vzet
P
l
a
gn
art
i
S
M
l
d
ta
c
Digi doni an 13 +
n
0
Pra
2
aolo
1

2.3

y [n]

z 3

z 1

48

Building Blocks: Adder


x[n]
+

x[n] + y [n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

y [n]

2.3

49

Building Blocks: Adder


x[n]
+

x[n] + y [n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao8 10

y [n]

b
b

b
b

b
b

0
0

0
2.3

1
0

10
49

Building Blocks: Adder


x[n]
+

x[n] + y [n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13 1
ran 20
P
o
l
ao8 10

y [n]

b
b

b
b

0
0

0
2.3

1
0

0
6

10

10

49

Building Blocks: Multiplier


x[n]

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

2.3

50

Building Blocks: Multiplier

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b
b
b
b
b
b

x[n]

b
b

0
b

2.3

10

50

Building Blocks: Multiplier

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
ar1t
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b
b
b
b
b
b

x[n]

b
b

0
b

10

b
b

0
0

b
b

10

= 0.5

2.3

50

Building Blocks: Unit Delay


z 1

x[n]

x[n 1]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

2.3

51

Building Blocks: Unit Delay


z 1

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b
b
b
b
b
b

x[n 1]

b
b
b
b

0
0

2.3

10

51

Building Blocks: Unit Delay


z 1

x[n]

x[n 1]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d 1
ta
Digi doni an 13
ran 20
P
o
l
ao
b

b
b
b
b

b
b

b
b

b
b

b
b

2.3

b
b

0
2

10

10

51

Building Blocks: Arbitrary Delay


z N

x[n]

x[n N]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

2.3

52

Building Blocks: Arbitrary Delay


z N

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b
b
b
b
b
b

x[n N]

b
b
b

0
b

2.3

10

52

Building Blocks: Arbitrary Delay


z N

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d 1
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b
b
b
b
b
b

x[n N]

b
b
b
b
b

b
b

b
b
b

0
b

10

0
b

10

N =4
2.3

52

The 2-point Moving Average

simple average:

a + b ssing
erli
e
t
c
t
o
e
r
lP 2
nV

m=

na Marti
d
Digi doni an 13
20+ x[n 1]
rany [n] =x[n]
P
o
l
o
2

moving average: take a localta


average
l Sig

Pa

2.3

53

The 2-point Moving Average

simple average:

a + b ssing
erli
e
t
c
t
o
e
r
lP 2
nV

m=

na Marti
d
Digi doni an 13
20+ x[n 1]
rany [n] =x[n]
P
o
l
o
2

moving average: take a localta


average
l Sig

Pa

2.3

53

The 2-point Moving Average Using Lego

sing +terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
1 20
ran z
P
o
l
ao
b

x[n]

1/2
y [n]

2.3

54

Lets average...
x[n] = [n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
a6 o 8 10

2.3

55

Lets average...
x[n] = [n]

sing terli
s
e
c
ro 1 in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20 0
P
o
l
2
0
2
a6 o 8 10

0
b

2.3

10

55

Lets average...
x[n] = u[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
a6 o 8 10

2.3

56

Lets average...
x[n] = u[n]

1
b

sing terli
s
e
c
ro 1 in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20 0
P
o
l
2
0
2
a6 o 8 10

0
b

2.3

10

56

Lets average...
x[n] = cos(n),

= /10

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
a6 o 8 10

b
b
b

0
b

b
b
b

2.3

57

Lets average...
x[n] = cos(n),

= /10

sing terli
s
e
c
ro 1 in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20 0
P
o
l
2
0
2
a6 o 8 10
b

b
b

0
b

2.3

b
b
b

10

b
b

b
b

57

Lets average...
x[n] = cos(n),

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
a6 o 8 10

2.3

58

Lets average...
x[n] = cos(n),

1
b

sing terli
s
e
c
ro 1 in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20 0
P
o
l
2
0
2
a6 o 8 10

2.3

10

58

What if we reverse the loop?

sing +terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
1 20
ran z
P
o
l
ao
b

x[n]

1/2
y [n]

2.3

59

What if we reverse the loop?

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran z210
P
o
l
ao
+

x[n]

y [n]

2.3

59

A simple model for banking

A simple equation to describe compound interest:

2.3

sing terli
s
e
c
ro in Vet
P
interest accrues on Dec 31
l
a
gn
art
i
S
M
l
d
itan: x[n]
deposits/withdrawals during
Digyear
ni an 13
o
d
ran 20
P
balance at year n:
o
l
Pao
y [n] = 1.05 y [n 1] + x[n]
constant interest/borrowing rate of 5% per year

60

A simple model for banking

A simple equation to describe compound interest:

2.3

sing terli
s
e
c
ro in Vet
P
interest accrues on Dec 31
l
a
gn
art
i
S
M
l
d
itan: x[n]
deposits/withdrawals during
Digyear
ni an 13
o
d
ran 20
P
balance at year n:
o
l
Pao
y [n] = 1.05 y [n 1] + x[n]
constant interest/borrowing rate of 5% per year

60

A simple model for banking

A simple equation to describe compound interest:

2.3

sing terli
s
e
c
ro in Vet
P
interest accrues on Dec 31
l
a
gn
art
i
S
M
l
d
itan: x[n]
deposits/withdrawals during
Digyear
ni an 13
o
d
ran 20
P
balance at year n:
o
l
Pao
y [n] = 1.05 y [n 1] + x[n]
constant interest/borrowing rate of 5% per year

60

A simple model for banking

A simple equation to describe compound interest:

2.3

sing terli
s
e
c
ro in Vet
P
interest accrues on Dec 31
l
a
gn
art
i
S
M
l
d
itan: x[n]
deposits/withdrawals during
Digyear
ni an 13
o
d
ran 20
P
balance at year n:
o
l
Pao
y [n] = 1.05 y [n 1] + x[n]
constant interest/borrowing rate of 5% per year

60

First-order recursion

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta1.05
Digi doni azn1 13
ran 20
P
o
l
ao

x[n]

y [n]

y [n] = 1.05 y [n 1] + x[n]

2.3

61

Example: the one-time investment


x[n] = 100 [n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 110.25, y [3] = 115.7625 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = (1.05)n 100
Digu[n]
o
and 2013
r
P
lo
200
Pao

y [1] = 105

100
0

2.3

10

62

Example: the one-time investment


x[n] = 100 [n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 110.25, y [3] = 115.7625 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = (1.05)n 100
Digu[n]
o
and 2013
r
P
lo
200
Pao

y [1] = 105

100
0

2.3

10

62

Example: the one-time investment


x[n] = 100 [n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 110.25, y [3] = 115.7625 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = (1.05)n 100
Digu[n]
o
and 2013
r
P
lo
200
Pao

y [1] = 105

100
0

2.3

10

62

Example: the one-time investment


x[n] = 100 [n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 110.25, y [3] = 115.7625 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = (1.05)n 100
Digu[n]
o
and 2013
r
P
lo
200
Pao

y [1] = 105

100
0

2.3

10

62

Example: the one-time investment


x[n] = 100 [n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 110.25, y [3] = 115.7625 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = (1.05)n 100
Digu[n]
o
and 2013
r
P
lo
200
200
Pao

y [1] = 105

100
0
b

2.3

100
b

10

10

62

Example: the saver


x[n] = 100 u[n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 315.25, y [3] = 431.0125 etc.
a
gn
art
i
S
M
l
ta
and
In general: y [n] = 2000 ((1.05)
Digin+1 do1)
niu[n]
an 2013
r
P
lo
200
Pao

y [1] = 205

100
0

2.3

10

63

Example: the saver


x[n] = 100 u[n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 315.25, y [3] = 431.0125 etc.
a
gn
art
i
S
M
l
ta
and
In general: y [n] = 2000 ((1.05)
Digin+1 do1)
niu[n]
an 2013
r
P
lo
200
Pao

y [1] = 205

100
0

2.3

10

63

Example: the saver


x[n] = 100 u[n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 315.25, y [3] = 431.0125 etc.
a
gn
art
i
S
M
l
ta
and
In general: y [n] = 2000 ((1.05)
Digin+1 do1)
niu[n]
an 2013
r
P
lo
200
Pao

y [1] = 205

100
0

2.3

10

63

Example: the saver


x[n] = 100 u[n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 315.25, y [3] = 431.0125 etc.
a
gn
art
i
S
M
l
ta
and
In general: y [n] = 2000 ((1.05)
Digin+1 do1)
niu[n]
an 2013
r
P
lo
200
Pao

y [1] = 205

100
0

2.3

10

63

Example: the saver


x[n] = 100 u[n]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 315.25, y [3] = 431.0125 etc.
a
gn
art
i
S
M
l
ta
and
In general: y [n] = 2000 ((1.05)
Digin+1 do1)
niu[n]
an 2013
r
P
lo
1500
200
Pao

y [1] = 205

100
0

1000

500
b

2.3

0
b

10

10

63

Example: The independently wealthy


x[n] = 100 [n] 5 u[n 1]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 100, y [3] = 100 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = 100 u[n]Dig
o
and 2013
r
P
lo
100
Pao

y [1] = 100

2.3

b
b

10

64

Example: The independently wealthy


x[n] = 100 [n] 5 u[n 1]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 100, y [3] = 100 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = 100 u[n]Dig
o
and 2013
r
P
lo
100
Pao

y [1] = 100

2.3

b
b

10

64

Example: The independently wealthy


x[n] = 100 [n] 5 u[n 1]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 100, y [3] = 100 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = 100 u[n]Dig
o
and 2013
r
P
lo
100
Pao

y [1] = 100

2.3

b
b

10

64

Example: The independently wealthy


x[n] = 100 [n] 5 u[n 1]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 100, y [3] = 100 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = 100 u[n]Dig
o
and 2013
r
P
lo
100
Pao

y [1] = 100

2.3

b
b

10

64

Example: The independently wealthy


x[n] = 100 [n] 5 u[n 1]

y [0] = 100

sing terli
s
e
c
ro in Vet
P
l
y [2] = 100, y [3] = 100 etc.
a
gn
art
i
S
M
l
ita ni and
In general: y [n] = 100 u[n]Dig
o
and 2013
r
P
lo
200
100
Pao

y [1] = 100

100
b
b

0
2

2.3

10

10

64

A simple generalization

x[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni aznM13
ran 20
P
o
l
ao

y [n]

y [n] = y [n M] + x[n]

2.3

65

Example
M = 3, = 0.7, x[n] = [n]

y [0] = 1, y [1] = 0, y [2] = 0

y [3] = 0.7, y [4] = 0, y [5] = 0

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
y [6] = 0.72 , y [7] = 0, y [8] = 0, etc.
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
1
Pao
b

2.3

10

66

Example
M = 3, = 0.7, x[n] = [n]

y [0] = 1, y [1] = 0, y [2] = 0

y [3] = 0.7, y [4] = 0, y [5] = 0

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
y [6] = 0.72 , y [7] = 0, y [8] = 0, etc.
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
1
Pao
b

2.3

10

66

Example
M = 3, = 0.7, x[n] = [n]

y [0] = 1, y [1] = 0, y [2] = 0

y [3] = 0.7, y [4] = 0, y [5] = 0

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
y [6] = 0.72 , y [7] = 0, y [8] = 0, etc.
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
1
Pao
b

2.3

10

66

Example
M = 3, = 0.7, x[n] = [n]

y [0] = 1, y [1] = 0, y [2] = 0

y [3] = 0.7, y [4] = 0, y [5] = 0

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
y [6] = 0.72 , y [7] = 0, y [8] = 0, etc.
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
1
1
Pao
b

2.3

10

b
b

b
b

10

66

Example
M = 3, = 1, x[n] = [n] + 2 [n 1] + 3 [n 2]

y [0] = 1, y [1] = 2, y [2] = 3

y [3] = 1, y [4] = 2, y [5] = 3

sing terli
s
e
c
ro in Vet
P
l
a
n
art
y [6] = 1, y [7] = 2, y [8] = 3, etc. l Sig
M
d
ta
Digi doni an 13
ran 20 3
3
P
o
l
2
2
Pao
b

1
0

2.3

b
b

10

1
0

b
b

b
b

b
b

10

67

Example
M = 3, = 1, x[n] = [n] + 2 [n 1] + 3 [n 2]

y [0] = 1, y [1] = 2, y [2] = 3

y [3] = 1, y [4] = 2, y [5] = 3

sing terli
s
e
c
ro in Vet
P
l
a
n
art
y [6] = 1, y [7] = 2, y [8] = 3, etc. l Sig
M
d
ta
Digi doni an 13
ran 20 3
3
P
o
l
2
2
Pao
b

1
0

2.3

b
b

10

1
0

b
b

b
b

b
b

10

67

Example
M = 3, = 1, x[n] = [n] + 2 [n 1] + 3 [n 2]

y [0] = 1, y [1] = 2, y [2] = 3

y [3] = 1, y [4] = 2, y [5] = 3

sing terli
s
e
c
ro in Vet
P
l
a
n
art
y [6] = 1, y [7] = 2, y [8] = 3, etc. l Sig
M
d
ta
Digi doni an 13
ran 20 3
3
P
o
l
2
2
Pao
b

1
0

2.3

b
b

10

1
0

b
b

b
b

b
b

10

67

Example
M = 3, = 1, x[n] = [n] + 2 [n 1] + 3 [n 2]

y [0] = 1, y [1] = 2, y [2] = 3

y [3] = 1, y [4] = 2, y [5] = 3

sing terli
s
e
c
ro in Vet
P
l
a
n
art
y [6] = 1, y [7] = 2, y [8] = 3, etc. l Sig
M
d
ta
Digi doni an 13
ran 20 3
3
P
o
l
2
2
Pao
b

1
0

2.3

b
b

10

1
0

b
b

b
b

b
b

10

67

We can make music with that!

2.3

sing terli
s
e
c
r0o n <inMVet
choose a signal x[n] that is nonzero only for
P
l
a
gn
art
i
S
M
l
d
choose a decay factor
ta
Digi doni an 13
ran 20
input x[n] to the system
P
o
l
Pao
play the output
build a recursion loop with a delay of M

68

We can make music with that!

2.3

sing terli
s
e
c
r0o n <inMVet
choose a signal x[n] that is nonzero only for
P
l
a
gn
art
i
S
M
l
d
choose a decay factor
ta
Digi doni an 13
ran 20
input x[n] to the system
P
o
l
Pao
play the output
build a recursion loop with a delay of M

68

We can make music with that!

2.3

sing terli
s
e
c
r0o n <inMVet
choose a signal x[n] that is nonzero only for
P
l
a
gn
art
i
S
M
l
d
choose a decay factor
ta
Digi doni an 13
ran 20
input x[n] to the system
P
o
l
Pao
play the output
build a recursion loop with a delay of M

68

We can make music with that!

2.3

sing terli
s
e
c
r0o n <inMVet
choose a signal x[n] that is nonzero only for
P
l
a
gn
art
i
S
M
l
d
choose a decay factor
ta
Digi doni an 13
ran 20
input x[n] to the system
P
o
l
Pao
play the output
build a recursion loop with a delay of M

68

We can make music with that!

2.3

sing terli
s
e
c
r0o n <inMVet
choose a signal x[n] that is nonzero only for
P
l
a
gn
art
i
S
M
l
d
choose a decay factor
ta
Digi doni an 13
ran 20
input x[n] to the system
P
o
l
Pao
play the output
build a recursion loop with a delay of M

68

How do we play it, really?

2.3

M-tap delay M-sample periodicity

sing terli
s
e
c
ro in Vet
P
l
a
periodic signal of frequency
gn 1Mart
i
S
l
d Hz
ta
Digi donfi a=nMT
an 2013
r
P
lo
example: T = 22.7s,aM
P o = 100
f 440Hz
associate time T to sample interval

69

How do we play it, really?

2.3

M-tap delay M-sample periodicity

sing terli
s
e
c
ro in Vet
P
l
a
periodic signal of frequency
gn 1Mart
i
S
l
d Hz
ta
Digi donfi a=nMT
an 2013
r
P
lo
example: T = 22.7s,aM
P o = 100
f 440Hz
associate time T to sample interval

69

How do we play it, really?

2.3

M-tap delay M-sample periodicity

sing terli
s
e
c
ro in Vet
P
l
a
periodic signal of frequency
gn 1Mart
i
S
l
d Hz
ta
Digi donfi a=nMT
an 2013
r
P
lo
example: T = 22.7s,aM
P o = 100
f 440Hz
associate time T to sample interval

69

How do we play it, really?

2.3

M-tap delay M-sample periodicity

sing terli
s
e
c
ro in Vet
P
l
a
periodic signal of frequency
gn 1Mart
i
S
l
d Hz
ta
Digi donfi a=nMT
an 2013
r
P
lo
example: T = 22.7s,aM
P o = 100
f 440Hz
associate time T to sample interval

69

Playing a sine wave

M = 100, = 1, x[n] = sin(2 n/100) for 0 n < 100 and zero elsewhere
1

0
b

bbbbbbbbb
bbb
bb
bb
bb
bb
bb
bb
b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

1
0

2.3

16

32

48

bb
b
bb
bb
bb
bb
bbb
bb
bbbbbbbbb

64

80

96

70

Playing a sine wave

M = 100, = 1, x[n] = sin(2 n/100) for 0 n < 100 and zero elsewhere
1

0
b

bbbbbbbbb
bbb
bb
bb
bb
bb
bb
bb
b

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13 0
ran 20
P
o
l
ao
1

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

b
b

P
1
0

2.3

16

32

48

bb
b
bb
bb
bb
bb
bbb
bb
bbbbbbbbb

64

80

1
96

166

332

498

664

830

996

70

Introducing some realism

2.3

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
controls envelope (decay)
l
d
ta
Digi doni an 13
x[n] controls color (timbre) ran
20
P

o
l
Pao

M controls frequency (pitch)

71

Introducing some realism

2.3

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
controls envelope (decay)
l
d
ta
Digi doni an 13
x[n] controls color (timbre) ran
20
P

o
l
Pao

M controls frequency (pitch)

71

Introducing some realism

2.3

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
controls envelope (decay)
l
d
ta
Digi doni an 13
x[n] controls color (timbre) ran
20
P

o
l
Pao

M controls frequency (pitch)

71

A proto-violin

M = 100, = 0.95, x[n]: zero-mean sawtooth wave between 0 and 99, zero elsewhere
1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb

2.3

16

32

48

64

80

96

72

A proto-violin

M = 100, = 0.95, x[n]: zero-mean sawtooth wave between 0 and 99, zero elsewhere
1

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13 0
ran 20
P
o
l
ao

bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb
b
b
bbb
bbb
bbb
bbb
bbb
b
b
b
bbb
bbb
bbb
bbb
bbb

2.3

16

32

48

64

80

96

1
0

166

332

498

664

830

996

72

The Karplus-Strong Algorithm

M = 100, = 0.9, x[n]: 100 random values between 0 and 99, zero elsewhere
1
b
b b

b
b

b
b

b
b

b
b

b
b

b
b

bb

16

32

2.3

48

b
b

b
b

b b

b
b
b

bb
b

b
b

b
b

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

b
b b

b b

b b

b b

bb

64

b
b

80

96

73

The Karplus-Strong Algorithm

M = 100, = 0.9, x[n]: 100 random values between 0 and 99, zero elsewhere
1
b

b
b

bb
b

b
b

b
b

b
b

bb

b
b
b

b
b
b
b

2.3

32

48

P
b

bb

16

b
b

b
b

b
b
b

bb

64

b
b

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13 0
ran 20
P
o
l
ao

b
b

b b
b

b b

80

96

b b
b
b
bb b
b b
b
bb b b bb
b b b
b b bb b b bb b b b
b b
b b b
b b b
b b bb b b bb b b b
b bb b
b b b
b b b
b b bb b b bb b b b
b b b
b bb b
b b b
b b b
b bb
b b bb b b bb b b b
b
b
b b b
b bb b b b
b b b
b bb b b b b b b b b b
bb b b b b b b b
b bb
b b
b
bb b b
b bb b b b b b b b b b b
b b
b b bb
b bb b b b b b b b b b b b b b b
bb b b
b b b b b b b b b b b b bb b
b
b
b
bb b
bb
b b
b
b
b b
b
b b b
b b bb b b
b
b bb b b b b b b b b bb b b b b b b b b b b b b b
b b b b b b b b b b b b bb b b b b b b b b b bb bb b b b b b b
b b b b b b b b b b b b b b b b b b b bb b
b
b
bb
b b b b b b b bb b b b b bb b b b
b b b b bb b b b b b b b b b b bb b b b b b b b b
b
b
b
b
b
b b b
bb b b b
b b b b b b b b b bb b b b b b b b b
b b
b b
b b b
b b b b bb b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b bb b b b b b b b b b b b b b
b bb
bb
b bb b
bb
b b b b b b b b b b b b b b b b b b b b b bb b b b b b b bb b b b b bb
b bb
b bb
b bbb b
b bbb b
b bbb b
b bbb b
b bbbb
b bbbb
b bbbb
b bbbb
b b b b b bb b b b b b b bb b b b
b b
b b
b b
b bb
b
b bb
b bb b
b bb
b bb
b b b b b b b b b b b b b b b b b b b b b b b b b b b bb b b
b b b b b b b bb b b b b b b b
b b b b b b b b bb b b b b b b
b
b b b b bb
b b b
b b b b b b b bb b b b b b
bb
b
b
b b b
b bb
b
b b b
b b
b bb b b b b b b b b b b b b b b b b b b b b b b b b b b b b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b
b b
b b
b
b
b b b
bbb b
b bb
b b b
b bb b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
bbb b b
b bb
b b b
b bb b b b
b b b
b b
b
b b bb
b bb
b bb b b b
b b b b b bb b b
b
bbb b
b
b b b
b bb b b b
b b b b b bb b b
b
bbb b
bb b b b
b
b
b
b
bbb
b b b b b b b b b bb b b b b b
b b
b b b
bbb
b
b b
b b b
b bbb b
bbb
b b
b b b
b
bbb
b b
bb
b
b
b
b

166

332

498

664

830

996

73

Recap

We have seen basic elements:


adders

sing terli
s
e
c
ro in Vet
P
l
delays
a
gn
art
i
S
M
l
d
a
We have seen two systemsDigit
ni an 13
o
d
moving averages
ran 20
P
o
l
o
recursive systems Pa
multipliers

2.3

We were able to build simple systems with interesting properties

to understand all of this in more details we need a mathematical framework!

74

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

END OF MODULE 2.3


P

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

END OF MODULE 2
P

Exercises (2.1)

Q1 Sketch the signal u[n 1]

sing terli
s
e
c
ro in Vet
P
l
a

gn X
art
i
S
M
l
ta = i and x[k][n k]
Digi x[n]
don k=
n
013
a
2
r
P

olo

Q2 Sketch the signal u[n] u[n 4]


Q3 Prove that

Q4 Prove that

Pa

u[n] =

n
X

[k]

k=

2.3

75

Answers: Q1

x[n] = u[n]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

15

2.3

P
b

10

10

15

76

Answers: Q1

x[n] = u[n 1]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

15

2.3

P
b

10

10

15

76

Answers: Q2

x[n] = u[n] u[n 4]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
n
0 5
10 Pra5
02
10

o
l
ao

15

15

2.3

77

Answers: Q2

x[n] = u[n] u[n 4]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
n
0 5
10 Pra5
02
10

o
l
ao

15

2.3

15

77

Answers: Q2

x[n] = u[n] u[n 4]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
n
0 5
10 Pra5
02
10

o
l
ao

15

15

2.3

77

Answers: Q3

x[n] =

x[k][n k]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
ta
i and 3
Digi d
n
o

1 if2n01
ran
P
=k
o
l
o
[n

k]
=
nZ
a
P

k=

0 otherwise

Therefore, the only term in the sum that is not killed is the one for k = n, i.e. x[n].

2.3

78

Answers: Q4

n
X

ng
[k]
essi

erli
t
c
t
o
e
r
k=
V
nal P Martin
g
i
S
l
gita oni and
Pn
i
D
Call y [n] = k= [k].
nd
013
a
2
r
P

If n < 0 all the terms in the sum


lo are zero, so y [n] = 0 for n < 0
Pao
u[n] =

If n > 0, the sum will have just one nonzero term for k = 0, so y [n] = 1 for n 0.
Therefore y [n] = u[n]

2.3

79

Quiz (2.2)

What is the minimum period P (in samples) of the signal n


e j(M/N)2n
g
i
s
li for the following values
r
s
e
e
t
of M, N?
c
t
e
ro

V
nal P Martin
g
i
S
d
tal
Digi doni an 13
ran 20
P
o
l
o

Q1 M = 1, N = 3?

Q2 M = 5, N = 7?
Q3 M = 35, N = 15?

2.3

Pa

80

Answers

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
ran 20
P
o
l
ao

Q1 P = 3
Q2 P = 7
Q3 P = 3

2.3

81

Quiz (2.3)

sing terli
s
e
c
Compute the moving average for the signal
ro in Vet
P
l
a
gn
art
i
S
M
l
d 1] + 3[n 2]
x[n]g=
ta[n] + 2[n
Di i doni an 13
ran 20
P
o
l
Pao

2.3

82

Answer

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
ita 0,i and1, 2, 3, 0,
= D.i.g. 0,don
13
n
= o. .P.ra 0, 0, 200,
1,
2,
3,
aol
n=0

x[n]
x[n-1]
(x[n] + x[n-1])/2

2.3

...

0,

0,

1/2,

3/2,

5/2,

3/2,

0,
0,

0,
0,

...
...

0,

0,

...

83

Answer

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
ita 0,i and1, 2, 3, 0,
= D.i.g. 0,don
13
n
= o. .P.ra 0, 0, 200,
1,
2,
3,
aol
n=0

x[n]
x[n-1]
(x[n] + x[n-1])/2

2.3

...

0,

0,

1/2,

3/2,

5/2,

3/2,

0,
0,

0,
0,

...
...

0,

0,

...

83

Answer

0
for e
n s<si0ng

erli
t
c

t
o
e

r
1/2
for n =in

al P for
t 01 V

n3/2
r
g
a
i
n
=
S
M
y [n]
tal= i5/2
andfor n = 2
Digi do
n

13n = 3

3/220for
an
r

lo
0
for n > 3
Pao

2.3

84

Quiz (2.3)
Compute the output of the system below when the input is
x[n] = [n] + 2[n 1] + 3[n 2]

sing terli
s
e
c
ro in Vet
P
l
a
gn
art
i
S
M
l
gita oni and
+Di
and 2013
r
P
aolo
b

x[n]

y [n]

1/2
z 1

2.3

85

Answer

y [n] = 0 for n < 0

sing terli
s
e
c
et
ro2 + 0.5in=V2.5
P
l
y [1] = x[1] + y [0]/2
=
a
t
Sign nd Mar
l
a
t
i
y [2] =
i a = 33+ 1.25 = 4.25
Digx[2] d+oyn[1]/2
n
2=010 + 2.175
ra + y [2]/2
y [3]o=Px[3]

l
Pao
y [0] = x[0] + y [1]/2 = 1

...

y [n] = 4.25 (0.5)n2 for n 2

2.3

86

Quizzes

sing terli
s
e
c
o it isn simple
A major reason for using the KS algorithm P
isrthat
Vet since it uses one
l
i
a
t
n
multiplication and addition per output
it requires M memory elements!
ar
MHowever,
l Sig sample.
d
a
t
n
i
Suggest an architecture forDthe
which uses only M/2 memory elements
ig violinonsynthesis
ia
3= 8.
d M, like
1
n
and write out an example for arasmall
M
0
2
lo P
o
a
P
Hint: Use M even, and think of up- and down-triangles!

Q1 Write the recursive equation for the KS algorithm


Q2

2.3

87

Answers to questions
A1: yn = ynM+1 + xn

sing terli
s
e
c
ro in Vet
P
l
+
a
gn
art
i
S
M
l
d
ta
Digi doni an 13
n
20
ra1
P

o
l
ao
M

A2: Use the idea is that a single triangle can be used with alternating signs.
b

x[n]

y [n]

For ex., for a period of 8 samples, M = 4, xn = 0, 1, 2, 1 and = 1


yn = 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, ....

2.3

88

You might also like