Docsity

Butterworth Low-Pass Filter Design and Response in MATLAB, Study notes of Electrical Engineering

Toggle sidebar
bg1
Example 5-3 p 229 MatLab Result:
Second Order Butterworth Low-Pass Filter w/ fc = 900 MHz
% 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=2*pi*900e6; % Cutoff Frequency of 900 MHz
L1=Ln1*RL/wc; % Actual L1 value
L2=Ln2*RL/wc; % Actual L2 value
C1=Cn1/(RL*wc); % Actual C1 value
f = 1;
for i=1:4000;
w=2*pi*f;
ZL1=j*w*L1;
ZL2=j*w*L2;
ZC1=1./(j*w*C1);
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=A0*A1*A2*A3*A4;
freq(i)=f;
H(i)=2.*1/(ABCD(1));
f=f+0.001*wc/(2*pi);
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.');
Docsity.com
pf2

Partial preview of the text

Download Butterworth Low-Pass Filter Design and Response in MATLAB and more Study notes Electrical Engineering in PDF only on Docsity!

Example 5-3 p 229 MatLab Result:

Second Order Butterworth Low-Pass Filter w/ fc = 900 MHz

% 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.');

Docsity.com

Docsity.com