0% found this document useful (0 votes)
147 views5 pages

Ee 15 Project Documentation

This document describes an EE 15 project to create a band-stop MATLAB program. The program filters signals between 360-460 Hz, plots the input and filtered signals and their frequency components, and displays the pole-zero map. It prompts the user for frequencies and sampling rate, assigns the inputs to arrays, creates zeros and poles, converts to a transfer function, and plots the various outputs. Based on testing, the sampling rate works best around 2000 Hz and input frequencies should be within 10% of the filter range for optimal results. Trial and error was used to set up the poles and zeros.

Uploaded by

Lean Grafane
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)
147 views5 pages

Ee 15 Project Documentation

This document describes an EE 15 project to create a band-stop MATLAB program. The program filters signals between 360-460 Hz, plots the input and filtered signals and their frequency components, and displays the pole-zero map. It prompts the user for frequencies and sampling rate, assigns the inputs to arrays, creates zeros and poles, converts to a transfer function, and plots the various outputs. Based on testing, the sampling rate works best around 2000 Hz and input frequencies should be within 10% of the filter range for optimal results. Trial and error was used to set up the poles and zeros.

Uploaded by

Lean Grafane
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/ 5

EE 15 PROJECT DOCUMENTATION

Proponents: Carandang, Vince Amiel; Grafane, Deus Lean, B; Cruz, Zeliena Dominique J

A. Project Specification
● Filter Type: Band-stop
● Given Range: 360-460 Hz

B. Band-stop MATLAB program features


● It filters signals within 360-460Hz
● Plots Input signal waveforms, filtered signal waveform, input signal frequency
components, filtered signal frequency components, Pole-zero map defined by the user.
● User-friendly interface.

​C. Program Flow


Line 15-17: ​Prompts the user to input desired frequencies and sampling rate through
INPUT ​function. ​NIF ​variable as the number of frequencies and ​VIF ​as the
corresponding frequencies given and​ SR a ​ s the sampling rate.

Lines 18-23​: Assigns inputs into array using iteration.

Lines 24-31: ​With an interval of 10 (variable Z), zeroes are created from the frequency
of 360Hz and 460Hz. Array arrangement is used in storing of zeroes into Z where
conjugate pairs are also included.

Lines 32-42​: With an interval of 0.05 (variable P), poles are created from the left and
right-side frequency of 360Hz and 460Hz respectively. Array arrangement is used in
storing of poles into P.

Lines 43-44: ​Converts roots to polynomial

Lines 45-46: ​Digital Signal Processing of Transfer Function and calls the function
freqzM

Line 47-52: ​Set up the equation to be evaluated and to be plotted, xk and y.

Line 55-56​: Plots the pole-zero map through ​pzplot ​function;

Line 57-59: ​Plots the magnitude and phase of the spectrum into one window using ​freqz
function.
Lines 60-61: ​Plots the signal waveform namely: “Input signal waveform”.

Line 62: ​Plots the spectrograms “Input Signal Frequency Components”

Line 63: ​Plots the “Filtered signal waveform”.

Line 64​: Plot the “Filtered Signal Frequency Components”.


D. Sample run
Number of test frequencies: 4
Frequency 1:340Hz
Frequency 2:380Hz
Frequency 3:440Hz
Frequency 4:500Hz
Sampling rate: 2000Hz

Fig. 1 Input Signal Waveform and Filtered Signal Waveform


Fig. 2. Input Signal Frequency and Filtered Signal Frequency Components
Fig.3. Magnitude and the Phase of the designed filter

Fig. 4. Pole-Zero Plot

E. Limitations:
The Matlab Band-stop filter program is designed as band-stop filter at 360Hz to 460Hz and only
filters the frequencies within the given range. Based on multiple run test, the most appropriate
values for sampling rate lies approximately 2000 ± 20% since values outside the ranges
conflicts with the graphs of input and filtered signal waveform of high frequencies. Also the value
of input frequency must be 10% lower than 360Hz and 10% higher than 460 Hz for best result.
Trial and error method is used in setting up the poles and zeroes to achieved best presentation
of the graph.

You might also like