+ All Categories
Home > Documents > Sig Pro Cass

Sig Pro Cass

Date post: 04-Apr-2018
Category:
Upload: sshebi
View: 219 times
Download: 0 times
Share this document with a friend

of 39

Transcript
  • 7/30/2019 Sig Pro Cass

    1/39

    Signal Processing

    AssignmentDonald

    CarrMay 18, 2005

    Question

    1Common

    factsMy -3 dB frequency was : 2 kHz

    = 2 p 2000c

    The circuits were taken from the Electronic Filter Design Handbook (Williams,

    1981). Standard values were acquired for the respective configurations and de-

    normalised accordingly using the FSF and Z adjustment.

    CLCR = 600

    s

    C = 0.132 F1

    L = 95.5

    mL2

    C = 0.132 F3

    R = 600o

    R Ls 2

    CC 21

    Ro

    Figure 1: The p CLC circuit

    1

  • 7/30/2019 Sig Pro Cass

    2/39

    T

    LCLR = 600

    s

    L = 0.048mL

    1

    Standard values were acquired C = 0.265 F2

    L = 0.048mL

    3

    R = 600o

    L L1 3

    Rs

    C R2 o

    Figure 2: The T LCL circuit

    2

  • 7/30/2019 Sig Pro Cass

    3/39

  • 7/30/2019 Sig Pro Cass

    4/39

    - 10 = I + ( R + sL + 1 )I

    1 o 3 2sC sC2 2

    R + sL + I U1 - 1

    =s 1 1sC

    sCR + sL + I 0- 1 1

    o 3 2sC

    sC

    - 1I R + sL + U1 - 1

    1 s 1= sC

    sCI R + sL + 0- 1 1

    2 o 3sC

    sC

    UI =

    2sC R R + s CL R + s CL R + s CL L + sL + sL + R + R2 2 3

    2 s o 3 s 1 o 1 3 1 3 s o

    But : y = i R2 o

    Y = I R2 o

    URoY =

    sC R R + s CL R + s CL R + s CL L + sL + sL + R + R2 2 32 s o 3 s 1 o 1 3 1 3 s o

    Since : y = h * u

    Y = HU

    YH =U

    RoH =

    sC R R + s CL R + s CL R + s CL L + sL + sL + R + R2 2 32 s o 3 s 1 o 1 3 1 3 s o

    Since L = L = L, R = R = R, C1 3 s o

    R

    H = CL

    2

    s + s + ( + )s +2R 2 R 2R3 2 2L L

    CL L C2 2

    After substituting in component values and reducing in terms ofc

    3

    c

    H(s) = 2s + 2 s + 2 s +3 2 2 3

    c c c

    4

  • 7/30/2019 Sig Pro Cass

    5/39

    state variable

    technique

    di1 = a i + a v + a i + b u

    1 1 1 1 2 2 1 3 3 1 1dt

    dv 2= a i + a v + a i + b u

    2 1 1 2 2 2 2 3 3 2 1dt

    di3 = a i + a v + a i + b u

    3 1 1 3 2 2 3 3 3 3 1dt

    y = c i + c v + c i + d u1 1 1 1 2 2 1 3 3 1 1

    dx= [ A ]x + [ B ]u

    dt

    sX = [ A ]X + [B ]U

    ( s [I] - [A ])X = [ B ]U

    X = ( s [I] - [A ]) [B ]U- 1

    and y = [ C]x + [ D ]u

    Y = [ C]X + [ D ]UC]adj (s [I ] - [A ]) [B ]UT

    Y = [ D ]Udet(s [I] - [A ]) + [

    Y C]adj (s [I ] - [A ]) [B ]TBut H = H = [ D ]

    U det (s [I ] - [A ]) + [

    Where :

    s + 0R 1 1LL L 1

    (s[I]- [A ]) = s , [C] = 0 0 R , [B ] = , [D ] = 0- 1 1 0oC C

    0 s +- 1 R 0L L

    R R R R R + Ro s o s o s3 2det(s [I] - [A ]) = s + ( + )s + ( 1 + 1 + )s +

    L L L C L C L L L L C3 1 3 2 1 2 3 1 1 3 2

    Roand [ C]adj (s [I] - [A ]) [B ] =TCL L

    1 3

    Ro

    CL

    LH(s ) = 1 3s + ( + )s + ( + + )s +R R 1 1 R R R + R3 2o s o s o s

    L L L C L C L L L L C3 1 3 2 1 2 3 1 1 3 2

    After substituting in component values and reducing in terms ofc

    3

    c

    H(s ) = 2s + 2 s + 2 s +3 2 2 3

    c c c

    It was very reassuring that both the matrix loop equation and state variable

    technique produced the same transfer function for their common circuit.

    5

  • 7/30/2019 Sig Pro Cass

    6/39

    R Ls 2

    1 2

    CC 21 Ro

    Figure 4: The p CLC circuit

    Question

    3Matrix node

    equationNode 1

    i = 0 = i + i + iRs L 2 C 1

    v dv tRs0 = + C + 1 vdt + i (0)1R dt L

    s 2 0

    u - v d (0 - v ) t1 10 = + C + 1 ( v - v ) dt + i(0)

    1 2 1R dt Ls 2 0

    -du d v d ( v )2110 = - C + 1 (v - v )dt dt

    1 2 1R dt Ls 2

    s( U - V )1= > 0 = - s C V + 1 ( V - V ) (Laplace)2

    1 1 2 1R L

    s 2

    U - V10 = - sC V + 1 (V - V )

    1 1 2 1R sL

    s 2

    Rs s

    U = (1 + sC R + ) V - R V 1 s 1 2sL sL

    2 2

    Node 2

    i = 0 = i + i + iL 2 C 2 Ro

    tv dvRo0 = + C + 1 vdt + i(0)

    2R dt Lo 2 0

    v d( v ) 1 t2 20 = + C (v - v ) dt - i (0)

    2 1 2R dt - L

    o 2 0

    d ( v ) 1dv 2220 = + C ( v - v )dt

    2 1 2R dt - Lo 2

    sV 12= > 0 = + s C V - (V - V ) (Laplace)2

    2 2 1 2R Lo 2

    V 120 = + sC V - (V - V )

    2 2 1 2R sL

    o 2

    6

  • 7/30/2019 Sig Pro Cass

    7/39

    - 10 = V + ( 1 + sC + 1 )V

    1 3 2sL sL R2 2 o

    (1 + sC R + )R -R V Us s1 s 1 =sL

    sL

    2 2

    V 0( + sC + )- 1 1 13 2s

    LsL

    R2 2 o

    - 1sC R + )R -RV Us s

    1 1 s= (1 + sL

    sL

    2 2

    V ( + sC + ) 0- 1 1 12 3s

    LsL

    R2 2 o

    But : y = v2

    Y = V2

    UY = 1

    det sL2

    where : sL det =2

    c R C L (s + ( + )s + ( + + )s + +3 1 1 2 1 1 1 11 s 3 2 C R C R C R C R C L C L R C C L

    1 s 3 o 1 s 3 o 3 2 1 2 o 1 3 2

    )1R C C L

    s 1 3 2

    But : Y = H U

    1

    c R C LH = 1 s 3 2(s + ( + )s + ( + + )s + + )1 1 1 1 1 1 13 2

    C R C R C R C R C L C L R C C L R C C L1 s 3 o 1 s 3 o 3 2 1 2 o 1 3 2 s 1 3 2

    After substituting in component values and reducing in terms ofc

    3

    c

    H(s ) = 2s + 2 s + 2 s +3 2 2 3

    c c c

    7

  • 7/30/2019 Sig Pro Cass

    8/39

    state variable

    technique

    di1 = a i + a v + a i + b u

    1 1 1 1 2 2 1 3 3 1 1dt

    dv 2= a i + a v + a i + b u

    2 1 1 2 2 2 2 3 3 2 1dt

    di3 = a i + a v + a i + b u

    3 1 1 3 2 2 3 3 3 3 1dt

    y = c i + c v + c i + d u1 1 1 1 2 2 1 3 3 1 1

    Identical algebra to that covered in Question 2 : state variable

    C]adj (s [I ] - [A ]) [B ]TH = [ D ]

    det(s [I ] - [A ]) + [

    s + 01 1 1R C C R C

    s 1 1 s 1

    (s[I]- [A ]) = s , [C] = 0 0

    1

    , [B ] = , [D ] = 0- 1 1 0L L

    2 20 s + 0- 1 1C Ro

    C3 3

    det(s [I] - [A ]) =

    s +( + )s + ( + + )s + + +3 1 1 2 1 1 1 1 1 1R C R C C L C L R R C C R R R R C L R R C L

    o 1 s 3 1 2 3 2 o s 1 3 o s s o 1 2 s o 3 2

    and [ C]adj (s[I] - [A ]) [B ] = 1TR C L C

    s 1 2 3

    H (s ) =

    1

    Rs C L C1 2 3

    s +( + )s +( + + )s + + +3 1 1 2 1 1 1 1 1 1Ro C Rs C C L C L Ro Rs C C Ro Rs Rs Ro C L Rs Ro C L1 3 1 2 3 2 1 3 1 2 3 2

    After substituting in component values and reducing in terms of c3

    c

    H(s) = 2s + 2 s + 2 s +3 2 2 3

    c c c

    Again the separate derivations converged on the same transfer function, and

    corroborated the earlier transfer function garnered from the T configuration

    topology. This consistency verified the inherent characteristics of the filter which

    are independent of the topology we choose to adopt.

    8

  • 7/30/2019 Sig Pro Cass

    9/39

    Question

    4Characteristic polynomial : s + s 2 + s2 +3 2 2 3

    c c c3

    d3 y d2 y d ySystem di erential equation : + 2 + 2 + y = U2 3 cc c cdt dt dt 2

    Question

    5There are no zeros since there are no s terms in the numerator. We need to dis-

    cover the poles of the transfer function, so we simply factorise the denominator.

    1

    s + s 2 + s 2 +3 2 2 3c c c

    1

    (s + )(s + s + )2 2c c c

    1v v

    (s + )(s + + j )(s + -j

    )3 3c cc c c2 2 2 2

    eigenfrequencies : s = -c

    orv

    3c

    s = - jc2 + 2

    orv

    3cs = - -

    jc2 2

    j

    c

    s

    Figure 5: Pole Zero diagram

    Since the poles are all on the left hand side of the imaginary axis, we know

    from our notes that the filter is stable.

    9

  • 7/30/2019 Sig Pro Cass

    10/39

    Question

    6

    3

    c

    H(s) = 2

    s + 2 s + 2 s +3 2 2 3

    c c c

    3

    c

    H(s) = 2v v(s + )(s + + j )(s + -

    j

    )3 3c cc c c2 2 2 2

    3

    c

    H(j ) = 2v v(j + )(j + - j )(j + + j )3 3c c

    c c c2 2 2 2

    Magnitude is given by :

    3

    | |c|H (j ) | = 2v v

    |(j + ) || (j + - j ) || (j + + j ) |3 3c cc c c2 2 2 2

    Phase is given by :v v

    3 3c cH(j ) = - ( j + ) - ( j + - j ) - ( j + j )

    c c c2 2 2 + 2

    10

  • 7/30/2019 Sig Pro Cass

    11/39

    3rd o rd e r B u tt er wo rt h h ig h p as s f ilt er wc = 2 k h z

    1.2

    1

    0.8

    0.6

    0.4

    0.2

    0

    -2 5000 -2 0000 -1 5000 -10 000 -50 00 0 500 0 1000 0 1500 0 2000 0 2500 0

    Fr eq uen cy [r ad s]

    Figure 6: excel : Normalised gain vs frequency

    25 0

    20 0

    15 0

    10 0

    5 0

    0

    -2 500 0- 200 00-1 5000 - 10 0 00 -5 000 0 50 0 010 000 150 00 2 0 00 0 25 0 00

    -5 0

    - 10 0

    - 15 0

    - 20 0

    - 25 0

    fre que nc y [r a ds]

    Figure 7: excel : phase vs frequency

    11

  • 7/30/2019 Sig Pro Cass

    12/39

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0

    - 2 - 1.5 - 1 -0 .5 0 0.5 1 1.5 2

    freq uenc y [r ads ] x 10 4

    Figure 8: matlab : gain vs frequency

    200

    150

    100

    50

    0

    - 50

    - 100

    - 150

    - 200-2 -1. 5 - 1 -0.5 0 0.5 1 1. 5 2

    fr equenc y [r ads ]x 10 4

    Figure 9: matlab : phase vs frequency

    12

  • 7/30/2019 Sig Pro Cass

    13/39

  • 7/30/2019 Sig Pro Cass

    14/39

    Question 8 wc 12566.37061

    h = 100wc/2 = 6283.185307

    root(3)/2*jwc = 10882.7961854053i

    p1 p2 p3

    wc -wc/2 - j(root(3)/2*wc) -wc/2 + j(root(3)/2*wc)

    -12566.37061 -6283.18530717959-10882.7961854053i -6283.18530717959+10882.7961854053i

    alpha 9.92201E+11

    residues

    k1 6283.18530717961

    k2 -3141.5926535898+1813.79936423422i

    k3 -3141.5926535898-1813.79936423422i

    Figure 10: Excel calculated residues

    4/23/05 2:10 PM MATLAB Command Window 1 of 1

    alpha =

    9.9220e+011

    K1 =

    6.2832e+003

    K2 =

    -3.1416e+003 +1.8138e+003i

    K3 =

    -3.1416e+003 -1.8138e+003i

    Figure 11: Matlab calculated residues

    14

  • 7/30/2019 Sig Pro Cass

    15/39

    Question

    9The Laplace transform of

    K e + K e + K e = h ( t)a p t p t p t 1 2 3v v 1 2 3(s + )( s + c + j )( s + c -j )3 3

    c c c2 2 2 2

    Where :

    K =

    6283.185307179611

    K =

    -3141.5926535898+1813.79936423422i2

    K = -3141.5926535898-1813.79936423422i

    3

    p =-12566.37061

    1

    p = -6283.18530717959-10882.7961854053i

    2

    p =-6283.18530717959+10882.7961854053i

    3

    h (t) = K e + K e + K ep t p t p t1 2 31 2 3

    h (t) = K e + |K|e ( e e + e e )1 2 5 6 6 .3 7 0 6 1t - 62 8 3 . 1 8 5 3 0 7 1 7 959

    t i K -i 1 0 8 8 2.7 9 6 1 8 5 4 0 53

    t i K i 1 0 8 8 2 .7 9 6 1 8 5 4 0 53

    t2 3

    1

    Since K = K (Conjugate pair)2 3

    h (t) = K e + |K|e ( e + e )1 2 5 6 6 .3 7 0 6 1t - 62 8 3 . 1 8 5 3 0 7 1 7 959

    t - i ( K +1 0 8 8 2 .7 9 6 1 8 5 4 0 53

    t) i( K +1 0 8 8 2 .7 9 6 1 8 5 4 0 53

    t)3 3

    1

    h (t) = K e + 2 |K|e cos ( K +10882

    .7961854053

    t)1 2 5 6 6 .3 7 0 6 1t - 62 8 3 . 1 8 5 3 0 7 1 7 959

    t

    1 3

    15

  • 7/30/2019 Sig Pro Cass

    16/39

    3 0 0 0

    2 5 0 0

    2 0 0 0

    1 5 0 0

    1 0 0 0

    50 0

    0

    0 0. 000 2 0. 0004 0. 00 0 60. 00 080 . 00 10.00 120 . 001 40 .0 0 160 . 001 80 .0 0 2

    - 50 0

    ti m e (s )

    Figure 12: Excel impulse response

    3000

    2500

    2000

    1500

    1000

    500

    0

    -5000 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

    ti me [s ec onds ]x 10 - 3

    Figure 13: MatLab impulse response

    16

  • 7/30/2019 Sig Pro Cass

    17/39

    Question

    10Using the the bilinear transform within Matlab :

    1 + T PP = i2i 1 - PT

    i2

    f [hz] P P Ps ample

    1 2 3

    48000 0.7685 0.8561 - 0.1975i 0.8561 +0.1975i8000 0.1202 0.1595 - 0.5663i 0.1595 +

    0.5663i

    Table 1: Matlab generated poles for the digital filters

    This bilinear transformation shifts the frequency response of the resulting

    filters. The higher the sampling frequency, the milder the resulting shift in

    frequency response. The filter with f = 48kHz therefore basically retainss ampleits initial frequency characteristics, while the filter with f = 8kHz has its

    s amplef dropped to 1700Hz.

    c

    Question11

    (1 + z ) (1 -Z

    z )- 1 N -M M - 1iH(z) = i =1

    N (1 - P z )- 1ii =1

    Where there are M = 0 zeros and N = 3 poles

    (1 + z )- 1 3H(z) =

    3 (1 - P z )- 1ii=1

    Where the values of the poles are given in table 1 (above) and

    MT (1 - Z )Ti

    = K ( N -M i =1 22 ) N (1 - P )T

    ii= 1 2

    T 13= c 3

    2 ( 2 ) 3 (1 - P )Tii =1 2

    f requency

    80000.056548000

    0.000864

    Table 2: values

    17

  • 7/30/2019 Sig Pro Cass

    18/39

    for f =48000Hz

    sample

    (1 + z )- 1 3H(z) =

    4 8 0 0 0 (1 - 0 .7685 z )(1 - (0 .8561 - 0 .1975 i )z )(1 - (0 .8561 +

    0

    .1975 i)z )- 1 - 1 - 1

    for f =8000Hz

    sample

    (1 + z )- 1 3H(z) =

    8 0 0 0 (1 - 0 .1202 z )(1 - (0 .1595 - 0 .5663 i )z )(1 - (0 .1595 +0

    .5663 i)z )- 1 - 1 - 1

    Question

    12There are three zeros at -1, divulged from the numerator term. The denominator

    reveals three poles, demarcated by Xes on the graph

    I m (z)

    -11

    R e (z)

    Figure 14: 48000 Hz filter Pole Zero diagram

    I m (z)

    -11

    R e (z)

    Figure 15: 8000 Hz filter Pole Zero diagram

    18

  • 7/30/2019 Sig Pro Cass

    19/39

    Question

    13

    Similarly to question 6

    Magnitude :

    (1 + z ) |- 1 3|H (z) | = |

    |(1 - P z ) || (1 - P z ) || (1 - P z ) |- 1 - 1 - 11 2 3

    Where is taken from table 2 and P values are taken from table 1

    Phase :

    H(z) = S ( zeros ) - S ( poles )

    H(z) = 3 (1 + z ) - (1 - P z ) - (1 - P z ) - (1 - P z )- 1 - 1 - 1 - 11 2 3

    Both Matlab and excel were used in order to establish corroborative evidence

    for the frequency response of the filter. I felt this was necessary since the shifting

    inherent in the bilinear transform was not immediate obvious, and I was initially

    concerned with my results.

    19

  • 7/30/2019 Sig Pro Cass

    20/39

    1. 2

    1

    0. 8

    0. 6

    0. 4

    0. 2

    0

    -4 -3 -2 -10 1 23 4

    the ta [r a ds]

    Figure 16: Excel: 8000 Hz digital filter normalised gain

    30 0

    20 0

    10 0

    0

    -4 -3 -2 -10 1 23 4

    - 10 0

    - 20 0

    - 30 0

    the ta [r a ds]

    Figure 17: Excel: 8000 Hz digital filter phase response

    20

  • 7/30/2019 Sig Pro Cass

    21/39

  • 7/30/2019 Sig Pro Cass

    22/39

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0-4 - 3 -2 -1 0 1 2 3 4

    theta

    Figure 20: Matlab : 8000 Hz digital filter normalised gain

    300

    200

    100

    0

    -100

    -200

    -300-4 -3 - 2 - 1 0 1 2 3 4

    theta

    Figure 21: Matlab : 8000 Hz digital filter phase response

    22

  • 7/30/2019 Sig Pro Cass

    23/39

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0-4 - 3 -2 -1 0 1 2 3 4

    theta

    Figure 22: Matlab : 48000 Hz digital filter normalised gain

    300

    200

    100

    0

    -100

    -200

    -300-4 -3 - 2 - 1 0 1 2 3 4

    theta

    Figure 23: Matlab : 48000 Hz digital filter phase response

    23

  • 7/30/2019 Sig Pro Cass

    24/39

    Question

    14

    (1 + z )- 1 3H(z) =

    (1 - P z )(1 - P z )(1 - P z )- 1 - 1 - 1

    1 2 3Y (z)

    But : H(z) =X (z)

    Y (z) (1 + z )- 1 3

    X (z) = (1 - P z )(1 - P z )(1 - P z )- 1 - 1 - 11 2 3

    Y (z) (1 - P z )(1 - P z )(1 - P z ) = X (z) (1 + z )- 1 - 1 - 1 - 1 31 2 3

    Y (z) (1 - P z - P z - P z + P P z + P P z + P P z - P P P z ) =- 1 - 1 - 1 - 2 - 2 - 2 - 31 2 3 1 2 2 3 1 3 1 2 3

    X (z) (1 + 3 z + 3 z + z )- 1 - 2 - 3

    Using the inverse Z transform properties given on pg. 25 of the digital section

    y - P y - P y - P y + P P y + P P y + P P y - P P P y ) =n 1 n- 1 2 n - 1 3 n - 1 1 2 n - 2 2 3 n - 2 1 3 n - 2 1 2 3 n - 3

    (x + 3 x + 3 x + x )n n - 1 n - 2 n - 3

    y = ( P + P + P )y - (P P + P P + P P )y + P P P y + (x + 3 x + 3 x + x )n 1 2 3 n - 1 1 2 2 3 1 3 n - 2 1 2 3 n - 3 n n - 1 n - 2 n - 3

    y = ay - y + y + (x + 3 x + 3 x + x )n n - 1 n - 2 n - 3 n n - 1 n - 2 n - 3

    This recurrence relation is common to both filters, with the coe cients of

    the terms assuming di erent values depending on the sampling frequency.

    1 1 1

    x 1 ynnz z- 1 - 1

    3 a

    1z z- 1 - 1

    -

    3

    1z z- 1 - 1

    1

    Figure 24: Signal ow diagram for both filters

    The following coe cients were calculated in Matlab :

    24

  • 7/30/2019 Sig Pro Cass

    25/39

    f [Hz ] a s ample 8000 0.4392 0.3845

    0.041648000 2.4808 2.08780.5933

    Table 3: Matlab generated values for a , and

    Question

    15The unit sample responses of both digital filters corresponded strongly to the

    original impulse response calculated for the analogue filter, with the impulse

    response being clearly recognisable. The lower the initial sampling frequency,

    the faster the emergence of the recognisable response was when observing the

    discrete impulse response.

    25

  • 7/30/2019 Sig Pro Cass

    26/39

    0 .06

    0 .05

    0 .04

    0 .03

    0 .02

    0 .01

    0

    0 10 2 030 405 0 60 70

    -0 .01

    n

    Figure 25: Matlab : 48000 Hz filter impulse response

    0 .25

    0.2

    0 .15

    0.1

    0 .05

    0

    0 10 2 030 405 0 60 70

    -0 .05

    -0.1

    n

    Figure 26: Matlab : 8000 Hz filter impulse response

    26

  • 7/30/2019 Sig Pro Cass

    27/39

    Question

    16In designing an ideal low pass filter, we want a top-hat function in the frequency

    domain, ranging from - toc c

    1

    -c c

    Figure 27: Ideal low pass filter frequency response

    This transforms, via the inverse Fourier transform, into a sinc function in the

    time domain. We sample the signal at 41 di erent points in order to discover

    the magnitude of the signal at that point and the sampled impulse response can

    subsequently be digitally recreated by summing Dirac functions multiplied by

    these magnitudes.

    The function is non-causal, so it must be shifted in the positive direction,

    and incomplete since the sinc function continues on to infinity in reality and

    we have discarded all the unsampled points. This impacts on the accuracy of

    recreation, and there are many di erent windowing metho ds devoted to easing

    this cut-o point.As is clearly seen from graph 29, the di erent windowing functions attenuate

    the function to di ering degrees and in di erent ways, as it approaches its cuto

    frequency.

    Our coe cients ( a )are calculated by multiplying the shifted magnitudes ofi

    the sampled points by an appropriate windowing coe cient.

    27

  • 7/30/2019 Sig Pro Cass

    28/39

    1

    0.8

    0.6

    0.4

    0.2

    0

    -0.2

    -0.40 5 10 15 20 25 30 35 40 45

    n

    Figure 28: Recreated impulse response

    Fi na l c oeffi c i ents

    1

    0

    -10 5 10 1 5 20 2 5 30 35 4 0 45

    r ec ta ngul ar w i ndow

    1

    0

    -10 5 10 1 5 20 2 5 30 35 4 0 45

    H amm i ng w i ndo w

    1

    0

    -10 5 10 1 5 20 2 5 30 35 4 0 45

    Bla c k man wi nd ow

    Figure 29: Di erent windowing methods

    28

  • 7/30/2019 Sig Pro Cass

    29/39

    no Rectangular Hamming Blackman

    1 0 002 -0.0335 -0.0029-0.00013 0 004 0.0374 0.00490.00085 0 006 -0.0424 -0.0091-0.00287 0 008 0.049 0.0162

    0.00719 0 0010 -0.0579 -0.0271

    -0.015411 0 0

    012 0.0707 0.0433

    0.029913 0 0014 -0.0909 -0.0681

    -0.054615 0 0016 0.1273 0.11020.098517 0 0

    018 -0.2122 -0.2016-0.193619 0 0020 0.6366 0.633

    0.630221 1 1122 0.6366 0.6330.630223 0 0

    024 -0.2122 -0.2016-0.193625 0 0026 0.1273 0.1102

    0.098527 0 0028 -0.0909 -0.0681-0.054629 0 0

    030 0.0707 0.0433

    0.029931 0 0

    032 -0.0579 -0.0271-0.015433 0 0034 0.049 0.01620.007135 0 0

    036 -0.0424 -0.0091-0.002837 0 0038 0.0374 0.00490.000839 0 0040 -0.0335 -0.0029-0.000141 0 00

    Table 4: Table of coe cients

    29

  • 7/30/2019 Sig Pro Cass

    30/39

    Question

    17The recreated signal is therefore represented by :

    40h ( n ) = S a d(n - i )ii=0

    The recurrence relation is there given by :

    y ( n ) = h ( n ) * x ( n )

    y ( n ) = S a d(n - i ) * x ( n )40ii=0

    y ( n ) = S a x ( n - i )(unit impulse convolution)40ii=0

    The transfer function can be deduced as :

    y ( n ) = S a x ( n - i )4 0ii =0

    Y (z) = S a X (z)z (Z transform)4 0 -iii =0

    Y (z)a z4 0 -iii =0X (z) = S

    H(z) = S a z4 0 -iii =0

    Question

    18

    r ectan gula r wi ndow

    1.5

    1

    0.5

    0

    -0.5

    -1

    -1.5-1.5 -1 - 0.5 0 0.5 1 1.5

    Re(z )

    Figure 30: Rectangular window, pole zero diagram

    30

  • 7/30/2019 Sig Pro Cass

    31/39

    Hammi ng w indow

    1.5

    1

    0.5

    0

    -0.5

    -1

    -1.5-1.5 -1 - 0.5 0 0.5 1 1.5

    Re(z )

    Figure 31: Hamming window, pole zero diagram

    For some reason unbeknownst to me, the matlab roots function malfunc-

    tioned at 2000 kHz, leaving me with a severely unsatisfactory Blackmans win-

    dow pole zero diagram. At 1995 kHz, the function stabilised, and gave me a

    pole zero diagram that was more readily believable in the context of the other

    plots.

    There are three poles in each pole zero diagram, though they are clustered

    at the origin of each of the respective pole zero diagrams.

    The zeros radiating beyond the unit circle were a point of some concern,

    before it was revealed that the lo cation of the zeros was unrestricted, and that

    the presence of the poles within the unit circle was the only point of concern

    regarding filter stability.

    31

  • 7/30/2019 Sig Pro Cass

    32/39

    B l ac kma n wi ndow

    1.5

    1

    0.5

    0

    -0.5

    -1

    -1.5

    -1.5 -1 - 0.5 0 0.5 1 1.5

    Re(z )

    Figure 32: Blackman window, pole zero diagram

    B l ac kma n wi ndow

    1.5

    1

    0.5

    0

    -0.5

    -1

    -1.5

    -1.5 -1 - 0.5 0 0.5 1 1.5

    Re(z )

    Figure 33: Blackman window, pole zero diagram ( f = 1995)c

    32

  • 7/30/2019 Sig Pro Cass

    33/39

    Question

    19I used Matlab to calculate the frequency response of the three fir digital filters,

    which simplified matters until I tried to calculate the phase of the filters. This

    returned a sharply discontinuous phase response graph, with Matlab automat-

    ically cycling values within a range of [ -p . . . p ]. The unwrap function, which

    was previously used to successfully maintain phase progression information un-

    der the iir filters, could not cope with the steep phase shift inherent to the filter.

    I had to write my own very rudimentary unwrap script (donunroll3), which was

    limited (very) to use with linearly varying phases. (Which the initial plots of

    the discontinuous phase revealed it to be.)

    The gain and phase are plotted around the unit circle in the s plane. This

    unit circle in the s plane is related to the frequency plane by :

    =T

    s ample2pf = f

    s amplefs ample

    f =2p

    Where = [ -p . . . p ]

    f = [ - 4000 . ..

    4000]

    All the FIR filters were discovered to have linear phase response. Gibbs

    phenomenon is normally associated with sudden cuto s in the frequency domain

    resulting in a ripple in the time domain. The sudden cuto s applied by our

    di erent windowing functions, in sampling the impulse response, induce similar

    rippling in the frequency domain. This e ect is incredibly pronounced in the

    rectangular window filter, and results in a strong ripple at the edge of the

    passband. It results in a barely perceivable waver in the passband when using

    the Hamming window and in absent in the passband when using the Blackman

    window.

    33

  • 7/30/2019 Sig Pro Cass

    34/39

    Rec tangu lar wi ndo w, 2k hz LP F ,s ampl e fr equenc y 8k hz

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0-4 - 3 -2 -1 0 1 2 3 4

    th eta [r ads ]

    Figure 34: Rectangular window, digital filter normalised gain

    Rec tangul ar w indow, 2khz LP F,s ampl e fre quency 8k hz

    4000

    3000

    2000

    1000

    0

    -1000

    -2000

    -3000

    -4000

    -4 -3 -2 - 1 0 1 2 3 4

    the ta [rads ]

    Figure 35: Rectangular window, digital filter phase response

    34

  • 7/30/2019 Sig Pro Cass

    35/39

    Ham min g wi ndow , 2k hz LP F ,sa mpl e fre quenc y 8k hz

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0-4 - 3 -2 -1 0 1 2 3 4

    th eta [r ads ]

    Figure 36: Hamming window, digital filter normalised gain

    Ham ming w indow , 2khz LP F,s ampl e fr equency 8k hz

    4000

    3000

    2000

    1000

    0

    -1000

    -2000

    -3000

    -4000

    -4 -3 -2 - 1 0 1 2 3 4

    the ta [rads ]

    Figure 37: Hamming window, digital filter phase response

    35

  • 7/30/2019 Sig Pro Cass

    36/39

    B l ac k mans wi ndo w, 2k hz LP F ,s ampl e fr equenc y 8k hz

    1

    0 .9

    0 .8

    0 .7

    0 .6

    0 .5

    0 .4

    0 .3

    0 .2

    0 .1

    0-4 - 3 -2 -1 0 1 2 3 4

    th eta [r ads ]

    Figure 38: Blackman window, digital filter normalised gain

    B lac k man wi ndow, 2k hz LP F ,sa mple f requenc y 8k hz

    4000

    3000

    2000

    1000

    0

    -1000

    -2000

    -3000

    -4000

    -4 -3 -2 - 1 0 1 2 3 4

    the ta [rads ]

    Figure 39: Blackman window, digital filter phase response

    36

  • 7/30/2019 Sig Pro Cass

    37/39

    It became apparent in the later comparison of implementation vs theory, that

    the graphs o er far more information when the gain was displayed in decibels.

    The graphs below clearly show the ripple at the edge of the passband, moving

    away from the passband as we progress from the rectangular window to the

    Blackman window. Gibbs phenomena can not avoided, but the more advanced

    windowing methods shift the oscillation away from the passband, where they

    have a greatly diminished e ect on the filtering process.

    Rec tangul ar wi ndow, 2k hz LP F, sam ple fr equ enc y 8k hz

    0

    -1 0

    -2 0

    -3 0

    -4 0

    -5 0

    -6 0

    -7 0

    -8 0

    -9 00 0.5 1 1.5 2 2.5 3 3.5

    theta [rads ]

    Figure 40: Rectangular window, digital filter normalised gain in dB

    37

  • 7/30/2019 Sig Pro Cass

    38/39

    Hamm ing w indow , 2kh z LP F,s am ple fr equenc y 8k hz

    0

    - 50

    - 100

    - 150

    0 0.5 1 1.5 2 2.5 3 3.5

    th eta [rads ]

    Figure 41: Hamming window, digital filter normalised gain in dB

    B l ac km an wi ndow, 2k hz LPF ,s ampl e fr equen cy 8k hz

    0

    - 20

    - 40

    - 60

    - 80

    - 100

    - 120

    - 140

    - 160

    0 0.5 1 1.5 2 2.5 3 3.5

    th eta [rads ]

    Figure 42: Blackman window, digital filter normalised gain in dB

    38

  • 7/30/2019 Sig Pro Cass

    39/39


Recommended