Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Session T1F

Demo Program for Frequency Sampling FIR Filter


Design Method
Gordana Jovanovic Dolecek
Institute INAOE, gordana.dolecek@gmail.com

Abstract - Demo programs that illustrate concepts with learning, validation, and research in engineering education
visual aids have become one of the more important tools [5]-[8].
in the field of engineering education. They help students The experience in the National Institute INAOE shows that
learn faster, remember longer, and identify the the development and usage of software educational tools
fundamental concepts better. Demo programs are represents an effective teaching approach and can increase
especially beneficial in terms of saving time and effort for students’ attention, motivation, and efficiency in learning.
both teaching and learning. To this end a demo program To be effective, software tools must have desirable
for teaching Frequency Sampling Finite Impulse characteristics including repeatability, capacity to motivate
Response design method is developed. In particular, a students, interactivity, versatility, easy to use etc. An
frequency sampling design of a differentiator using comb attractive MATLAB demo program to visualize and to better
and resonator filters is demonstrated. The program is understand the procedure for the Design of Frequency
implemented in MATLAB using tool makeshow, which Sampling of Finite Impulse Response Filter, is developed.
has several favorable characteristics. It is demonstrated, MATLAB platform is chosen because it is the tool of choice
step by step, how the initial comb characteristic is being for most educational and research purposes and it provides
changed by introducing the corresponding second order powerful computation and advanced visualization tools.
resonators. All the steps are demonstrated in z-plane and
in the frequency domain. Finally, all steps are presented FREQUENCY SAMPLING METHOD
together in the same slide and the obtained differentiator The goal of the proposed procedure is to design an FIR
characteristic is compared with the desired (Finite Impulse Response) filter, whose magnitude response
characteristic. The program can be used as a
complement to theoretical classes on the fundamentals of H (e jω ) exactly matches the desired arbitrary shaped
digital signal processing at the graduate level. The
student validation of the program is also included. magnitude response H D (e jω ) at N equally spaced points
over the range 0 ≤ ω < 2π , [9]
Index Terms – Comb filter, Demo program, Frequency
sampling, MATLAB, Resonator. H (e jω k ) = H D (e jω k ) , k = 0,..., N − 1 , (1)

MOTIVATION where
2πk
Many of the engineering lecture courses are taught using a ωk = . (2)
traditional method i.e., only with the support of a blackboard N
or transparencies. As a result, “most of the learning in The system function of the filter H(z) can be implemented as
traditional teaching is individual, since the students in the a comb filter
classrooms are taking notes or listening instead of 1 − z−N
participating “ [1]. It is well known that passive learners lose H COMB ( z ) = , (3)
attention quickly in lectures and tutorials, and after 20
N
minutes in lecture student attention level reduces to one third
cascaded with N complex first–order resonators those are
its initial level [2]. The availability of personal computers
connected in parallel,
(PCs), their increasing calculation power, and their enhanced
graphical possibilities enable teachers to take the advantage
N −1
H D ( e jω k )
H RES ( z ) = ∑
of the pedagogical possibilities afforded by new
jω k −1
, (4)
technologies [3] and to transform the passive learners into
k =0 1 − e z
active participants in the learning process.
Computer-aided learning has become an important
yielding
educational research activity in various engineering
disciplines [4]. Many computer packages developed to assist H ( z ) = H COMB ( z ) H RES ( z ) . (5)
learning, are very helpful in different aspects of teaching,

978-1-4244-6262-9/10/$26.00 ©2010 IEEE October 27 - 30, 2010, Washington, DC


40th ASEE/IEEE Frontiers in Education Conference
T1F-1
Session T1F
jω k
The complex gain H D (e ) is computed from the
desired magnitude response and the assigned phase
response.
To avoid the complex coefficients the equation (4) can be
rewritten as
H D (e j 0 ) H D (e jπ ) N / 2 −1
H RES ( z ) = + + ∑ H R , k ( z ) , (6)
1 − z −1 1 + z −1 k =1

where H R , k ( z ) is the second-order resonator with real


