Digital Filter Design for Audio Processing
Digital Filter Design for Audio Processing
AUDIO PROCESSING
A PROJECT REPORT (PHASE-II)
Submitted by
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
APRIL 2025
i
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
CHRIST INSTITUTE OF TECHNOLOGY
PUDUCHERRY
BONAFIDE CERTIFICATE
This is to certify that this project (phase-II) report titled “DIGITAL EQUIRIPPLE
FILTER DESIGN SIMULATION FOR AUDIO PROCESSING” is the bonafide
record of work done by Ajeeth kumar.M (21TCL015), Balaji. P (21TCL017),
Balamurugan.K (21TCL018) in the partial fulfillment of the requirements for the
award of the degree of BACHELOR OF TECHNOLOGY in ELECTRONICS AND
COMMUNICATION ENGINEERING during the year 2024-2025 of
PONDICHERRY UNIVERSITY and that this work has not been submitted for the
award of any other degree of this / any other institution.
ii
ACKNOWLEDGEMENT
We would like to express our gratitude towards our Management and our
respected Director Mr. C.D. KUMARAVEL, [Link], [Link], [Link], MBA, Christ
Institute of Technology, for his kind co-operation and encouragement which helped us in
the completion of this project.
We would like to express our sincere thanks to Dr. S.R.S. PAUL, M.E, Ph.D,
Chairman and Managing Director, Christ Institute of Technology, for giving us this
opportunity to express ourselves.
We express our deep sense of gratitude to all teaching and non-teaching staff of
our Department, family, and to our friends for their support and encouragement during the
entire course of this dissertation work.
iii
ABSTRACT
This project involves the development of an interactive graphical user interface (GUI)
for the design, simulation, and analysis of digital filters specifically tailored for audio
signal processing applications. The tool provides a flexible environment where users
can explore and compare different digital filter design techniques, primarily including
Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters. The system
enables users to input and manipulate essential filter parameters such as sampling
attenuation. The GUI supports importing external audio files and automatically adapts
the filter configuration based on the audio sampling rate. Upon filter selection, the
application designs the filter based on the specified criteria and applies it to the input
observing how various filter designs affect audio signals under real-world conditions.
The GUI enhances accessibility and usability, providing an efficient way to model and
refine digital filter behavior interactively. Such a platform is particularly useful for
audio engineers and signal processing practitioners who require a quick and accurate
method to evaluate and apply filters for audio enhancement, noise reduction, or
bandwidth limitation.
iv
LIST OF FIGURES
v
TABLE OF CONTENTS
BONAFIDE I
DECLARATION II
ACKNOWLEDGEMENT III
ABSTRACT IV
LIST OF FIGURES V
TABLE OF CONTENTS VI
LIST OF ABBREVIATIONS VII
1 INTRODUCTION 1
1.1 INTRODUCTION TO DIGITAL FILTERS 1
1.1.1 Basics of Signal Processing And Filtering
1.1.2 Classification of Digital Filters
1.1.3 Frequency Domain Characteristics
1.1.4 Filter Design Techniques
1.1.5 Applications of Digital Filters In Audio
Processing
2 LITERATURE SURVEY
vi
2.2 REVIEW OF EQUI-RIPPLE DESIGN TECHNIQUE
3 METHODOLOGY
5.1 CONCLUSION
vii
REFERENCE
APPENDIX 16
LIST OF ABBREVIATION
viii
ix
CHAPTER 1
INTRODUCTION
1
world—typically in analog form—must be digitized to be manipulated by computer
algorithms. This transformation is carried out using Analog-to-Digital Converters
(ADCs), which sample the continuous-time signal at uniform intervals (based on the
Nyquist-Shannon sampling theorem) and quantize the amplitude values into discrete
levels. The result is a sequence of numerical values that approximates the original signal,
forming a digital representation suitable for computational processing.
Once digitized, signals can be subjected to a wide range of operations. These
include:
• Noise reduction, which removes unwanted interference or background
components.
• Signal enhancement, which boosts important features or improves clarity.
• Compression, which reduces data size for efficient storage or transmission.
• Decomposition, which separates a signal into different frequency or time
components.
• Synthesis or reconstruction, where signals are regenerated or altered for
various output applications.
One of the most critical operations in DSP is filtering, which focuses on modifying
or extracting specific frequency components from a signal. A filter is a system or
algorithm that processes the input signal to produce an output signal with altered
frequency content. In practice, filtering allows certain frequencies to pass through with
little or no alteration (passband), while significantly reducing or eliminating others
(stopband). Filtering is essential in almost all DSP systems, enabling engineers to isolate
useful information, suppress noise, reduce bandwidth, or meet regulatory and quality
standards.
There are two main categories of filters: analog filters and digital filters. Analog
filters use electrical components such as resistors, capacitors, and inductors to achieve
frequency selection, and are suitable for real-time hardware applications. Digital filters,
on the other hand, use mathematical algorithms to process digitized signals. They offer
greater precision, repeatability, and flexibility, and can be implemented in both software
and dedicated hardware (like FPGAs or DSP chips).
Digital filters are generally classified into Finite Impulse Response (FIR) and
Infinite Impulse Response (IIR) filters. FIR filters have a response that settles to zero in
a finite number of steps, offering inherent stability and linear phase characteristics. IIR
2
filters use recursive structures that theoretically produce output indefinitely, providing
greater computational efficiency but often requiring careful design to ensure stability
and acceptable phase behavior.
To understand filtering, it is important to grasp a few key frequency-domain
concepts:
Passband: The range of frequencies that the filter is designed to allow through with
minimal attenuation. For instance, a lowpass filter may be used to retain frequencies
below a certain cutoff point, effectively removing high-frequency noise or aliasing
components. In audio applications, the passband may be tuned to preserve frequencies
relevant to human speech or musical instruments.
Stopband: The range of frequencies that the filter is designed to suppress. In this
region, the amplitude of incoming frequencies is significantly reduced. For example, a
bandstop (notch) filter may be configured to eliminate a narrow range of frequencies,
such as electrical hum at 50 or 60 Hz, while allowing all other frequencies to pass
unaltered.
Transition Band: The frequency range between the passband and stopband where
the filter response transitions from high to low amplitude. The sharpness of this
transition depends on the filter design and order. A narrow transition band provides
better frequency discrimination but requires a higher-order filter, which may increase
computational complexity.
Attenuation: Refers to the reduction of signal amplitude within the stopband and is
typically measured in decibels (dB). A higher level of attenuation corresponds to better
suppression of unwanted frequencies. In practical terms, stopband attenuation of 40 dB
or more is often considered sufficient for many applications.
Digital filters offer several key advantages over their analog counterparts:
• Precision: Since digital filters use numerical computations, they are not
subject to drift, component aging, or environmental conditions that affect
analog circuits.
• Flexibility: Parameters such as cutoff frequencies and gain can be easily
adjusted in software, making digital filters adaptable to changing system
requirements.
• Stability: FIR filters, in particular, are always stable, as they do not use
feedback in their structure.
3
• Reproducibility: Given the same input and parameters, digital filters
produce consistent results, which is vital for standardized signal processing
systems.
Designing digital filters involves specifying characteristics such as filter type (e.g.,
lowpass, highpass, bandpass, bandstop), cutoff frequencies, ripple tolerances in the
passband and stopband, and filter order (the number of coefficients). The design can
then be implemented using standard algorithms and tools. Common design techniques
include windowing methods (e.g., Hamming, Kaiser), optimization-based methods like
the equiripple (Parks-McClellan) approach, and analog-to-digital transformations for
IIR designs (e.g., Butterworth, Chebyshev).
Software environments like MATLAB, Python (SciPy, NumPy), and tools such as
Octave offer comprehensive libraries for digital filter design and simulation. These
platforms allow engineers and researchers to visualize frequency responses, test filter
performance on real or simulated data, and fine-tune parameters in an interactive and
intuitive manner.
4
Infinite Impulse Response (IIR) Filters
IIR filters have an impulse response that theoretically continues indefinitely. They
are recursive, using both input and output values:
• More efficient in terms of computation (lower order needed for a given
specification)
• May introduce non-linear phase distortion
• Require careful stability analysis
• General form:
𝑀 𝑁
5
• Transition Width: The frequency span between the passband and stopband.
These metrics are critical in applications such as telecommunication systems and
high-fidelity audio processing, where precise control over frequency components is
required.
6
1.1.5 Applications of Digital Filters in Audio Processing
Digital filters are indispensable in the realm of audio processing, where maintaining
signal quality, clarity, and fidelity is paramount. They serve as essential tools in shaping,
enhancing, and cleaning audio signals across a diverse range of applications, from
professional audio engineering to consumer-grade listening devices. By enabling precise
control over frequency components, digital filters help achieve superior sound quality
and ensure optimal audio performance in various contexts.
One of the most prominent applications of digital filters is noise reduction. In real-
world recording or playback environments, background noise such as high-frequency
hiss, electrical hum, or environmental interference can severely compromise audio
quality. Lowpass filters are employed to suppress high-frequency noise, while bandstop
(notch) filters are particularly effective in eliminating narrowband disturbances like
electrical hums at 50 Hz or 60 Hz. This targeted attenuation of unwanted frequencies
results in cleaner sound output and improved signal intelligibility, especially in speech
and vocal recordings.
Another critical use of digital filters lies in equalization (EQ). Equalization involves
modifying specific frequency bands to enhance or attenuate portions of the audio
spectrum, allowing for a balanced or creatively altered tonal profile. Graphic equalizers,
for example, use arrays of bandpass filters to isolate and adjust frequencies
independently, giving users or audio engineers the flexibility to shape sound according
to stylistic preferences, room acoustics, or playback systems. This is fundamental in both
live sound reinforcement and post-production environments.
In the domain of audio effects, digital filters are integral in creating immersive and
dynamic auditory experiences. Effects such as reverb, chorus, and flanging depend on
temporal and spectral manipulation of the audio signal. Highpass and lowpass filters are
often embedded within these effects chains to control the spectral footprint, helping
create depth, space, or motion within a mix. Filtering ensures that only the desired
frequency ranges are emphasized or modulated, preventing clutter and enhancing clarity.
Sample rate conversion is another key application where digital filters play a pivotal
role. When audio signals are converted from one sampling rate to another—for example,
7
from 96 kHz to 44.1 kHz—anti-aliasing filters must be applied before downsampling to
eliminate frequency components that could otherwise fold back into the audible range
(aliasing). Similarly, interpolation filters are used during upsampling to reconstruct
missing intermediate samples. These filtering stages preserve the integrity of the audio
signal during format conversion, ensuring high fidelity and preventing distortion.
8
explore both Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filter
types. FIR filters are known for their inherent stability and linear phase characteristics,
making them ideal for audio applications where phase integrity is crucial. IIR filters, on
the other hand, offer computational efficiency and steep roll-off characteristics, making
them well-suited for tasks that require lower-order filters. The simulation tool offers
functionality to configure essential filter parameters, such as cutoff frequencies,
stopband attenuation, and passband ripple, allowing users to compare and contrast these
filter types under uniform conditions.
In addition to traditional manual filter design approaches, the project incorporates
high-level filter design functionality using MATLAB’s built-in designfilt utility. This
allows users to define filters through specification parameters, such as desired frequency
range and attenuation characteristics, while MATLAB internally determines the optimal
design strategy. This approach blends flexibility with automation, catering to users who
require efficient design workflows without compromising control over filter behavior.
A central objective of this project is to support the analysis of filters using real audio
signals. Users can import audio files in commonly used formats, such as WAV or MP3,
and immediately apply designed filters to these signals. The GUI visualizes both the
frequency response of the filter and the impact of filtering in the time and frequency
domains. This dual-domain view provides users with valuable insights into how specific
design choices affect signal clarity, noise suppression, and frequency content, enhancing
their understanding of the practical implications of filter theory.
To preserve the fidelity of the filtered signals, the tool employs zero-phase filtering
using the filtfilt function. This method applies the filter forward and backward across
the signal to eliminate phase distortion, a critical consideration in audio applications
where even minor phase shifts can alter the perceived quality of sound. By implementing
zero-phase filtering, the project ensures that the output audio retains its original structure
and clarity, making it suitable for use in high-fidelity applications such as speech
enhancement, professional music production, and hearing aid simulations.
Moreover, the project is designed to serve as both a practical tool and an educational
resource. Its intuitive design and immediate visual feedback allow students, researchers,
and engineers to explore filter behavior dynamically and interactively. This contributes
to a deeper understanding of digital signal processing concepts and accelerates the
design-evaluation cycle for experimental and prototype work.
9
1.3 SCOPE AND APPLICATIONS
The scope of this project encompasses the design, development, and
implementation of a digital filter simulation tool, specifically tailored for processing
audio signals within a MATLAB-based graphical user interface (GUI). The tool is
intended to serve both academic and practical purposes, bridging the gap between
theoretical concepts in digital signal processing and their real-world application in audio
systems. By integrating multiple filter design techniques, real-time signal visualization,
and audio file handling, the project offers a versatile platform for designing, testing, and
analyzing digital filters in an interactive and user-friendly environment.
From a technical perspective, the simulation environment supports the construction
and application of both Finite Impulse Response (FIR) and Infinite Impulse Response
(IIR) filters. It provides flexible input for customizing filter parameters such as sampling
rate, passband and stopband frequencies, passband ripple, and stopband attenuation.
Additionally, the use of high-level filter design methods, such as those supported by
MATLAB's designfilt utility, broadens the usability of the tool by simplifying the filter
specification process while retaining professional-grade accuracy and performance. This
ensures the tool's relevance across a wide range of user profiles—from students and
educators to engineers and researchers.
A significant part of the tool’s scope involves the processing and analysis of real
audio signals. Users can import audio files in various formats, apply designed filters,
and immediately observe the results in both the time and frequency domains. Through
real-time plotting of frequency response curves, waveform comparisons, and spectral
visualizations, the tool supports in-depth exploration of how filters influence audio
quality. By employing zero-phase filtering (using forward and reverse filtering), the tool
also maintains signal integrity, making it suitable for critical applications where audio
fidelity is essential.
In terms of academic scope, this project serves as a practical learning platform for
understanding core concepts in digital signal processing, including filter design,
frequency analysis, and system behavior. Students can interactively adjust filter
parameters and instantly observe their effects, which enhances conceptual understanding
10
through experimentation. This simulation environment aligns well with curriculum
objectives in electrical engineering, electronics, computer science, and audio technology
courses, offering a hands-on supplement to theoretical instruction.
From a research and development perspective, the simulation tool can be employed
for rapid prototyping and comparative evaluation of filter designs. Engineers working
in the field of audio signal processing can use the tool to test and refine filter
specifications before deployment in embedded systems, DSP chips, or software
applications. The quick turnaround between design input and signal output visualization
makes the platform particularly useful for iterative design processes and feasibility
studies.
The applications of this digital filter simulation tool span a broad spectrum of real-
world audio technologies. In noise reduction, it can be used to develop filters that
suppress background interference, such as electrical hums or high-frequency hiss. In
equalization, it assists in crafting filters that adjust tonal balance in audio playback or
recording systems. For audio effects, the tool provides the basis for designing filters that
contribute to reverberation, flanging, and other sound manipulation techniques
commonly used in music production and gaming.
Other notable application areas include speech processing, where filters are
essential for voice enhancement and feature extraction in recognition systems, and
sample rate conversion, where anti-aliasing filters are crucial in upsampling or
downsampling audio streams. The tool also supports hearing aid development, enabling
researchers to design custom filter banks for enhancing speech intelligibility in
challenging listening environments. In music mastering, precision filters designed with
this tool can help producers sculpt sound with clarity and accuracy.
11
1.4 ORGANIZATION OF THE REPORT
The report is systematically organized into five major chapters, each focusing on a
distinct phase of the project. This structure ensures a logical flow of information,
beginning with foundational concepts and progressing through design methodology,
implementation, analysis, and conclusion. The intent is to guide the reader from
understanding the basic principles of digital filtering to evaluating the outcomes of the
developed simulation tool.
Chapter 1 - Introduction, laying the groundwork for the entire project. It introduces
the concept of digital filters and their importance in audio processing, defines key
terminology, and provides insight into filter classification, frequency-domain
characteristics, and design methods. This chapter also outlines the project's main
objectives, the scope of its application, and the structural organization of the report itself.
Chapter 2 - Literature Survey, which reviews previous work and theoretical
foundations relevant to the project. It discusses the fundamental differences between
FIR and IIR filters, explores their practical usage, and highlights existing methodologies
such as the Equiripple design technique. This section helps establish the context for the
project and justifies the chosen approach.
Chapter 3 - Methodology adopted for the design and implementation of the digital
filter simulation tool. It explains the design principles behind FIR filters using the Parks-
McClellan algorithm, details the MATLAB-based simulation strategy, and outlines the
workflow followed for audio signal processing. This chapter provides the technical
foundation for the system's development.
Chapter 4 - Implementation and Results. It details the actual coding and GUI design
in MATLAB, presents screenshots of the working application, and provides an analysis
of the frequency response plots and audio filtering results. Real audio signals are tested
using different filter designs, and the outputs are evaluated both visually and aurally to
demonstrate the tool’s effectiveness.
Chapter 5 - Conclusion and Future Work. It summarizes the achievements of the
project, reflects on its performance relative to the initial objectives, and discusses any
limitations encountered. It also suggests future improvements, such as expanding the
tool’s functionality, incorporating real-time playback, or integrating additional filter
types.
12
CHAPTER 2
LITERATURE SURVEY
13
intuitive interaction with DSP concepts. Matlab-based platforms have long supported
filter design GUIs like fdatool, but there is an increasing need for customized tools with
real-time audio input support and automatic parameter adaptation [20][21].
Custom GUI systems allow real-time visualization of filter frequency responses and
waveform plots before and after filtering, making them valuable for both educational
and practical applications [22][23]. Such systems also support parameter manipulation
like sampling frequency, passband width, and ripple specifications, promoting rapid
prototyping [24][25].
Zero-phase filtering, achieved through forward-backward filtering (e.g., filtfilt in
MATLAB), is particularly advantageous in audio applications where phase distortion
must be avoided [26][27]. Unlike causal filters, zero-phase filters apply the filter forward
and backward, effectively cancelling phase shifts while maintaining magnitude
response.
This approach has found significant application in audio enhancement systems,
ensuring that the filtered audio retains its original timing characteristics, which is
essential in speech processing, music production, and perceptual evaluation frameworks
[28][29].
Dynamic audio environments require that filter configurations adapt in real-time
based on changes in signal characteristics or user-defined specifications. Research on
adaptive equiripple filters indicates that runtime updates to filter coefficients are feasible
and beneficial in environments like hearing aids and streaming audio [30][31].
Moreover, modern filter design tools integrate machine learning or optimization
algorithms to refine filter parameters based on perceptual metrics or spectral
requirements [32][33].
Digital filters are embedded in various professional audio systems including DAWs
(Digital Audio Workstations), sound equalizers, mixers, and audio restoration tools.
Equiripple FIR filters are used in mastering plugins to shape tonal balance without
introducing phase artifacts [34][35].
In broadcast and communication systems, filters play a crucial role in speech
enhancement and noise suppression. Research demonstrates the efficacy of FIR filters
in enhancing speech intelligibility under noisy conditions [36][37].
Several studies have compared equiripple FIR designs with other filter approaches
in terms of attenuation performance, transition width, and computational load [38][39].
While IIR filters are more efficient in terms of processing cost, FIR filters dominate in
14
applications where phase linearity is non-negotiable [40][41].
Performance evaluation of digital filters often involves both objective measures
(frequency response, phase response, group delay) and subjective listening tests.
Simulation tools incorporating audio playback features enhance the process of
evaluating design effectiveness under real-world conditions [42][43].
The equiripple design technique is a highly effective and widely recognized method
for designing Finite Impulse Response (FIR) filters in digital signal processing. It is
particularly valued for its ability to produce filters that minimize the maximum deviation
between the desired and actual frequency response, a property known as minimax
optimality. This results in filters that exhibit equal ripple in the passband and stopband,
providing predictable and controlled performance across the frequency spectrum. The
equiripple method is especially beneficial in applications that demand linear phase
characteristics and stringent frequency domain specifications, such as audio signal
processing, telecommunications, biomedical instrumentation, and scientific
measurement systems.
At the core of this technique is the goal of approximating a desired frequency
response Hd(ω) with a realizable FIR filter response H(ω), such that the maximum
absolute error between the two is minimized over specified bands. This optimization
problem is formulated in the Chebyshev or minimax sense and leads to a design where
the magnitude of the error alternates uniformly across extremal frequencies. The
theoretical foundation is based on the Alternation Theorem, which states that the best
approximation to a function under the minimax criterion will have its maximum error
equiripple across selected frequency points.
To solve this problem, the equiripple design employs the Remez Exchange
Algorithm, a powerful iterative procedure that adjusts the filter coefficients to
redistribute error equally across the defined frequency bands. The algorithm starts with
an initial set of extremal frequencies—points where the error between the ideal and
actual response is presumed to be largest. It then computes the error function, refines the
filter coefficients, and updates the set of extremal points. This process is repeated until
the error converges and a filter with the desired equiripple behavior is achieved. The
15
result is a linear-phase FIR filter that optimally balances the deviation from the ideal
response across all bands.
Linear phase is a key advantage of equiripple-designed filters. In many DSP
applications, especially those involving audio, speech, and biomedical signals,
maintaining waveform integrity is essential. Linear phase ensures that all frequency
components are delayed equally, preventing phase distortion and preserving the
temporal structure of the original signal. Equiripple filters achieve this by enforcing
symmetry or anti-symmetry in their impulse responses, a constraint that also reduces the
number of unique coefficients needed for design.
Another significant strength of the equiripple technique is its flexibility. Designers
can specify the desired filter type—lowpass, highpass, bandpass, or bandstop—along
with edge frequencies, ripple limits, and relative weights for each band. These weights
allow for prioritization; for instance, a higher weight can be assigned to the stopband to
achieve greater attenuation at the cost of increased passband ripple. This level of control
is particularly useful when designing filters under strict performance constraints or when
trade-offs between ripple and transition width are necessary.
Modern DSP software environments, such as MATLAB, provide built-in tools to
implement the equiripple design technique efficiently. MATLAB’s firpm function
(formerly known as remez) allows users to specify the desired frequency characteristics
and automatically computes the optimal filter coefficients. This simplifies the design
process and provides quick feedback for tuning and testing. For example, a lowpass filter
with specific transition characteristics can be created in just a few lines of code, and its
frequency response can be visualized instantly.
The equiripple method offers several practical benefits. First, it ensures the best
possible approximation of the ideal filter response for a given filter order, making it
suitable for high-performance systems. Second, its ripple control and linear phase
characteristics make it ideal for applications where signal fidelity and clarity are
paramount. Third, its compatibility with software tools means it can be integrated
seamlessly into simulation and real-time processing environments.
Despite its many advantages, the equiripple method does have limitations. The
design process is computationally more intensive than simpler FIR design methods, such
as those based on window functions. It is also restricted to linear-phase filters, which
may not be suitable for all applications. Additionally, the uniform ripple distribution,
while optimal in the Chebyshev sense, may not always be perceptually optimal,
16
particularly in applications where smooth transitions are preferred over sharp cutoff
characteristics.
Nevertheless, the equiripple design technique remains a cornerstone in the field of
digital filter design. It is widely used in audio equalization, digital communications for
channel filtering and pulse shaping, biomedical signal processing for noise removal and
feature extraction, and instrumentation where precise frequency control is necessary. Its
balance of theoretical rigor, practical flexibility, and optimal performance
17
CHAPTER 3
METHODOLOGY
18
The goal of the algorithm is to minimize the maximum error between the desired
response D(ω) and the actual response H(ω) over the passband and stopband
frequencies:
19
Fig 3.1: Flowchart of Parks-McClellan algorithm for Equiripple Filter
A key feature of this algorithm is the designer’s ability to control ripple magnitudes
across different frequency bands by adjusting the weighting factors. For instance, in a
lowpass filter design, if higher attenuation is required in the stopband compared to the
passband ripple, the stopband can be assigned a higher weight. This flexibility allows
for customized filter designs that are finely tuned to the performance needs of specific
applications.
The Parks-McClellan algorithm is a highly efficient method for designing finite
impulse response (FIR) filters that exhibit an equiripple behavior in their frequency
response. It is especially useful in applications that require precise control over the
frequency characteristics of filters, such as digital signal processing (DSP),
telecommunications, and audio processing.
At its core, the Parks-McClellan algorithm is based on the Remez exchange
algorithm, which iteratively minimizes the maximum error between the desired and
actual frequency responses of a filter. This is known as the Chebyshev approximation,
and the resulting filter is referred to as an equiripple filter because the ripples in the
passband and stopband are equal in magnitude, optimizing the worst-case performance
20
of the filter.
The Parks-McClellan algorithm assumes the desired frequency response is
piecewise constant, such as low-pass, high-pass, band-pass, or band-stop filters. It seeks
to design a filter whose frequency response closely approximates the ideal response by
minimizing the maximum deviation (or ripple) across specified frequency bands.
The algorithm operates by:
• Specifying bands – The user defines the passband, stopband, and optionally,
the transition bands.
• Choosing weights – Relative weights are assigned to control the importance
of ripple magnitude in each band.
• Iterative refinement – Using the Remez exchange algorithm, the filter
coefficients are adjusted to achieve the optimal equiripple condition.
• Convergence – The algorithm iteratively refines a set of extremal
frequencies where the error alternates between maxima and minima until
convergence is reached.
Despite its many strengths, the Parks-McClellan algorithm has some limitations. It
is primarily suited for designing linear-phase FIR filters and does not directly support
minimum-phase or nonlinear-phase designs. Additionally, it requires the user to
predetermine the filter order, which may necessitate multiple design iterations to meet
specific performance criteria. In high-order filter designs or designs with narrow
transition bands, the algorithm may also encounter numerical stability issues.
Nevertheless, the advantages of equiripple filter design using the Parks-McClellan
algorithm are substantial. Its application spans a variety of domains including audio
engineering, telecommunications, instrumentation, and biomedical signal processing. In
audio processing, for example, it is used to design equalizers and crossover networks
that maintain phase accuracy. In communications, it enables the creation of sharp
transition filters needed for channel separation and noise rejection. In biomedical fields,
it helps extract critical frequency components from physiological signals like ECG and
EEG without introducing distortion.
21
3.2 MATLAB Simulation
MATLAB has long been a preferred environment for engineering simulations,
offering a powerful set of built-in tools and libraries for digital signal processing (DSP),
including filter design, analysis, and visualization. In this project, MATLAB serves as
the primary platform for simulating the behavior of digital filters and evaluating their
impact on audio signals. The simulation approach leverages MATLAB’s robust
functionalities to implement, test, and refine various FIR and IIR filter designs within
an interactive and visual framework.
The simulation process begins with the development of a graphical user interface
(GUI) that allows users to interact with the filter design process in real time. The GUI is
programmed using MATLAB's uicontrol and figure functions, enabling input of design
parameters such as sampling frequency, passband and stopband frequencies, passband
ripple, and stopband attenuation. These parameters are essential for defining the desired
specifications of the digital filter, and the GUI facilitates easy adjustment without
requiring the user to interact directly with the underlying code.
Users are presented with multiple filter design options, including FIR, IIR, and a
high-level design method using the designfilt function. When a filter type is selected,
the GUI reads the specified parameters and invokes the appropriate design function—
either a custom FIR design based on the Kaiser window method, an IIR design using the
Butterworth prototype via the butter function, or an automatic configuration using
designfilt, which abstracts away the underlying algorithm selection while still honoring
the given specifications.
The designed filter coefficients are then used to analyze the frequency response of
the filter. This is accomplished using MATLAB’s freqz function, which calculates the
frequency response and allows for plotting of the magnitude (in decibels) versus
frequency. The result is a visual representation of the filter’s behavior across the
spectrum, showing characteristics such as the width of the transition band, the level of
ripple in the passband, and attenuation in the stopband. These plots are rendered in real
time within the GUI’s axes components, offering immediate feedback on design
changes.
In addition to designing and analyzing filters, the MATLAB simulation
environment also supports audio signal loading and processing. Users can import audio
files in various formats (e.g., WAV, MP3, FLAC) using the audioread function. The
imported signal is stored in memory, and the sampling frequency is automatically
22
detected and applied to the filter design. This dynamic integration ensures that the filter
is appropriately scaled to match the frequency characteristics of the signal.
The loaded signal is filtered using MATLAB’s filtfilt function, which applies zero-
phase digital filtering by performing forward and reverse filtering. This approach
eliminates phase distortion, a key concern in audio applications, and preserves the
original signal’s waveform integrity. The simulation outputs both the time-domain
waveforms of the original and filtered signals and a frequency-domain representation
obtained through the Fast Fourier Transform (FFT). The frequency spectra help
visualize the energy distribution of the signal before and after filtering, offering insight
into the effectiveness of the designed filter.
23
scalability, allowing future enhancements such as real-time playback, support for
multiband filtering, or adaptive filter integration.
24
Response), IIR (Infinite Impulse Response), or MATLAB’s high-level designfilt
function. Based on the selected method, the system invokes the corresponding algorithm
to generate the filter coefficients. For FIR design, the Parks-McClellan algorithm or
Kaiser window method may be used. IIR filter designs typically employ Butterworth
filters, offering a balance between smooth response and computational efficiency. For
the designfilt option, MATLAB automatically selects the best-fit design method based
on the user's provided frequency and ripple specifications.
25
waveform—typically the first 1000 samples—of both the original and the filtered
signals. This visualization helps users detect changes in amplitude, waveform
smoothness, and transient suppression. The changes can be especially noticeable in
scenarios involving noise reduction or high-frequency component removal, where the
filtered waveform appears cleaner and more stable.
To complement time-domain analysis, the workflow includes spectral analysis
using the Fast Fourier Transform (FFT). By converting the time-domain signals into the
frequency domain, the system plots the spectral content of the filtered signal and
overlays it with the original signal's spectrum. This comparison reveals the frequency
components that have been attenuated or preserved by the filter. For instance, in a
lowpass filter design, users can observe a significant drop in high-frequency energy in
the filtered signal, confirming the filter's effectiveness.
The simulation environment also uses dual-axis plotting in the GUI’s second panel.
The left axis is used for displaying time-domain plots, while the right axis shows
frequency-domain plots, allowing for a consolidated view of both domains in a single
figure. This approach enhances interpretability, allowing users to understand how time-
domain changes relate to frequency-domain modifications. The overlaid plots serve as
a powerful educational and diagnostic tool, particularly for students and practitioners
who are developing an intuition for filter behavior.
26
encourages experimentation and promotes a deeper understanding of how each
parameter influences filter characteristics. It also supports iterative refinement, which is
often necessary in professional audio processing workflows where trial and error is used
to tune filter parameters to achieve optimal perceptual or technical results.
Additionally, the system is designed to be extensible and modular. Future
enhancements could include real-time audio playback of the filtered signal, integration
with MATLAB's audio device writer system for live streaming, or support for multiband
and adaptive filtering methods. These enhancements would further expand the tool's
usefulness in areas such as live sound processing, hearing aid simulation, or intelligent
audio enhancement systems.
The audio processing workflow implemented in this project exemplifies a complete
and practical application of digital filter theory. It brings together critical stages of audio
data acquisition, filter parameterization, zero-phase filtering, and detailed visualization,
all within an interactive GUI environment. By enabling both intuitive and analytical
exploration of filter behavior, the workflow serves as a robust platform for educational
purposes, research prototyping, and practical audio signal enhancement. It successfully
demonstrates how theoretical filter design techniques can be seamlessly translated into
applied signal processing tasks, emphasizing clarity, interactivity, and precision
throughout the user experience.
27
CHAPTER 4
IMPLEMENTATION AND RESULTS
The implementation of the digital filter simulation tool was carried out entirely
within the MATLAB environment, leveraging its extensive support for signal
processing, graphical interface development, and real-time data visualization.
MATLAB was chosen for its built-in DSP toolboxes, intuitive syntax, and high-level
abstraction capabilities, which together facilitated rapid prototyping, integration of filter
design functions, and efficient GUI creation. The primary goals of the implementation
were to enable users to design digital filters, apply them to real audio signals, and
observe their effects through synchronized time- and frequency-domain visualizations—
all within a unified interface.
4.1.1 GUI Layout and User Input Handling
The foundation of the simulation tool is a MATLAB-based graphical user interface
(GUI), which was developed using the uicontrol and figure functions. The interface
includes buttons, dropdown menus, text fields, and axes components to allow users to
input filter specifications, choose design methods, and visualize results.
Upon launching the application, the main figure window initializes with default
values:
• Sampling frequency: 48000 Hz
• Passband frequency: 3000 Hz
• Stopband frequency: 4000 Hz
• Passband ripple: 1 dB
• Stopband attenuation: 60 dB
Users can update these values using editable fields. A dropdown menu lets users
choose between three filter design methods: FIR, IIR, and DESIGNFILT. Each change
in input triggers a corresponding callback function (onParamChange) that updates
internal specifications and refreshes the filter and plots. Input validation ensures all
numerical entries are positive and valid, displaying error dialogs when necessary.
28
Fig 4.1: GUI of the Filter Response
29
Fig 4.3: Select the Speech wave file
30
filter forward and then backward. The advantage of this approach is that it avoids phase
distortion, a critical requirement in audio signal processing where waveform fidelity is
essential.
After filtering, the system generates two primary types of plots:
Frequency Response Plot: Using freqz, the magnitude response of the designed
filter is calculated and displayed over a normalized frequency axis. The output shows
passband behavior, stopband attenuation, and the sharpness of the transition band.
Time and Frequency Domain Analysis: The first 1000 samples of the original and
filtered signal are plotted in the time domain. Simultaneously, the FFT of both signals
is computed, and the corresponding spectra are displayed. A dual-axis plot (yyaxis)
combines both views, offering a compact and intuitive display.
To enhance readability and scalability, the implementation is structured into
modular nested functions. Key functions include:
• onLoad() – Handles file import and sampling rate update
• onParamChange() – Updates parameters and triggers re-plotting
• updatePlots() – Manages plotting of frequency and time/spectrum data
• designFIR() – Implements FIR design logic using Kaiser window
• butterIIR() – Implements IIR design using Butterworth filter
This modular design supports future enhancements such as:
• Adding more filter types (e.g., Chebyshev, Elliptic)
• Integrating real-time playback using MATLAB's audio device interface
• Including adaptive filtering capabilities for non-stationary environments
• Exporting filtered audio for external use
Each module was tested individually and then integrated into the GUI to ensure
smooth transitions between input, processing, and visualization phases. This
development methodology ensured that the system remained maintainable and adaptable
to additional features.
31
The ripple within the passband remains minimal, aligning with the specified passband
ripple of 1 dB.
In the lower subplot, the time-domain waveform of the original signal (black) is
contrasted with the filtered output (red), indicating a smoother signal post-filtering. The
overlaid spectrum (orange) confirms the suppression of high-frequency components
beyond the cut-off, as seen in the distinct roll-off after the 4 kHz mark. This behavior
validates the efficiency of the FIR filter in maintaining linear phase while delivering
high attenuation with well-controlled ripple.
The IIR filter’s frequency response, derived using a Butterworth design, exhibits a
more gradual roll-off. The upper magnitude plot in the IIR GUI shows a less steep
transition with stopband attenuation progressing from -100 dB to nearly -600 dB.
However, this deep attenuation comes at the cost of a less defined cut-off edge and a
nonlinear roll-off curve.
In the lower subplot, the original and filtered signals display significant overlap in
time, but with slight distortion. The spectrum of the filtered signal shows reduced high-
frequency content, though the slope of suppression is not as sharp as in the FIR case.
Additionally, some irregularities in the spectral content may be attributed to numerical
32
instability or phase artifacts, which are common in high-order IIR filters. Despite this,
the IIR filter remains effective for applications where lower computational load and
moderate selectivity are acceptable.
33
Fig 4.6: DESIGNFILT-Based Filter Response
In the case of bandpass filtering, both FIR and DESIGNFILT methods were used
with passbands defined between 3000 Hz and 8000 Hz, and stopbands outside 4000 Hz
and 9000 Hz. Both methods yielded highly selective frequency responses with
symmetrical magnitude profiles, as shown in the respective GUI screenshots.
The upper plots illustrate clear bandpass behavior: attenuation below 3000 Hz and
above 9000 Hz, and a flat response within the passband. The lower plots again confirm
the expected output—the filtered waveform retains mid-frequency content while
rejecting low and high frequencies. Spectral plots highlight the concentration of signal
energy within the designed frequency band, with minimal leakage beyond the cut-off
edges.
This validates the effectiveness of both FIR and DESIGNFILT approaches for
multiband designs, particularly where phase linearity and predictable stopband
attenuation are essential.
34
Fig4.7: Lowpass Filter Analysis (FIR vs DESIGNFILT)
In the final configuration, a highpass FIR filter was implemented with a passband
beginning at 3000 Hz and a stopband ending at 4000 Hz. The upper frequency response
plot clearly shows a rising curve after the cut-off frequency, with deep attenuation below
3 kHz. The clean transition and symmetrical notches again highlight the advantages of
FIR filters in achieving sharp frequency control.
The time-domain view shows that low-frequency content is significantly reduced in
the filtered signal, while the spectrum confirms that frequencies below 3000 Hz have
been strongly attenuated. This highpass configuration could be especially useful in
applications like speech enhancement, where low-frequency background noise must be
removed without distorting mid-to-high frequency components.
4.3 Filter Output with Audio Signal
After designing and analyzing digital filters using the MATLAB simulation tool,
the final step in evaluating filter performance is to examine their practical effect on real
audio signals. This section focuses on the output characteristics of filtered audio,
demonstrating how each design approach—FIR, IIR, and DESIGNFILT—affects the
time-domain waveform and spectral content of the input signal. The test audio used for
this analysis is a voice or tonal sample recorded at a 44.1 kHz sampling rate, representing
typical scenarios in speech and music processing.
The time-domain behavior of the original and filtered signals reveals how filtering
alters the waveform’s amplitude, smoothness, and transient structure. In the case of FIR
35
filtering, the filtered output exhibits reduced oscillations and a smoother contour
compared to the original waveform. This is particularly noticeable in segments with
high-frequency content, where the filter effectively suppresses fast-changing
components without distorting the overall shape. The use of filtfilt ensures that zero-
phase filtering is applied, preserving the temporal alignment of waveform features such
as peaks, troughs, and transients.
In contrast, the IIR filter output, while demonstrating successful attenuation of high-
frequency noise, shows some distortion in the waveform. The recursive nature of IIR
filters introduces slight overshoots and ringing effects, especially near edges and
transitions. These artifacts stem from the nonlinear phase response of IIR filters and the
feedback structure used during filtering. However, they remain within acceptable limits
for applications like real-time filtering where computational efficiency is prioritized
over strict waveform preservation.
The DESIGNFILT-based filters generate time-domain results that closely resemble
those of FIR filters. The filtered waveforms are clean, with preserved envelope
characteristics and reduced high-frequency jitter. Because designfilt internally chooses
optimal FIR configurations (e.g., equiripple or minimum-order FIR), it balances filtering
strength and waveform fidelity. This makes it ideal for cases where user simplicity and
visual quality are equally important, such as in educational tools or initial design
iterations.
The spectral view, obtained through Fast Fourier Transform (FFT) and displayed
alongside the waveform plots, illustrates how the filtering process reshapes the signal’s
frequency content. In the FIR filter output, we observe a distinct drop in signal energy
beyond the defined stopband edge (e.g., 4000 Hz). The stopband attenuation exceeds
100 dB in some cases, confirming the precision and strength of the FIR approach.
Frequency components in the passband remain untouched, indicating minimal distortion
of useful signal information.
In the IIR-filtered signal, while attenuation beyond the stopband is observed, the
transition region is broader and less steep. This results in some energy leaking into the
stopband. Additionally, the magnitude plot shows minor fluctuations in the passband, a
known characteristic of IIR filters. These effects might degrade quality in high-fidelity
applications but are generally acceptable for tasks like noise suppression or embedded
signal conditioning.
36
Fig 4.8: Digital Filter Design GUI
The DESIGNFILT filter spectrum shows a well-balanced behavior between the FIR
and IIR extremes. The transition is sharper than in IIR designs, and the attenuation depth
approaches that of manually configured FIR filters. This is indicative of MATLAB’s
internal optimization, which constructs filters that satisfy the user-defined constraints
(passband/stopband frequencies, ripple, and attenuation) with minimal effort. The
frequency-domain plots confirm the tool’s ability to generate robust filter designs
through automated means.
Listening tests and subjective evaluation, though outside the scope of automated
MATLAB simulation, play a vital role in assessing filtered audio signals. In informal
testing using standard playback tools:
• The FIR-filtered signal sounded noticeably cleaner, with reduced hiss and
high-frequency artifacts.
• The IIR-filtered signal introduced slight coloration, particularly in segments
rich in transients or wideband energy.
• The DESIGNFILT-filtered signal retained the clarity of the original while
effectively reducing unwanted frequency bands.
These auditory impressions align with the plotted results and reinforce the trade-
offs among filtering strength, computational complexity, and perceptual transparency.
The filtered audio outputs demonstrate the practical advantages and trade-offs of
each design method:
• FIR filters are ideal when phase linearity and spectral sharpness are crucial,
37
such as in mastering audio or scientific measurements.
• IIR filters are useful in embedded systems or real-time audio where speed
and low memory usage are key concerns.
• DESIGNFILT filters offer a practical compromise, enabling rapid
prototyping with good filtering characteristics and minimal user burden.
The GUI-based tool developed in this project supports iterative experimentation,
enabling users to switch between designs, modify parameters, and instantly observe how
changes affect the audio output. This feature is especially valuable in educational
settings, where immediate feedback helps students build an intuitive understanding of
filter behavior.
38
CHAPTER 5
CONCLUSION AND FUTURE WORK
5.1 Conclusion
This project successfully achieved its objective of designing and developing an
interactive MATLAB-based simulation tool for digital filter design and audio signal
processing. By integrating graphical user interface components with robust signal
processing algorithms, the system provides users with an intuitive platform to design,
test, and analyze various types of digital filters in real time.
The implementation encompassed three core filter design approaches—FIR (Finite
Impulse Response), IIR (Infinite Impulse Response), and MATLAB's high-level
designfilt method—each offering unique advantages in terms of design flexibility,
computational efficiency, and ease of use. FIR filters demonstrated excellent
performance in terms of stopband attenuation and linear phase behavior, making them
ideal for applications requiring signal fidelity and phase integrity. IIR filters provided a
more computationally efficient solution but introduced nonlinear phase characteristics,
which may affect waveform shape. The designfilt approach effectively balanced ease-
of-use with precision by abstracting design complexities while delivering near-optimal
filters suitable for both prototyping and production use.
Real audio signals were used to validate the filter designs, and both time-domain
and frequency-domain analyses confirmed that the filtered outputs adhered to the
expected performance criteria. Through zero-phase filtering using MATLAB’s filtfilt
function, the system ensured that signal phase distortion was minimized, especially
crucial in audio processing contexts.
The visual feedback in the form of frequency response plots and spectral overlays
allowed users to understand the practical implications of their design choices. By
enabling parameter adjustments, filter selection, and live audio analysis within a single
interface, the simulation tool not only serves as a powerful engineering solution but also
as an educational resource for those learning digital signal processing concepts.
39
signals, there are several opportunities to expand its capabilities and increase its practical
value in both academic and professional contexts. One of the most significant future
enhancements would be the integration of real-time audio playback. This feature would
allow users to listen to the original and filtered signals directly within the GUI, providing
immediate perceptual feedback to evaluate the audible differences between filter
designs. Incorporating MATLAB’s audio streaming capabilities would make this
addition feasible and beneficial, especially for users focusing on speech or music
processing.
Another important improvement would be the inclusion of more advanced and
diverse filter types. Currently limited to lowpass, highpass, and bandpass designs, the
tool could be extended to support bandstop (notch) filters, multiband configurations, and
adaptive filters that respond dynamically to changing signal conditions. This would
greatly enhance its versatility for complex real-world applications such as dynamic noise
cancellation or biomedical signal enhancement. Furthermore, enabling support for
minimum-phase and nonlinear-phase filter designs would allow the tool to be used in
phase-sensitive environments, such as communication systems and phase modulation
studies.
Automation of filter order estimation is another valuable enhancement. Instead of
requiring users to manually determine appropriate filter orders or rely solely on default
settings, the tool could compute the optimal filter order based on input parameters such
as transition width and required attenuation. This would simplify the design process and
improve efficiency, especially for novice users unfamiliar with filter design heuristics.
Expanding the tool’s capabilities to handle stereo or multichannel audio would
enable its use in spatial audio processing, surround sound applications, and real-time
mixing environments. Multi-channel support would also open up opportunities for
advanced filtering tasks, such as applying different filters to each channel or spatially-
aware filtering techniques.
Visualization tools can also be improved to offer deeper insights into filter
characteristics. Beyond the current frequency and time-domain plots, future versions
could include phase response, group delay, pole-zero plots, and real-time animated
response graphs. These visualizations would enhance the learning experience for
students and provide researchers with more diagnostic tools for evaluating filter
performance.
Additionally, the ability to export filter coefficients, save filtered audio files, or
40
generate MATLAB scripts from user-configured designs would make the system more
practical for long-term use. Such export features would enable the transition of designed
filters into other MATLAB projects, embedded platforms, or external digital audio
workstations (DAWs), thereby bridging the gap between simulation and
implementation.
As a forward-looking enhancement, the integration of machine learning techniques
could enable the tool to provide intelligent recommendations for filter parameters based
on input signal analysis. This would make the system more adaptive and helpful,
particularly for users who are not experts in digital filter theory but still require precise
signal manipulation.
41
REFERENCE
[1] S. K. Mitra, Digital Signal Processing: A Computer-Based Approach, 4th ed. New York,
NY, USA: McGraw-Hill, 2010.
[2] A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed. Upper Saddle
River, NJ, USA: Prentice-Hall, 2009.
[3] B. Widrow, J. R. Glover Jr., J. M. McCool, J. Kaunitz, C. S. Williams, R. H. Hearn, J. R.
Zeidler, E. Dong Jr., and R. C. Goodlin, “Adaptive noise cancelling: Principles and
applications,” Proc. IEEE, vol. 63, no. 12, pp. 1692–1716, Dec. 1975.
[4] L. R. Rabiner and B. Gold, Theory and Application of Digital Signal Processing. Englewood
Cliffs, NJ, USA: Prentice-Hall, 1975.
[5] T. W. Parks and J. H. McClellan, “Chebyshev approximation for nonrecursive digital filters
with linear phase,” IEEE Trans. Circuit Theory, vol. CT-19, no. 2, pp. 189–194, Mar. 1972.
[6] A. Antoniou, Digital Filters: Analysis, Design, and Applications, 2nd ed. New York, NY,
USA: McGraw-Hill, 2006.
[7] M. Bellanger, “Specification of FIR filters by a weighted Chebyshev approximation,” IEEE
Signal Process. Mag., vol. 18, no. 5, pp. 76–84, Sep. 2001.
[8] Y. C. Lim, “Design of FIR filters with reduced coefficients,” IEEE Trans. Circuits Syst., vol.
33, no. 4, pp. 357–364, Apr. 1986.
[9] J. H. McClellan, T. W. Parks, and L. R. Rabiner, “A computer program for designing
optimum FIR linear phase digital filters,” IEEE Trans. Audio Electroacoust., vol. 21, no. 6,
pp. 506–526, Dec. 1973.
[10] C. S. Burrus, R. A. Gopinath, and H. Guo, Introduction to Wavelets and Wavelet
Transforms: A Primer. Upper Saddle River, NJ, USA: Prentice-Hall, 1997.
[11] P. P. Vaidyanathan, “Multirate digital filters, filter banks, polyphase networks, and
applications: A tutorial,” Proc. IEEE, vol. 78, no. 1, pp. 56–93, Jan. 1990.
[12] J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms, and
Applications, 4th ed. Upper Saddle River, NJ, USA: Prentice-Hall, 2007.
[13] S. R. Parker, “Audio signal processing with digital filters,” IEEE Spectrum, vol. 35, no. 6,
pp. 32–39, Jun. 1998.
[14] J. Mourjopoulos, “Digital equalization of room acoustics: An overview,” J. Audio Eng. Soc.,
vol. 42, no. 11, pp. 884–900, Nov. 1994.
[15] R. F. Lyon, “Speech recognition and auditory models,” in Proc. IEEE Int. Conf. Acoust.,
Speech, Signal Process. (ICASSP), 1982, pp. 36.1.1–36.1.4.
[16] J. Benesty, S. Makino, and J. Chen, Speech Enhancement. Berlin, Germany: Springer, 2005.
[17] H. Puder, “Hearing aid algorithms,” IEEE Signal Process. Mag., vol. 22, no. 4, pp. 50–62,
Jul. 2005.
[18] P. Vary, “Noise suppression by spectral subtraction and Wiener filtering,” IEEE Signal
Process. Mag., vol. 3, no. 4, pp. 112–120, Oct. 1985.
[19] R. Brennan and T. Schneider, “A flexible filter design GUI in MATLAB,” in Proc. IEEE
DSP Workshop, 2006.
[20] M. J. Smith, “Applications of digital signal processing in audio and acoustics,” IEEE
Spectrum, vol. 29, no. 10, pp. 36–43, Oct. 1992.
42
[21] G. E. Dullerud and F. Paganini, A Course in Robust Control Theory: A Convex Approach.
New York, NY, USA: Springer, 2000.
[22] A. B. Watson, “DCT quantization matrices visually optimized for individual images,” in
Proc. SPIE Human Vision, Visual Process. Digit. Display IV, 1993, vol. 1913, pp. 202–216.
[23] J. B. Allen and L. R. Rabiner, “A unified approach to short-time Fourier analysis and
synthesis,” Proc. IEEE, vol. 65, no. 11, pp. 1558–1564, Nov. 1977.
[24] D. Graupe, Time Series Analysis, Identification and Adaptive Filtering. Malabar, FL, USA:
Krieger, 1987.
[25] A. Papoulis, Signal Analysis. New York, NY, USA: McGraw-Hill, 1984.
[26] M. Vetterli and J. Kovacevic, Wavelets and Subband Coding. Upper Saddle River, NJ, USA:
Prentice-Hall, 1995.
[27] S. C. Chan and K. L. Ho, “An adaptive filter bank with perfect reconstruction,” IEEE Trans.
Signal Process., vol. 49, no. 1, pp. 134–144, Jan. 2001.
[28] T. Saramäki, “Finite impulse response filter design,” in Handbook for Digital Signal
Processing, S. K. Mitra and J. F. Kaiser, Eds. New York, NY, USA: Wiley-Interscience,
1993, pp. 155–277.
[29] A. H. Tewfik and M. Kim, “Perceptually motivated filter design using convex
optimization,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2002,
pp. II-1493–II-1496.
[30] E. Ifeachor and B. W. Jervis, Digital Signal Processing: A Practical Approach, 2nd ed.
Harlow, U.K.: Pearson Education, 2002.
[31] Y. Neuvo, D. Cheng, and S. K. Mitra, “A novel approach to the design of digital filters with
arbitrary magnitude and phase responses,” IEEE Trans. Circuits Syst., vol. 25, no. 5, pp.
309–314, May 1978.
[32] D. L. Jones and T. W. Parks, “FIR filter design over arbitrary frequency bands,” IEEE Trans.
Acoust., Speech, Signal Process., vol. ASSP-35, no. 1, pp. 69–74, Jan. 1987.
[33] R. Prasad, “Low-power FIR filter implementation techniques for wireless and portable
applications,” IEEE Trans. VLSI Syst., vol. 11, no. 6, pp. 928–937, Dec. 2003.
[34] L. Savioja and V. Välimäki, “Realtime room acoustics simulation with a modular structure,”
IEEE Signal Process. Mag., vol. 16, no. 5, pp. 28–34, Sep. 1999.
[35] H. L. Van Trees, Detection, Estimation, and Modulation Theory, Part I. New York, NY,
USA: Wiley, 2001.
[36] N. Ahmed and K. R. Rao, “Orthogonal transforms for digital signal processing,” IEEE
Trans. Acoust., Speech, Signal Process., vol. 24, no. 6, pp. 501–515, Dec. 1976.
[37] R. M. Gray and J. D. Markel, “Digital linear prediction and spectral analysis,” IEEE Trans.
Audio Electroacoust., vol. 21, no. 6, pp. 491–500, Dec. 1973.
[38] J. C. Goswami and A. Chan, Fundamentals of Wavelets: Theory, Algorithms, and
Applications. New York, NY, USA: Wiley-Interscience, 1999.
[39] K. Steiglitz, “A digital signal processing filter design program,” IEEE Trans. Audio
Electroacoust., vol. 18, no. 1, pp. 80–87, Mar. 1970.
[40] L. Cohen, “Time-frequency distributions—A review,” Proc. IEEE, vol. 77, no. 7, pp. 941–
981, Jul. 1989.
[41] J. Allen and D. Berkley, “Image method for efficiently simulating small-room acoustics,”
J. Acoust. Soc. Amer., vol. 65, no. 4, pp. 943–950, Apr. 1979.
43
[42] D. Graupe and R. Liu, “Time series analysis of neural signals and adaptive learning,” IEEE
Trans. Biomed. Eng., vol. BME-30, no. 6, pp. 421–429, Jun. 1983.
[43] J. H. McClellan, “Software for filter design,” in Proc. IEEE Int. Conf. Acoust., Speech,
Signal Process. (ICASSP), 1983, pp. 118–121.
44
APPENDIX
function digitalFilterGUI
'MenuBar','none','ToolBar','none', ...
% Default specs
[Link] = 48000;
[Link] = 3000;
specs.Fs_stop = 4000;
[Link] = 1;
[Link] = 60;
% Load button
45
'Callback',@onLoad);
% Method selection
uicontrol('Style','text','String','Method:',...
paramList = {'Fs','Fp','Fs_stop','Rp','Rs'};
ypos = 510:-40:350;
for k = 1:numel(paramList)
name = paramList{k};
% Display label
uicontrol('Style','text','String',labelStr, ...
% Edit field
46
end
% Initial plot
updatePlots();
function onLoad(~,~)
[Link].x = x;
[Link] = Fs_file;
[Link] = Fs_file;
47
set([Link],'String',num2str(Fs_file));
updatePlots();
end
function onParamChange(~,~)
% Read method
[Link] = [Link]{[Link]};
for k = 1:numel(paramList)
name = paramList{k};
val = str2double(get([Link].(name),'String'));
return;
end
specs.(name) = val;
end
updatePlots();
end
48
%% Main plotting function
function updatePlots()
cla(h.ax1); cla(h.ax2);
% If no audio loaded
if isempty([Link])
'HorizontalAlignment','center','FontSize',12);
return;
end
x = [Link].x;
Fs = [Link];
t = (0:length(x)-1)/Fs;
% Normalized frequencies
Wp = [Link]/(Fs/2);
Ws_norm = specs.Fs_stop/(Fs/2);
% Design filter
switch [Link]
case 'FIR'
[b,a] = designFIR(Wp,Ws_norm,[Link]);
49
case 'IIR'
[b,a] = butterIIR(Wp,Ws_norm,[Link],[Link]);
case 'DESIGNFILT'
d = designfilt('lowpassfir', ...
'PassbandFrequency',[Link], ...
'StopbandFrequency',specs.Fs_stop, ...
'PassbandRipple',[Link], ...
'StopbandAttenuation',[Link], ...
'SampleRate',Fs);
b = [Link]; a = 1;
end
[H,f] = freqz(b,a,1024,Fs);
plot(h.ax1,f,20*log10(abs(H)));
set(h.ax1,'XGrid','on','YGrid','on');
% Zero-phase filter
y = filtfilt(b,a,x);
plot(h.ax2,t(1:1000),x(1:1000),'k'); hold(h.ax2,'on');
plot(h.ax2,t(1:1000),y(1:1000),'r');
50
% Spectrum on right axis
yyaxis(h.ax2,'right');
nfft = 2^nextpow2(length(x));
X = fft(x,nfft); Y = fft(y,nfft);
faxis = Fs*(0:(nfft/2))/nfft;
plot(h.ax2,faxis,20*log10(abs(Y(1:nfft/2+1))));
hold(h.ax2,'off');
set(h.ax2,'XGrid','on','YGrid','on');
ylabel(h.ax2,'Magnitude (dB)');
end
if A>50
beta = 0.1102*(A-8.7);
elseif A>=21
else
51
beta = 0;
end
N = ceil((A-8)/(2.285*pi*delta_f));
if mod(N,2)
N = N + 1;
end
b = fir1(N,Wp,kaiser(N+1,beta));
a = 1;
end
[n,Wn] = buttord(Wp,Ws,Rp,Rs);
[b,a] = butter(n,Wn);
end
end
52
Zero-phase filtering, achieved using the filtfilt function, is crucial for preserving audio quality as it eliminates phase distortion. This method applies the filter forward and backward across the signal, ensuring that even minor phase shifts, which can alter the perceived quality of sound, are removed. This technique is critical in high-fidelity applications like speech enhancement and professional music production .
The MATLAB simulation environment facilitates the design and testing of digital filters by providing a graphical user interface (GUI) that allows users to interact with the filter design process in real-time. The GUI supports input of design parameters like sampling frequency, passband and stopband frequencies, and uses functions such as freqz to plot the frequency response. The environment also enables users to import audio files and apply zero-phase filtering using the filtfilt function, thereby preserving the original signal’s waveform integrity .
Real-time visual feedback in a GUI enhances the filter design process by allowing users to immediately observe the effects of design changes on the frequency and time-domain characteristics of the filter. This interaction facilitates a more intuitive understanding of how specific parameters influence the filter's performance, accelerates the design-evaluation cycle, and aids in educational settings by providing direct visual insight into complex signal processing concepts .
The primary differences between FIR and IIR filters are their respective stability and computational efficiency. FIR filters are inherently stable and maintain linear phase characteristics, making them suitable for audio applications where phase integrity is critical. IIR filters offer computational efficiency and steep roll-off characteristics, which are beneficial for tasks that require lower-order filters .
Machine learning techniques could enhance digital filter design tools by providing intelligent recommendations for filter parameters based on analyzed input signals. This adaptability would be particularly valuable for non-expert users, allowing for precise signal manipulation without deep knowledge of digital filter theory. Such enhancements could make the tool more helpful by tailoring filter designs to the unique characteristics of different signal types .
The audio processing workflow supports dynamic and interactive filter design by using a GUI that allows users to load audio files and apply designed filters. The workflow processes the audio data, applying zero-phase filtering and providing visual feedback in both time and frequency domains. This interactive approach helps users intuitively understand the effects of different filter designs on actual audio signals, enhancing educational and practical applications of digital signal processing .
FIR filters are known for their inherent stability and linear phase characteristics, making them ideal for audio applications where phase integrity is crucial .
The Parks-McClellan algorithm is limited in that it is primarily suited for designing linear-phase FIR filters and does not support minimum-phase or nonlinear-phase designs. It also requires the user to predetermine the filter order, potentially necessitating multiple iterations to meet performance criteria. High-order filter designs or those with narrow transition bands can encounter numerical stability issues .
Potential enhancements include supporting more filter types such as bandstop, multiband, and adaptive filters, improving phase handling capabilities for minimum and nonlinear-phase designs, automating filter order estimation based on performance criteria, enabling multi-channel audio processing, and enhancing visualization tools with real-time animated response graphs and phase response plots. These improvements would make the tool more versatile and practical across various complex real-world applications .
MATLAB's designfilt utility simplifies the digital filter design process by allowing users to define filters through specification parameters such as desired frequency range and attenuation characteristics. MATLAB internally determines the optimal design strategy, blending flexibility with automation and providing efficient design workflows without compromising control over filter behavior .