You are on page 1of 6

1

Second advance of the course Digital Signal


Processing 2: Filtering
Bracero Alexis, Cachaguay Alexis, Soto Alex, Yánez Danilo
Universidad de la Fuerzas Armadas Espe
Sangolquı́,Ecuador
aabracero@espe.edu.ec
ascachaguay@espe.edu.ec
apsoto1@espe.edu.ec
djyanez1@espe.edu.ec

Abstract—The document carried out deals with information a new tool called the z-transform that will allow us to explore the
on the Filters course, where we can find a synthesis of what the full range of filters that we can design and implement.
course has been. The first filter design strategy that we will explore be that of imitation,
that is, we will try to replicate the structure of either the impulse
Keywords—signals, systems, properties filtering . response or the frequency response of ideal filters. In this lesson,
we will see three fundamental methods to approximate ideal filters:
impulse truncation, the window method, and frequency sampling.
Although limited, these strategies remain a very good ”back of the
envelope” method to quickly prototype digital filters and can be
I. I NTRODUCTION used in the initial phase of a project before moving on to more
Digital Signal Processing is the branch of engineering that, in sophisticated design methods.
the space of just a few decades, has enabled unprecedented levels
of interpersonal communication and of on-demand entertainment.
By reworking the principles of electronics, telecommunication and
computer science into a unifying paradigm, DSP is a the heart of
the digital revolution that brought us CDs, DVDs, MP3 players,
mobile phones and countless other devices.
The goal, for students of this course, will be to learn the fundamentals
of Digital Signal Processing from the ground up. Starting from the
basic definition of a discrete-time signal, we will work our way
through Fourier analysis, filter design, sampling, interpolation and
quantization to build a DSP toolset complete enough to analyze
a practical communication system in detail. Hands-on examples
and demonstration will be routinely used to close the gap between
theory and practice.
To make the best of this class, it is recommended that you are
proficient in basic calculus and linear algebra; several programming
examples will be provided in the form of Python notebooks but you
can use your favorite programming language to test the algorithms
described in the course.
Lesson 2.2.1 Basic Filter Design The subject of this module
is filter design, that is, the ability to determine the algorithmic
parameters of a filter from a set of engineering specifications with
respect to a desired frequency response. Abstract requirements on
the filter’s characteristics have led us to ideal filters in the previous
module, but we have seen that these filters cannot be implemented
in practice.
In this module we will abandon the abstract requirements of the
previous module and introduce target specifications with tolerances.
For the design strategy, at first we will try to mimic ideal filters but Figure 1. Video 1
the method will show its limitations very soon. So we will introduce
Figure 2. Video 2 Figure 5. Video 4

Figure 6. Video 5

Figure 3. Video 3

Figure 7. Test Lesson 2.2.2

Lesson 2.2.3 Intuitive Filter Design In this lesson, we will talk


Figure 4. Test Lesson 2.2.1 about how to design a filter based only on the intuitive properties of
its transfer function. This pedagogical lesson will show you several
simple IIR filters whose properties can be easily derived based solely
on the position of the poles and zeros in the associated transfer
function.
Lesson 2.2.2 The z-transform In the first lesson on filter design
we took a very intuitive approach and we quickly realized a series
of drawbacks, mostly in the sense that not all parameters of the
resulting filters were under our control. Before we study more
sophisticated methods however, we need to take a step back and
answer a fundamental question: what is the largest class of realizable
filters that we can implement?
We know that, in order to have a linear time-invariant system, we
need to have a system described by a linear combination of past
input and output values scaled by constants. We call this a constant
coefficient difference equation (CCDE). A CCDE is very complicated
and cumbersome to manipulate in the raw. In this lesson, we will
introduce a new tool called the z-transform that will greatly simplify
the task. With the z-transform, we will arrive at a new characterization
of a filter in terms of what we call a rational transfer function, which
is simply a ratio of polynomials. With this, filter design will become Figure 8. Video 6
a polynomial fitting problem.
Figure 9. Test Lesson 2.2.3
Figure 11. Video 8

2.2.4 Classic Filter Design Methods In this lesson, we will


briefly look at the major filter design techniques available to
engineers today. We will start by reviewing what we mean by filter
specifications and then we will briefly describe IIR and FIR filter
design techniques.
We will not go into the gory details on how the transfer function
coefficients are actually computed; this is the job of numerical
packages that are currently available in most programming languages
or a numerical toolbox. The idea for this lesson is to give you a
map to navigate the various possibilities that will be available to
you when you tackle a signal processing project. Figure 12. Video 9
An exception will be made for the Parks-McClellan optimal filter
design algorithm, for which a detailed Python notebook is available
in this module.

The concept of filtering an image is associated with the representation


of an image in the frequency domain. Any filter that is designed
will aim to modify the contribution of specifying frequency ranges
to image formation. So for example if we want to filter an image
of a possible random noise contamination what we will have to do
is design a filter that reduces as much as possible the contribution
of high frequencies in the formation of the image. If instead we
want to enhance any behavioral pattern present in the image and we
know that this pattern is associated with a certain frequency range
in the formation of the image, what we will do is build a filter that
decreases the contribution of any frequency. that is not within the
desired range.

Figure 13. Video 10


There are three types of filters that they study: low-pass filters that
filter high frequencies, high-pass filters that filter low frequencies,
and band-pass filters that filter frequency ranges.

Figure 14. Test Lesson 2.2.4

Lesson 2.2.5 Implementation of digital filters In this lesson


we will briefly look at some implementation issues with respect
to digital filters. We can very easily ”code” a CCDE in our fa-
vorite programming language since the CCDE is itself a discrete-
Figure 10. Video 7 time algorithm containing only multiplications, additions and delays.
Perhaps more interestingly, we can represent a CCDE graphically
using block diagrams, which we have already used informally in the
first part of this course (remember the Karplus-Strong algorithm?)
Block diagrams allow us to think of the algorithmic structure in a
different way and even perform language-independent optimization
on the filter structure.
Hardware implementation of applications that increase specifications
in terms of response time, power consumption and portability have
become a necessity. Digital filters are part of computationally ex-
pensive applications and their wide range of applications make their
implementation on embedded devices of interest. On the other hand,
audio processing covers various fields of application. Among the most
representative are: human voice pattern recognition systems, digital
audio players, the audio effects that are used in music recording, Figure 17. Question 1
and the voice processing used in telecommunications, to name just
a few. This article presents the design and implementation of digital
filters for real-time audio on a digital signal processor, showing a
solution to this type of applications. Digital signal processing is done
using infinite impulse response and finite impulse response filters.
The results show that an untrained human ear perceives the frequency
modifications of the signals in the audible range.
When implementing filters for real-time applications, the efficiency
of the implementation is paramount. We will touch briefly on the
constraints inherent to real-time processing and look at how general-
purpose hardware such as your PC ferries the data from the real world
and back.
Don’t forget to check out the Python notebooks for detailed imple-
mentation examples. Figure 18. Question 2

Figure 19. Question 3

Figure 15. Video 11

Figure 20. Question 4

Figure 16. Video 12

Figure 21. Question 5


Questions?
Figure 25. Question 9

Grades

Figure 22. Question 6

Figure 26. Bracero Alexis Grade Unit 2

Figure 23. Question 7

Figure 24. Question 8 Figure 27. Cachaguay Alexis Grade Unit 2


Figure 28. Soto Alex Grade Unit 2

Figure 29. Yánez Danilo Grade Unit 2

You might also like