In this paper, the transfer function of the seventh order digital graphic equalizer is calculated.. The gain responses of the digital filters, of individual equalizers and of overall gra
Trang 1D E S I G N A N D I M P L E M E N T A T I O N O F H I G H - O R D E R D IG I T A L
E Q U A L I Z E R S F O R A U D I O S I G N A L U S I N G M A T L A B A N D D S K
T M S 3 2 0 C 6 7 1 1
S u n g Ho V a n
D epartm ent o f Electronics & Telecommunication, College o f Technology V N U
A b s t r a c t In this paper, the transfer function of the seventh order digital graphic equalizer is calculated The gain responses of the digital filters, of individual equalizers and of overall graphic equalizer are designed by MATLAB and implemented by DSK TMS320C6711 These gains can be controlled
digital graphic equalizer
1 I n t r o d u c t io n
In t h e a ud io a n d musical i n s t r u m e n t s , the e q u aliz ers a re used to enhance perform anc e of the t r a n s m i t t e r ch an n e ls or to improve the quality of sound
r ea ch in g to the lis teners A typical equalizer consists of a low frequency shelving filter a n d t h r e e or more peak in g filters with a d ju s ta b le p a r a m e t e r s to provide
a d j u s t m e n t of t h e overall eq ualizer frequency res po nse over a broad ran ge of frequencies in t h e audio spectrum In a p a ra m e t r i c equalizer, each individual
p a r a m e t e r can be varie d i nd epe nd ent ly wit ho u t effecting the p a r a m e t e r s of the
ot her filter blocks in the equalizer In a graphic eq ua liz er , its consists of a cascade
of p e ak i n g filters with fixed cent er frequencies b u t a d ju s ta b le gain levels
Th e m ajor ap plications of equalizers are to correct a nd to improve certain types of pro bl em s t h a t may have occurred du ri ng the processing or the t r a n s fe r process a n d to a l t e r or to reduce the noise The a d a p t iv e e qu ali zer s are basically an
a d a p t iv e filter FIR with coefficients t h a t are ad ju s te d by the LMS algo rithm to
c o m p e ns a te c h a n n e l dist or tions caused by intersymbol i n te r fe r e n ce s (ISI)
In th is pa p er , a llp as s filters a r e employed to design a n d to realize high order
e q u al iz er s for a ud io a n d musical signals The pur po se of t hes e equalizers is to
i ncr eas e the de si re d frequency components and to reduce t h e u n d e s i r e d frequency comp on en ts in t h e sound r an g e by modifying the gain response
2 S t r u c t u r e o f h ig h o r d e r e q u a liz e r
A high o r d e r eq ua liz er is created by connecting a cascade of one first-order with one or mo re second-order equalizers The fr equency response of overall
eq u al iz er can be controlled by a d ju s ti n g the c en te r frequencies of each section in the cascade Fi g u r e (1) shows the block schema of a cascade of a sev ent h equalizer
which consist of one first-order and thr ee second-order equalizers In this block
Trang 24 8 Su n g Ho Van
sc hem a, A,(z) is t r a n s f e r fun cti on of the first-order all pas s filter, while A2(z), A3(z),
A ,(z) a r e t r a n s f e r f un ct io n s of t h e second-order allpass filters
Th e fi r st - or de r e q u a l i z e r is c r e a t e d by a dd in g one low-pass filter a n d one high-
pa ss filter w i t h t h e m u l t i p l i e r coefficients Cj/2 an d 1/2, respectively a n d is
c h a r a c t e r i z e d by th e following t r a n s f e r function
H , ( z ) = —r ^ - = —L[ l - A | ( z ) ] + - [ l + A | ( z ) ] ; (1)
w h e r e c, is a positive p a r a m e t e r ; Aj(z) is a first-order all pass t r a n s f e r function given by
oti “ z
A,(z) = 1 —
1- ocj Z
Figure 1 The block schema of a seventh - order graphic equalizer.
Th e frequ en cy r e s p o n s e of t h i s first section Hj(z) can be va ried by vary in g the
v a lu e s of p a r a m e t e r s Cị a n d Qị P a r a m e t e r c controls the a m o u n t of boost or cut at
low frequencies, while t h e c o n s t a n t Ơ Ị controls the boost or cu t b a n d w i d th
T he c o r r e s p o n d i n g i n p u t - o u t p u t rela tion of the fi rst-order eq ua liz er is described by following difference equation
y,[n] = - [ (C ,+ l) + (1- C , ) a1]x[n] + ị [(0,-1) - ( c , + l ) a1]x[n-l] + a , y i [n-l] • (3)
T h a t shows c lea rl y t h a t t h e coefficients of difference e q u a t io n can be ad jus ted
by v a ry i n g th e p a r a m e t e r s Ci a n d ƠỊ
T he t r a n s f e r fu nc ti on of t h e ith second-order eq ualizer is given by
H,(z) = — [l - A, (z)] + ỳ [ l + A; (z)] ,1 = 2 , 3 , 4 , (4)
where
Trang 3A / X _ a i ~ P i ( l +OCj)z 1 + z 2
A,(z) = - L—1 ~ - , i = 2, 3, 4
1 - P j (1 + a jZ + a ị Z
(5)
The r e l a ti o n s (4) an d (5) show t h a t the ith e q u a l i z e r is c r e a t e d by combining one b a n d p a s s filter with one ban dst op filter T h e c e n t e r fr e q u e n c y a n d the 3-dB
b a n d w i d th of each filter can be varied by va ry in g t h e v a l u e s of p a r a m e t e r s k a a n d p, These p a r a m e t e r s of each eq ualizer can be t u n e d i n d e p e n d e n t l y w i t h o u t effecting the p a r a m e t e r s of t h e o t h e r sections Th erefore t h e fr e q u e n c y a n d m a g n i t u d e response of t h e overall eq ual ize r can be controlled by a d j u s t i n g t h e s e p a r a m e t e r s The c e n t e r fr equency CÙQÌ is controlled by th e p a r a m e t e r Pj, b e c a u s e which is
d e te r m i n e d by t h e following relation
The p a r a m e t e r Qj d e te r m i n e s the 3-dB b a n d w i d t h BW j of eac h e q u a l iz e r by relation (7)
Bw i arcos
1 + a :
(7) The magnitude response of the ith equalizer is controlled by p a ra m e t e r c = H (ej“0)- The t r a n s f e r function of th e overall eq u al iz er a s on f i g u r e ( l ) given by
Y ( z )
3 N u m e r ic a l r e s u l t s
20
m
-20
-4Ũ
*
I
1 5
s 10
QJ~
I 5Q
I 0
G a in r e s p o n s e o f e q u a liz e r a = 0 0
N o r m a liz e d f r e q u e m c y củ / ti
" v T
N o r m a liz e d fr e q u e m c y c o /71
Figure 2 Gain response of the bandpass, b a nd st op a nd second-
or der equalizers with the different values of c, a a n d p.
Trang 450 Su ng Ho Van
A second-order eq ua liz er is built by a dd in g one b a n d p a s s filter with one
b andstop filter Fi gure2 shows t h e gain responses of t hes e filters a n d of the equalizer s i m u la t e d with different p a r a m e t e r s c, a an d p The b a n d p a s s and bandstop filters a re designed wit h the va lue s of a : ƠỊ =0.8; a2 =0.5; a3 =0.2 a n d p = 0.315 Thes e filters a r e employed for i m p l e m e n ti n g two second-order equalizers; the first eq ualizer wi th th e p a r a m e t e r s : C10 =1.5; C20 =2.5; C30 =5; C40 =0.5; a3 =0.2; p=0.8 and c , =1; C2 =2; C3 =3.5; C4 =0.7; a, =0.8; p = 0.315
By connecting in cascade of one first-order eq ualizer with the second-order equalizers , we can bu i lt the higher- order graphic equal ize rs as plotted on the
fi gurel The figure 3 a n d 4 plot the gain responses of t h e ba n d p a s s , ban dst op filters, equalizers a n d s e v en t h - o r d er graphic equalizer obtaine d by sy nt he siz in g these filters an d individual e q ua liz ers from eq ua tio ns (4) a n d (8) Fi gur e3 is plot of
gain responses with the p a r a m e t e r s of values: a = 0.1584; p2 = 0.809; p3= 0.309; p.j =
- 0.809 a nd c , = 1.3; C2 =1.2; C3 = 0.95; C4 =1.1 a nd figure4 with a = 0.7267; p2
= 0.7071; p3 = 0.1564; p4 = - 0.7071; a nd c , = 1.3; C2=2.75; C3=3.65; C4 = 3.21 Figure 5 is the impu lse res po nse of graphic equalizer which h a s frequency response given on the figure 4
G ain re s p o n s e o f lo w p a s s and b a n d p a s s filGfeam re sp o n s e of h ig h p a s s and b a n d sto p filte r
N o rm a liz e d fre q u e n c y , củ / h
G ain re s p o n se o f th e individual e q u a lize rs 3
N o rm a lize d fre q u e n c y co/71
G ain re sp o n se of th e overal e q u a lize r
N o rm a liz e d fre q u e n c y , cd / h
N o rm a llize d fre q u e n c y ,03/71
Figure 3 G a i n resp on se of the b a n d p a s s , b a n d s t o p filters,
individual e qu ali zer s a n d sev ent h- or der graphic eq ualizer with: a = 0.8; p, = 0.809; p3= 0.309; p4= - 0.809; a n d C l = 1.3;
C2 = 1.7; C3 = 1.55; C4=1.31.
Trang 5G a in re s p o n s e o f lo w p a s s an d b a n d p a s s filt& o in re s p o n e o f h ig h p a s s a n d b a n d s to p filter
N o r m a liz e d fre q u e n c y ( d / k
G ain re s p o n s e o f in divid ual e q u a liz e rs
N o r m a liz e d fr e q u e n c y co/n
G a in re s p o n s e o f o v eral e q u a liz e r
N o r m a liz e d fre q u e n c y , u/ti
1
N o r m a liz e d fr e q u e n c y ,co/w
Figure 4 Ga in response of the b a n d p a s s , b a n d s t o p filters,
individual equal izer s an d seven th -o rd er gr aph ic eq ual ize r with: a=0.7267; P2=0.7071; (33=0.1564; (34= - 0.7071; a nd
C1=1.3;C2=2.75; C3 =3.65;C4 =3.21
T he plots show t h a t the gain response of each eq ual ize r a n d can be regula ted
i n d ep e nd en tl y w it h o u t effecting the p a r a m e t e r s of th e o t h e r e q ual ize rs and hence the gain response of overall equalizer can be controlled by reg u l a ti n g the
p a r a m e t e r s of each individ ua l equalizer Therefore, the desired frequency
co mponents can be in cr e as ed or reduced by r e g u l a ti n g the p a r a m e t e r s c, a or p, respectively
Impulse response of overall equalizer
Sample number.n
Sample number.n
Figure 5 I m pu ls e response of the graphic eq u al iz er with
frequency res po n se given on the figure 4
Trang 652 Sung Ho Van
The coefficients of overall graphic equalizer are printed in the following table
coeff.h =
{
2.2877; 0.2110; -1.2788; -0.2758; -0.1347; 0.4113; 0.1148; -0.3444; 0.3659; 0.2325; -0.1208; -0.1567; -0.2313; 0.1193; 0.1500;-0.0649; 0.0196; 0.0172; 0.0234; 0.0031; -0.0916; -0.0076; 0.0445; 0.0136; 0.0105; -0.0173; -0.0002; 0.0143; -0.0162; - 0.0092; 0.0069; -0.0021; -0.0059; 0.0012; 0.0017; 0.0037; -0.0006; -0.0037; 0.0007; 0.0005; -0.0003; -0.0002; -0.0006; 0.0012; 0.0006; -0.0008; -0.0003; -0.0001; 0.0003; 0.0002; -0.0003; 0 0001; 0 0002; -0.0000; -0.00QJ; -0.0002; 0.0000; 0.0001; -0.0000; .0.0000}.
4 I m p le m e n t a t io n o f a h ig h - o r d e r e q u a liz e r u s i n g D SK TMS320C6711
The above se v e n t h - o rd e r graphic eq ual ize r can be i mp le me nt ed by employing DSK TMS320C6711 In this i n s t r u m e n t , the four sets of coefficients of graphic eq ualizer designed by MATLAB in t h e above table is contained in th e file graphicEQcoeff.h Both th e i n p u t sa m p les a nd the set of coefficients are tra ns fo r m e d into the frequency domain Because the filtering is i m pl e m e n te d by fast convolution wi th ov erlap-add method The complex F F T and IFF T are carried out on th e floating point DSK TMS320C6711
The p r o g ra m grap hi cEQ C which i m p l e m e n ts this seven th -or der equalizer is
tested using an i n p u t voice file Theforce.wav added a sinusoid of the frequency
950Hz which is g e n e r a t e d by ba ss frequency generator In the o u t p u t of overall equalizer, this si nu so id a l signal is a t t e n u a t e d , because the dip of the gain response
of equalizer occurs a t this frequency component The slider file graphicEQ.gel
allows to control four frequency b a n d s of overall eq ualizer independently The input, o u t p u t si g na ls a n d th e i r spect ru m of th e overall eq ualizer can be obtained with a digital oscilloscope, with a signal an alyzer, with th e CCS-window or with an earphone
5 C o n c lu s io n
By using t h e fi rst-order and second-order a llp as s filters , the lowpass, highpass, b a n d p a s s a n d ba n ds to p filters a re built These filters are the basic components to c o n s t i t u t e t h e individual equalizers Therefore the overall graphic
eq ualizer has a ve ry simple s t r u c tu r e T h a t m e a n s t h a t the im pl e m e n ti n g the FIR filter is carried o u t rap id ly not only on the software b u t also on the hard wa re Because, it allows to reduce a g r ea t n u m b e r of c o m p u ta ti on s as well as the n um be r
of delays, a d d e r s a n d the coefficient multipliers The MATLAB a nd DSK
T M S3 20 C 67 11 p r o g r a m s p e r m i t to control flexibly th e p a r a m e t e r s of each individual eq ua liz er a n d hence the gain response of the overall graphic equalizer can be controlled flexibly in a desired range of frequency
Trang 7R e fe r e n c e s
1 Hồ Văn Sung, x ử lý sô tín hiệu Phương p h á p truyền th ố n g kết hợp với p h n
m ềm M A T L A B T1&2 N hà Xuấ t Bản Giao dục H à Nội 2003, 2005.
2 Hồ Văn Sung, Thực h à n h x ử lý sô'tín hiệu trên m á y tín h PC với M A T L A B Nhà
Xuấ t Bản Khoa học và Kỹ T h u ậ t Hà Nội 2005
3 T M S 320C 6000 C P U a n d Instruction S e t Reference Guide, S P R U 1 8 9 F , Texas
I n s t r u m e n t s , Dallas, TX, 2005
1 4.G Pallot, Processeurs de signaux et logique p ro g ra m m a b le, cours e t TP
CNAM/MEDIAS 2002
4 S K Op p e nh ei m a n d at.all, Discrete-time S ig n a l Procesing, P re nt ic e Hall 1999
5 S a n jit K Mitra, D igital S ig n a l Processing: A C omputer- B a se d Approach,
McGraw - Hill Irwin 2001
6 R Cha ssa in g, D S P A p p lica tio n s using c a n d the T M S 3 2 0 C 6 X D S K , J o h n Wiley
& Sons , INC 2002
7 J a n i e s H.McClellan, c Sidney B u r r u s a n d at., C o m p u ter - B a se d Exercises for
S ig n a l Processing Using M A T L A B 5, Pr e n t ic e Hall, 1998.
8 T M S 3 2 0 C 6 0 0 0 Code Composer S tu d io Tutorial, S P R U 3 0 1 C , Texas
I n s t r u m e n t s , Dallas, TX, 2 0 0 1.