digital signal processing and filter design using scilab · digital signal processing and filter...

49
Digital Signal Processing and Filter Design using Scilab Digital Signal Processing and Filter Design using Scilab Iman Mukherjee Department of Electrical Engineering, IIT Bombay December 1, 2010 Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Upload: trankhanh

Post on 20-Jul-2018

256 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Digital Signal Processing and Filter Design usingScilab

Iman Mukherjee

Department of Electrical Engineering, IIT Bombay

December 1, 2010

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 2: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Outline

1 Basic signal processing toolsDiscrete Fourier TransformFast Fourier TransformConvolutionPlottingGroup DelayAliasing

2 Filter DesignNon-Recipe BasedRecipe BasedAn Example Application

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 3: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 4: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 5: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 6: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 7: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 8: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 9: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Discrete Fourier Transform

DFT

X(!) =

∞∑n=−∞

x[n]e−j!n

The Scilab command 99K [xf] = dft(x,flag);

x is the time domain representation

xf is the frequency domain representation

flag = 1 or -1

Notice - Cosine is Even Symmetric, hence this 64-point DFTis real with peaks at 4 and 60 (64-4)

Faster way - fft ...

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 10: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

FFT

x=fft(a ,-1) or x=fft(a)

y=fft2(x,n,m) - two-dimension

x=fft(a,-1,dim,incr) - multidimensional fft

fftshift(abs(y)) - rearranges the fft output, moving the zerofrequency to the center of the spectrum

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 11: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

FFT

x=fft(a ,-1) or x=fft(a)

y=fft2(x,n,m) - two-dimension

x=fft(a,-1,dim,incr) - multidimensional fft

fftshift(abs(y)) - rearranges the fft output, moving the zerofrequency to the center of the spectrum

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 12: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

FFT

x=fft(a ,-1) or x=fft(a)

y=fft2(x,n,m) - two-dimension

x=fft(a,-1,dim,incr) - multidimensional fft

fftshift(abs(y)) - rearranges the fft output, moving the zerofrequency to the center of the spectrum

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 13: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

FFT

x=fft(a ,-1) or x=fft(a)

y=fft2(x,n,m) - two-dimension

x=fft(a,-1,dim,incr) - multidimensional fft

fftshift(abs(y)) - rearranges the fft output, moving the zerofrequency to the center of the spectrum

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 14: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

FFT

x=fft(a ,-1) or x=fft(a)

y=fft2(x,n,m) - two-dimension

x=fft(a,-1,dim,incr) - multidimensional fft

fftshift(abs(y)) - rearranges the fft output, moving the zerofrequency to the center of the spectrum

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 15: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Fast Fourier Transform

Exercise 1

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 16: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Convolution

The convol Command

With the convol command

Without the convol command (multiplying in the frequencydomain)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 17: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Convolution

The convol Command

With the convol command

Without the convol command (multiplying in the frequencydomain)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 18: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Convolution

Exercise 2

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 19: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Plotting

Bode and Pole-Zero Plots

Demo Pole-Zero Plot

Demo Bode Plot

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 20: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Plotting

Bode and Pole-Zero Plots

Demo Pole-Zero Plot

Demo Bode Plot

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 21: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Group Delay

Group Delay

Rate of change of Phase w.r.t Frequency

�g =d�

d!

Where,�g is the Group Delay� is for phase delay! is for frequency

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 22: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Aliasing

What is Aliasing?

Ambiguity from reconstruction !

Shannon-Nyquist Sampling theorem.

Under-sampling

Scilab commands to remember -

t = soundsec(n [,rate]) - generates n sampled seconds of timeparameter

v = linspace(x1,x2 [,n]) - linearly spaced vector

mtlb hold(flag)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 23: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Aliasing

What is Aliasing?

Ambiguity from reconstruction !

Shannon-Nyquist Sampling theorem.

Under-sampling

Scilab commands to remember -

t = soundsec(n [,rate]) - generates n sampled seconds of timeparameter

v = linspace(x1,x2 [,n]) - linearly spaced vector

mtlb hold(flag)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 24: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Aliasing

What is Aliasing?

Ambiguity from reconstruction !

Shannon-Nyquist Sampling theorem.

Under-sampling

Scilab commands to remember -

t = soundsec(n [,rate]) - generates n sampled seconds of timeparameter

v = linspace(x1,x2 [,n]) - linearly spaced vector

mtlb hold(flag)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 25: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Basic signal processing tools

Aliasing

What is Aliasing?

Ambiguity from reconstruction !

Shannon-Nyquist Sampling theorem.

Under-sampling

Scilab commands to remember -

