Normalized Frequency \u03c0 radsample Magnitude dB Single Stage Decimator Filter

Normalized frequency π radsample magnitude db single

This preview shows page 23 - 26 out of 32 pages.

Normalized Frequency ( ×π rad/sample) Magnitude (dB) Single-Stage Decimator Filter Response Figure 26: Single-Stage Decimator Filter Response. 4-(a)(b) Use the method discussed in class to implement a 2-stage decimator. SetM1 = 10andM2 = 10 for the corresponding stages. Calculate the number of multiplica-tions per second needed to implement this filter. Comment on the efficiency ofthis method versus the single stage implementation.
Image of page 23
ECE 513 - Homework 9 Solution 24 [N_H1,Fo1,Ao1,w1] = firpmord([Fp_1 Fstop_1], [1 0], [delta_p1 delta_s1], F0); h1 = firpm(N_H1,Fo1,Ao1,w1); % design stage 2 filter [N_H2,Fo2,Ao2,w2] = firpmord([Fp_2 Fstop_2], [1 0], [delta_p2 delta_s2], F1); h2 = firpm(N_H2,Fo2,Ao2,w2); numSamp1 = F1; % number of samples processed at first stage per second numSamp2 = F1/M2; % number of samples processed at second stage per second numMult1 = (N_H1+1)*numSamp1; % number of mult per second at first stage numMult2 = (N_H2+1)*numSamp2; % number of mult per second at second stage fprintf(1, ’\n---------------------2 Stage Implementation---------------\n’) fprintf(1, ’Number of filter coefficients for first stage: %d\n’, N_H1); fprintf(1, ’Number of filter coefficients for second stage: %d\n’, N_H2); fprintf(1, ’Number of samples per second processed at output ... of first stage decimation of %d: %d\n’, M1, numSamp1); fprintf(1, ’Number of multiplications per second at first stage: %d\n’, numMult1); fprintf(1, ’Number of samples per second processed at output ... of second stage decimation of %d: %d\n’, M2, numSamp2); fprintf(1, ’Number of multiplications per second at second stage: %d\n’, numMult2); fprintf(1, ’Total number of multiplications per second: %d\n’, numMult1+numMult2); fprintf(1, ’---------------------------------------------------------------\n’) % check the overall response of the filters figure(2) h2_up = upsample(h2, M1); h_casc = conv(h1, h2_up); freqz(h_casc, 1) title(’Two-Stage Decimator Filter Response’) ---------------------2 Stage Implementation--------------- Number of filter coefficients for first stage: 22 Number of filter coefficients for second stage: 404 Number of samples per second processed at output of first stage decimation of 10: 1000 Number of multiplications per second at first stage: 23000 Number of samples per second processed at output of second stage decimation of 10: 100 Number of multiplications per second at second stage: 40500 Total number of multiplications per second: 63500 --------------------------------------------------------------- Figure 27 show Two-Stage Decimator Filter Response.
Image of page 24
ECE 513 - Homework 9 Solution 25 0 0.2 0.4 0.6 0.8 1 -4 -3 -2 -1 0 x 10 4 Normalized Frequency ( ×π rad/sample) Phase (degrees) 0 0.2 0.4 0.6 0.8 1 -200 -150 -100 -50 0 Normalized Frequency ( ×π rad/sample) Magnitude (dB) Two-Stage Decimator Filter Response Figure 27: Two-Stage Decimator Filter Response. 4-(b)
Image of page 25
Image of page 26

You've reached the end of your free preview.

Want to read all 32 pages?

  • Fall '11
  • Cw

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture