+ All Categories
Home > Documents > An Efficient Approach for the Study of Digital...

An Efficient Approach for the Study of Digital...

Date post: 26-Aug-2018
Category:
Upload: duongkien
View: 212 times
Download: 0 times
Share this document with a friend
4
An Efficient Approach for the Study of Digital Filters. Luciano L. Mendes and José S. G. Panaro Abstract The main purpose of this paper is to present a group of computational tools that can provide a support for apprenticeship and teaching of principles and concepts about digital filters. Index Terms Educational programs, finite impulse response filter, infinite impulse response filter, digital filters. I. INTRODUCTION Today, the societies all over the world demand information at very high rates and it is providing a great interest in digital information because the digital systems can proportionate a better use of the communication channels available. The analog data has been converted to digital data to supply the new services demanded by the society and to improve the communication channels capabilities. Thus, it is necessary to digitally process the information and that is why the concepts about digital filters are required and desired for Telecommunication Engineering students. To attend this purpose, a program series have been developed to allow the user to study the concepts and phenomena involving finite and infinite impulse response filters. II. FINITE IMPULSE RESPOSNSE FILTERS. The program filtro_fir.m has been developed to present a didactic approach to introduce the filtering principles related to finite impulse response (FIR) filters. Fig. 1 shows the program graphic interface, where the user can provide the characteristics of the desired filter as the filter order, stopband attenuation and the cutoff frequencies. The user can simulate lowpass, highpass, bandpass or bandstop filter. Once defined these parameters, the program generates the impulse response of the chosen filter. Using the stopband attenuation, the program calculates the β parameter that defines the Kaiser window shape. This window is used to truncate the impulse response in a finite number of samples. The program allows a graphic visualization of the Kaiser window and the resulting impulse response, as shown in the Fig. 2 and 3. Manuscript received on July 21,2001. Luciano L. Mendes, INATEL, Rua João de Camargo 510, (035) 34719269, [email protected]; José S. G. Panaro, INATEL, Rua João de Camargo 510, (035) 34719200, [email protected]. Fig. 1 – Program filtro_fir.m Fig 2 – Kaiser window.
Transcript
Page 1: An Efficient Approach for the Study of Digital Filters.cict.inatel.br/nova2/docentes/lucianol/Artigos/Intertech_2002/... · An Efficient Approach for the Study of Digital Filters.

An Efficient Approach for the Study of DigitalFilters.

Luciano L. Mendes and José S. G. Panaro

Abstract The main purpose of this paper is to present agroup of computational tools that can provide a support forapprenticeship and teaching of principles and concepts aboutdigital filters.

Index Terms Educational programs, finite impulse responsefilter, infinite impulse response filter, digital filters.

I. INTRODUCTION

Today, the societies all over the world demand informationat very high rates and it is providing a great interest in digitalinformation because the digital systems can proportionate abetter use of the communication channels available. Theanalog data has been converted to digital data to supply thenew services demanded by the society and to improve thecommunication channels capabilities. Thus, it is necessary todigitally process the information and that is why the conceptsabout digital filters are required and desired forTelecommunication Engineering students. To attend this purpose, a program series have beendeveloped to allow the user to study the concepts andphenomena involving finite and infinite impulse responsefilters.

II. FINITE IMPULSE RESPOSNSE FILTERS.

The program filtro_fir.m has been developed to present adidactic approach to introduce the filtering principles relatedto finite impulse response (FIR) filters.Fig. 1 shows the program graphic interface, where the usercan provide the characteristics of the desired filter as the filterorder, stopband attenuation and the cutoff frequencies. Theuser can simulate lowpass, highpass, bandpass or bandstopfilter. Once defined these parameters, the program generatesthe impulse response of the chosen filter. Using the stopbandattenuation, the program calculates the β parameter thatdefines the Kaiser window shape. This window is used totruncate the impulse response in a finite number of samples.The program allows a graphic visualization of the Kaiserwindow and the resulting impulse response, as shown in theFig. 2 and 3.

Manuscript received on July 21,2001. Luciano L. Mendes, INATEL, Rua João de Camargo 510, (035) 34719269,[email protected]; José S. G. Panaro, INATEL, Rua João de Camargo 510,(035) 34719200, [email protected].

Fig. 1 – Program filtro_fir.m

Fig 2 – Kaiser window.

Page 2: An Efficient Approach for the Study of Digital Filters.cict.inatel.br/nova2/docentes/lucianol/Artigos/Intertech_2002/... · An Efficient Approach for the Study of Digital Filters.

Fig. 3 – Impulse Response and Frequency Response.

