0% found this document useful (0 votes)
95 views28 pages

(DSP) Asg 1

The document provides MATLAB code to design a finite impulse response (FIR) filter using the window method. The code defines functions to design lowpass, highpass, bandpass, and bandstop filters based on input parameters including the number of filter taps, cutoff frequencies, and type of window function. It then provides an example output of the filter coefficients and magnitude response for a 21-tap lowpass filter with specific parameter values.

Uploaded by

markedchic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views28 pages

(DSP) Asg 1

The document provides MATLAB code to design a finite impulse response (FIR) filter using the window method. The code defines functions to design lowpass, highpass, bandpass, and bandstop filters based on input parameters including the number of filter taps, cutoff frequencies, and type of window function. It then provides an example output of the filter coefficients and magnitude response for a 21-tap lowpass filter with specific parameter values.

Uploaded by

markedchic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

MALAYSIA-JAPAN INTERNATIONAL INSTITUTE OF

TECHNOLOGY
(DEPARTMENT OF ELECTRONIC SYSTEMS ENGINEERING)

ASSIGNMENT 1

DIGITAL SIGNAL PROCESSING


(SMJE3163)

NAME
MATRIC NO
IC. NO
YEAR / COURSE
STUDENT’S SECTION
LECTURER’S NAME
DATE
QUESTION 1

MATLAB CODE

function B = firwd(N, Ftype, WnL, WnH, Wtype)


N=21;Ftype=1;WnL=0.25*pi;WnH=0;Wtype=4;
% example of initialise the i/p of the design requiremnt (N=3;Ftype=1;WnL=1;WnH=0;Wtype=4;)
% B = firwd(N,Ftype,WnL,WnH,Wtype)
% FIR filter design using the window function method.
% Input parameters:
% N: the number of the FIR filter taps.
% Note: It must be an odd number.
% Ftype: the filter type
%1. Lowpass filter;
%2. Highpass filter;
%3. Bandpass filter;
%4. Band reject filter;
% WnL: lower cutoff frequency in radians. Set WnL=0 for the highpass filter.
% WnH: upper cutoff frequency in radians. Set WnH=0 for the lowpass filter.
% Wtypw: window function type
%1. Rectangular window;
%2. Triangular window;
%3. Hanning window;
%4. Hamming window;
%5. Blackman window;
% Output:
% B: FIR filter coefficients.
M = (N - 1)/2;
hH = sin (WnH*[ - M: 1:-1])./ ([ - M: 1: -1]*pi);
hH(M + 1) = WnH/pi;
hH(M + 2: 1: N) = hH(M: -1: 1);
hL = sin (WnL*[ - M: 1: -1])./([ - M: 1: -1]*pi);
hL(M + 1) = WnL/pi;
hL(M + 2: 1: N) = hL(M: -1: 1);
if Ftype == 1
h(1: N) = hL(1: N);
end
if Ftype == 2
h(1: N) = -hH(1: N);
h(M + 1) = 1 + h(M + 1);
end
if Ftype ==3
h(1: N) = hH(1: N) - hL(1: N);
end
if Ftype == 4
h(1: N) = hL(1: N) - hH(1: N);
h(M + 1) = 1 + h(M + 1);
end
% window functions;
if Wtype ==1
w(1:N)=ones(1,N);
end
if Wtype ==2
w = 1 - abs([ - M: 1: M])/M;
end
if Wtype ==3
w = 0.5 + 0.5* cos ([ - M: 1: M]*pi/M);
end
if Wtype ==4
w = 0.54 + 0.46* cos ([ - M: 1: M]*pi/M);
end
if Wtype ==5
w = 0.42 + 0.5* cos ([ - M: 1: M]*pi/M) + 0.08* cos (2*[ - M: 1: M]*pi/M);
end
B = h.*w

fs=8000;
[h,f]=freqz(B,1,512,fs);
l=20*log10(abs(h))
plot(f,20*log10(abs(h)));grid
axis([0 4000 -100 10]);
xlabel('Frequency (Hz)');ylabel('Magnitude Response (dB)');
1(a)

The coding is similar as before but the number of tap,N is change to 21.
N=21;Ftype=1;WnL=0.25*pi;WnH=0;Wtype=4;

The filter coeeficient,B :

>> question_1

B = Columns 1 through 14

0.0025 0.0026 -0.0000 -0.0087 -0.0211 -0.0243 0.0000 0.0608 0.1452 0.2200 0.2500
0.2200 0.1452 0.0608

Columns 15 through 21

0.0000 -0.0243 -0.0211 -0.0087 -0.0000 0.0026 0.0025

The list of magnitude frequency response in dB:

0.0348 -2.2071 -34.7612 -50.0567 -55.945 -55.6819


