

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


% Example 5-3 p 229: Butterworth Low-Pass Filter %
close all; % close all opened graphs clear all; % clear all variables figure; % open new graph
% Normalized components from filter coefficient tables Ln1 = 1.; % Normalized Inductance Ln2 = 1.; % Normalized Inductance Cn1 = 2.; % Normalized Capacitance Rg = 50; % Source resistance RL = 50; % Load Resistance
wc=2pi900e6; % Cutoff Frequency of 900 MHz
L1=Ln1RL/wc; % Actual L1 value L2=Ln2RL/wc; % Actual L2 value C1=Cn1/(RL*wc); % Actual C1 value
f = 1; for i=1:4000; w=2pif; ZL1=jwL1; ZL2=jwL2; ZC1=1./(jwC1); YC1=1./ZC1; GL=1./RL;
% Define the ABCD matrices for each element of the filter
A0=[1 Rg;0 1]; A1=[1 ZL1;0 1]; A2=[1 0;YC1 1]; A3=[1 ZL2;0 1]; A4=[1 0;GL 1];
ABCD=A0A1A2A3A4; freq(i)=f; H(i)=2.*1/(ABCD(1));
f=f+0.001wc/(2pi); end
subplot(211), semilogx(freq,20*log10(abs(H)));grid on; ylim([-50 10]); title('Low-Pass Butterworth Filter Response'); xlabel('Frequency, Hz'); ylabel('Attenuation, dB');
phase=atan(imag(H)./real(H)); subplot(212), semilogx(freq,phase/pi*180);grid on; xlabel('Frequency, Hz'); ylabel('Phase, deg.');