Académique Documents
Professionnel Documents
Culture Documents
TECHNOLOGY
(DEPARTMENT OF ELECTRONIC SYSTEMS ENGINEERING)
ASSIGNMENT 1
NAME
MATRIC NO
IC. NO
YEAR / COURSE
STUDENT’S SECTION
LECTURER’S NAME
DATE
QUESTION 1
MATLAB CODE
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;
>> 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
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;
>> 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
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;
>> 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
N=31
N=41
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;
>> 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
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;
>> 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
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;
>> 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
3 (a)
3 (b)
MATLAB CODE
>> 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
>> question_4
B = 1.000000000000000 0 0.000000058207661 0
A= 1.0e+12 *