Digital 5-Band Equalizer Electrical Engineering 113D Authors: Gordon Tsui Michael Kim
Jan 03, 2016
Digital 5-Band Equalizer
Electrical Engineering 113D
Authors: Gordon Tsui
Michael Kim
Digital Equalizer
• Used in Audio Processing and is the process of modifying the frequency envelope of sound
• Found in various programs such as WINAMP, Windows Media Player and any other application that requires digital audio processing.
• Number of bands vary on each equalizer
Development
• Modeled project after Experiment 2
• Used MATLAB to obtain coefficients required for different filters
• Found impulse response to verify requirement needs
• Implemented assembly code and tested results
System Diagram
LOW PASS
BAND PASS
BAND PASS
BAND PASS
HIGH PASS
INPUT OUTPUT
Impulse Response
• Specifications needed to meet a 1dB Ripple
Filter Specifications
• Our Equalizer consisted of 5-bands
Low Pass 0-2kHz
Band Pass 1 1.6kHz-3.6kHz
Band Pass 2 4.2kHz-7.2kHz
Band Pass 3 7.7kHz-9.7kHz
High Pass 10.28khz and above
Filter Specifications
• Low Pass Filter – Magnitude Responses
0 5 10 15 20-160
-140
-120
-100
-80
-60
-40
-20
0
20
Frequency (kHz)
Mag
nitu
de (
dB)
Magnitude Response (dB)
Low Pass Filter Magnitude Response
-40
-35
-30
-25
-20
-15
-10
-5
0
5
10
15
0 500 1000 1500 2000 2500
Frequency (Hz)
Mag
nit
ud
e (d
B)
•Difference seen between two due to anti-aliasing filter in DSP Board
Filter Specifications
• Band Pass Filter 1 – Magnitude Responses
0 5 10 15 20-160
-140
-120
-100
-80
-60
-40
-20
0
20
Frequency (kHz)
Mag
nitu
de (
dB)
Magnitude Response (dB)
Band Pass Filter 1 Magnitude Response
-35
-30
-25
-20
-15
-10
-5
0
5
10
15
0 1000 2000 3000 4000 5000
Frequency (Hz)
Mag
nit
ud
e (d
B)
Filter Specifications
• Band Pass Filter 2 – Magnitude Responses
0 5 10 15 20-160
-140
-120
-100
-80
-60
-40
-20
0
20
Frequency (kHz)
Mag
nitu
de (
dB)
Magnitude Response (dB)
Band Pass Filter 2 Magnitude Response
-35
-30
-25
-20
-15
-10
-5
0
5
10
15
0 2000 4000 6000 8000 10000
Frequency (Hz)
Mag
nit
ud
e (d
B)
Filter Specifications
• Band Pass Filter 3 – Magnitude Responses
0 5 10 15 20-160
-140
-120
-100
-80
-60
-40
-20
0
20
Frequency (kHz)
Mag
nitu
de (
dB)
Magnitude Response (dB)
Band Pass Filter 3 Magnitude Response
-40
-35
-30
-25
-20
-15
-10
-5
0
5
10
15
0 2000 4000 6000 8000 10000 12000
Frequency (Hz)
Mag
nit
ud
e (d
B)
Filter Specifications
• High Pass Filter – Magnitude Responses
0 5 10 15 20-160
-140
-120
-100
-80
-60
-40
-20
0
20
Frequency (kHz)
Mag
nitu
de (
dB)
Magnitude Response (dB)
High Pass Filter Magnitude Response
-35
-30
-25
-20
-15
-10
-5
0
5
10
15
0 2000 4000 6000 8000 10000 12000 14000 16000
Frequency (Hz)
Mag
nit
ud
e (d
B)
•Difference seen between two due to FHP cutoff frequency
Assembly CodeXGL .word 32767 ;the different gain valuesXGB .word 0 ;at the end of the .data section
A = trcv ; load accumulator with word
AR1=#XLP ; AR1 points to XLP and gets value of A*AR1=A
AR1=#XBP ;AR1 points to XBP and gets value of A*AR1=A
AR3 = #XNLAST ;points to XNLASTA = #0 ;sets value of A to 0repeat(#122) ;123 coefficientsMACD(*AR3-,L0,A) ;same as experiment 2*AR0 = hi(A) ;AR0 gets the MSB of AA=#0 ;sets value A to zeroMACP(*AR0, XGL, A) ;multiplies values of at AR0 and XGL and stores in A*AR0 = hi(A) ;AR0 gets the MSB of A
AR3 = #XNLASTBA = #0repeat(#122)MACD(*AR3-,B0,A)*AR4 = hi(A)A=#0MACP(*AR4, XGB, A)*AR4 = hi(A)
A = *AR0A = A + *AR4 ;the output of the two filters are added together
tdxr = A ;value of A sent to output
Problems With Assembly Coding
• Initially had too many coefficients that the DSP board couldn’t handle
• Unable to use the @ operator
• Gain of 1*(2^15-1) reduces signal by factor of 2
Examples
• Audio Clip with unity Gain
• Applied High Pass Filter
• Applied Band Pass Filters
• Combination of Band Pass and High Pass
• Applied Low Pass Filter