0.0348 -2.3003 -35.5193 -49.9835 -55.255 -55.0996
0.0348 -2.3962 -36.298 -49.9242 -54.649 -54.5881
0.0348 -2.4949 -37.0987 -49.8788 -54.1158 -54.1393
0.0348 -2.5964 -37.9234 -49.8475 -53.6471 -53.747
0.0347 -2.7008 -38.774 -49.8308 -53.2359 -53.4062
0.0346 -2.8082 -39.653 -49.8289 -52.8772 -53.1131
0.0345 -2.9185 -40.5634 -49.8423 -52.5666 -52.8645
0.0344 -3.0319 -41.5086 -49.8716 -52.3007 -52.6578
0.0343 -3.1483 -42.4931 -49.9173 -52.0769 -52.491
0.0341 -3.2679 -43.522 -49.9803 -51.893 -52.3627
0.0339 -3.3906 -44.602 -50.0613 -51.7473 -52.2716
0.0337 -3.5165 -45.7415 -50.1611 -51.6384 -52.217
0.0335 -3.6456 -46.9513 -50.2808 -51.5655 -52.1984
0.0332 -3.7781 -48.2457 -50.4215 -51.5278 -52.2155
0.0328 -3.9139 -49.6443 -50.5844 -51.5251 -52.2686
0.0324 -4.053 -51.1744 -50.7709 -51.5572 -52.3579
0.032 -4.1957 -52.876 -50.9826 -51.6244 -52.4844
0.0314 -4.3418 -54.8107 -51.2213 -51.7271 -52.649
0.0308 -4.4914 -57.0812 -51.489 -51.8663 -52.8531
0.0302 -4.6446 -59.8773 -51.7882 -52.043 -53.0987
0.0294 -4.8014 -63.6144 -52.1214 -52.2587 -53.3882
0.0286 -4.962 -69.5449 -52.492 -52.5155 -53.7246
0.0276 -5.1262 -89.6277 -52.9038 -52.8156 -54.1116
0.0265 -5.2942 -72.2833 -53.3613 -53.1622 -54.554
0.0253 -5.466 -66.0712 -53.8701 -53.5591 -55.0576
0.024 -5.6417 -62.7253 -54.4371 -54.011 -55.63
0.0225 -5.8213 -60.4856 -55.0709 -54.5238 -56.2809
0.0208 -6.0049 -58.8354 -55.7823 -55.1052 -57.0231
0.019 -6.1926 -57.5508 -56.5857 -55.7649 -57.8735
0.017 -6.3843 -56.5144 -57.5004 -56.5157 -58.8558
0.0148 -6.5801 -55.6565 -58.5531 -57.3746 -60.0036
0.0124 -6.7801 -54.9329 -59.7824 -58.3653 -61.3676
0.0097 -6.9843 -54.3133 -61.2472 -59.5216 -63.0287
0.0068 -7.1929 -53.7764 -63.0445 -60.8943 -65.1289
0.0036 -7.4057 -53.3065 -65.35 -62.5646 -67.9524
0.0001 -7.623 -52.8918 -68.539 -64.6751 -72.2185
-0.0037 -7.8448 -52.5234 -73.6839 -67.5117 -81.0454
-0.0078 -8.071 -52.1942 -88.1853 -71.7989 -83.3588
-0.0123 -8.3019 -51.8985 -77.7785 -80.6999 -72.9881
-0.0171 -8.5374 -51.632 -70.549 -82.7766 -68.417
-0.0223 -8.7775 -51.3912 -66.677 -72.5067 -65.4639
-0.0279 -9.0225 -51.1732 -64.0295 -67.9583 -63.2927
-0.034 -9.2722 -50.9757 -62.0265 -65.0179 -61.5869
-0.0406 -9.5269 -50.7969 -60.4245 -62.8559 -60.1927
-0.0476 -9.7865 -50.6355 -59.0981 -61.1579 -59.0231
-0.0551 -10.0511 -50.4902 -57.9739 -59.7704 -58.0247
-0.0632 -10.3208 -50.3602 -57.0058 -58.6071 -57.1618
-0.0719 -10.5957 -50.2449 -56.1624 -57.6144 -56.41
-0.0811 -10.8758 -50.1438 -55.4217 -56.757 -55.7513
-0.091 -11.1612 -34.7612 -54.7678 -56.0103 -55.1727
-0.1016 -11.452 -35.5193 -54.1886 -55.3565 -54.664
-0.1128 -11.7482 -36.298 -53.6748 -54.7826 -54.2175
-0.1248 -12.0499 -37.0987 -53.2193 -54.2784 -53.827
-0.1375 -12.3573 -37.9234 -52.8164 -53.8362 -53.4878
-0.151 -12.6704 -38.774 -52.4615 -53.4498 -53.196
-0.1654 -12.9892 -39.653 -52.151 -53.1145 -52.9484
-0.1806 -13.3139 -40.5634 -51.8819 -52.8264 -52.7426
-0.1966 -13.6445 -41.5086 -51.6518 -52.5823 -52.5766
-0.2137 -13.9812 -42.4931 -51.4588 -52.3798 -52.449
-0.2316 -14.324 -43.522 -51.3013 -52.217 -52.3586
-0.2506 -14.6731 -44.602 -51.1782 -52.0922 -52.3047
-0.2706 -15.0284 -45.7415 -51.0886 -52.0045
-0.2917 -15.3902 -46.9513 -51.0318 -51.9529
-0.3139 -15.7586 -48.2457 -51.0076 -51.9371
-0.3373 -16.1335 -49.6443 -51.0158 -51.9568
-0.3618 -16.5153 -51.1744 -51.0565 -52.0122
-0.3876 -16.9038 -52.876 -51.13 -52.1037
-0.4147 -17.2994 -54.8107 -51.2371 -52.2319
-0.4431 -17.7021 -57.0812 -51.3785 -52.3981
-0.4728 -18.112 -59.8773 -51.5554 -52.6035
-0.5039 -18.5293 -63.6144 -51.7694 -52.8501
-0.5365 -18.9541 -69.5449 -52.0223 -53.1402
-0.5705 -19.3865 -89.6277 -52.3165 -53.4767
-0.6061 -19.8268 -72.2833 -52.6549 -53.8635
-0.6432 -20.275 -66.0712 -53.0411 -54.305
-0.682 -20.7313 -62.7253 -53.4795 -54.8071
-0.7224 -21.1959 -60.4856 -53.9757 -55.3773
-0.7644 -21.6689 -58.8354 -54.5367 -56.0249
-0.8083 -22.1506 -57.5508 -55.1713 -56.7624
-0.8539 -22.6412 -56.5144 -55.8911 -57.6064
-0.9013 -23.1408 -55.6565 -56.7115 -58.5798
-0.9506 -23.6496 -54.9329 -57.6533 -59.7153
-1.0018 -24.168 -54.3133 -58.7461 -61.0615
-1.0549 -24.6961 -53.7764 -60.0333 -62.6961
-1.1101 -25.2342 -53.3065 -61.5824 -64.7535
-1.1672 -25.7826 -52.8918 -63.5078 -67.4995
-1.2265 -26.3415 -52.5234 -66.0255 -71.5888
-1.2879 -26.9114 -52.1942 -69.629 -79.6494
-1.3515 -27.4925 -51.8985 -75.9538 -85.1346
-1.4173 -28.0852 -51.632 -98.6432 -73.3736
-1.4854 -28.6899 -51.3912 -74.7807 -68.5784
-1.5557 -29.307 -51.1732 -69.068 -65.5347
-1.6285 -29.9371 -50.9757 -65.6792 -63.315
-1.7036 -30.5806 -50.7969 -63.2774 -61.5795
-1.7812 -31.2381 -50.6355 -61.4284 -60.1655
-1.8612 -31.9103 -50.4902 -59.936 -58.982
-1.9438 -32.5978 -50.3602 -58.6946 -57.9733
-2.0289 -33.3015 -50.2449 -57.6408 -57.1028
-2.1167 -34.0223 -50.1438 -56.7336 -56.3451
1(b)

The coding is similar as before but the number of tap,N is change to 31.
N=31;Ftype=1;WnL=0.25*pi;WnH=0;Wtype=4;

The filter coeeficient,B :

>> question_1

B = Columns 1 through 14

-0.0012 -0.0020 -0.0021 0.0000 0.0048 0.0099 0.0099 -0.0000 -0.0189 -0.0362 -0.0347
0.0000 0.0684 0.1528

Columns 15 through 28

0.2228 0.2500 0.2228 0.1528 0.0684 0.0000 -0.0347 -0.0362 -0.0189 -0.0000 0.0099
0.0099 0.0048 0.0000

Columns 29 through 31

-0.0021 -0.0020 -0.0012

The list of magnitude frequency response in dB:

-0.025 -0.0255 -10.0483 -52.3573 -59.7842 -61.0436 -63.4031 -68.3795


-0.0249 -0.0326 -10.4496 -52.7506 -59.483 -61.0693 -63.8906 -69.8487
-0.0246 -0.0408 -10.862 -53.1738 -59.2664 -61.1763 -64.4926 -71.7182
-0.0241 -0.05 -11.286 -53.628 -59.1301 -61.3662 -65.2261 -74.2105
-0.0234 -0.0604 -11.7218 -54.115 -59.0713 -61.6422 -66.1148 -77.8406
-0.0226 -0.072 -12.1696 -54.6374 -59.0886 -62.0096 -67.1939 -84.361
-0.0215 -0.0851 -12.6298 -55.1988 -59.1819 -62.4759 -68.5172 -102.2676
-0.0203 -0.0997 -13.1025 -55.8037 -59.3526 -63.0519 -70.1722 -82.4043
-0.019 -0.116 -13.5883 -56.4581 -59.6035 -63.7526 -72.3159 -76.8822
-0.0175 -0.134 -14.0873 -57.1695 -59.939 -64.5992 -75.2725 -73.5907
-0.0159 -0.1538 -14.5999 -57.9477 -60.3653 -65.6225 -79.9108 -71.2731
-0.0141 -0.1757 -15.1266 -58.8057 -60.8915 -66.8691 -90.7561 -69.5132
-0.0123 -0.1998 -15.6677 -59.7603 -61.5299 -68.4127 -87.3056 -68.1208
-0.0103 -0.2261 -16.2236 -60.835 -62.2977 -70.3811 -78.8147 -66.9935
-0.0083 -0.2548 -16.7949 -62.0626 -63.2191 -73.024 -74.6644 -66.0698
-0.0063 -0.286 -17.3819 -63.4922 -64.3299 -76.9426 -71.934 -65.3104
-0.0042 -0.32 -17.9853 -65.2009 -65.6844 -84.405 -69.9297 -64.6884
-0.0021 -0.3567 -18.6056 -67.3215 -67.3715 -93.1972 -68.3747 -64.1856
0 -0.3965 -19.2434 -70.1147 -69.5503 -79.7128 -67.1303 -63.7886
0.0021 -0.4393 -19.8994 -74.2146 -72.5514 -74.7294 -66.1175 -63.4882
0.0042 -0.4854 -20.5744 -82.1032 -77.2662 -71.653 -65.287 -63.2778
0.0062 -0.5348 -21.2691 -88.8624 -88.4792 -69.4588 -64.6065 -63.1532
0.0082 -0.5878 -21.9845 -76.5609 -84.2484 -67.7833 -64.0537
0.0101 -0.6445 -22.7215 -71.745 -75.9667 -66.4552 -63.6128
0.0118 -0.705 -23.4812 -68.7333 -71.8761 -65.3804 -63.2729
0.0135 -0.7694 -24.2649 -66.5634 -69.1793 -64.5017 -63.0259
0.0151 -0.838 -25.0739 -64.8874 -67.1986 -63.7821 -62.8666
0.0166 -0.9108 -25.9098 -63.5402 -65.6619 -63.1963 -62.7915
0.018 -0.988 -26.7743 -62.4302 -64.4326 -62.7268 -62.799
0.0192 -1.0697 -27.6695 -61.502 -63.4323 -62.3612 -62.8891
0.0203 -1.1561 -28.5976 -60.7193 -62.6122 -62.0905 -63.0633
0.0212 -1.2474 -29.5616 -60.0575 -61.9402 -61.9085 -63.3249
0.022 -1.3435 -30.5644 -59.4991 -61.3941 -61.8112 -63.6791
0.0227 -1.4448 -31.61 -59.0316 -60.9583 -61.7964 -64.1337
0.0233 -1.5513 -32.7029 -58.6457 -60.6215 -61.8634 -64.6996
0.0237 -1.6632 -33.8487 -58.3347 -60.3759 -62.013 -65.3921
0.024 -1.7806 -35.0543 -58.0936 -60.2158 -62.2479 -66.2331
0.0242 -1.9036 -36.3283 -57.919 -60.1377 -62.5724 -67.2543
0.0242 -2.0324 -37.6817 -57.8085 -60.1397 -62.9931 -68.5037
0.0242 -2.1672 -39.1292 -57.7609 -60.2212 -63.5195 -70.0581
0.0241 -2.308 -40.6902 -57.7757 -60.3835 -64.1646 -72.0514
0.0238 -2.455 -42.3922 -57.8536 -60.6291 -64.9471 -74.7485
0.0235 -2.6083 -44.2749 -57.9959 -60.9624 -65.8937 -78.8022
0.0232 -2.7681 -46.3992 -58.2052 -61.3897 -67.044 -86.8288
0.0228 -2.9345 -48.866 -58.4848 -61.9205 -68.4597 -92.4026
0.0223 -3.1076 -51.8608 -58.8398 -62.5674 -70.2437 -80.6141
0.0218 -3.2877 -55.786 -59.2766 -63.3485 -72.5869 -75.8436
0.0212 -3.4747 -61.8337 -59.8041 -64.2896 -75.9084 -72.8442
0.0207 -3.6688 -80.0772 -60.4339 -65.4285 -81.4766 -70.686
0.0201 -3.8703 -65.747 -61.1821 -66.824 -101.8533 -69.0288
0.0194 -4.0792 -59.626 -62.0707 -68.5731 -83.3529 -67.71
0.0188 -4.2956 -56.5201 -63.1313 -70.8534 -76.8881 -66.6393
0.0181 -4.5197 -54.564 -64.4115 -74.0455 -73.2888 -65.7616
0.0174 -4.7517 -53.2223 -65.9864 -79.2477 -70.8216 -65.0409
0.0166 -4.9917 -52.2649 -67.986 -94.3521 -68.9749 -64.4528
0.0158 -5.2399 -51.5718 -70.6647 -83.0545 -67.5271 -63.9803
0.0149 -5.4963 -51.0723 -74.6389 -75.9903 -66.3622 -63.6113
0.0139 -5.7612 -50.7209 -82.2742 -72.2175 -65.4118 -63.337
0.0128 -6.0346 -50.4869 -90.0563 -69.6693 -64.6328 -63.1516
0.0116 -6.3168 -50.3485 -77.1474 -67.7766 -63.9962 -63.0512
0.0101 -6.608 -50.2896 -72.2335 -66.2995 -63.4819 -63.0338
0.0084 -6.9082 -50.298 -69.1812 -65.1143 -63.0758 -63.0989
0.0065 -7.2177 -50.3643 -66.9956 -64.1491 -62.7679 -63.2477
0.0043 -7.5366 -50.4812 -65.3206 -63.3586 -62.5509 -63.483
0.0016 -7.865 -50.6429 -63.9875 -62.7125 -62.4203 -63.8096
-0.0014 -8.2033 -50.8447 -62.9033 -62.1901 -62.373 -64.2347
-0.005 -8.5516 -51.0831 -62.0115 -61.7766 -62.408 -64.7682
-0.0091 -8.91 -51.3553 -61.2753 -61.4615 -62.5256 -65.4243
-0.0138 -9.2788 -51.6592 -60.6695 -61.2373 -62.7278 -66.2232
-0.0192 -9.6582 -51.9935 -60.1767 -61.0991 -63.0183 -67.1938
1(c)

The coding is similar as before but the number of tap,N is change to 41.
N=41;Ftype=1;WnL=0.25*pi;WnH=0;Wtype=4;

The filter coeeficient,B :

>> question_1

B = Columns 1 through 14

0.0000 0.0010 0.0018 0.0017 -0.0000 -0.0032 -0.0061 -0.0057 0.0000 0.0096 0.0172
0.0153 -0.0000 -0.0241

Columns 15 through 28

-0.0430 -0.0390 0.0000 0.0713 0.1556 0.2238 0.2500 0.2238 0.1556 0.0713 0.0000 -
0.0390 -0.0430 -0.0241

Columns 29 through 41

-0.0000 0.0153 0.0172 0.0096 0.0000 -0.0057 -0.0061 -0.0032 -0.0000 0.0017 0.0018
0.0010 0.0000

The list of magnitude frequency response in dB:

0.02 0.0068 -11.6712 -67.4836 -61.7911 -69.9134 -75.586 -66.7621


