Chapter 15 - Fourier Series and Fourier Transform

Embed Size (px)

Citation preview

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    1/41

    Problems

    Section 15.2: The Fourier Series

    P15.2-1

    2

    022 s = rad/s and ( ) for 0 22

    T f t t t = = = . The coefficients of the Fourier

    series are given by:

    ( )

    2 2

    0 0

    2 2

    20

    2 2

    0

    1 432

    2 4cos

    2

    2 4sin

    2

    n

    n

    a t dt

    a t n t dt n

    b t n t dt n

    = =

    = =

    = =

    ( ) 2 21 1

    4 4 1 4 1cos sin

    3 n n f t n t

    n nn t

    = = = +

    P15.2-2

    4 24 2

    04

    04

    2 2 2 1 2 2cos 2 cos sin 2sin

    1(sin 0) 2 (sin ) sin

    2 2( 1)

    1sin

    2

    T TT T

    n TT

    n

    a n t dt n t dt n t nT T T n T T

    n nn

    n

    n

    n

    +

    t

    = + = +

    = +

    = =

    ( )1 2

    odd

    0 even

    nn

    n

    ( )4 2

    4 2

    04

    04

    2 2 1 22sin 2 sin cos 2 cos

    1(2cos ( ) 1) cos

    23

    is odd

    22,6,10,

    0 4,8,12,

    T T

    T T

    TnT

    b n t dt n t dt n t nTT T n T

    nn

    n

    nn

    nn

    n

    2t

    T

    = + = +

    =

    = =

    =

    1

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    2/41

    P15.2-3

    ( )0 average value of2

    Aa f t= =

    ( ) 1 for 0t

    f t A t T T

    =

    ( ) ( ) ( )

    0 0 0

    2

    0

    2 2

    2 2 2 2 1 21 cos cos cos

    2 2 2cos sin

    2 10

    2

    cos 2 cos 0 2 sin 2 0 02

    T T Tn

    T

    t Aa A n t dt n t dt t n t dt T T T T T T T

    n t n t n t A T T T

    T Tn

    T

    An n n

    n

    = =

    +

    =

    = +

    =

    ( ) ( )( ) ( )( )

    0 0 0

    2

    0

    2 2

    2 2 2 2 1 21 sin sin sin

    2 2 2sin cos

    2 10

    2

    sin 2 sin 0 2 cos 2 02

    T T Tn

    T

    t Ab A n t dt n t dt t n t dt T T T T T T T

    n t n t n t A T T T

    T Tn

    T

    A An n n

    n n

    = =

    =

    =

    =

    ( )1

    2sin

    2 n

    A A f t n

    n Tt

    =

    = +

    2

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    3/41

    P15.2-4

    0

    22 s, rad/s

    2T

    = = = , ( )0 average value of 1a f t= = ,

    ( ) for 0 2 f t t t =

    ( )( ) ( ) ( )

    ( )

    ( ) ( ) ( )

    2

    2

    20

    0

    2 2

    cos sin2cos

    2

    1cos 2 cos 0 2 sin 2 0

    0

    n

    n t n t n t a t n t dt

    n

    n n nn

    += =

    = +

    =

    ( )( ) ( ) ( )

    ( )( ) ( )( ) ( )( )

    2

    2

    20

    0

    2 2

    sin cos2sin

    2

    1sin 2 sin 0 2 cos 2 0

    2

    n

    n t n t n t b t n t dt

    n

    n n nn

    n

    = =

    =

    =

    ( )1

    2 21 sin

    n

    f t nn T

    t

    =

    =

    Use Matlab to check this answer:

    % P15.2-4

    pi=3.14159;

    A=2; % input waveform parameters

    T=2; % period

    w0=2*pi/T; % fundamental frequency, rad/s

    tf=2*T; % final time

    dt=tf/200; % time increment

    t=0:dt:tf; % time, s

    a0=A/2; % avarage value of input

    v1=0*t+a0; % initialize input as vector

    for n=1:1:51 % for each term in the Fourier series ...an=0; % specify coefficients of the input

    series

    bn=-A/pi/n;

    cn=sqrt(an*an + bn*bn); % convert to magnitude and angle form

    thetan=-atan2(bn,an);

    v1=v1+cn*cos(n*w0*t+thetan); % add the next term of the input

    Fourier series

    end

    3

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    4/41

    plot(t, v1,'black') % plot the Fourier series

    grid

    xlabel('t, s')

    ylabel('f(t)')

    title('P15.3-4')

    4

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    5/41

    Section 15-3: Symmetry of the Function f(t)

    P15.3-1

    o

    24 s rad/s

    4 2

    T

    = = = .

    The coefficients of the Fourier series are:

    ( )0 average value of 0da v= =t

    0 because vd(t) is an odd function oft.na =

    ( )

    ( )( ) ( )( )

    4

    0

    4 4

    0 0

    4 4

    2 2

    00

    2 2

    16 3 sin

    2 2

    33 sin sin

    2 2 2

    cos3 12

    3 sin cos2 2 2 2

    2 4

    6 61 cos 2 sin 2 0 2 co

    nb t n t dt

    n t dt t n t dt

    n t

    n t n t n t n

    n

    n n nn n

    =

    =

    =

    =

    ( )( )( )12

    s 2nn

    =

    The Fourier series is:

    ( )d1

    12sin

    2nv t n t

    n

    =

    =

    P15.3-2

    ( ) ( ) ( )1 1

    12 121 6 6 sin 1 6 sin

    2 2c d

    n n

    v t v t n t n t nn n 2

    = =

    = = + = +

    1

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    6/41

    P15.3-3

    o

    2 10006 ms 0.006 s rad/s krad/s

    .006 3 3T

    = = = = =

    The coefficients of the Fourier series are:

    ( )0

    3 2

    12average value of V6 2

    aa v t

    = = =

    because va(t) is an even function oft.0nb =

    ( )

    ( )

    0.001

    0

    0.001 0.0016

    0 0

    2 6 2

    2 10002 3 3000 cos

    0.006 3

    1000 10002000 cos 2 10 cos

    3 3

    1000sin

    1000 1000 1000 100032000 cos sin1000 10 3 3 3

    3 9

    na t n t dt

    n t dt t n t dt

    n t

    n t n t n t n

    n

    =

    =

    = +

    0.001

    0

    2 3 2

    2 2

    3 92000 sin 0 cos 1 sin 0

    1000 3 10 3 3 3

    6 18 6sin cos 1 sin

    3 3 3

    18

    n n n nn n

    n n nn n n

    = +

    =

    =

    2 2cos 1

    3

    n

    n

    The Fourier series is

    ( )a 2 21

    1 18 10001 cos cos

    2 3n

    nv t n t

    n 3

    =

    = +

    P15.3-4

    ( ) ( ) ( )b a 2 21

    2 21

    1 18 10000.002 1 1 1 cos cos 0.002

    2 3 3

    1 18 1000 21 cos cos

    2 3 3 3

    n

    n

    nv t v t n t

    n

    nn t n

    n

    =

    =

    = = + +

    = +

    2

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    7/41

    P15.3-5

    ( ) f t t t = < <

    ( )

    0

    0

    00

    22 , 1

    2

    average value: 0

    2sin

    0 since have odd function

    T

    n

    n

    T

    a

    b f t n t dt T

    a

    = = =

    =

    =

    =

    ( )2

    1 2 3

    2 12 1 sin cossin

    2

    2, 1, and 2 3

    n

    nnt t nt

    b t nt dt n n n

    b b b

    = = =

    = = =

    P15.3-6

    08 s, 4 rad/sT = =

    ( )0 because is an even functionnb f t=

    ( )0

    2 2 2 1average 1 4

    8a

    = = =

    ( ) ( )2 00

    1 2

    0 1

    4cos

    42 cos cos

    4 48

    23 sin sin

    4 2

    T

    na f t n t dt T

    n t dt n t dt

    n n

    n

    =

    =

    =

    1 2 3.714, .955, .662a a a= = =

    3

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    8/41

    P15.3-7

    0

    2

    0

    2

    2 ,

    2cos

    T

    Aa A t dt

    = =

    = =

    ( ) ( ) ( )( ) ( )( )

    ( )( )

    ( )( )

    ( ) ( )

    ( )( ) ( ) ( ) ( )

    2 2

    2 2

    2

    2

    2

    2 2cos cos 2 cos 2 1 cos 2 1

    2

    sin 2 1 sin 2 12

    2 2 1 2 2 1

    sin 2 1 sin 2 12 2 2

    2 1 2 1

    22 1 sin 2 1 2 1 sin 2 1

    2 24 1

    n

    Aa A t n t dt n t n n t dt

    n t n t A

    n n

    n nA

    n n

    An n n n

    n

    = = +

    += +

    +

    +

    = + +

    = +

    ( )( )

    ( )

    ( )

    2

    2

    4cos

    4 1

    4 1

    4 1

    n

    An

    n

    A

    n

    =

    =

    0nb = since ( )f t is an even function.

    P15.3-8

    0

    20.4 s, 5 rad sT

    T

    = = =

    0

    0

    cos 0 .1

    ( ) 0 .1 .3

    cos .3 .4

    A t t

    f t t

    A t t

    =

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    9/41

    [ ]

    .1 2

    1 0.1

    .1

    0 0.1

    .1

    .1

    2

    5 cos2

    5 cos cos

    15 cos 5 (1 ) cos 5 (1 )

    22 cos ( / 2)

    11

    n

    Aa A t dt

    a A t n t dt

    A n t

    A nn

    n

    = =

    =

    = + +

    =

    n t dt

    0 because the function is even.nb =

    P15.3-9

    0 0 because the average value is zero

    0 because the function is odd

    10 for even due to wave symmetry

    4

    n

    n

    a

    a

    b

    =

    =

    =

    Next:

    ( )2 24

    0 2 24

    2 2

    88 sin 4 cos 1,5,9, ...

    2 2 sin

    83,7,11, ...

    T

    n T

    n nn for n

    nb t n t dt

    nfor n

    n

    = = = = =

    5

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    10/41

    Section 15.5: Exponential Form of the Fourier Series

    P15.5-1

    21

    1

    oT 2

    = = = , the coefficients of the complex Fourier series are given by:

    ( )

    ( ) ( )( )( )

    ( )

    ( )

    ( )

    1 12 2

    0 0

    1 2 1 2 1

    0

    12 1 2 1

    2

    0

    1sin

    1 2

    2

    2

    2 2 1 2 1 (4 1)

    j t j t j n t j n t

    n

    j n t j n t

    j n t j n t

    e e A t e dt A e dt

    j

    Ae e dt

    j

    A e e A

    j j n j n n

    +

    +

    = =

    =

    = =

    +

    C

    where we have used and2 1j ne = j je e = .

    P15.5-22 2

    20 0

    1 j nt j nt T TT T

    n

    A At e dt t e dt

    T T T

    = =

    C

    Recall the formula for integrating by parts:2 22

    11 1

    t tt

    tt tu dv u v v du= . Take u andt=

    2 j nt

    Tdv e dt

    = . When , we get0n

    2 22 2

    2 20

    00

    2 2

    2

    1

    2 2 2 2

    1

    2 22

    TT

    j nt j nt j nT T j nt T

    Tn

    j n j n

    A t e A T e ee dt

    T j nT j n j n nT T T

    A T e e Aj

    T j nn

    T

    n

    = + = +

    = + =

    C

    Now for n = 0 we have

    0 0

    1

    2

    T A AC t dt

    T T= =

    Finally,

    465

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    11/41

    ( )2

    0

    1

    2 2

    n j n t T

    nn

    A A f t j e

    n

    =

    =

    = +

    P15.5-3/ 2

    22

    / 2

    / 2

    / 2

    2 2

    2

    sin

    sin

    d j n t j n d j n d

    T T j n t dT

    nd

    d

    2

    T

    j n d j n d T T

    A A e A e ee dt

    T T T j n j n j n

    T T

    A e e

    n j

    A n d n T

    n d

    Ad T

    n dT

    T

    T

    = = =

    =

    =

    =

    C

    P15.5-4

    ( )( )

    0

    0

    1o

    t T j n t

    n dta f t t b e dt

    T

    + = +

    C

    Let dt t = , then dt t= + .

    ( )( ) ( )

    ( )( )

    ( )( )

    ( ) ( ) ( )

    0

    0

    0

    0

    0

    0

    0 0

    0 0

    1

    1

    1 1

    do d

    d

    do o d

    d

    o dd

    o

    d

    d do d o o d o

    d d

    t T t j n t n

    t t

    t T t j n j n t

    t t

    j n t t T t j n

    t t

    t T t t T t j n t j n j n t j n

    t t t t

    a f b e d T

    a f b e e d T

    ea f b e d

    T

    a e f e d e b e d T T

    + +

    +

    +

    + +

    = +

    = +

    = +

    = +

    C

    But

    0

    0

    0

    0

    0 0

    0

    do

    do

    d

    d

    t T tj n

    t T t j n

    t to t t

    neb e d b

    bj n

    + +

    = =

    = so

    466

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    12/41

    0 0C a C b= +

    and

    0o d j n t n na e n= C C

    P15.5-5

    ( )0 0 2 2 2 1 12 18 s, rad/s, average value4 8

    T CT

    = = = = =

    4=

    The coefficients of the exponential Fourier series are calculated as

    1 1 24 4 4

    n2 1 1

    1 1 2

    4 4 4

    2 1 1

    4 2 4 4 2 4

    12

    8

    12

    8

    4 4 4

    22

    32

    n n n j t j t j t

    n n n j t j t j t

    n n n n n n j j j j j j

    j

    e dt e dt e dt

    e e e

    n n n

    j j j

    je e e e e e

    n

    je

    n

    = + +

    = + +

    = +

    =

    C

    4 4 2 2

    13 2 sin 2 sin 3sin sin

    2 4 2 4

    n n n n j j j

    e e e

    j n n nj j

    n n

    2

    n

    = =

    and

    ( )

    1 1 24 4

    n2 1 1

    1 1 2

    4 4 4

    2 1 1

    4 2 4 4 2 4

    11 2 1

    8

    11 2 1

    8

    4 4 4

    2

    2

    1

    n n j t j t j t

    n n n j t j t j t

    n n n n n n j j j j j j

    e dt e dt e d

    e e e

    n n n j j j

    je e e e e e

    n

    = + +

    = + +

    = +

    =

    C 4n

    t

    nsin 3sin

    2 4

    n n

    n

    = C

    The function is represented as

    467

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    13/41

    ( ) 4 40 n n1 1

    4 4

    1 1

    4

    1

    1 1 13sin sin sin 3sin

    4 4 2 2 4

    1 23sin sin

    4 4 2

    j n t j n t

    n n

    j n t j n t

    n n

    j n t

    n

    f t C e e

    n n n ne e

    n n

    n ne

    n

    = =

    = =

    =

    = + +

    = + +

    = +

    C C

    This result can be checked using MATLAB:

    pi = 3.14159;

    N=100;

    T = 8; % period

    t = linspace(0,2*T,200); % time

    c0 = 1/4; % average value

    w0 = 2*pi/T; % fundamental frequency

    for n = 1: N

    C(n) = -j*((exp(+j*n*pi/4)-exp(+j*n*pi/2))-2*(exp(-j*n*pi/4)-

    exp(+j*n*pi/4))+(exp(-j*n*pi/2)-exp(-j*n*pi/4)))/(2*pi*n);

    end

    for i=1:length(t)

    f(i)=c0;

    for n=1:length(C)

    f(i)=f(i)+C(n)*exp(j*n*w0*t(i))+C(n)*exp(-j*n*w0*t(i));

    end

    end

    plot(t,f,'black');

    xlabel('t, sec');

    ylabel('f(t)');

    468

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    14/41

    469

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    15/41

    Alternately, this result can be checked using Mathcad:

    N 15:= n 1 2, N..:= m 1 2, N..:=

    T 8:= 2

    T:=

    d T200

    := i 1 2, 400..:= ti d i:=

    Cn

    2

    1

    t1 exp j n t( )

    d

    1

    1

    t2 exp j n t( )

    d+1

    2

    t1 exp j n t( )

    d+

    T:=

    Cm

    2

    1

    t1 exp j m t( )

    d

    1

    1

    t2 exp j m t( )

    d+1

    2

    t1 exp j m t( )

    d+

    T:=

    f i( )

    1

    N

    n

    Cn

    exp j n ti

    ( )= 1

    N

    m

    Cm

    exp 1 j m ti

    ( )=

    +:=

    f i( )

    .643

    .685

    .745

    .807

    .856

    1.88

    .872

    .831

    .767

    .693

    .628

    .589

    .589

    .633

    .717

    .825

    =C

    n

    0.357

    0.477

    0.331

    0

    0.199

    0.159

    0.051

    0

    0.04

    0.095

    0.09

    0

    0.076

    0.068

    0.024

    = Cm

    0.357

    0.477

    0.331

    0

    0.199

    0.159

    0.051

    0

    0.04

    0.095

    0.09

    0

    0.076

    0.068

    0.024

    =

    100 200 300 4002

    0

    2

    f i( )

    i

    470

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    16/41

    P15.5-6

    The function shown at right is related to the

    given function by

    ( ) ( )1 1 6v t v t = +

    (Multiply by 1 to flip v1 upside-down; subtract

    6 to fix the average value; replace tby t+1 toshift to the left by 1 s.)

    From Table 15.5-1

    ( )( ) ( )

    0 21

    1 6 1n n

    j n t j n t

    n n

    j A jv t e e

    n n

    = =

    = =

    Therefore

    ( )

    ( ) ( ) ( )12 2

    6 1 6 1

    6 6

    n n j n t j n j n t

    n n

    j j

    v t e e en n2

    +

    = =

    = =

    The coefficients of this series are:

    ( )2

    0 n

    6 16 and

    nj nj

    C en

    = = C

    This result can be checked using Matlab:

    pi = 3.14159;

    N=100;

    A = 6; % amplitude

    T = 4; % periodt = linspace(0,2*T,200); % time

    c0 = -6; % average value

    w0 = 2*pi/T; % fundamental frequency

    for n = 1: N

    C(n) = (-j*A*(-1)^n/n/pi)*exp(+j*n*pi/2);

    D(n) = (+j*A*(-1)^n/n/pi)*exp(-j*n*pi/2);

    end

    for i=1:length(t)

    f(i)=c0;

    for n=1:length(C)

    f(i)=f(i)+C(n)*exp(j*n*w0*t(i))+D(n)*exp(-j*n*w0*t(i));

    end

    end

    plot(t,f,'black');

    xlabel('t, sec');

    ylabel('f(t)');

    title('p15.5-6')

    471

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    17/41

    472

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    18/41

    P15.5-7

    Represent the function as

    ( )( )

    5

    5 1 5

    1 0

    1 2

    t

    t

    e tf t

    e e t

    1 =

    (Check: ( ) ( ) ( )5 50 0, 1 1 1, 2 f f e f e e = = = 5 0 = )

    0 0

    2 12 s, , also average value

    2 2T C

    = = = = =

    The coefficients of the exponential Fourier series are calculated as

    ( ) ( )( )

    ( )

    ( )

    ( )( )( )

    ( )

    ( )

    1 2 5 15 5

    n0 1

    1 1 2 255 5 5

    0 0 1 1

    1 21 25 5

    5 5

    0 10 1

    11

    2

    1

    2

    1

    2 5 5

    tt j n t j n t

    j n t j n t t j n t j n t

    j n t j n t j n t j n t

    e e dt e e e dt

    e dt e e dt e e dt e e dt

    e e e ee e

    j n j n j n j n

    +

    + +

    = +

    = +

    = + + +

    C

    ( )

    ( ) ( )

    ( )

    ( ) ( )

    5 2 55 25 5

    5 5 2 25

    1 1 1

    2 5 5

    1 1 1

    2 5 5

    j n j n j n j n j n j n

    j n j n j n j n j n j n

    e e e e e e ee e

    j n j n j n j n

    e e e e e e e ee

    j n j n j n j n

    + +

    = + + +

    = + + +

    ( ) ( )( )

    ( )( )

    ( )5 5 51 1 1 1 1 1 112 5 5

    n n n n

    e e e j n j n j n j n

    = + + +

    The terms that include the factor are small and can be ignored.5 0.00674e =

    ( )( )

    ( )( )

    ( ) ( )

    n

    1 1 11 1

    2 5 5

    1 1odd

    50 even

    5odd

    5

    0 even

    n n

    j n j n j n

    n

    j n j nn

    n j n j n

    n

    = + + +

    +=

    +=

    C

    473

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    19/41

    This result can be checked using Matlab:

    pi = 3.14159;

    N=101;

    T = 2; % period

    t = linspace(0,2*T,200); % time

    c0 = 0.5; % average valuew0 = 2*pi/T; % fundamental frequency

    for n = 1:2:N

    if n == 2*(n/2)

    C(n) = 5/((+j*pi*n)*(5+j*pi*n));

    D(n) = 5/((-j*pi*n)*(5-j*pi*n));

    else

    C(n)=0;

    D(n)=0

    end

    end

    for i=1:length(t)

    f(i)=c0;

    for n=1:length(C)

    f(i)=f(i)+C(n)*exp(j*n*w0*t(i))+D(n)*exp(-j*n*w0*t(i));

    end

    end

    plot(t,f,'black');

    xlabel('t, sec');

    ylabel('f(t)');

    title('p15.5-7')

    474

  • 8/9/2019 Chapter 15 - Fourier Series and Fourier Transform

    20/41

    Section 15-6: The Fourier Spectrum

    P15.6-1

    ( )

    40 2

    42

    2

    A Tt tT

    f tA T

    A t t T

    T

    =

    +