You are on page 1of 8

Analog Filter Design

CEP

“Audio Signal Processing”


Fall 2021

Submitted By:
Huzaifa Yasir FA19-BEE-112

Muhammad Tahir FA19-BEE-128

Class & Section: BEE-


5D

Supervisor:
“Dr. Muhammad Altaf”

Department of Electrical and Computer Engineering


COMSATS University Islamabad
Wah Campus
Part 1 :
Octave Bands Concept:

Part 1 CODE:
clc; clear all; close all;

[x,Fs]= audioread('myvoice.wav');

n=length(x);

Y=fft(x,n);

FY=(-n/2:n/2-1).*(Fs/n);

Y1=fftshift(Y); AY=abs(Y1);

plot(FY,AY); xlabel('frequency

(Hz)'); ylabel('amplitude');

title('Frequency Domain plot');

Part 1 OUTPUT:

(Frequency domain plot for audio signal)


Part 2:

IIR Filters:
As my registration number is 112 so divide by 5 I get remainder 2 and then adding 3 I
got A=5. So I will choose 5 octave bandpass butterworth IIR filters for auido signal
with different frequencies. For this we have to know the centered, upper and lower
frequencies for designing these filters.

Part 2 CODE:
n1=2;

%first ovtave band

[ya,xa]=butter(n1,[0.1,0.15],'bandpass');

fvtool(ya,xa); y1=filter(ya,xa,x);

%second ovtave band

[yb,xb]=butter(n1,[0.15,0.25],'bandpass');

fvtool(yb,xb); y2=filter(yb,xb,x);

%third ovtave band

[yc,xc]=butter(n1,[0.25,0.4],'bandpass');

fvtool(yc,xb); y3=filter(yb,xb,x);

%fourth ovtave band

[yd,xd]=butter(n1,[0.4,0.6],'bandpass');

fvtool(yd,xd); y4=filter(yd,xd,x);

%fifth ovtave band

[ye,xe]=butter(n1,[0.6,0.85],'bandpass');

fvtool(ye,xe);

y5=filter(ye,xe,x);
Part 2 OUTPUT:

Filter Visualization
1st
octave
band
pass
IIR
Butter
worth
filter

2nd
octave
band
pass
IIR
Butter
worth
filter
3rd
octave
band
pass
IIR
Butter
worth
filter

4th
octave
band
pass
IIR
Butter
worth
filter

5th
octave
band
pass
IIR
Butter
worth
filter

You might also like