0.0199 0.0073 -12.2685 -68.4512 -61.6455 -68.2901 -79.9193 -67.3494
0.0194 0.008 -12.8885 -69.7737 -61.6324 -67.043 -89.2816 -68.1205
0.0187 0.0087 -13.5321 -71.6088 -61.7503 -66.075 -89.7561 -69.1115
0.0177 0.0094 -14.2004 -74.2806 -62.0019 -65.3281 -80.1154 -70.3795
0.0164 0.01 -14.8941 -78.656 -62.3942 -64.7659 -75.7493 -72.0201
0.0149 0.0104 -15.6146 -89.2406 -62.9395 -64.3647 -72.9596 -74.2098
0.0131 0.0105 -16.363 -85.6447 -63.6571 -64.1092 -70.9607 -77.3276
0.0112 0.0102 -17.1407 -76.9529 -64.5769 -63.9903 -69.4508 -82.4676
0.0091 0.0093 -17.9491 -72.6381 -65.7452 -64.0033 -68.2821 -97.4493
0.0068 0.0077 -18.7899 -69.7691 -67.2378 -64.1481 -67.3721 -86.2647
0.0045 0.0053 -19.665 -67.6507 -69.1877 -64.4281 -66.6706 -79.1814
0.0021 0.0018 -20.5764 -66.0059 -71.8594 -64.8517 -66.1456 -75.4181
-0.0003 -0.0029 -21.5265 -64.696 -75.9061 -65.4329 -65.7762 -72.8992
-0.0027 -0.009 -22.518 -63.6424 -83.9512 -66.1933 -65.5494 -71.0547
-0.0051 -0.0169 -23.554 -62.7964 -89.491 -67.1665 -65.4572 -69.645
-0.0074 -0.0266 -24.638 -62.1266 -77.7695 -68.4053 -65.4965 -68.5473
-0.0096 -0.0385 -25.7743 -61.6119 -73.0588 -69.9972 -65.6682 -67.6907
-0.0116 -0.0527 -26.9678 -61.2385 -70.1334 -72.1003 -65.9771 -67.0317
-0.0134 -0.0697 -28.2245 -60.9974 -68.0656 -75.0441 -66.4331 -66.542
-0.0151 -0.0896 -29.5517 -60.8839 -66.5165 -79.7195 -67.0522 -66.2034
-0.0165 -0.1126 -30.9584 -60.8967 -65.3244 -90.9067 -67.8591 -66.0044
-0.0176 -0.1392 -32.4559 -61.0376 -64.4001 -86.6832 -68.8921
-0.0185 -0.1696 -34.059 -61.3123 -63.6901 -78.4131 -70.2123
-0.0191 -0.2041 -35.7871 -61.7308 -63.1602 -74.3538 -71.9228
-0.0194 -0.243 -37.6671 -62.3086 -62.7885 -71.7065 -74.2173
-0.0195 -0.2866 -39.7375 -63.0694 -62.5607 -69.794 -77.5239
-0.0192 -0.3352 -42.0563 -64.0494 -62.4684 -68.3448 -83.1567
-0.0187 -0.3892 -44.7177 -65.3055 -62.5077 -67.2232 -105.7099
-0.0179 -0.4487 -47.8911 -66.9325 -62.6788 -66.3521 -84.5702
-0.0168 -0.5143 -51.9319 -69.105 -62.986 -65.6844 -78.2505
-0.0155 -0.5861 -57.827 -72.1963 -63.4384 -65.1899 -74.7249
-0.014 -0.6645 -71.5727 -77.2754 -64.0508 -64.8489 -72.3278
-0.0123 -0.7497 -65.1316 -91.6932 -64.8463 -64.649 -70.561
-0.0104 -0.8422 -58.4725 -81.3917 -65.8606 -64.5833 -69.2076
-0.0084 -0.9422 -55.5278 -74.1948 -67.1501 -64.6488 -68.1544
-0.0063 -1.0501 -53.9 -70.3994 -68.8094 -64.8471 -67.3353
-0.0042 -1.1661 -52.9694 -67.8659 -71.0118 -65.1837 -66.709
-0.002 -1.2905 -52.4812 -66.0135 -74.1288 -65.6691 -66.2491
0.0002 -1.4237 -52.3061 -64.5996 -79.2207 -66.3204 -65.9384
0.0023 -1.566 -52.3697 -63.4998 -93.4845 -67.1636 -65.7662
0.0044 -1.7176 -52.6251 -62.6427 -83.5143 -68.2395 -65.7268
0.0063 -1.8789 -53.0408 -61.9839 -76.3068 -69.6133 -65.8188
0.0081 -2.0502 -53.5945 -61.4951 -72.5292 -71.3966 -66.0446
0.0098 -2.2318 -54.2689 -61.1575 -70.0186 -73.8019 -66.4114
0.0112 -2.424 -55.0498 -60.9595 -68.1907 -77.3148 -66.9313
0.0125 -2.627 -55.9243 -60.8943 -66.8016 -83.5332 -67.6236
0.0136 -2.8413 -56.8793 -60.9593 -65.7267 -108.5003 -68.5183
0.0144 -3.0671 -57.9002 -61.1561 -64.8944 -82.6472 -69.6619
0.015 -3.3048 -58.9695 -61.4901 -64.2603 -76.9367 -71.1303
0.0154 -3.5546 -60.0658 -61.9716 -63.7962 -73.6217 -73.0569
0.0155 -3.8169 -61.1626 -62.6172 -63.4834 -71.337 -75.7074
0.0155 -4.092 -62.2283 -63.4524 -63.3106 -69.6436 -79.7389
0.0152 -4.3802 -63.2266 -64.5164 -63.2711 -68.3442 -87.8027
0.0148 -4.682 -64.1197 -65.8721 -63.3629 -67.3341 -93.1035
0.0142 -4.9975 -64.8727 -67.6263 -63.588 -66.5514 -81.4581
0.0134 -5.3273 -65.4598 -69.9802 -63.9524 -65.9574 -76.7361
0.0126 -5.6716 -65.87 -73.3854 -64.4674 -65.5269 -73.7903
0.0117 -6.0309 -66.1097 -79.2668 -65.1512 -65.2439 -71.6992
0.0108 -6.4055 -66.2015 -112.029 -66.0315 -65.0984 -70.1255
0.0099 -6.7958 -66.1798 -79.7308 -67.1515 -65.0853 -68.9081
0.009 -7.2024 -66.0844 -73.6991 -68.5809 -65.2036 -67.9582
0.0082 -7.6255 -65.9556 -70.2802 -70.4405 -65.4565 -67.2222
0.0075 -8.0658 -65.8306 -67.9466 -72.9649 -65.8516 -66.6663
0.0069 -8.5236 -65.7421 -66.2263 -76.7081 -66.4019 -66.2683
0.0064 -8.9996 -65.7186 -64.9113 -83.649 -67.1281 -66.0143
0.0061 -9.4942 -65.7855 -63.8918 -96.387 -68.0617 -65.8957
0.006 -10.008 -65.9673 -63.1036 -80.4207 -69.2523 -65.9088
0.0061 -10.5417 -66.2893 -62.5065 -75.2167 -70.7814 -66.0539
0.0064 -11.0958 -66.7817 -62.0746 -72.0927 -72.7941 -66.3353
The comparison of the magnitude of frequency response according to tap length. (Only some of the values from
total of 512 points are used)

1(a) N=21 1(b) N=31 1(c) N=41 -0.4431 -0.0192 0.0064


