Creating Butterworth and Chebyshev filters with by Using Sptool

Hi, at my previous post i talked about the filters and input-output relationship.
As you remember i mentioned that i will design the discrete-time
filters with Butterworth and Chebyshev approximations.

Let’s see the properties of the filter again.

0.8 < |H(exp(jw))| < 1   for     0 < w < 0.22*pi
|H(exp(jw))| < 0.26     for   0.32*pi < w < pi

sptool1

 

For able to desing filter we will use “sptool” command. When we write ‘sptool’ to command window, we get SPTOOL:startup.spt window.

 

Then click ‘FIRbp[design]’ and ‘New’.

 

sptool2.1.jpg

So we have a new window like ‘Filter Design & Analysis Tool-(FIRbp)’, change the values of filter at the blue arrows and right click to ‘Magnitude (DB)’ at the red arrow and hange as given. Finally, click ‘Design Filter’. After that click to ‘Edit’ and use ‘convert to single section’.

Now we will get our numerator and denominator coefficients of filter.  Use this way; ‘File -> export (change name of coefficients) -> export’.

3

 

 

Name numerator coefficients b1,denominator coefficients a1 for Butterworth filter and b2,a2 for
Chebyshev filter.

 


f=linspace(-1,1,length(data))
BW = filter(b1,a1,data)
CS1 = filter(b2,a2,data)
figure;

subplot(3,1,1)
stem(f,fftshift(abs(fft(data))));
title('Magnitude response of my input signal');
grid on;
subplot(3,1,2)
stem(f,fftshift(abs(fft(BW))));
title('Magnitude response of my output,filtered by Butterworth ');
grid on;
subplot(3,1,3)
stem(f,fftshift(abs(fft(CS1))));
title('Magnitude response of my output,filtered by Chebyshev');
grid on;

Let’s examine the differences Butterworth and Chebyshev approximations.

sinyal2

As you see transition region at Chebyshev approximation is smaller than Butterworth approximation.
But at the passband region of Chebyshev approximation has ripples and filters the signal around zero.

I hope it would be helpful to you.
Thanks.

gökhan öztürk

Reklamlar

ozturkgokhan hakkında

Electrical and electronics engineer. In turkey.

Aralık 20, 2015 tarihinde diğer, Maltab içinde yayınlandı ve , , olarak etiketlendi. Kalıcı bağlantıyı yer imlerinize ekleyin. Yorum yapın.

Bir Cevap Yazın

Aşağıya bilgilerinizi girin veya oturum açmak için bir simgeye tıklayın:

WordPress.com Logosu

WordPress.com hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Google fotoğrafı

Google hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Twitter resmi

Twitter hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Facebook fotoğrafı

Facebook hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Connecting to %s

%d blogcu bunu beğendi: