9
-6 -4 -2 0 2 4 6 0 0.5 1 1.5 2 amplitude spectrum amplitude - A TextEnd -6 -4 -2 0 2 4 6 -3 -2 -1 0 1 2 3 frequency - f phase - phi TextEnd phase spectrum "C cos 2#ft ( ) = C cos 2#ft ± # ( ) "3cos 2# $ 5t + # 3 ( ) = 3cos 2# $ 5t + # 3 " # ( ) = 3cos 2" # 5t $ 2" 3 ( ) cos 2"ft + # ( ) = e j 2"ft +# + e $ j 2"ft +# 2 = e j" e j 2#ft + e $ j" e $ j 2#ft 2 = X km e j 2"ft + X kp e # j 2"ft X km = 1 2 e j" = "X k e j 2#ft X = 1 2 e j" 1 2 e # j" 0 k = f k = # f otherwise $ % & & " always a odd pair Absorb the minus sign into the angle -6 -4 -2 0 2 4 6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 frequency - f complex amplitude - X TextEnd complex amplitude spectrum What do you do with negative amplitudes? Amplitudes always positive 1.5 1.5 2" 3 " 2# 3 1.5e j 2" 3 1.5e " j 2# 3 Period of Sum of Sinusoids zt () = zt + T ( ) , T = ? xt () = cos 2" 5t ( ) yt () = cos 2" 4 3 ( )t ( ) zt () = xt () + yt () Least common multiple T z =3 seconds T x =1/5 seconds 1/5*k=3/4*l k/l=15/4 4/20s, 8/20s, 12/20s, 16/20s, 20/20s, 24/20s, 28/20s, 32/20s, 36/20s, 40/20s, 44/20s, 48/20s, 52/20s, 56/20s, 60/20s 15/20s. 30/20s, 45/20s, 60/20s 15 cycles 4 cycles 1/5s, 2/5s, 3/5s … T y =3/4 seconds 3/4s, 6/4s, … T z =15*T x =15/5=3 seconds T z =4*T y =3/4*4=3 seconds seconds to complete cycle rational number xt () = cos 2" 5t ( ) yt () = cos 2" 4 3 ( )t ( ) seconds to complete cycle zt () = zt + T z ( ) zt () = xt () + yt () Fourier Series x(t ) = sin 2"t ( ) 0 # t < 1 X 0 = 1 T 0 x(t )dt 0 T 0 " = sin(2#t )dt = 0 0 1 " 0 0.5 1 1 0 1 1 1 sin . . 2 ! t T 1 0 t = 0 + 1 " cos 2#t $ # 2 % & ( ) * + 0 " cos 2# 2t $ # 2 % & ( ) * + 0 " cos 2# 3t $ # 2 % & ( ) * +K X 0 = 0 X k = 1e " j# /2 k = 1 0 k $ 1 % & X k = 2 T 0 x(t )e " j 2# k To t dt 0 T 0 $ = 2 sin(2#t )e " j 2#kt dt 0 1 $ = 2 sin(2#t ) cos("2#kt ) + j sin("2#kt ) [ ]dt 0 1 $

Least common multipleFourier Series T What do you do withx

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

-6 -4 -2 0 2 4 60

0.5

1

1.5

2amplitude spectrum

am

plit

ude -

A

TextEnd

-6 -4 -2 0 2 4 6

-3

-2

-1

0

1

2

3

frequency - f

phase -

phi

TextEnd

phase spectrum

Complex amplitude spectrum !• o 1.5exp(-jpi/3)! ! ! ! ! ! ! 1.5exp(jpi/3) o• ! |! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !|• --|---------------------|-----------------------|-• ! -5! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 5! f

•Amplitude spectrum !• o 1.5! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !o 1.5• ! |! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !|• --|---------------------|-----------------------|- !• -5! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 5! f••Phase spectrum o pi/3 !-5!! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! |--|---------------------|-----------------------|-! |! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !! 5! f ! o -pi/3

!

"Ccos 2#ft( ) = Ccos 2#ft ± #( )

!

"3cos 2# $5t + #3( ) = 3cos 2# $5t + #

3"#( )

!

= 3cos 2" #5t $ 2"3( )

!

cos 2"ft + #( ) =ej 2"ft+# + e$ j2"ft+#

2

!

=ej"ej 2#ft

+ e$ j"e$ j2#ft

2

!

= Xkmej 2"ft

+ Xkpe# j2"ft

!

Xkm = 1

2ej"

!

= "Xkej 2#ft

!

X =

1

2ej"

1

2e# j"

0

k = f

k = # f

otherwise

$

% &

' &

!

" always a odd pair

Absorb the minus sign into the angle

-6 -4 -2 0 2 4 60

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

frequency - f

com

ple

x a

mplit

ude -

X

TextEnd

complex amplitude spectrum

What do you do with negative amplitudes?Amplitudes always positive

!

1.5

!

1.5

!

2"3

!

" 2#3

!

1.5ej 2"3

!

1.5e" j 2#

3

Period of Sum of Sinusoids

!

z t( ) = z t + T( ),T = ?

!

x t( ) = cos 2"5t( )

!

y t( ) = cos 2" 43( )t( )

!

z t( ) = x t( ) + y t( )

Least common multiple

Tz=3 seconds

Tx=1/5 seconds

1/5*k=3/4*l

k/l=15/4

4/20s, 8/20s, 12/20s,

16/20s, 20/20s, 24/20s,

28/20s, 32/20s, 36/20s,

40/20s, 44/20s, 48/20s,

52/20s, 56/20s, 60/20s

15/20s. 30/20s,

45/20s, 60/20s

15 cycles

4 cycles

1/5s, 2/5s, 3/5s …

Ty=3/4 seconds

3/4s, 6/4s, …

Tz=15*Tx=15/5=3 seconds Tz=4*Ty=3/4*4=3 seconds

seconds to complete cycle

rational number

!

x t( ) = cos 2"5t( )

!

y t( ) = cos 2" 43( )t( )

seconds to complete cycle

!

z t( ) = z t + Tz( )!

z t( ) = x t( ) + y t( )

Fourier Series

!

x(t) = sin 2"t( ) 0 # t <1

!

X0

=1

T0

x(t)dt0

T0

"