0.019 0.0192 -0.0179 -0.4728 -0.0255 0.0068
0.017 0.0203 -0.0168 -0.5039 -0.0326 0.0073
0.0148 0.0212 -0.0155 -0.5365 -0.0408 0.008
0.0124 0.022 -0.014 -0.5705 -0.05 0.0087
0.0097 0.0227 -0.0123 -0.6061 -0.0604 0.0094
0.0068 0.0233 -0.0104 -0.6432 -0.072 0.01
0.0036 0.0237 -0.0084 -0.682 -0.0851 0.0104
0.0001 0.024 -0.0063 -0.7224 -0.0997 0.0105
-0.0037 0.0242 -0.0042 -0.7644 -0.116 0.0102
-0.0078 0.0242 -0.002 -0.8083 -0.134 0.0093
-0.0123 0.0242 0.0002 -0.8539 -0.1538 0.0077
-0.0171 0.0241 0.0023 -0.9013 -0.1757 0.0053
-0.0223 0.0238 0.0044 -0.9506 -0.1998 0.0018
-0.0279 0.0235 0.0063 -1.0018 -0.2261 -0.0029
-0.034 0.0232 0.0081 -1.0549 -0.2548 -0.009
-0.0406 0.0228 0.0098 -1.1101 -0.286 -0.0169
-0.0476 0.0223 0.0112 -1.1672 -0.32 -0.0266
-0.0551 0.0218 0.0125 -1.2265 -0.3567 -0.0385
-0.0632 0.0212 0.0136 -1.2879 -0.3965 -0.0527
-0.0719 0.0207 0.0144 -1.3515 -0.4393 -0.0697
-0.0811 0.0201 0.015 -1.4173 -0.4854 -0.0896
-0.091 0.0194 0.0154 -1.4854 -0.5348 -0.1126
-0.1016 0.0188 0.0155 -1.5557 -0.5878 -0.1392
-0.1128 0.0181 0.0155 -1.6285 -0.6445 -0.1696
-0.1248 0.0174 0.0152 -1.7036 -0.705 -0.2041
-0.1375 0.0166 0.0148 -1.7812 -0.7694 -0.243
-0.151 0.0158 0.0142 -1.8612 -0.838 -0.2866
-0.1654 0.0149 0.0134 -1.9438 -0.9108 -0.3352
-0.1806 0.0139 0.0126 -2.0289 -0.988 -0.3892
-0.1966 0.0128 0.0117 -2.1167 -1.0697 -0.4487
-0.2137 0.0116 0.0108 -2.2071 -1.1561 -0.5143
-0.2316 0.0101 0.0099 -2.3003 -1.2474 -0.5861
-0.2506 0.0084 0.009 -2.3962 -1.3435 -0.6645
-0.2706 0.0065 0.0082 -2.4949 -1.4448 -0.7497
-0.2917 0.0043 0.0075 -2.5964 -1.5513 -0.8422
-0.3139 0.0016 0.0069 -2.7008 -1.6632 -0.9422
-0.3373 -0.0014 0.0064 -2.8082 -1.7806 -1.0501
-0.3618 -0.005 0.0061 -2.9185 -1.9036 -1.1661
N=21

N=31

N=41

As the tap length increases, the magnitude frequency response decreases.


QUESTION 2

2 (a)

The coding is as question 1 but the specification for the design is changed.
N=31;Ftype=2;WnL=0;WnH=0.625*pi;Wtype=3;

The filter coeeficient,B :

>> question_2

B = Columns 1 through 14

0 -0.0002 -0.0004 0.0025 -0.0018 -0.0056 0.0113 -0.0000 -0.0232 0.0246 0.0183 -0.0664
0.0367 0.1077

Columns 15 through 28

-0.2909 0.3750 -0.2909 0.1077 0.0367 -0.0664 0.0183 0.0246 -0.0232 -0.0000 0.0113 -
0.0056 -0.0018 0.0025

Columns 29 through 31

-0.0004 -0.0002 0

List of magnitude frequency response in dB

-85.1905 -77.6867 -74.8203 -49.7226 -6.021 0.0278 -0.0017


