0% found this document useful (0 votes)
17 views

EEE 4202 SW Open Ended Lab

Uploaded by

bob nayad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

EEE 4202 SW Open Ended Lab

Uploaded by

bob nayad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ISLAMIC UNIVERSITY OF TECHNOLOGY (IUT)

ORGANISATION OF ISLAMIC COOPERATION (OIC)


DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

COURSE NO. : EEE 4202


COURSE TITLE : Electrical Circuit II (Software) Lab
STUDENT ID. :
EXPERIMENT NO. : 04 (Open Ended Lab)
EXPERIMENT NAME : Design and realization of passive filters using Proteus and
digital filters using MATLAB and Simulink.
Objective:
1. To create passive filter using RLC circuit in proteus
2. Design a filter approximation using MATLAB
3. Build and apply a digital filter in Simulink.
Part A
Theory:
A filter is a circuit that is designed to pass signals with desired frequencies and reject or attenuate
others.
As a frequency-selective device, a filter can be used to limit the frequency spectrum of a signal to
some specified band of frequencies. Filters are the circuits used in radio and TV receivers to allow
us to select one desired signal out of a multitude of broadcast signals in the environment. A filter
is a passive filter if it consists of only passive elements R, L, and C.
There are four types of filters whether passive:
1. A low pass filter passes low frequencies and stops high frequencies, as shown in Fig. 1(a). A
typical low pass filter is formed when the output of an RC circuit is taken off the capacitor and the
cutoff frequency in Hz is defined by fc = 1/2πRC .
2. A high pass filter passes high frequencies and rejects low frequencies, as shown in Fig. 1(b). A
high pass filter is formed when the output of an RC circuit is taken off the resistor and the cutoff
frequency in Hz is defined by fc = 1/2πRC.
3. A band pass filter passes frequencies within a frequency band and blocks or attenuates
frequencies outside the band, as shown ideally in Fig. 1(c). The RLC series resonant circuit
provides a band pass filter when the output is taken off the resistor and the center frequency is
given by fo = 1/2π√𝐿𝐶.
4. A band stop filter passes frequencies outside a frequency band and blocks or attenuates
frequencies within the band, as shown ideally in Fig. 1(d). A band stop filter is formed when the
output RLC series resonant circuit is taken off the LC series combination and the center frequency
is given by fo = 1/2π√𝐿𝐶.
Fig 1: Ideal frequency response of four types of filter: (a) low pass filter, (b) high pass filter, (c)
band pass filter and (d) band stop filter.

Open Ended Task Part A


Your task is to design a circuit in proteus that can be used as a filter. Use frequency analysis or
AC sweep to demonstrate the circuit’s filter response after designing it.
Students with Odd student ID: Will design a Lowpass filter and a Band pass filter
Students with Even student ID: Will design a Highpass filter and a Band stop filter
Filter specification:
For Low pass and High pass filter: choose a cutoff frequency fc = last 3 digits of your student
id (Hz). For example, a student id like 160021155 will choose fc = 155 Hz as cutoff frequency.
For Band pass and Band stop filter: choose the center frequency fo = last 3 digits of your
student id (Hz). For example, a student id like 160021055 will choose fo = 55 Hz as center
frequency.
The design parameters of the circuits are up to the students to choose. Proper capacitance,
inductance and resistance values should be calculated and then applied in the circuit for the
desired response to be produced.

Part B
Filter approximation is a process in digital signal processing that involves designing a filter with
a frequency response that approximates a desired response. There are several different types of
filter approximations that are commonly used in digital signal processing. Some of the most
common filter approximations include Butterworth, Chebyshev, Elliptic, and Bessel filters. Each
of these filters has its own unique characteristics and trade-offs between frequency response, filter
order, and phase response.
Butterworth Filters: A Butterworth filter is a type of filter that has a maximally flat magnitude
response in the passband. This means that the filter has a uniform gain in the passband and a
smooth transition to the stopband. The Butterworth filter is often used when a flat frequency
response is desired in the passband, and the sharpness of the transition to the stopband is not
critical.

Chebyshev Filters: A Chebyshev filter is a type of filter that has a steeper roll-off than the
Butterworth filter but with a ripple in the passband. The Chebyshev filter is designed to achieve a
sharper transition between the passband and the stopband at the expense of a small amount of
ripple in the passband. The amount of ripple can be controlled by adjusting the filter's
parameters.

There are two types of Chebyshev filters: Type I and Type II. In Type I, the ripple is present in
the passband, while in Type II, the ripple is present in the stopband. Chebyshev filters are often
used when a sharper transition between the passband and stopband is required, such as in audio
processing or data analysis.

Elliptical Filters: An elliptical filter, also known as a Cauer filter, is a type of filter that has the
steepest roll-off among the three filters but with ripples in both the passband and the stopband.
The elliptical filter is designed to achieve the sharpest possible transition between the passband
and the stopband, but with a trade-off of having ripples in both the passband and stopband. The
amount of ripple in both the passband and stopband can be controlled by adjusting the filter's
parameters.

Fig 2: Different filter type with their responses


Open ended Task part B
Suppose you are in need of a filter that should specific kind of response with specific number of
ripples present. The amount of ripples present in the filter can be related to order of the filter like
this:
Number of ripples = n/2; where n is the order of the filter.
Students with Odd student ID: Will design a Highpass filter with flat passband and rippled
stopband response
Students with Even student ID: Will design a Lowpass filter with rippled passband and flat
stopband response
Write a MATLAB code to simulate the output response of a filter with the properties mentioned
above, choosing the right type of approximation filter.

1. The filter cut-off frequency (fc) should be determined in the way exactly like mentioned in
Part A task. Choose sampling frequency = 2*(cutoff frequency). [fc = 2fs]
2. The number of ripples present in the filter should be last digit of your student id. For example,
a student with a student id of 160021055 will have 5 ripples present (in passband/stopband).
Choose the order number (n) of the filter in such a way.
3. Magnitude of ripple factor (Rp) in db should be as followed depending on your section:
Sec A: 1 Sec B: 2 Sec C: 3

Part C
FilterBuilder:
filterBuilder starts an interactive tool for building filters. It relies on the fdesign object-object
oriented filter design paradigm, and is intended to reduce development time during the filter design
process. filterBuilder uses a specification-centered approach to find the best algorithm for the
desired response.
Instructions:

To use filterBuilder, enter filterBuilder at the MATLAB® command line using one
of three approaches:

• Simply enter filterBuilder. MATLAB opens a dialog for you to select a filter
response type. After you select a filter response type, filterBuilder launches the
appropriate filter design dialog box.
• Enter filterBuilder(h), where h is an existing filter object. For example, if h is a
bandpass filter, filterBuilder(h) opens the bandpass filter design dialog box. The
h object must have been created using filterBuilder or using fdesign.
• Enter filterBuilder('response') to replace response with a response method from
the following table. MATLAB opens a filter design dialog that corresponds to the
specified response.

Open Ended Task Part C

1. Create a IIR filter using the filterbuilder with specifications according to the Part A (Center
Frequency fc should be last 3 digits of student id). Observe the filter’s magnitude response from
View Filter Response option and generate the filter Simulink block from Code Generation tab.
Students with Odd student ID: Will design a Band Stop filter (with any choice of filter
approximation and filter order)
Students with Even student ID: Will design a Band Pass filter (with any choice of filter
approximation and filter order)

Determination of center frequency

For Bandstop filter, the center frequency is calculated


as average of Stopband frequency 1 and 2.
Fc = (Stopband frequency 1 + Stopband Frequency 2) / 2
Choice of frequencies are up to the students.
Passband 1 < Stop band 1 <Stop band 2 < Passband 2
The minimum input sample rate should be greater than
twice the Passband Frequency 2. And,
In this example, center frequency = (45+55)/2 = 50 Hz
And Input Sample rate taken 200 Hz (Greater than 2*65
Hz).
For Bandpass filter, the center frequency is calculated as
average of Passband frequency 1 and 2.
Fc = (Passband frequency 1 + Passband Frequency 2) / 2
Choice of frequencies are up to the students.
Stop band 1 < Pass band 1 <Pass band 2 < Stop band 2
The minimum input sample rate should be greater than twice
the Stopband Frequency 2. And,
In this example, center frequency = (140+160)/2 = 150 Hz
Input Sample rate taken 400 Hz (2*200 Hz).

(This task 2 of part C is not required to perform in the lab)


2. To observe the filter action, use the simulated filter block in a Simulink simulation to filter out
desired signal from a noisy signal. Desired signal is a sine wave of frequency as last 3 digits of
your student id in Hz. Add a very high frequency sine wave signal to your desired signal, which
will act as noise over the desired signal. Then filter out the high frequency signal using the filter
generated from filter builder. Use the following block diagram for reference:

Fig: Simulink block Diagram


Fig: Input noisy Signal

Fig: Output noise free Signal

You might also like