You are on page 1of 6

EL220 Signals and Systems

Experiment # 12

Analog Filter Designing Using

MATLAB Performed on

Student Name:
Roll Number:
Section:-

Maximum Marks Performance = 05 Viva = 05 Total = 10

Marks Obtained

Remarks (if any)


Experiment evaluated by
Instructor Name: Rameen Anwar Signature and Date:

Copyright © Department of Electrical Engineering – Usman Institute of Technology


Theory
FILTERS:
Filters are so named according to the frequency range of signals that they allow to pass through
them, while blocking or “attenuating” the rest. The most commonly used filter designs are the:
 The Low Pass Filter – the low pass filter only allows low frequency signals from 0Hz to
its cut-off frequency, ƒc point to pass while blocking those any higher.
 The High Pass Filter – the high pass filter only allows high frequency signals from its cut-
off frequency, ƒc point and higher to infinity to pass through while blocking those any
lower.
 The Band Pass Filter – the band pass filter allows signals falling within a certain
frequency band setup between two points to pass through while blocking both the lower
and higher frequencies either side of this frequency band.
Simple First-order passive filters (1st order) can be made by connecting together a single resistor
and a single capacitor in series across an input signal, ( Vin ) with the output of the filter, ( Vout )
taken from the junction of these two components. Depending on which way around we connect
the resistor and the capacitor with regards to the output signal determines the type of filter
construction resulting in either a Low Pass Filter or a High Pass Filter.
As the function of any filter is to allow signals of a given band of frequencies to pass unaltered
while attenuating or weakening all others that are not wanted, we can define the amplitude
response characteristics of an ideal filter by using an ideal frequency response curve of the four
basic filter types as shown.

Figure 1 Ideal Filter Response Curves

Filters can be divided into two distinct types: active filters and passive filters. Active filters
contain amplifying devices to increase signal strength while passive do not contain amplifying
devices to strengthen the signal. As there are two passive components within a passive filter
design the output signal has a smaller amplitude than its corresponding input signal, therefore
passive RC filters attenuate the signal and have a gain of less than one, (unity).
In this experiment, we will look at the simplest type, a passive two component RC and RL low
pass, high pass and bandpass filters.

BODE PLOTS:
A Bode Plot is a useful tool that shows the gain and phase response of a given LTI system for
different frequencies. Bode Plots are generally used with the Fourier Transform of a given
system. The frequency of the bode plots are plotted against a logarithmic frequency axis. Every
tickmark on the frequency axis represents a power of 10 times the previous value. For instance,
on a standard
Bode plot, the values of the markers go from (0.1, 1, 10, 100, 1000, ...) Because each tickmark is
a power of 10, they are referred to as a decade. Notice that the "length" of a decade decreases as
you move to the right on the graph.
The bode Magnitude plot measures the system Input/Output ratio in special units called decibels.
The Bode phase plot measures the phase shift in degrees (typically, but radians are also used).

RC LOW PASS FILTER:

Figure 2 Low Pass Filter

The reactance of a capacitor varies inversely with frequency, while the value of the resistor
remains constant as the frequency changes. At low frequencies the capacitive reactance, ( Xc< )
of the capacitor will be very large compared to the resistive value of the resistor, R. This means
that the voltage potential, Vc across the capacitor will be much larger than the voltage drop, Vr
developed across the resistor. At high frequencies, the reverse is true with Vc being small and Vr
being large due to the change in the capacitive reactance value.
While the circuit above is that of an RC Low Pass Filter circuit, it can also be thought of as a
frequency dependent variable potential divider
circuit Cutoff Frequency:
“Cut-off”, “Corner” or “Breakpoint” frequency is defined as being the frequency point where the
capacitive reactance and resistance are equal, R = Xc = 4k7Ω. When this occurs the output signal
is attenuated to 70.7% of the input signal value or -3dB (20 log (Vout/Vin)) of the input.
Although R = Xc, the output is not half of the input signal. This is because it is equal to the vector
sum of the two and is therefore 0.707 of the input. The cutoff frequency of given RC filter is:

RC HIGH PASS FILTER:

Figure 3 RC High Pass Filter

In this circuit arrangement, the reactance of the capacitor is very high at low frequencies so the
capacitor acts like an open circuit and blocks any input signals at Vin until the cut-off frequency
point ( ƒc ) is reached. Above this cut-off frequency point the reactance of the capacitor has
reduced sufficiently as to now act more like a short circuit allowing all of the input signal to pass
directly to the output.

RC BAND PASS FILTER:

Figure 4 RC Band Pass Filter


Unlike a low pass filter that only pass signals of a low frequency range or a high pass filter which
pass signals of a higher frequency range, a Band Pass Filters passes signals within a certain
“band” or “spread” of frequencies without distorting the input signal or introducing extra noise.
This band of frequencies can be any width and is commonly known as the filters Bandwidth. It is
the difference between the lower cut-off frequency ( ƒc LOWER ) and the higher cut-off frequency
( ƒcHIGHER ) points. In other words, BW = ƒ H – ƒL. Clearly for a pass band filter to function
correctly, the cut-off frequency of the low pass filter must be higher than the cut-off frequency for
the high pass filter.

SECOND ORDER RC LPF:

Figure 5 Second Order RC LPF

The above circuit uses two passive first-order low pass filters connected or “cascaded” together to
form a second-order or two-pole filter network. Therefore, we can see that a first-order low pass
filter can be converted into a second-order type by simply adding an additional RC network to it
and the more RC stages we add the higher becomes the order of the filter. If a number ( n ) of
such RC stages are cascaded together, the resulting RC filter circuit would be known as an “nth-
order” filter with a roll-off slope of “n x -20dB/decade”

Second-order filters are important and widely used in filter designs because when combined with
first-order filters any higher-order nth-value filters can be designed using them. For example, a
third order low-pass filter is formed by connecting in series or cascading together a first and a
second-order low pass filter. But there is a downside too cascading together RC filter stages.
Although there is no limit to the order of the filter that can be formed, as the order increases, the
gain and accuracy of the final filter declines.

The cutoff frequency of second order LPF can be represented as:


-3 dB Point of Second Order RC System:

where ƒc is the calculated cut-off frequency, n is the filter order and ƒ-3dB is the new -3dB pass
band frequency as a result in the increase of the filters order.

Example 1:-

R=10000; C=0.1*10^-9;
H=tf([1/(R*C)],[1 1/(R*C)]);
bodemag(H,'k*-')
grid on

Example 2:-
R=10000;
C=0.1*10^-9;
H=tf([1 0],[1 1/(R*C)]);
bodemag(H,'k*-')
grid on

Example 3:-

R1=10000;
R2=1000000;
C1=0.1*10^-9;
C2=0.1*10^-9;
H_low = tf([1/(R1*C1)],[1 1/(R1*C1)]);
H_pass = tf([1 0],[1 1/(R2*C2)]);
H = H_low*H_pass;
bodemag(H,'k*-')
grid on

Example 4:-
R1=10000;
C1=0.1*10^-9;
H_low = tf([1/(R1*C1)],[1 1/(R1*C1)]);
H = H_low*H_low;
bodemag(H,'k*-',H_low,'r*-')
legend('Second Order LPF','First Order LPF')
grid on
Exercise
Q1: For the RC LPF form the bode plot considering R=10KΩ and C=0.1nF. Also comment on
the calculated cutoff and the cutoff observed in bode plot (Refer Example 1).
R=10000; C=0.1*10^-9;
H=tf([1/(R*C)],[1 1/(R*C)]);
bodemag(H,'k*-')
grid on

Q2: Considering the values of R and C as in Q1. Draw the Bode magnitude plot and comment on
cutoff frequency. (Refer Example 2)

R=10000;
C=0.1*10^-9;
H=tf([1 0],[1 1/(R*C)]);
bodemag(H,'k*-')
grid on

Q3: Design a high pass filter having cutoff frequency at 1KHz, considering the practical values of
R and C. Draw the bode magnitude plot using MATLAB and identify the cutoff frequency in that
plot (refer Example 2)

Q4: Design a Band Pass Filter (BPF) that could pass a band of frequencies. Find the cutoff
frequencies of cascaded LPF and HPF. Identify -3dB points in Bode magnitude plot.(Refer
Example 3)

Q5: Design a BPF that could pass a range of frequencies from 1KHz to 1MHz, considering the
practical values of resistors and capacitors. Draw its Bode magnitude plot using MATLAB.

Open Ended Lab

Q1: Design the second order LPF using cascaded RC network. Find the cutoff frequency (3db
point in graph)
R1=10000;
C1=0.1*10^-9;
H_low = tf([1/(R1*C1)],[1 1/(R1*C1)]);
H = H_low*H_low;
bodemag(H,'k*-',H_low,'r*-')
legend('Second Order LPF','First Order LPF')
grid on

Q2: Design the second order RC HPF and comment on the relation between first order and
second HPF.

You might also like