-85.2114 -77.7475 -77.0254 -48.7441 -5.7702 0.0244 -0.0019
-85.2743 -77.8824 -80.2433 -47.8787 -5.5268 0.0211 -0.002
-85.3802 -78.0963 -85.848 -47.1134 -5.2905 0.0178 -0.0022
-85.5305 -78.3961 -112.2605 -46.4388 -5.0612 0.0145 -0.0022
-85.7271 -78.791 -86.3526 -45.8485 -4.8388 0.0114 -0.0023
-85.9731 -79.2934 -79.9723 -45.3381 -4.6231 0.0084 -0.0023
-86.2722 -79.9207 -76.2637 -44.9052 -4.414 0.0055 -0.0023
-86.6293 -80.6971 -73.6389 -44.5489 -4.2114 0.0028 -0.0023
-87.0506 -81.6578 -71.6138 -44.2701 -4.0152 0.0002 -0.0022
-87.5444 -82.8567 -69.9756 -44.0713 -3.8252 -0.0022 -0.0021
-88.1214 -84.381 -68.6118 -43.9569 -3.6413 -0.0044 -0.002
-88.7956 -86.3867 -67.4558 -43.9338 -3.4634 -0.0064 -0.0019
-89.5863 -89.195 -66.4653 -44.0117 -3.2913 -0.0082 -0.0017
-90.5204 -93.6617 -65.6118 -44.2044 -3.1251 -0.0098 -0.0015
-91.6372 -104.1748 -64.8755 -44.5318 -2.9645 -0.0112 -0.0014
-92.9965 -101.0241 -64.2421 -45.0225 -2.8094 -0.0124 -0.0012
-94.6976 -92.2665 -63.7014 -45.7197 -2.6598 -0.0134 -0.001
-96.9212 -87.9337 -63.2461 -46.6915 -2.5156 -0.0142 -0.0008
-100.0569 -85.0314 -62.871 -48.0544 -2.3765 -0.0148 -0.0005
-105.2385 -82.856 -62.5728 -50.0316 -2.2427 -0.0152 -0.0003
-121.0949 -81.128 -62.3495 -53.1401 -2.1138 -0.0155 -0.0001
-108.3721 -79.7075 -62.2007 -59.1456 -1.9899 -0.0156 0
-101.3155 -78.5149 -62.1271 -76.0728 -1.8708 -0.0155 0.0002
-97.4342 -77.5003 -62.131 -55.9829 -1.7564 -0.0153 0.0004
-94.7436 -76.631 -62.2161 -49.901 -1.6466 -0.0149 0.0005
-92.6883 -75.8844 -62.3882 -46.0241 -1.5414 -0.0145 0.0007
-91.0328 -75.2442 -62.6551 -43.1035 -1.4406 -0.0139 0.0008
-89.6551 -74.6989 -63.0279 -40.7236 -1.3442 -0.0132 0.0009
-88.4839 -74.24 -63.5221 -38.6943 -1.252 -0.0125 0.001
-87.4743 -73.8613 -64.1592 -36.9123 -1.1639 -0.0116 0.001
-86.596 -73.5585 -64.9705 -35.315 -1.0799 -0.0107 0.0011
-85.8279 -73.3289 -66.0032 -33.8618 -0.9999 -0.0098
-85.1548 -73.171 -67.3323 -32.5247 -0.9237 -0.0088
-84.5657 -73.0847 -69.0881 -31.2836 -0.8512 -0.0078
-84.0521 -73.0708 -71.5258 -30.1233 -0.7824 -0.0067
-83.6078 -73.1315 -75.2659 -29.0324 -0.7172 -0.0057
-83.2284 -73.2707 -82.7015 -28.002 -0.6554 -0.0047
-82.9103 -73.4935 -89.9677 -27.0249 -0.597 -0.0037
-82.6514 -73.8074 -76.9594 -26.0952 -0.5419 -0.0027
-82.4502 -74.2227 -71.8174 -25.2081 -0.49 -0.0017
-82.3062 -74.7535 -68.5248 -24.3596 -0.4412 -0.0008
-82.2195 -75.4195 -66.0948 -23.5464 -0.3953 0.0001
-82.1911 -76.2487 -64.173 -22.7654 -0.3524 0.0009
-82.2227 -77.2828 -62.5914 -22.0144 -0.3122 0.0017
-82.3172 -78.5868 -61.2574 -21.291 -0.2747 0.0024
-82.4781 -80.2702 -60.1143 -20.5934 -0.2399 0.0031
-82.7106 -82.5389 -59.1254 -19.9199 -0.2075 0.0037
-83.0213 -85.8553 -58.2659 -19.2692 -0.1776 0.0042
-83.419 -91.697 -57.518 -18.6397 -0.15 0.0047
-83.9154 -152.5827 -56.8692 -18.0305 -0.1246 0.0051
-84.5265 -91.3874 -56.3104 -17.4404 -0.1013 0.0054
-85.2741 -85.2593 -55.8353 -16.8685 -0.0801 0.0056
-86.1896 -81.6514 -55.4395 -16.3139 -0.0609 0.0058
-87.3197 -79.0901 -55.1204 -15.7758 -0.0434 0.0059
-88.7383 -77.1137 -54.8768 -15.2535 -0.0278 0.0059
-90.5728 -75.5166 -54.709 -14.7464 -0.0138 0.0059
-93.0709 -74.1897 -54.6187 -14.2539 -0.0014 0.0059
-96.8269 -73.0678 -54.6092 -13.7753 0.0095 0.0057
-104.0628 -72.1095 -54.6856 -13.3102 0.019 0.0056
-113.2285 -71.2869 -54.8553 -12.8581 0.0271 0.0053
-99.276 -70.5802 -55.1288 -12.4185 0.0341 0.0051
-94.0919 -69.9756 -55.5204 -11.9911 0.0398 0.0048
-90.8311 -69.4628 -56.0507 -11.5754 0.0445 0.0044
-88.4532 -69.0346 -56.7489 -11.1711 0.0482 0.0041
-86.5911 -68.6858 -57.6592 -10.7779 0.051 0.0037
-85.072 -68.413 -58.851 -10.3953 0.053 0.0033
-83.8011 -68.2141 -60.4429 -10.0232 0.0541 0.0029
-82.7207 -68.0886 -62.6627 -9.6612 0.0546 0.0025
-81.7932 -68.0369 -66.0404 -9.3091 0.0544 0.002
-80.9932 -68.0611 -72.4141 -8.9665 0.0537 0.0016
-80.3024 -68.1644 -87.6793 -8.6334 0.0524 0.0012
-79.7079 -68.352 -69.3072 -8.3093 0.0507 0.0008
-79.2001 -68.6312 -63.5736 -7.9942 0.0487 0.0004
-78.7719 -69.0117 -59.9969 -7.6877 0.0463 0
-78.4182 -69.5076 -57.3705 -7.3898 0.0436 -0.0003
-78.1355 -70.1379 -55.289 -7.1001 0.0407 -0.0007
-77.9216 -70.9302 -53.5661 -6.8186 0.0376 -0.001
-77.7754 -71.9253 -52.1009 -6.545 0.0344 -0.0012
-77.6967 -73.1865 -50.8327 -6.2792 0.0311 -0.0015
2 (b)

The coding is as question 1 but the specification for the design is changed.
N=31;Ftype=2;WnL=0;WnH=0.625*pi;Wtype=4;

The filter coeeficient,B :

>> question_2

B = Columns 1 through 14

0.0016 -0.0014 -0.0011 0.0045 -0.0026 -0.0070 0.0130 -0.0000 -0.0247 0.0256 0.0188 -
0.0675 0.0370 0.1081

Columns 15 through 28

-0.2911 0.3750 -0.2911 0.1081 0.0370 -0.0675 0.0188 0.0256 -0.0247 -0.0000 0.0130 -
0.0070 -0.0026 0.0045

Columns 29 through 31

-0.0011 -0.0014 0.0016

List of magnitude frequency response in dB

-59.085 -80.5935 -57.1555 -51.5693 -6.0267 0.0225 0.0196


-59.1261 -93.335 -56.9704 -51.3854 -5.7534 0.0226 0.0193
-59.2502 -77.2884 -56.8647 -51.2274 -5.4887 0.0226 0.0189
-59.4595 -72.0125 -56.8367 -51.0976 -5.2325 0.0226 0.0183
-59.7586 -68.8011 -56.886 -50.9991 -4.9847 0.0226 0.0175
-60.1537 -66.5175 -57.0138 -50.9363 -4.7451 0.0225 0.0166
-60.6541 -64.772 -57.2228 -50.9145 -4.5135 0.0223 0.0155
-61.2728 -63.3839 -57.5171 -50.9405 -4.2898 0.0221 0.0143
-62.0282 -62.2548 -57.903 -51.0231 -4.0738 0.0218 0.0129
-62.9465 -61.3255 -58.3894 -51.1736 -3.8654 0.0214 0.0114
-64.0667 -60.5575 -58.9887 -51.4066 -3.6645 0.021 0.0099
-65.4491 -59.9249 -59.718 -51.7418 -3.4709 0.0205 0.0082
-67.1944 -59.4096 -60.6019 -52.2064 -3.2844 0.0199 0.0065
-69.4883 -58.9988 -61.6761 -52.8396 -3.1049 0.0192 0.0047
-72.7345 -58.6834 -62.9958 -53.7009 -2.9324 0.0184 0.0029
-78.1324 -58.4567 -64.6511 -54.8875 -2.7665 0.0175 0.001
-95.961 -58.3147 -66.804 -56.5758 -2.6073 0.0166 -0.0009
-80.6897 -58.2549 -69.7932 -59.1408 -2.4545 0.0155 -0.0027
-73.9856 -58.2764 -74.5423 -63.6535 -2.3081 0.0144 -0.0046
-70.2987 -58.3799 -86.2224 -77.4735 -2.1678 0.0132 -0.0064
-67.778 -58.5677 -80.8423 -66.5102 -2.0336 0.0119 -0.0081
-65.8909 -58.8439 -72.7584 -58.6301 -1.9052 0.0105 -0.0097
-64.4092 -59.2146 -68.6773 -54.1117 -1.7827 0.009 -0.0113
-63.2139 -59.6887 -65.9556 -50.8162 -1.6657 0.0075 -0.0128
-62.2354 -60.2787 -63.9366 -48.1628 -1.5542 0.0059 -0.0141
-61.4297 -61.0021 -62.3539 -45.9079 -1.4481 0.0043 -0.0154
-60.7672 -61.8839 -61.0731 -43.9261 -1.3472 0.0026 -0.0165
-60.2279 -62.961 -60.0167 -42.1443 -1.2513 0.0009 -0.0174
-59.7971 -64.2903 -59.1362 -40.5161 -1.1604 -0.0008 -0.0182
-59.4648 -65.9652 -58.3992 -39.0103 -1.0742 -0.0025 -0.0188
-59.2238 -68.1555 -57.7834 -37.6049 -0.9926 -0.0042 -0.0192
-59.0691 -71.2206 -57.2726 -36.2837 -0.9156 -0.0059 -0.0195
-58.9978 -76.1686 -56.8552 -35.0347 -0.8429 -0.0076
-59.0087 -89.3293 -56.5223 -33.8484 -0.7744 -0.0092
-59.1021 -81.1145 -56.2677 -32.7174 -0.7099 -0.0107
-59.2798 -73.5645 -56.0865 -31.6357 -0.6494 -0.0121
-59.5456 -69.6247 -55.9756 -30.5986 -0.5926 -0.0135
-59.9052 -66.9735 -55.9329 -29.6019 -0.5395 -0.0148
-60.3668 -65.0012 -55.9572 -28.6422 -0.4899 -0.0159
-60.9423 -63.4558 -56.0487 -27.7169 -0.4436 -0.017
-61.648 -62.2084 -56.2083 -26.8233 -0.4006 -0.0179
-62.5074 -61.1847 -56.4382 -25.9594 -0.3606 -0.0186
-63.5548 -60.3379 -56.7417 -25.1233 -0.3235 -0.0192
-64.8427 -59.637 -57.1236 -24.3135 -0.2892 -0.0197
-66.4563 -59.0607 -57.5907 -23.5285 -0.2576 -0.02
-68.5472 -58.5938 -58.1521 -22.7671 -0.2285 -0.0201
-71.4258 -58.2255 -58.8203 -22.028 -0.2018 -0.0201
-75.9074 -57.9481 -59.6128 -21.3104 -0.1773 -0.0199
-85.9674 -57.7563 -60.5542 -20.6132 -0.155 -0.0195
-84.3996 -57.6467 -61.6804 -19.9357 -0.1347 -0.019
-75.3669 -57.6176 -63.0469 -19.277 -0.1162 -0.0183
-71.0786 -57.6687 -64.7442 -18.6365 -0.0995 -0.0174
-68.2747 -57.8015 -66.9361 -18.0135 -0.0844 -0.0164
-66.2189 -58.0187 -69.9658 -17.4075 -0.0709 -0.0153
-64.6224 -58.325 -74.777 -16.8178 -0.0587 -0.014
-63.3419 -58.7275 -86.7991 -16.244 -0.0479 -0.0126
-62.2962 -59.236 -80.726 -15.6856 -0.0383 -0.0111
-61.4347 -59.8643 -72.7688 -15.1421 -0.0297 -0.0096
-60.7245 -60.6318 -68.6972 -14.6131 -0.0222 -0.0079
-60.1426 -61.5664 -65.9542 -14.0983 -0.0156 -0.0061
-59.6732 -62.7097 -63.8946 -13.5972 -0.0098 -0.0043
-59.305 -64.1268 -62.2545 -13.1096 -0.0048 -0.0025
-59.0297 -65.9276 -60.8999 -12.635 -0.0004 -0.0006
-58.8419 -68.3189 -59.7525 -12.1731 0.0034 0.0012
-58.7381 -71.7669 -58.7631 -11.7237 0.0066 0.0031
-58.7165 -77.7677 -57.8981 -11.2865 0.0093 0.0049
-58.7768 -118.2203 -57.1336 -10.8612 0.0117 0.0067
-58.9204 -77.5626 -56.4521 -10.4475 0.0137 0.0084
-59.1503 -71.6006 -55.8402 -10.0452 0.0153 0.01
-59.4715 -68.137 -55.2874 -9.6541 0.0167 0.0116
-59.8914 -65.7163 -54.7854 -9.2739 0.0179 0.013
-60.4203 -63.8804 -54.3274 -8.9043 0.0189 0.0144
-61.0727 -62.4251 -53.908 -8.5453 0.0197 0.0156
-61.8693 -61.2416 -53.5227 -8.1965 0.0203 0.0167
-62.84 -60.2652 -53.168 -7.8578 0.0209 0.0176
-64.0295 -59.4546 -52.841 -7.529 0.0213 0.0183
-65.5089 -58.7819 -52.5397 -7.2099 0.0217 0.0189
-67.3999 -58.2277 -52.2624 -6.9002 0.022 0.0194
-69.9377 -57.778 -52.0084 -6.5999 0.0222 0.0196
-73.6766 -57.423 -51.7772 -6.3088 0.0224 0.0197
2 (c)

The coding is as question 1 but the specification for the design is changed.
N=31;Ftype=2;WnL=0;WnH=0.625*pi;Wtype=5;

The filter coeeficient,B :

>> question_2

B = Columns 1 through 14

-0.0000 -0.0001 -0.0002 0.0011 -0.0009 -0.0029 0.0066 -0.0000 -0.0166 0.0191 0.0153 -
0.0594 0.0345 0.1047

Columns 15 through 28

-0.2888 0.3750 -0.2888 0.1047 0.0345 -0.0594 0.0153 0.0191 -0.0166 -0.0000 0.0066 -
0.0029 -0.0009 0.0011

Columns 29 through 31

-0.0002 -0.0001 -0.0000

List of magnitude frequency response in dB

-94.7353 -87.7041 -85.5057 -52.4668 -6.0207 -0.0209 -0.0005


