2. II
AKNOWLEDGMENT
First and foremost I would like to express my deep thanks to ALLAH (SWT)
for blessing me with another day in this life. I do thank ALLAH the almighty for all
blessings to my daily life, good health, healthy mind and good ideas.
I express my deepest thanks to DR. Raed Mohammed my lecturer for taking part in
useful decision & giving necessary advices, guidance throughout my assignment and
the past few months. And my dear friends Uthaya Kumar for the motivation, I choose
this moment to acknowledge his contributions gratefully.
3. III
ABSTRACT
Currently the main concern of the world engineers is finding the best ways to
serve the human being In our beloved planet earth, however against all odds The
purpose of this project was to create a 10 band graphic equalizer to give us control
over the amplitude of a sound signal at ten different resonant frequencies ranging
from bass (low frequencies) to treble (high frequencies) therefore tailoring the sound
signal to a listener’s preference however MATLAB (Simulink) is going to be used in
realizing the different between the theoretical and practical results and other to be
explained onward.
4. IV
TABLE OF CONTENT
AKNOWLEDGMENT
......................................................................................................................................
II
ABSTRACT
........................................................................................................................................................
III
TABLE OF CONTENT
...................................................................................................................................
IV
CHAPTER
I
............................................................................................................................................................
1
1.0
INTRODUCTION
..........................................................................................................................................
1
1.1
BACKGROUND
.............................................................................................................................................
1
1.2
OBJECTIVES
...........................................................................................................................................
2
CHAPTER II
.........................................................................................................................................................
3
2.0 THEORITICAL CONCEPT
.....................................................................................................................
3
2.1 INTRODUCTION
.......................................................................................................................................
3
2.2 OVERVIEW
..................................................................................................................................................
3
CHAPTER III
.....................................................................................................................................................
10
DESIGN IMPLEMENTATION
...................................................................................................................
10
3.1 INTRODUCTION
.....................................................................................................................................
10
3.2
MAIN
DESIGN
.............................................................................................................................................
10
FIRST STAGE (AUDIO INPUT SUBSYSTEM)
..................................................................................
11
SECOND STAGE (FILTERS AND GAINS)
..........................................................................................
13
THIRD STAGE (OUTPUT SPEAKERS)
................................................................................................
15
CHAPTER IV
.....................................................................................................................................................
17
4.0 DESIGN INNOVATIVNESS
................................................................................................................
17
CHAPTER IV
.....................................................................................................................................................
18
5.0
SIMULATION
RESULTS
..........................................................................................................................
18
CHAPTER VI
.....................................................................................................................................................
20
6.0 DISCUSSION
..............................................................................................................................................
20
CHAPTER VII
...................................................................................................................................................
21
7.0 CONCLUSION
...........................................................................................................................................
21
CHAPTER VIII
..................................................................................................................................................
22
8.0 REFERENCES
............................................................................................................................................
22
6. VI
LIST OF FIGURES:
Figure
1:
Parametric
and
Graphical
EQ
....................................................................................................
3
Figure
2:Butterworth
filter
frequency
response
..................................................................................
5
Figure
3:
Analog
Bandpass
Filter
and
voltage
Divider
analysis
....................................................
6
Figure
4:
Bandpass
IIR
Filter
Network
diagram
..................................................................................
8
Figure
5:
IIR
equalizer
data
flow
diagram
..............................................................................................
9
Figure
6:
Simulink-‐Based
graphic
equalizer
simplified
into
3
stages
.......................................
10
Figure
7:
First
stage
-‐
Audio
input
subsystem
.....................................................................................
11
Figure
8:
Second
stage
of
the
system
(Filters
and
Gains)
...............................................................
13
Figure
9:
Parameters
of
digital
filters
block
.........................................................................................
13
Figure
10:
output
speakers
Block
.............................................................................................................
15
Figure
11:
GUI
of
the
Graphic
audio
equalizer
....................................................................................
17
Figure
12:
output
and
input
after
spectrum
of
rock
effect
............................................................
18
Figure
13:
output
and
input
of
theater
effect
......................................................................................
18
Figure
14:
input
and
output
spectrum
of
hip-‐hop
effect
................................................................
19
Figure
15:
output
and
input
of
different
random
scales
.................................................................
19
7. LIST OF TABLES:
Table
1:Fc
and
Fs
.............................................................................................................................................
14
8. CHAPTER I
1.0 INTRODUCTION
1.1 BACKGROUND
Over the last two decades, digital signal processing technology have been too quick
and enormous, and take a part to be one of the most important fields of study, which
stepped up the digital technology and the electronic industry to a higher level of
development. Digital signal processing have become the methodology of choice over
analogue signal processing due to the flexibility, precision and broad range of
application including applications in telecommunications, sensors and radars and
more, in addition it made a huge change in electronics industrial and to be more
developed as the need of making things better is alive (Weeks, 2007).
Digital signal processing manipulate several types of signals for the purpose of
Filtering, measuring and producing analogue signals, however analogue signals
known to take the information and convert it into electric pulse with different
amplitude, while digital signal information converted to a binary form, where each bit
of data represented by two discernible amplitudes, in addition analogue signals
represented as a sine wave while the digital signals can be represented as square
waves. Digital signal processing covers many aspects such as sound reproducing,
medical image processing, and telecommunication or any applications that involves
compressing and reproducing of signals (Tan,2008).
On the other hand digital filters are the filters that operates on digital signals, such as
sound represented inside a computer. It is a computation, which takes one sequence of
numbers (the input signal) and produces a new sequence of numbers (the filtered
output signal), in addition to realize that a digital filter can do anything that a real-
world filter can do, where all the filters alluded to above can be simulated to an
arbitrary degree of precision digitally.
9. 2
Thus, a digital filter is only a formula for going from one digital signal to another. It
may exist as an equation on paper, as a small loop in a computer subroutine, or as a
handful of integrated circuit chips properly interconnected. (Julius O. Smith III , 2017).
Furthermore, all the information introucing the digital signal processing and digital
filters will be used later on in this paper, for the purpose of desging a graphical audio
equlizer using digital filters and DSP behaviours.
1.2 OBJECTIVES
The main aim and desire of the author in this assignment is to analyse, identify
and evaluate and to investigate and design a Graphical Equalizer using Simulink of
MATLAB, and as an electrical engineer to gain the full knowledge and research of the
following, the statement which the primary objective.
• To provide environmental input audio signals for ten (10) frequency bands covering appropriate
frequency of the audio signals using Simulink on MATLAB.
• To provides five (5) quick settings for the amplitude of the frequency bands such as to create effects
mimicking specific ambience such as pop, jazz, classical, theatre and rock.
• To provides appropriate justification and supported with fundamental principles on the choice of
filters which are IIR (Infinite Impulse Response or FIR (Finite Impulse Response) filters, as well as
parameters associated with the chosen filters.
10. 3
CHAPTER II
2.0 THEORITICAL CONCEPT
2.1 INTRODUCTION
The chapter present deeper information of the graphical audio equalizer system
modelling besides mathematical modelling, in addition to the design of the audio
equalizer theoretical concepts of using the digital filters.
2.2 OVERVIEW
High
quality
audio
system
depends
on
frequency
response
equalizers,
as
primary
concern
to
compensate
for
room
acoustics
and
modes,
however
the
used
equalizers
fall
into
two
main
categories
of
graphic
and
parametric
equalizers.
Figure
1:
Parametric
and
Graphical
EQ
Furthermore
the
paper
focus
only
with
the
graphic
equalizer,
where
the
name
take
a
part
of
its
array
narrow
filters,
how
normally
adjusted
with
vertical
slide
control
sets
side
by
side
to
resemble
a
graphic
display
of
the
set
frequency
response.
11. 4
Graphic equalizer take a main part of its being the most common tool for sound
reinforcement. However an ideal graphic equalizer consist of a bank of frequencies
which gives the function of:
• Cutting.
• Boosting.
To the given frequencies, in addition the center of the frequencies filters are identical
for graphical equalizer, depends on the manufacturers and following the ISO
international standard organization.
On the other hand since the position of the sliders roughly represents the amounts of
boost and cut, graphical equalizer offers an approximate visual representation of the
frequency response alteration created by the equalizer. Furthermore The numbers of
filters placed in the equalizer can be few as 5 band graphic equalizer to 31 band
graphical equalizer or more if needed.(Gino Sigismondi,2016)
The frequency system of the audio graphical equalizer depends in two types of filters
• Infinite impulse response (IIR).
• Finite impulse response (FIR).
Digital IIR filters can be derived from the IIR counterpart, thus transforming the
analogue filters parameters such as (frequency, gain and Q), to the digital domain,
which to be the main procedure for the digital equalizers, because it fix the perfect
parameters from the analogue equalizers, in addition included the An infinite impulse
response where in practice, the impulse response eventually decay below the noise
floor.
On the other hand for FIR filters, its impossible to have a direct way of transforming
analogue equalizers parameters to digital FIR systems, and the algorithm that emulate
a specific frequency response on a FIR system to be similar to the amplitude and the
phase.
12. 5
Adding to the use of filters. IIR filters have a place to be more useful over the FIR,
especially in audio equalizers because of a several reasons:(Weiss,2015)
1. The delay of the FIR system is not acceptable for audio processing.
2. Larger hardware expense involved for tunable FIR audio equalizer than the IIR
equivalent.
3. The parametric of analogue equalizers can be maintained easier in IIR than FIR
filters.
4. The FIR audio band of the digital signal processing computationally more intensive
than the on for IIR filters.
Furthermore for the design of the graphical equalizer, other filters are involved in the
design where to be explained simply.
Low pass filter: low pass filters simply allow only low frequency elements to pass
through and rejects any other high frequency signals.
High pass filter: high pass filters allow only certain signals with frequencies higher
than a specified cutoff frequencies, however it also reduce signals with frequencies
lower than the cutoff frequency, while it depends on the design of the filter.
Butterworth filter: Butterworth filter outputs a flat frequency response in the pass
band and it can be called as a maximally flat magnitude filter.
Figure
2:Butterworth
filter
frequency
response
13. 6
Designs of IIR
The 10 band audio equalizer consist of 10 digital IIR filters connected in parallel,
however adding to the concept of the center band of these frequencies as discussed
earlier in the paper which lies between 0 HZ to fs/2 where it’s the sample frequency
of 48000 Hz.
Figure
3:
Analog
Band
pass
Filter
and
voltage
Divider
analysis
The equation below shows the H(s) after being derived from the voltage divider
analysis of the RCL network. And where s = j(2pif)
Secondly, the equation below shows the bilinear transformation between the s-plane
and the z-plane:
By using the last equation the z plane TF found from the first equation.
14. 7
Last but not least, the coefficients of each filter can be calculated using the following
equations.
fo = the center frequency of the band pass filter
f1 and f2 = the half power points where the gain is equal to 1/ 2
fs = sample frequency.
The previous equations derived for approximation to center frequencies less
than 6000 Hz or by using the formula fs/8, however as a digital IIR filters the transfer
function required to be transformed to a difference equation in the DT domain.
The equation below shows the difference equation with its representation as a
network diagram.
15. 8
Figure
4:
Band
pass
IIR
Filter
Network
diagram
As shown in the diagram below the left and the right sound bytes fed to the 10
filters in parallel, however after each perspective Band pass filter eliminates the
frequencies in different range, and every output to be scaled by a output gain and the
range mentioned ranges from 0 to1.
In addition the ten filters results summed together and transferred to the
output, which this process allows one selectively limit the gain of a specific frequency
range from the sound input.(James M. ,2005).
17. 10
CHAPTER III
DESIGN IMPLEMENTATION
3.1 INTRODUCTION
The chapter present the design implementation steps, supported with
explanation of constructing the Simulink blocks, however the design implementation
divided to different stages for better and clearer way of explanation.
3.2 MAIN DESIGN
The figure below shows the main design of the Simulink-based graphic
equalizer, which to be separated to 3 different stages each stage responsible of a part
of the audio graphical equalizer system.
Figure
6:
Simulink-‐Based
graphic
equalizer
simplified
into
3
stages
The block diagram of the system flow shown below:
Audio
input
Filter
Bank
Gain
Output
Speakers
Slide
pots
for
boost/cut
18. 11
• First stage: Audio input, which responsible of dragging the audio file and
give access to precede the audio file to the next stage.
• Second stage: Filter bank and Gain, which considered of being the heart of
the system where all the filters and gain function beside filtering the audio file
and prepare it to the next stage.
• Third stage: Output speakers, the last stage, Responsible of the output from
the second stage after being filtered and to present the equalized audio and
results.
FIRST STAGE (AUDIO INPUT SUBSYSTEM)
Figure
7:
First
stage
-‐
Audio
input
subsystem
The first stage of the design implementation shows the input of the system where the
audio file is inserted to the equalizer by using the From Multimedia File block
19. 12
From multimedia file block
Description: The From Multimedia File block reads audio samples, video frames, or
both from a multimedia file. The block imports data from the file into a Simulink
model.
Function: The block supports code generation for the host computer that has file I/O
available. You cannot use this block with Simulink Desktop Real-Time
software because that product does not support file I/O. in addition the block support
certain audio files to be imported to the system.
To workspace block
Description: The (To Workspace block) inputs and writes the signal data to a
workspace. During the simulation, the block writes data to an internal buffer. When
the simulation is completed or paused, that data is written to the workspace. Data is
not available until the simulation is stopped or paused.
Functions:
• For menu-based simulation, data is written in the MATLAB base workspace.
• A Sim command in a MATLAB function sends data logged with the To
Workspace block to the workspace of the calling function, not to the MATLAB
(base) workspace.
On the other hand the two blocks simplified to be in a subsystem block, because it
support the case when having an error to be known easily.
20. 13
SECOND STAGE (FILTERS AND GAINS)
Figure
8:
Second
stage
of
the
system
(Filters
and
Gains)
The stages shown above considered to be the heart of the audio equalizer,
where all the mathematical and frequency calculations made, however the working
principles of the stage is the audio to enter the stage after its been uploaded to the
system as mentioned earlier in the function of the first stage, in addition the audio is
to be filtered according to the settings adjusted inside the digital filter blocks
properties shown in the figure below.
Figure
9:
Parameters
of
digital
filters
block
21. 14
Furthermore the blocks allows the designer to choose between the filters given
in the block, for this design an IIR filter was chosen and to be specific a Butterworth
filter is been working for the audio signal entering, in addition the frequency adjusted
according to the IOS standards for a 10 band audio equalizer, where it shows the
sampling and the cutoff frequency, the table below shows the chosen frequencies
ranges for each filter.
Table
1:Fc
and
Fs
Filters frequency (Hz) frequency (Hz)
Low pass Fs = 48000 40
Band pass 40 80
Band pass 80 160
Band pass 160 300
Band pass 300 600
Band pass 600 1200
Band pass 1200 2400
Band pass 2400 5000
Band pass 5000 10000
High pass 10000 20000
Digital Filter Design Block:
Description:
The digital filter design block used for designing and implementing a digital
Filter, with a feature of designing a single channel or multi-channels signals. In
addition it can be the best choice of simulating the numerical behavior of the floating
point systems.
On the other hand, the digital Filter design block offers extensive filter design
parameters and tools such as:
• Poles and zeros.
• Impulse response plots.
22. 15
Gain Block:
The Gain block responsible of generating the out of the previous block (digital
filter design), by multiplying its output by a specific gain factor, however the gain can
be entered as variable expression or numeric value in the parameters section of the
block. The value of the gain can be modified using a slider as to be shown in a
MATLAB Gui after linking each gain of the system by a workspace block as
explained earlier.
Add Block
The add block perform addition on its inputs. For the design all the inputs are
filtered by the filters block and the Gain is adjusted the last step to sum all the filtered
signals and to be displayed in the last stage.
THIRD STAGE (OUTPUT SPEAKERS)
Figure
10:
output
speakers
Block
The to audio device block sends the audio data that’s been executed from the
last two stages to be heard by the built-in speakers of the computer, however the
output audio effect will be heard by the user, in addition to any changes have been
done the user can clearly recognize the different by adjusting the gain for each filter.
23. 16
INPUT AND OUTPUT SPECTRUM
The input and output spectrum show both the frequency spectrum of the input
and output, in more details the unclear spectrum of the input where the frequency of
the audio file shown before it enters the second stage and after the filtering process, in
addition the spectrums will be discussed more in the results section.
Figure
11:
input
and
output
spectrum
blocks
24. 17
CHAPTER IV
4.0 DESIGN INNOVATIVNESS
As proposed earlier in the paper a MATLAB graphical user interface was
implemented to enhance the use of the graphical equalizer that built in Simulink, in
addition as mentioned earlier the workspace blocks constructed in the Simulink to
link between the GUI and the MATLAB to make it easier for the user to control and
adjust the graphical equalizer effects and Gain.
The GUI include the following features:
• Browse button: allow the user to choose different audio file easily from the computer
• Ten sliders: allow the user to control the gain easily and adjust the bands of the filters
• Five audio effects: the effects automatically adjust the Band to a specific value for the
desired effect for example “hip-hop” effect adjust band according to the ISO hip-hop
effect frequencies.
Figure
12:
GUI
of
the
Graphic
audio
equalizer
25. 18
CHAPTER IV
5.0 SIMULATION RESULTS
As proposed in the project, the output of the spectrum analyzed block that
was built in to show the frequency response before and after the signals enters the
filters constructed, however the GUI allow the user to use different effects. Hence
there will be different results for each effect.
The spectrum shows both audio signal in the output and input, it shows that the
signals after been filtered in high pass and low pass, however the frequency response
of the filters reduces after entering the filter shown in the figure below.
Figure
13:
output
and
input
after
spectrum
of
rock
effect
The figure above shows the input and output spectrum after applying the rock effect,
as realized the amplitude is changed and less signals to be found in the output
spectrum after the audio signals have been filtered.
Figure
14:
output
and
input
of
theater
effect
26. 19
The figure above shows the output and input spectrum of the theatre effect,
however the amplitude increased in output spectrum as shown, this might take place
where the theatres take a wide are so a high amplitude frequency should be resulted,
in addition the frequency drops down in some part where the gain is reduced in this
part.
Figure
15:
input
and
output
spectrum
of
hip-‐hop
effect
The figure above shows the spectrums after using the rock effect by the user, where as
shown the amplitude is almost the same and less signals to be found in the output
spectrum, beside as heard by the audio speakers the hip-hop effect is to be more high
pitched and loud with a high bass.
Figure
16:
output
and
input
of
different
random
scales
The figure below shows the output and input of a random scales sets by the user,
however all the gain were sets to the minimum value.
27. 20
CHAPTER VI
6.0 DISCUSSION
For the audio equalizer designed using IIR filter which is based on the process
of filtering of the audio signals and gain, however different effects were fixed to the
GUI interfacing with Simulink, in addition the user can select the most suitable effect
to be arranged according to the effect ranges beside the user can keep on changing in
the slider value to get the best desired output and put the action to adjust it according
to the desired response and the change have been made, thus an improved IIR filter
increase the accuracy of the system response, furthermore from the applied system the
following changes were realized:
• Less signals in the output: the output of the filters always show less signals
where the filters take off some signals or in another word to filter the signals
this might be caused by the low-pass for the first part of the spectrum and
band-pass for the 8 centered gains, and the high pass filter for the last gain.
• Amplitude fluctuating for each effect: the amplitude for each spectrum
results were slightly different in amplitude range, however this is because each
effect has a different gain ranges where to be adjusted by the sliders.
The simulation results clearly shows the change in frequency response after using
each effect, however each effect apply different ranges of frequencies as stated by the
international standards organization, furthermore the audio output can be clearly
heard when a changes is applied.
On the other hand, after trying the different effects shown in the results section its
obvious that the filter are performing the following changes.
• The impulse response exists indefinitely.
• The output values depend on the previous outputs.
28. 21
CHAPTER VII
7.0 CONCLUSION
In conclusion according to the assignment papers, digital signal processing
covers many areas of our daily routines of many complex systems, however of the
technology development happening now days and the wide use of the audio graphic
equalizers in the music industry, the systems can be improved by adding more control
to the equalizers for example to increase the number of frequency bands used, as the
number of bands increases users can have more control and accuracy of the filtering
of audio equalizers, while the frequency ranges to be more wider and under control.
However after facing many challenges the aim was fully archived with a minimum
possibility of errors.
As against all the odds the assignment well done and many information were
determined about the digital signal processing in addition to the IIR filter and FIR
filter beside the designing of graphical audio equalizer, however many readings and
research were done finding out the information written in this research paper, with a
minimum possible errors.
29. 22
CHAPTER VIII
8.0 REFERENCES
nxp.com. (2010). Implementing a 10 band stereo. [online] Available at:
http://www.nxp.com/assets/documents/data/en/application-notes/AN2110.pdf
[Accessed 16 Jun. 2017].
Krambeck, Donald. "An Introduction To Digital Signal Processing".
[www.Allaboutcircuits.com]. N.p., 2015. Web. 5 July 2017.
Tan, Li. Digital Signal Processing. Amsterdam: Academic Press, 2008. Print.
Weeks, Michael. Digital Signal Processing Using MATLAB And Wavelets.
Hingham, Mass.: Infinity Science Press, 2007. Print.