= sin(2#t)dt = 00

1

"

0 0.5 1

1

0

11

1

sin ..2 !t

T

10 t

!

= 0+1" cos 2#t $#

2

%

& '

(

) * + 0 " cos 2#2t $

#

2

%

& '

(

) * + 0 " cos 2#3t $

#

2

%

& '

(

) * +K

!

X0

= 0

Xk

=1e

" j# /2k =1

0 k $1

% & '

!

Xk

=2

T0

x(t)e" j2# k

Tot

dt0

T0

$

= 2 sin(2#t)e" j2#ktdt0

1

$

= 2 sin(2#t) cos("2#kt)+ j sin("2#kt)[ ]dt0

1

$

Fourier Series

!

sin(2"t)

!

sin(2"t)cos(2k"t)

sin(2"t)sin(2k"t)

!

cos(2k"t)

sin(2k"t)

!

sin(2"t)cos(2"kt)dt0

1

#

!

sin(2"t)sin(2"kt)dt0

1

#

!

k =1

!

k = 2

!

k = 3

!

= 0

!

= 0

!

= 0

!

= 0

!

= 0

!

= 0.5

!

Xk

!

=1e" j# /2

!

= 0

!

= 0

Fourier Series (frequency space)

X0

.1

Td

0

T

tz t

X0

.1

3d

0

3

tcos ...2 ! 5 t cos ...2 !4

3t

X00

So, use L’Hopitals Rule

,k!4 15,k 4 k 15

Xk0

X,4 15

0

0

Xk

..1

41i

....4 1i ! exp ...2 1i ! k k3 ..6 exp ...2 1i ! k k2 .6 k2 ...482i ! exp ...2 1i ! k k .241 exp ...2 1i ! k 241

...! k 4 k 4 k 15 ...! k 15 k 4 k 15 ...! k 15 k 4 k 15 ...! k 15 k 4 k 4

Xk

.2

Td

0

T

t.z t e

....j 2 ! kt

T

Xk

.2

3d

0

3

t.cos ...2 ! 5 t cos ...2 !4

3t e

....j 2 ! kt

3

Xk

.i..2 exp ...2 i ! k k3 .2 k3 ..241 exp ...2 i ! k k .241 k

.! k4 ..241 ! k2 .3600 !

Xk

.1i

..2 1 k3 .2 k

3 ..241 1 k .241 k

....! k 15 k 4 k 4 k 15

X41

X15

1

Fourier Series (frequency space)

,k!4 15Xk0

X41

X15

1

X00

-20 -15 -10 -5 0 5 10 15 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

frequency

X TextEnd

Spectrum of z=cos(2pi*5t)+cos(2pi*(4/3)t)

0 1 2 3 4 5 6-1

-0.5

0

0.5

1

pe

rio

d:5

sq

rt(2

) se

co

nd

s

TextEnd

aperiodic sum of sinusoids

0 1 2 3 4 5 6-1

-0.5

0

0.5

1

pe

rio

d:3

/4 s

eco

nd

s

TextEnd

0 1 2 3 4 5 6-2

-1

0

1

2

time

pe

rio

d:?

se

co

nd

s

TextEnd

Aperiodic Sum of Sinusoids w/ an Irrational Frequency

!

z t( ) = z t + T( ),T = ?

!

x t( ) = cos 2"5 2t( )

!

y t( ) = cos 2" 43( )t( )

!

z t( ) = x t( ) + y t( )

Least common multiple

seconds to complete cycle

irrational number

!

x t( ) = cos 2"5 2t( )

!

y t( ) = cos 2" 43( )t( )

seconds to complete cycle

!

z t( ) = z t + Tz( )

!

z t( ) = x t( ) + y t( )

!

Tx

=1

5 2seconds

0 1 2 3 4 5 6-1

-0.5

0

0.5

1

pe

rio

d:5

sq

rt(2

) se

co

nd

s

TextEnd

Aperiodic sum of sinusoids

0 1 2 3 4 5 6-1

-0.5

0

0.5

1

pe

rio

d:3

/4 s

eco

nd

s

TextEnd

0 1 2 3 4 5 6-2

-1

0

1

2

pe

rio

d:?

se

co

nd

s

TextEnd

time

!

1

5 2s,2

5 2s,3

5 2sK

!

3

4s,6

4s,9

4sK

!

Ty =3

4seconds

!

1

5 2k =

3

4l

!

k

l=15 2

4

!

Tz

="seconds

!

z t( ) aperiodic

Fourier Series for Irrational Frequency

In the Fourier Series for an aperiodic signal

“what’s the period, Quinn?”

“What’s the frequency, Kenneth?”

In 1986, CBS Anchorman Rather was confronted about 11 p.m. while walking on

Park Avenue, when he was punched from behind and knocked to the ground then

chased into a building and kicked him several times in the back while the assailant

demanded to know 'Kenneth, what is the frequency?' The assailant was convinced

the media had him under surveillance and were beaming hostile messages into

his head, and he demanded that Rather tell him the frequency being used.

X0

.1

Td

0

T

tz t Xk

.2

Td

0

T

t.z t e

....1j 2 ! kt

T

PS3-5

Pick a T, plot the spectrum, then repeat with larger T’s.

40 20 0 20 40

0

0.2

0.4

0.60.410218

.5.252191 103

A k

2

5050 k

QUAD8 Numerically evaluate integral, higher order method.

Q = QUAD8('F',A,B) approximates the integral of F(X) from A to B

'F' is a string containing the name of the function.

The function must return a vector of output values given a vector of input values.

Q = QUAD8('F',A,B,TOL,TRACE,P1,P2,...) allows coefficients P1, P2, ...

to be passed directly to function F: G = F(X,P1,P2,...).

To use default values for TOL or TRACE, you may pass in the empty

matrix ([]).

function y = myintegrand(t,f)

y=cos(2*pi*f*t).^2;

save as myintegrand.m

»f=1;

»quad8('myintegrand',0,1,[],[],1)

ans =

0.50000000000000

!

x(t) = cos22"ft( )

0

1

# dt

X0

.1

Td

0

T

tz t Xk

.2

Td

0

T

t.z t e

....1j 2 ! kt

T

Pick a T, compute X0, loop over Xk’s, plot the spectrum, then repeat with larger T’s.

Basis Vector

Bases are building blocks to form more complex things

!

x = Ak

k=1

m

" #k

Synthesize x from a weighted sum of basis elements, !

or

Decompose x into a weighted sum of basis elements, !

Prefer orthonormal basis vectors

V

x1

x2

V1

V2

x1

x2

V

V•

V•x2

x1

x1

x2

V

V1

V2

x1

x2

V

V•x2

V•x1

!

V = aˆ x 1+ bˆ x

2

!

V = aˆ x 1+ bˆ x

2

!

V = V • x1( ) ˆ x

1+ V • x

2( ) ˆ x 2

!

V " V • x1( ) ˆ x

1+ V • x

2( ) ˆ x 2

projections

Basis Functions

orthogonality condition

normalized

!

x(t),"k(t) are functions

When are functions orthogonal to each other?

How do you “project” functions onto each other?

!

Ak

= x(t)"k

*dt

a

b

# How much of is in ?

!

x(t)

!

"k(t)

!

x(t) = Ak

k

" #k(t)

If are orthonormal:

!

"k(t)

!

Ak

= x(t)"k

*dt

a

b

#where Fourier Series

Complex exponentials

!

x(t) = Ak

k

" #k(t)

!

" j"k*dt

a

b

# =1 if j = k

0 if j $ k

% & '

!

a " t " b

over an interval

!

"k = 1

T0

ej 2#kt

T0

Basis Functions

orthogonality condition

normalized

Ex:

!

"1

= 6

3cos 2#t( )

!

"2

= 6

3cos 2# 1

3( )t( )

!

6

3cos 2"t( ) 6

3cos 2" 1

3( )t( )dt0

3

#

!

"1"2dt

a

b

# =

!

= 0

orthogonal

!

6

3cos 2"t( ) 6

3cos 2"t( )dt

0

3

#

!

=1

!

" j"k*dt

a

b

# =1 if j = k

0 if j $ k

% & '

!

"1"1dt

a

b

# =

!

1

3

6

3cos 2" 1

3( )t( ) 6

3cos 2" 1

3( )t( )dt0

3

#

!

=1

!

"2"2dt

a

b

# =

normalized

normalized!

0 " t " 3

over an interval

!

a " t " bover an interval

0 1 2 3

1

0

10.816497

0.816497

.6

3

cos ..2 ! t

.6

3

cos ...2 !1

3

t

30 t

Bezier Curves

!

"4

= t3

!

"3

= 3t 2 t #1( )

!

"2

= 3t t #1( )2

!

"1

= t #1( )3

!

0 " t "10 0.5 1

0

0.5

1

y t

x t0 0.5 1

0

0.5

1

y t

t

0 0.5 10

0.5

1

t

x t

P0

P1P2

P3

P0=(0,0)P1=(.5,1)

P2=(.75,.8)P3=(1,0)

!

x(t) = P0x(1" t)

3+ 3P1

x(1" t)

2t + 3P2

x(1" t)t

2+ P3

x(1" t)t

3

!

y(t) = P0y (1" t)3

+ 3P1y (1" t)2t + 3P2y (1" t)t

2+ P3y (1" t)t

3

cubic spline basis function

!

t "1( )3

3t t "1( )2

dt

0

1

#

!

"1"2dt

a

b

# = not orthogonal

!

"2

= 3t t #1( )2

!

"1

= t #1( )3

0 0.5 1

0

0.5

11

0

1 t3

.3 .t 1 t2

.3 .t21 t

t3

10 t

!

= "1

14

parametric curve

Bezier Curves

!

"4

= t3

!

"3

= 3t 2 t #1( )

!

"2

= 3t t #1( )2

!

"1

= t #1( )3

!

0 " t "10 0.5 1

0

0.5

1

y t

x t0 0.5 1

0

0.5

1

y t

t

0 0.5 10

0.5

1

t

x t

P0

P1P2

P3

P0=(0,0)P1=(.5,1)

P2=(.75,.8)P3=(1,0)

!

x(t) = P0x(1" t)

3+ 3P1

x(1" t)

2t + 3P2

x(1" t)t

2+ P3

x(1" t)t

3

!

y(t) = P0y (1" t)3

+ 3P1y (1" t)2t + 3P2y (1" t)t

2+ P3y (1" t)t

3

cubic spline basis function

!

t "1( )3

3t t "1( )2

dt

0

1

#

!

"1"2dt

a

b

# = not orthogonal

!

"2

= 3t t #1( )2

!

"1

= t #1( )3

0 0.5 1

0

0.5

11

0

1 t3

.3 .t 1 t2

.3 .t21 t

t3

10 t

!

= "1

14

parametric curve

Make your own set of basis functions

1. Pick an initial basis function and an interval

2. Normalize

3. Pick a general formula for a second function

4. “Orthonormalize”

a. make orthogonal to b. normalize

!

"1

!

"1

!

"1"1dt

a

b

# =1

!

"2

!

"2

!

"1

!

"1"2dt

a

b

# = 0

!

"2"2dt

a

b

# =1

5. Pick a general formula for a second function

6. “Orthonormalize”

a. make orthogonal to & b. normalize!

"3

!

"3

!

"1

!

"3"1dt

a

b

# = 0

!

"3"3dt

a

b

# =1

!

"2

!

"3

!

"2

!

"3"2dt

a

b

# = 0

7. Continue for

1 eqn

2 eqns

3 eqns

k eqns

!

"k

!

a " t " b

Make your own set of basis functions

1. Pick an initial basis function with one parameter, & interval

2. Normalize

3. Pick a general formula for a second function with 2 parameters

& 1 zero-crossing4. “Orthonormalize”

a. make orthogonal to b. normalize

!

"1

!

"1

!

"2

!

"2

!

"1

5. Pick a general formula for a second function with 3 parameters

& 2 zero-crossings 6. “Orthonormalize”

a. make orthogonal to & b. normalize!

"3

!

"3

!

"1

!

"2

!

"3

!

"2

7. Continue for with k parameters

!

"k

1 eqn

2 eqns

3 eqns

k eqns

!

a " t " b

!

"1"1dt

a

b

# =1

!

"1"2dt

a

b

# = 0

!

"2"2dt

a

b

# =1

!

"3"1dt

a

b

# = 0

!

"3"3dt

a

b

# =1

!

"3"2dt

a

b

# = 0

Make your own set of basis functions

1. Pick an initial basis function with one parameter & an interval

!

"1

!

"1

= A

2. Normalize

!

"1"1dt

t1

t2

# =1

!

AAdt

0

1

" =1

0 0.5 10

0.2

0.4

0.60.5

0

y x

.0.5 x

0.5

10 x

Linear segments

!

A2

=1

!

A =1

!

"1

=1

3. Pick an second basis function with two parameters

!

"2

!

"2

= Bt + C

4. Orthonormalize

!

"2"2dt

t1

t2

# =1

!

"2"1dt

t1

t2

# = 0

!

Bt + C( ) Bt + C( )dt0

1

" =1

!

Bt + C( )1dt0

1

" = 0

!

B

2+ C = 0

!

B2

3+ BC + C

2=1

!

B = ±2 3

!

C = m 3

!

C = "B

2

!

B2

3" B

B2

2+ "

B

2

#

$ %

&

' (

2

=1

!

"2

= 2 3t # 3

!

0 " t "1

!

A2

t0

1

=1

!

B2

t3

3+ 2CBt2

2+C2

t0

1

=1

0 0.5 10

0.2

0.4

0.60.5

0

y x

.0.5 x

0.5

10 x

Linear segments

5. Pick an third basis function with three parameters

!

"3

6. Orthonormalize

!

"3"3dt

t1

t2

# =1

!

"3"1dt

t1

t2

# = 0

!

"2

= 2 3t # 3

!

"1

=1

!

"3

=bt + a t # c

(bc + a) $ b(t $ c) t > c

!

"3"2dt

t1

t2

# = 0

!

bt + a( ) bt + a( )dt0

c

" + bc + a # b t # c( )( )$3dtc

1

" =1

!

bx + a( )1dt0

c

" + bc + a # b x # c( )( )1dtc

1

" = 0

!

bx + a( ) 2 3t " 3( )dt0

c

# + bc + a " b x " c( )( ) 2 3t " 3( )dtc

1

# = 0

Linear segments

6. Orthonormalize

..2 b2c3 ...2 b .2 b a c

2 ...2 b b .2 a c a2 .a b .

1

3b21

.c2 .2 c

1

2b a 0

.....1

123 b .2 c 1 3 .2 c 1 3 .2 c 1 0

!

c =1

2

!

1

4b + a = 0

!

a ="1

4b

!

a = " 3

!

b = 4 3

!

c =1

2

0 0.5 12

0

21.732051

1.732051

1

.2 3 x 3

y x

10 x

!

"3

=4 3t # 3 t $ 1

2

(2 3t + 3) # 4 3(t # 1

2) t > 1

2

% & '

!

"2

= 2 3t # 3

!

"1

=1

!

"3

=4 3t # 3 t $ 1

2

(2 3t + 3) # 4 3(t # 1

2) t > 1

2

% & '

Linear segments

Decomposition via the “Q” basis

0 0.5 12

0

21.732051

1.732051

1

.2 3 x 3

y x

10 x

!

"3

=4 3t # 3 t $ 1

2

(2 3t + 3) # 4 3(t # 1

2) t > 1

2

% & '

!

"2

= 2 3t # 3

!

"1

=1

!

x(t) = cos "t( )

!

x(t) = Ak

k

" #k(t)

!

Ak

= x(t)"k

*dt

a

b

#where

!

A1

= cos 2"t( )1dt0

1

#

!

A1

= 0

!

A2

= cos 2"t( ) 2 3t # 3( )dt0

1

$

!

A2

= 0!

A1

= x(t)"1dt

a

b

#

!

A2

= x(t)"2dt

a

b

#

!

A3

= x(t)"3dt

a

b

#

!

A3

= "0.702

!

A3

= cos "t( ) 4 3t # 3( )dt0

12

$

+ cos "t( ) 2 3t + 3 # 4 3 t # 1

2( )( )dt12

1

$

0 0.5 12

1

0

1

21.2159

1.211036

cos ..2 ! x

.0.702 y x

10 x

!

x(t) = "0.702#3(t)

!

a " t " b

!

0 " t "1

Decomposition via the “Q” basis

!

x(t) = sin"

2t

#

$ %

&

' (

!

x(t) = Ak

k

" #k(t)

!

Ak

= x(t)"k

*dt

0

T

#where

!

A1

= sin"

2t

#

$ %

&

' ( 1dt

0

1

)

!

A1

= 0.673

!

A2

= sin"

2t

#

$ %

&

' ( 2 3t ) 3( )dt

0

1

*

!

A2

= 0.301!

A1

= x(t)"1dt

0

T

#

!

A2

= x(t)"2dt

0

T

#!

A3

= x(t)"3dt

0

T

#

!

A3

= 0.06

!

A3

= sin"

2t

#

$ %

&

' ( 4 3t ) 3( )dt

0

12

*

+ sin"

2t

#

$ %

&

' ( 2 3t + 3 ) 4 3 t ) 1

2( )( )dt12

1

*

dummy

0 0.5 1

1

0.5

0

0.5

1

1.5

!

0 " t "1

Orthonormal Cubic Splines

0 0.5 1

4

2

0

2

42.645751

4

.7 t3

..7 5 t3

..6 5 t2

..21 3 t3

..3 .10 3 t2

..10 3 t

.35 t3

.60 t2

.30 t 4

10 t

dummy

cos .! t

0 0.5 1

1

0

1

dummy

sin .! t

0 0.5 1

0.5

0

0.5

1

dummy

1 t2

0 0.5 1

0

0.5

1

dummy

sin ..2 ! t

0 0.5 1

1

0

1

Sampling and Aliasing D/A Conversion

D to C

y[n] y(t)

Ts = 1 / fs

Ideal discrete to continuous converter for sample spacing Ts

Interpolates discrete samples to form a continuous signal

0 0.5 1 1.5 2 2.5 3 3.5 4-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.5 1 1.5 2 2.5 3 3.5 4-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 0.5 1 1.5 2 2.5 3 3.5 4-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

D/A Conversion

Pulse

For each sample y[n], a pulse p(t) is produced

!

y(t) = y[n]p(t " nTs)n="#

#

$

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

D to C

y[n] y(t)

Ts = 1 / fs

!

y(t) = p(t) =1 "Ts 2 < t # Ts 2

0 otherwise

$ % &

Different pulse shapes produce different D-to-C interpolations

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

D/A Conversion

Pulse

For each sample y[n], a pulse p(t) is produced

!

y(t) = y[n]p(t " nTs)n="#

#

$

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

D to C

y[n] y(t)

Ts = 1 / fs

!

y(t) = p(t) =1" t Ts "Ts # t # Ts0 otherwise

$ % &

Different pulse shapes produce different D-to-C interpolations

D/A Conversion

Pulse

For each sample y[n], a pulse p(t) is produced

!

y(t) = y[n]p(t " nTs)n="#

#

$

D to C

y[n] y(t)

Ts = 1 / fs

!

p(t) =1 "Ts 2 < t # Ts 2

0 otherwise

$ % &

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

!

y(t) = y[0]p(t) + y[1]p(t "Ts)

!

y(t) =1p(t) + 0.5p(t "1)

!

y(t) =

1 0( ) + 0.5 0( ) = 0 t < "1 2

1 1( ) + 0.5 0( ) =1 "1 2 < t <1 2

1 0( ) + 0.5 1( ) = 0.5 1 2 < t < 3/2

1 0( ) + 0.5 0( ) = 0 3/2 < t

#

$

% %

&

% %

D/A Conversion

Pulse

For each sample y[n], a pulse p(t) is produced

!

y(t) = y[n]p(t " nTs)n="#

#

$

D to C

y[n] y(t)

Ts = 1 / fs

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

!

p(t) =1" t Ts "Ts # t # Ts0 otherwise

$ % &

!

y(t) = y[0]p(t) + y[1]p(t "Ts)

!

y(t) =1p(t) + 1

2p(t "Ts)

!

y(t) = a

0 t < "Ts1+ t Ts "Ts # t < 0

1" t Ts 0 # t < Ts

0 Ts # t < 2T

0 t > 2T

$

%

& & &

'

& & &

+ b

0 t < "Ts0 "Ts # t < 0

1+ t "Ts( ) Ts 0 # t < Ts

1" t "Ts( ) Ts Ts # t < 2Ts

0 t > 2T

$

%

& & &

'

& & &

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

!

y(t) = ap(t) + bp(t "Ts)

D to C

y[n] y(t)

Ts = 1 / fs

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.2

0.4

0.6

0.8

1

1.2

1.4

!

y(t) =

0 t < "Ts1+ t Ts "Ts # t < 0

a 1" t Ts( ) + b 1+ t "Ts( ) Ts( ) 0 # t < Ts

1" t "Ts( ) Ts Ts # t < 2Ts

0 t > 2Ts

$

%

& & &

'

& & &

!

y(t) =

0 t < "Ts1+ t Ts "Ts # t < 0

a + (b " a) t Ts 0 # t < Ts

1" t Ts Ts # t < 2Ts

0 t > 2Ts

$

%

& & &

'

& & &

linear interpolation

!

a

!

b

!

Ts

=1

D/A Conversion

Ideal

D to C

y[n] y(t)

Ts = 1 / fs

!

y(t) = p(t) =

sin"t

Ts"t

Ts

for #$ < t <$

%

& ' '

( ' '

-10 -8 -6 -4 -2 0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-10 -8 -6 -4 -2 0 2 4 6 8 10-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

!

= sinc"t

Ts

#

$ %

&

' (

Walsh functions

orthogonality condition

normal

!

" j"k*dt

a

b

# =1 if j = k

0 if j $ k

% & '

!

"1"1

*

dt0

4

# = 1$11

4

% = 4

!

"2"2

*

dt0

4

# = 1$1+ %1$ %1( ) +1$1+ %1$ %1( )( ) = 4

!

"1"2

*

dt0

4

# =1$1+1$1+ 1$ %1( ) + 1$ %1( ) =1+1%1%1= 0

not normal

not normal

orthogonal

!

"j"k

*

dta

b

# =$k

= 4 if j = k

0 if j % k

& ' (

Walsh functions

0 0.5 1 1.5 2 2.5 3 3.5 4-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

t

x(t)

TextEnd

!

x(t) = t

!

x(t) = Ak

k

" #k(t)

!

Ak

=1

"k

x(t)#* t( )dt0

4

$ =1

4x(t)W (2,k +1)dt

0

4

$where

!

0 " t " 4

!

A0

= 1

4t "1dt

0

4

# = t2

20

4

= 1

48 = 2

!

A1= 1

4t "1dt

0

2

# + 1

4t $1( )dt

2

4

# = 1

4

t2

20

2

$ 1

4

t2

22

4

= 1

42 $ 6( ) = $4 1

4= $1

!

A2

= 1

4t "1dt

0

1

# + 1

4t " $1( )dt

1

3

# + 1

4t "1dt

3

4

# = 1

4

t2

20

1

$ t2

21

3

+ t2

23

4

( ) = 1

4

1

2$ 9

2$ 1

2[ ] + 16

2$ 9

2[ ]( ) = 0

!

A3

= 1

4t "1dt

0

1

# + 1

4t " $1( )dt

1

2

# + 1

4t " 1( )dt

2

3

# + 1

4t " $1( )dt

3

4

# = 1

4

t2

20

1

$ t2

21

2

+ t2

22

3

$ t2

23

4

( )= 1

4

1

2$ 4

2$ 1

2[ ] + 9

2$ 4

2[ ]$ 16

2$ 9

2[ ]( ) = $2 1

4= $ 1

2

Walsh functions

!

x(t) = Ak

k

" #k(t)

!

Ak

= 2,"1,0," 12[ ]

[2 2 2 2]+[-1 -1 1 1] + [0 0 0 0]+[-0.5 0.5 -0.5 0.5 ]=[0.5 1.5 2.5 3.5]

0 0.5 1 1.5 2 2.5 3 3.5 40

0.5

1

1.5

2

2.5

3

3.5

4

t

x(t

) , xhat(

t)

TextEnd