Analog and Digital Filters
605
ANALYTICAL Solution
Part (a)
H w
V w
V w
R
jwC
R
j w
j w
R C
o
i
( )
( )
( )
*
*
*
ϭ
ϭ
ϩ
ϭ
ϩ
1
1
Part (b)
H w
w
w
R C
( )
*
ϭ
ϩ
2
2
1
∠H w
2 tan w R C
( )
* *
1
ϭ ( )
(
)
ր Ϫ
Ϫ
MATLAB Solution
% Script File: HP _ filter _ analysis
% RC-High Pass Filter Analysis
R=1e3/(2*pi);
C=.1e-6;
a = 1/(R*C);
w = -5*a:10000:5*a;
num = [1 0];
den = [1 a];
Hhp = freqs(num,den,w);
figure(1);
subplot(2,1,1);
plot(w/(2*pi),abs(Hhp));
ylabel(‘magnitude’);
xlabel(‘frequency in Hrz’);
title(‘Magnitude of H(f) vs. frequency’);
subplot(2,1,2);
plot(w/(2*pi),angle(Hhp)*180/pi);
xlabel(‘frequency in Hrz’);
ylabel(‘phase in degrees’);
title(‘Phase of H(f) vs. frequency’);
figure(2)
db=20.*log(abs(Hhp));
FIGURE 6.31
Circuit diagram of Example 6.2.
R
C
V i (w )
V o (w )
CRC_47760_CH006.indd 605
CRC_47760_CH006.indd 605
7/23/2008 2:26:44 PM
7/23/2008 2:26:44 PM
605
ANALYTICAL Solution
Part (a)
H w
V w
V w
R
jwC
R
j w
j w
R C
o
i
( )
( )
( )
*
*
*
ϭ
ϭ
ϩ
ϭ
ϩ
1
1
Part (b)
H w
w
w
R C
( )
*
ϭ
ϩ
2
2
1
∠H w
2 tan w R C
( )
* *
1
ϭ ( )
(
)
ր Ϫ
Ϫ
MATLAB Solution
% Script File: HP _ filter _ analysis
% RC-High Pass Filter Analysis
R=1e3/(2*pi);
C=.1e-6;
a = 1/(R*C);
w = -5*a:10000:5*a;
num = [1 0];
den = [1 a];
Hhp = freqs(num,den,w);
figure(1);
subplot(2,1,1);
plot(w/(2*pi),abs(Hhp));
ylabel(‘magnitude’);
xlabel(‘frequency in Hrz’);
title(‘Magnitude of H(f) vs. frequency’);
subplot(2,1,2);
plot(w/(2*pi),angle(Hhp)*180/pi);
xlabel(‘frequency in Hrz’);
ylabel(‘phase in degrees’);
title(‘Phase of H(f) vs. frequency’);
figure(2)
db=20.*log(abs(Hhp));
FIGURE 6.31
Circuit diagram of Example 6.2.
R
C
V i (w )
V o (w )
CRC_47760_CH006.indd 605
CRC_47760_CH006.indd 605
7/23/2008 2:26:44 PM
7/23/2008 2:26:44 PM