t = soundsec(n [,rate]) - generates n sampled seconds of timeparameter

v = linspace(x1,x2 [,n]) - linearly spaced vector

mtlb hold(flag)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 26: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

First order filter

Second order filter

Observation : More attenuation !

Scilab commands to remember -

ss2tf, tf2ss, dscr - State-Space ¡-¿ Transfer Function,Discretizing Continuous Systems

r = repfreq(Sys,frq) - Frequency response

playsnd(data)

filtered output = flts(input,filter)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 27: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

First order filter

Second order filter

Observation : More attenuation !

Scilab commands to remember -

ss2tf, tf2ss, dscr - State-Space ¡-¿ Transfer Function,Discretizing Continuous Systems

r = repfreq(Sys,frq) - Frequency response

playsnd(data)

filtered output = flts(input,filter)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 28: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

First order filter

Second order filter

Observation : More attenuation !

Scilab commands to remember -

ss2tf, tf2ss, dscr - State-Space ¡-¿ Transfer Function,Discretizing Continuous Systems

r = repfreq(Sys,frq) - Frequency response

playsnd(data)

filtered output = flts(input,filter)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 29: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

First order filter

Second order filter

Observation : More attenuation !

Scilab commands to remember -

ss2tf, tf2ss, dscr - State-Space ¡-¿ Transfer Function,Discretizing Continuous Systems

r = repfreq(Sys,frq) - Frequency response

playsnd(data)

filtered output = flts(input,filter)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 30: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Analog filter family prototypes

Butterworth

Chebyshev

Inverse Chebyshev

Elliptic/Chauer

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 31: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Analog filter family prototypes

Butterworth

Chebyshev

Inverse Chebyshev

Elliptic/Chauer

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 32: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Analog filter family prototypes

Butterworth

Chebyshev

Inverse Chebyshev

Elliptic/Chauer

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 33: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Analog filter family prototypes

Butterworth

Chebyshev

Inverse Chebyshev

Elliptic/Chauer

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 34: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Butterworth

Passband: Monotonic

Stopband: Monotonic

No ripples

Wide Transition, slow Roll-off

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 35: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Chebyshev

Passband: Equiripple

Stopband: Monotonic

Only ripples in Passband

Lesser Transition width, slow Roll-off at high frequencies

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 36: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Inverse Chebyshev

Passband: Monotonic

Stopband: Equiripple

Only ripples in Stopband

Lesser Transition width, slow Roll-off at low frequencies

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 37: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

Elliptic

Passband: Equiripple

Stopband: Equiripple

Ripples in both - Passband and Stopband

Least Transition, sharp and fast Roll-off

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 38: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 39: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 40: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 41: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 42: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 43: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 44: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Non-Recipe Based

An example

Steps :

Decide over the filter specifications (type, PB and SB cut-offs,ripples etc.)

Normalize

Calculate the Order of the filter

Calculate the filter coeffiecients

Implement Analog Transfer function

Perform bilinear transformation

Convert to the needed filter type

Let us design a Low-Pass Chebyshev Filter

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 45: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Recipe Based

Scilab Commands in Filter Design

iir - [hz]=iir(n,ftype,fdesign,frq,delta)

eqiir -[cells,fact,zzeros,zpoles]=eqiir(ftype,approx,om,deltap,deltas)

eqfir - [hn]=eqfir(nf,bedge,des,wate)

wfir - [wft,wfm,fr]=wfir(ftype,forder,cfreq,wtype,fpar)

analpf - [hs,pols,zers,gain]=analpf(n,fdesign,rp,omega)

trans - hzt=trans(pd,zd,gd,tr type,frq)

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 46: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

Recipe Based

Exercise 3

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 47: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

An Example Application

Audio effects

Flanging - A sound file seems like riding on a wave

Echo - Delayed and added back

Equalizer - Different Frequency Bands

LowMidHigh

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 48: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

An Example Application

Thank you !

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab

Page 49: Digital Signal Processing and Filter Design using Scilab · Digital Signal Processing and Filter Design using Scilab Basic signal processing tools Discrete Fourier Transform DFT X(!)

Digital Signal Processing and Filter Design using Scilab

Filter Design

An Example Application

Sanjit K. Mitra, “Digital Dignal Processing, A computer basedapproach”, Tata McGraw-Hill Edition 1998.

Steven W. Smith, “http://www.dspguide.com/ ”

Carey Bunks, Franc ¸ois Delebecque, Georges Le Vey andSerge Steer, “Scilab Group INRIA Meta2 Project/ENPCCergrene ”, Signal Processing with Scilab.

Iman Mukherjee Digital Signal Processing and Filter Design using Scilab