-94.7566 -87.774 -87.3689 -51.1681 -5.8096 -0.0179 -0.0005
-94.821 -87.9177 -89.9201 -49.908 -5.6037 -0.0153 -0.0006
-94.9291 -88.14 -93.7891 -48.6848 -5.4028 -0.013 -0.0006
-95.0826 -88.4476 -101.4315 -47.4973 -5.207 -0.011 -0.0006
-95.2835 -88.8497 -108.2215 -46.344 -5.0162 -0.0093 -0.0006
-95.5348 -89.3585 -95.6277 -45.2234 -4.8303 -0.0078 -0.0006
-95.8402 -89.9911 -90.6324 -44.1342 -4.6492 -0.0065 -0.0006
-96.2049 -90.7714 -87.4628 -43.0749 -4.4728 -0.0054 -0.0006
-96.6351 -91.7338 -85.1492 -42.0443 -4.3012 -0.0045 -0.0006
-97.1394 -92.931 -83.3415 -41.0411 -4.1341 -0.0037 -0.0005
-97.7286 -94.4481 -81.8733 -40.0643 -3.9716 -0.003 -0.0005
-98.4173 -96.436 -80.6524 -39.1127 -3.8136 -0.0025 -0.0005
-99.2254 -99.203 -79.6226 -38.1853 -3.6601 -0.0021 -0.0004
-100.1808 -103.5561 -78.7473 -37.2811 -3.5108 -0.0018 -0.0004
-101.3243 -113.3872 -78.0013 -36.3993 -3.3659 -0.0015 -0.0003
-102.719 -112.0243 -77.367 -35.5388 -3.2251 -0.0013 -0.0003
-104.4697 -102.7775 -76.8317 -34.699 -3.0885 -0.0012 -0.0002
-106.771 -98.3463 -76.3858 -33.879 -2.956 -0.0011 -0.0002
-110.0508 -95.407 -76.0226 -33.0783 -2.8275 -0.001 -0.0001
-115.618 -93.2156 -75.7372 -32.2959 -2.703 -0.0009 0
-137.7605 -91.4812 -75.5263 -31.5314 -2.5824 -0.0009 0
-116.896 -90.0597 -75.3876 -30.7842 -2.4656 -0.0009 0.0001
-110.4188 -88.869 -75.3203 -30.0536 -2.3525 -0.0008 0.0001
-106.7178 -87.8585 -75.3245 -29.3392 -2.2431 -0.0008 0.0002
-104.1187 -86.9946 -75.4014 -28.6404 -2.1374 -0.0008 0.0002
-102.1209 -86.2543 -75.5532 -27.9567 -2.0352 -0.0008 0.0002
-100.5064 -85.621 -75.7835 -27.2878 -1.9365 -0.0008 0.0003
-99.1604 -85.083 -76.0973 -26.6331 -1.8413 -0.0008 0.0003
-98.0154 -84.6317 -76.5015 -25.9923 -1.7494 -0.0007 0.0003
-97.0281 -84.2606 -77.0054 -25.3649 -1.6608 -0.0007 0.0003
-96.1696 -83.9654 -77.6214 -24.7506 -1.5755 -0.0006 0.0004
-95.4195 -83.7433 -78.3665 -24.1491 -1.4933 -0.0005
-94.7631 -83.5926 -79.2646 -23.56 -1.4142 -0.0005
-94.1896 -83.5129 -80.3497 -22.983 -1.3382 -0.0004
-93.6908 -83.5051 -81.6736 -22.4179 -1.2651 -0.0003
-93.2609 -83.5711 -83.3192 -21.8642 -1.195 -0.0002
-92.8952 -83.7142 -85.4323 -21.3217 -1.1277 -0.0001
-92.5907 -83.9396 -88.307 -20.7903 -1.0632 0
-92.3449 -84.2541 -92.6966 -20.2695 -1.0013 0.0001
-92.1568 -84.6673 -102.0013 -19.7593 -0.9422 0.0002
-92.0256 -85.1923 -102.9542 -19.2592 -0.8856 0.0004
-91.9517 -85.8474 -93.224 -18.7692 -0.8315 0.0005
-91.9361 -86.6583 -88.8774 -18.2891 -0.7798 0.0006
-91.9807 -87.663 -86.1158 -17.8185 -0.7306 0.0007
-92.0881 -88.9199 -84.1425 -17.3573 -0.6836 0.0008
-92.2623 -90.5253 -82.6524 -16.9054 -0.6389 0.0009
-92.5084 -92.6549 -81.4959 -16.4625 -0.5964 0.0009
-92.8331 -95.6844 -80.5884 -16.0284 -0.556 0.001
-93.2455 -100.6892 -79.8771 -15.6031 -0.5177 0.0011
-93.7575 -115.13 -79.3267 -15.1863 -0.4814 0.0011
-94.3853 -104.4881 -78.9113 -14.7779 -0.447 0.0012
-95.1514 -97.169 -78.6109 -14.3777 -0.4144 0.0012
-96.0879 -93.2109 -78.4081 -13.9856 -0.3836 0.0012
-97.243 -90.4893 -78.2863 -13.6014 -0.3546 0.0012
-98.6933 -88.4259 -78.228 -13.2251 -0.3273 0.0012
-100.5712 -86.7777 -78.2131 -12.8564 -0.3016 0.0012
-103.1379 -85.4199 -78.2173 -12.4952 -0.2774 0.0012
-107.032 -84.2796 -78.2113 -12.1415 -0.2547 0.0012
-114.7691 -83.3111 -78.1598 -11.795 -0.2334 0.0011
-121.0305 -82.4838 -78.0227 -11.4557 -0.2135 0.0011
-108.6959 -81.7765 -77.7577 -11.1235 -0.195 0.001
-103.7232 -81.174 -77.3256 -10.7983 -0.1776 0.0009
-100.5507 -80.6654 -76.6967 -10.4799 -0.1615 0.0009
-98.224 -80.2426 -75.8573 -10.1682 -0.1465 0.0008
-96.3971 -79.9 -74.8121 -9.8632 -0.1326 0.0007
-94.9049 -79.6336 -73.583 -9.5647 -0.1197 0.0006
-93.6558 -79.441 -72.2034 -9.2726 -0.1079 0.0005
-92.594 -79.321 -70.7116 -8.9869 -0.0969 0.0004
-91.6831 -79.2737 -69.1449 -8.7074 -0.0868 0.0003
-90.898 -79.3003 -67.5357 -8.4341 -0.0776 0.0002
-90.2211 -79.4036 -65.9104 -8.1668 -0.0691 0.0001
-89.6395 -79.5875 -64.2888 -7.9056 -0.0614 0
-89.1439 -79.8581 -62.6853 -7.6502 -0.0543 0
-88.7274 -80.2235 -61.1098 -7.4006 -0.0479 -0.0001
-88.385 -80.6951 -59.5689 -7.1568 -0.0421 -0.0002
-88.1131 -81.2884 -58.0665 -6.9186 -0.0369 -0.0003
-87.9097 -82.0253 -56.6047 -6.686 -0.0322 -0.0003
-87.7735 -82.9374 -55.1842 -6.4588 -0.028 -0.0004
-87.7047 -84.0723 -53.8051 -6.2371 -0.0242 -0.0005
QUESTION 3

3 (a)
3 (b)

MATLAB CODE

%Design of the digital lowpass Butterworth filter


format long
fs=8000;% Sampling rate
[B A]=lp2lp([1],[1 1], 10.69*10^3) %Complete step 2
[b a]=bilinear(B,A,fs) %Complete step 3
%Plot the magnitude and phase responses
%b=[0.4005 0.4005]; numerator coefficients from MATLAB of transfer function
%a=[1 -0.1989]; denominator coefficients from MATLAB of transfer function
freqz(b,a,512,fs);
axis([0 fs/2 -20 1])

>> question_3

B= 10690

A= 1 10690

b = 0.400524541026602 0.400524541026602

a = 1.000000000000000 -0.198950917946797
QUESTION 4

4 (a)
4 (b)

MATLAB CODE

%Design of the digital highpass Chebyshev filter


format long
fs =8000; % Sampling rate
% BLT design
[B A] = lp2hp([0.4913],[1 0.9883 1.2384 0.4913], 1.6*10 ^ 4) % Complete step 2
[b a] = bilinear(B,A,fs)% Complete step 3
% Plot the magnitude and phase responses
%b =[0.1327 -0.2654 0.1327]; numerator coefficients from MATLAB
%a =[1 0.7996 0.3618];denominator coefficients from MATLAB
freqz(b,a,512,fs);
axis([0 fs/2 -40 10])

>> question_4

B = 1.000000000000000 0 0.000000058207661 0

A= 1.0e+12 *

0.000000000001000 0.000000040330552 0.000514970079381 8.337064929778135

b = 0.132140935987090 -0.396422807961270 0.396422807961270 -0.132140935987090

a = 1.000000000000000 0.343195266272189 0.604410973641743 0.204088219472835

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy