You are on page 1of 5

Analog Filters

Table of Contents
........................................................................................................................................ 1
Low pass filter ................................................................................................................... 1
High pass filter ................................................................................................................... 2
Band pass filter ................................................................................................................... 3
Band elemination filter ......................................................................................................... 4

• Low pass filter

• High pass filter

• Band pass filter

• Band elemination filter

Low pass filter


% Magnitude
w=0:0.02:10; RC=1;
magGjw=1./sqrt(1+w.*RC);
subplot(2,1,1)
semilogx(w,magGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Magnitude of Vout/
Vin');...
title('Magnitude Characteristics of basic RC low?pass filter');
grid

% phase
w=0:0.02:10; RC=1;
phaseGjw=-atan(w.*RC).*180./pi;
subplot(2,1,2)
semilogx(w,phaseGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Phase of Vout/
Vin ? degrees');...
title('Phase Characteristics of basic RC low?pass filter');
grid

1
Analog Filters

High pass filter


% Magnitude
w=0:0.02:100;
RC=1; magGjw=1./sqrt(1+1./(w.*RC).^2);
subplot(2,1,1)
semilogx(w,magGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Magnitude of Vout/
Vin');...
title('Magnitude Characteristics of basic RC high?pass filter');
grid

% Phase
w=0:0.02:10; RC=1;
phaseGjw=atan(1./(w.*RC)).*180./pi;
subplot(2,1,2)
semilogx(w,phaseGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Phase of Vout/
Vin ? degrees');...
title('Phase Characteristics of basic RC high?pass filter');
grid

2
Analog Filters

Band pass filter


% Magnitude
w=0:0.02:100;
magGjw=abs(-j.*w./(w.^2-j.*w-1));
subplot(2,1,1)
semilogx(w,magGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Magnitude of Vout/
Vin');...
title('Magnitude Characteristics of basic RLC band?pass filter');
grid

% Phase
w=0:0.02:100;
phaseGjw=angle(-j.*w./(w.^2-j.*w-1)).*180./pi;
subplot(2,1,2)
semilogx(w,phaseGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Phase of Vout/
Vin ? degrees');...
title('Phase Characteristics of basic RLC band?pass filter');
grid

3
Analog Filters

Band elemination filter


% Magnitude
w=0:0.02:100;
magG=abs((w.^2-1)./(w.^2-j.*w-1));
subplot(2,1,1)
semilogx(w,magG);
grid

% Phase
w=0:0.02:100;
phaseGjw=angle((w.^2-1)./(w.^2-j.*w-1)).*180./pi;
subplot(2,1,2)
semilogx(w,phaseGjw);...
xlabel('Frequency in rad/sec ? log scale'); ylabel('Phase of Vout/
Vin ? degrees');...
title('Phase Characteristics of basic RLC band?elimination filter');
grid

4
Analog Filters

Published with MATLAB® R2017a

You might also like