coefficients,
H R,k ( z) =
{ } { }
2 Re H D (e jω k ) − 2 Re H D (e jω k )e jω k z −1 , (7)
1 − 2 cos(ωk ) z −1 + z − 2
where Re{.} means the real part of the complex value in {.}.
Fig. 1. The first slide.
Considering the linear phase, the second order resonator
(7) can be rewritten as Using a series of sequential steps it is demonstrated how the
initial comb characteristic is being changed by introducing
1 − z −1 the corresponding second order resonators, with the final
H R , k ( z ) = Bk , (8)
1 − 2 cos(ωk ) z −1 + z − 2 goal of obtaining the magnitude characteristic of the
differentiator. All steps are demonstrated in both the z-plane
where for N even ,
and in the frequency domain.
0 ≤ k ≤ ( N / 2) − 1 , (9)
and DESCRIPTION OF THE DEMO PROGRAM
Bk = 2 H D (e jω k ) cos(π ( N − 1)k / N ) . (10) The desired magnitude response is given by
H D (e jω ) = ω ,0 ≤ ω ≤ π . (12)
Similarly for an odd value of N, we have,
The N-point unit sample response is specified to possess
odd symmetry, so that the resonator gain (10) is given by,
0 ≤ k ≤ ( N − 1) / 2 − 1 . (11) [9]
Note that for N odd the second term in (6) is equal to zero . 2kπ cos(π ( N − 1)k / N )
More details of the method can be found in [9]. Bk = . (13)
N +1
FEATURES OF DEMO PROGRAM In this demo illustration we set N= 9. Figure 2 shows the
desired magnitude and phase responses and Figure 3 shows
The package was implemented in MATLAB using the tool the corresponding sampled values.
makeshow. MATLAB is chosen because it is the tool of
choice for most educational and research purposes, [10].
There are two windows in each slide, (Fig.1). The upper
window is used for a specific explanation or for graphics.
The bottom window is used for a general explanation, or for
additional explanation of the upper graphics. The order of
the slide and the command buttons are on the right side of
each slide.
The student using the demo can change the slides
automatically using the option AutoPlay. In this case the
student may use the button Stop to stop the presentation
and later hit Continue to continue it. The student can also
choose the option to change slides manually with the mouse,
by clicking Next to go forward or Prev, to go backward.
The buttons Reset and Close are used to reset the demos
and exit the program, respectively, (See Fig.1).
In particular, the demo shows the frequency sampling
design of a differentiator using comb and resonator filters. Fig.2. Desired responses.
978-1-4244-6262-9/10/$26.00 ©2010 IEEE October 27 - 30, 2010, Washington, DC
40th ASEE/IEEE Frontiers in Education Conference
T1F-2
Session T1F
As an example, Figure 5 shows the pole–zero pattern for
the comb and the resonator for k=3 and k=6. By cascading
the comb and the resonator filters, the poles of resonator,
denoted by crosses in the figure, cancel the corresponding
zeros of the comb, denoted by circles in the figure, thereby
resulting in the magnitude response shown in Figure 6.
The resulting magnitude response of the cascade of the
comb filter with the parallel connection of resonators for
k=1, 2 and 3 and k=8, 7, and 6, is given in Figure 7. Note
that the zeros of the comb filter at the positions, k=4 and k=5
are not yet cancelled by the resonator poles. This will be
achieved in the last step.
All steps are shown in Figure 8 for k=1, 2, 3 and 4 and
k=8, 7, 6 and 5. The bottom plot shows the resulting
magnitude response which is obtained by summing the
magnitude responses of the cascade comb and parallel
Fig.3. Sampled desired responses. resonators, for k=1, 2, 3 and 4.
For the sake of comparison, Figure 9 shows the desired
Figure 4 shows the pole-zero pattern of the comb filter magnitude response and the obtained response. Note that the
along with its magnitude response. The filter design consists obtained response has a small difference relative to the
of canceling zeros of the comb filter by the corresponding desired response. To obtain the response of the filter which
poles of resonators in order to achieve the desired magnitude is more similar to the desired response, one has to take more
at the frequency point of interest. sampling points.

Fig.5. Comb and resonator.

Fig.4. Comb filter.


Fig.6. Magnitude response comb+resonator, k=3 and 6.
978-1-4244-6262-9/10/$26.00 ©2010 IEEE October 27 - 30, 2010, Washington, DC
40th ASEE/IEEE Frontiers in Education Conference
T1F-3
Session T1F
EVALUATION
It is crucially important to take into account the feedback
from students regarding the usefulness of a software tool in
the teaching-learning process. We devised evaluation forms
to gather data that address (a) the effectiveness of the
software for teaching the Frequency Sampling Method
(Evaluation form 1), and (b) specific features of the
software, (Evaluation form 2).

Evaluation form 1:
1. Justification for the computer use in teaching
Frequency Sampling Method. (1=unjustified;
4=absolutely justified).
2. Contribution to study of the filter design by demo
program use. (1=irrelevant; 4= very effective).
3. Clarity of explanations and features of demo.
Fig.7. Resulting magnitude response for k=1, 2, 3, and k=8, 7, 6. (1=confusing; 4=absolutely clear).
4. Did this demo help you to understand better the
Frequency Sampling Method? (1=NO;
4=Absolutely YES).
5. Did this demo help you to better understand the
cancellation of comb zeros by the resonator poles?
(1=NO; 4=Absolutely YES).

Evaluation form 2:

1. Special knowledge or programming skills required.


(1=excessive; 4=null).
2. Ease of operation. (1=complex; 4= very easy).
3. Flexibility & Repeatability (Possibility to come
back to previous slide/slides and repeat it/them
many times). (1=unnecessary; 4=very useful).
4. General quality of presentation (figures, resolution,
visibility, etc). (1=pure; 4=excellent).

Fig.8. All steps of the design.


The demo program has been consistently used as a
complementary tool in teaching the basic course on Digital
Signal Processing at the graduate level for the past five
academic years at the INAOE Institute. Figure 10 presents
the result of the evaluation of (a) and (b) questionnaires in
terms of the average marks for all questions. In total 52
students have participated in the evaluations.
The result of the demo evaluation shows that students
liked this way of teaching of the Frequency Sampling
Method. More specifically, they found this demo very useful
for understanding the Frequency Sampling Method and the
comb zeros cancellations by the resonator poles.
Additionally they highly justified the use of the computer
demo as a complementary tool for teaching the Frequency
Sampling Method. They especially highly rated the features
of the program: no programming skills required to run the
program, ease of operation, and flexibility & repeatability.
As a future work, it is planned to improve the general
Fig.9. Comparison of the desired and obtained magnitude responses.
quality of presentations and to prepare demo programs for
different filter design methods.

978-1-4244-6262-9/10/$26.00 ©2010 IEEE October 27 - 30, 2010, Washington, DC


40th ASEE/IEEE Frontiers in Education Conference
T1F-4
Session T1F
REFERENCES

[1] T. C. Hutchinson, F. Kuester, “Hardware Architecture for a


Visualization Classroom: VizClass”, 2004 Wiley Periodicals, Inc.
Comput appl Eng Educ 12:232-241.
[2] Ng, G. S., “Teaching Effectively with Visual Effects in an Image-
Processing Class” , John Wiley & Sons journal Computer
Applications in Engineering Education, Vol. 4, No.5, 1997, pp.111-
114.
[3] Fu, T. T., “Applications of Computer Simulation in Mechanism
Teaching”, John Wiley & Sons journal Computer Applications in
Engineering Education, Vol.3, No11, 2003, pp.156-165.
[4] Fernandez, A. J., and Sanchez J. M., “Educational Software for
Learning the Foundations of Programming”, John Wiley & Sons
journal Computer Applications in Engineering Education. Vol. 4,
No.11, 2004, pp. 167-179.
[5] Yann, X. F., and Teng, J. G., 2003, “Interactive Web-Based Package
a. Evaluation form 1. for Computer-Aided Learning of Structural Behavior”, John Wiley &
Sons journal Computer Applications in Engineering Education, Vol.3,
No 10, 2003, pp.121-137.
[6] Li, S. G., and Lie, Q., “Interactive Groundwater (IGW): An Innovative
Digital Laboratory for Groundwater Education and Research”, John
Wiley & Sons journal Computer Applications in Engineering
Education, Vol. 11, No 4, 2004, pp.179-203.
[7] Jovanovic-Dolecek G., “RANDEMO: Educational Software for
Random Signal Analysis”, John Wiley & Sons journal Computer
Applications in Engineering Education, Vol. 2, No 5., 1997, pp.93-99.
[8] Jovanovic Dolecek, G., and Harris, F., “On MATLAB Demonstrations
of Narrowband Gaussian Noise,” Accepted for John Wiley & Sons
journal Computer Applications in Engineering Education (In press).
[9] Kuc, R., “Introduction to Digital Signal Processing”, McGraw-Hill
Company, 1988.
[10] Kim A. S., Park C., and Park, S. H., “Development of Web-based
Engineering Numerical Software (WENS) Using MATLAB:
Applications to Linear Algebra, John Wiley & Sons journal Computer
Applications in Engineering Education, Vol.2, No 1, 2003, pp. 67-75.
b. Evaluation form 2.

Fig. 10. Evaluation.

ACKNOWLEDGMENT
This work is supported by CONACYT Mexico.

978-1-4244-6262-9/10/$26.00 ©2010 IEEE October 27 - 30, 2010, Washington, DC


40th ASEE/IEEE Frontiers in Education Conference
T1F-5

You might also like