Once the impulse response is defined, the programcomputes the frequency response of the filter that can beanalyzed to certify that every initial specification has beenfitted, as shown in the Fig. 3. To better observe small details, a toolbar is available withZoom function, which can be used to allow a more preciseanalysis of the results. With the resources presented here, the user can verify howthe initial parameters influence the filter characteristics andcan decide if the obtained filter fits the project. If the userwants to implement the designed filter using any platform,like another program or a DSP kit, the program provides anASCII text file, called coef_fir.txt, with the filter coefficients. For a more didactic approach, a waveform generator hasbeen developed to provide several waveforms to be filteredand analyzed by the user. The following waveforms areavailable: sinusoidal, square, triangular or arbitrary. The usermust provide the frequency of the signal for the first threeoptions while, in the last case, the name of a wave file(.WAV) is required to be used as input signal. With the inputsignal defined, the program simulates a DSP device andprocesses the signal, generating the filtered signal. Theoriginal and the filtered signal spectra are plotted and the usercan observe the filter action. The waveforms are also plottedto allow the user to comprehend the temporal effect of thefiltering process. In the following example, the file micro.wav has been usedas input signal. Fig. 4 shows the original and the filteredspectra while Fig. 5 shows the original and filteredwaveforms.

Fig. 4 – Original and filtered spectra.

Fig. 5 – Original and filtered waveforms.

The filtered signal is saved as a wave file with the nameprovided by the user, so the user can play the original and thefiltered file using the “Play” pushbuttons shown in Fig. 1. Tosave the filtered file the user must provide the samplefrequency and the number of quantization bits to be used tostore the signal. To improve the study of FIR filters, the programfiltro_remez.m has been developed, which uses the Parks-McClellan algorithm to obtain an equiripple filter. Fig. 6presents the graphic interface of the program. This program also has a waveform generator. The impulseresponse, frequency response, original and filtered spectraand original and filtered waveforms are plotted, allowing theuser to compare the two windows and realize the advantagesof each one. In this program, the user defines the prototypefilter frequency response graphically, using the mouse. Thefilter order must also be provided. The filter coefficients aresaved in an ASCII text file, called coef_equi.txt. Thestopband attenuation and the passband ripple are obtained asfunction of the filter order and the transition bandwidthspecified. Fig. 6 and 7 show the results for a 40th orderlowpass filter using linear and log scales, while Fig. 8

Page 3: An Efficient Approach for the Study of Digital Filters.cict.inatel.br/nova2/docentes/lucianol/Artigos/Intertech_2002/... · An Efficient Approach for the Study of Digital Filters.

presents the corresponding impulse response. The selectedinput signal is filtered and the original and filtered spectra areplotted, as shown in Fig. 9. The signal waveforms are plottedin the proper window, as shown in Fig. 10.

Fig. 6 – Frequency response of the prototype and designed filters.

Fig. 7 – Frequency response of the prototype and designed filters.

Fig. 8 – Impulse response.

Fig. 9 – Original and filtered spectra.

Fig. 10 – Original and filtered waveforms.

II. INFINITE IMPULSE RESPONSE FILTERS.

The program filtro_iir.m has been developed to allow theuser to study the other important class of digital filters, thatis, the infinite impulse response (IIR) filters. Fig. 11 showsthe graphic interface of the program.

Fig. 11 – Program filtro_iir.m.

Page 4: An Efficient Approach for the Study of Digital Filters.cict.inatel.br/nova2/docentes/lucianol/Artigos/Intertech_2002/... · An Efficient Approach for the Study of Digital Filters.

This program has the same resources presented by theprogram filtros_fir.m, but in this case, four approximationscan be studied: Butterworth, Chebyshev, Inverse Chebyshevand Elliptic. Thus, the user can compare the results obtainedby each approximation, using the graphics to support thestudy. As an example, a 1KHz square wave has been introducedin a 15th order elliptic low pass filter with cutoff frequency of6KHz. The stopband attenuation is 40dB and the maximumpassband ripple is 0.5dB. Fig. 12 shows the impulse and thefrequency responses of the designed filter, while Fig. 13shows the original and filtered spectra. The user can analyzethe original and filtered waveforms such as shown in Fig. 14.

Fig. 12 – Impulse response and frequency response.

Fig. 13 – Original and filtered spectra.

Fig. 14 – Original and filtered waveforms.

IV. CONCLUSION

In this work, a group of didactic tools has been developedto help the apprenticeship of digital filters. These tools allowthe student to verify several concepts and characteristics ofFIR and IIR filters. The programs provide an approximationfor the main types of filters, showing the impulse andfrequency response. The user can change the filter parametersand check the results easily. With the waveform generatorincluded, the user can analyze the effects of the filteringprocess on different waveforms. The system also generates the filter coefficients, thusconsisting also in a synthesis tool. The users can implementtheir design systematically with help from this tool set forthis issue.

REFERENCES

[1] D. Hanselman, and B. Littlefield, Matlab 5 – The Student Edition,Makron Books, São Paulo, SP, 1999.

[2] A. V. Oppenheim, and R. W. Schafer, Discrete-Time Signal Processing,Prentice Hall, Englewood Cliffs, NJ, 1989.

[3] S. J. Orfanidis, Introduction to Signal Processing, Prentice Hall, UpperSaddle River, NJ, 1996.


Recommended