3 th Iteratioal Coferece o AEROSPACE SCIENCES & AVIATION TECHNOLOGY, ASAT- 3, May 6 8, 9, E-Mail: asat@mtc.edu.eg Military Techical College, Kobry Elkobbah, Cairo, Egypt Tel : +() 459 43638, Fax: +() 698 Subbad Codig of Speech Sigals Usig ecimatio ad Iterpolatio Ashraf M. Aziz * Abstract: I may practical applicatios of digital sigal processig, such as telecommuicatio systems, oe is faced with the problem of chagig the samplig rate of a sigal, either icreasig it or decreasig it by some amout. I telecommuicatio systems, that trasmit ad receive differet types of sigals, there is a requiremet to process the various sigals at differet rates commesurate with the correspodig badwidths of the various sigals. This paper addresses the problem of samplig rate coversio ad multirate sigal processig i the digital domai. A structure of a two-chael quadrature mirror filter with low pass filter, high pass filter, decimators ad iterpolators, is proposed to perform subbad codig of speech sigals i the digital domai. The proposed structure decomposes a sigal ito low frequecy ad high frequecy compoets. The performace of the proposed structure is compared with the performace of the delta-modulatio ecodig systems. The results show that the proposed structure sigificatly reduces the error ad achieves cosiderable performace improvemet compared to delta-modulatio ecodig systems. Keywords: Samplig rate coversio; Multirate digital sigal processig ; ata compressio.. Itroductio I telecommuicatio systems that trasmit ad receive differet types of sigals; e.g., teletype, facsimile, speech, video, etc., there is a requiremet to process the various sigals at differet rates. The process of covertig a sigal from a give rate to a differet rate is called samplig rate coversio. I tur, systems that employ multiple samplig rates i digital sigal processig are called multirate digital sigal processig (SP) systems [, ]. Samplig rate coversio of a digital sigal ca be accomplished i oe of two methods. The first method is to covert the digital sigal ito a aalog sigal ad the resample the aalog sigal at a differet rate. I this case the digital sigal is passed through a digital-to-aalog (/A) coverter, filter it if ecessary. The the output aalog sigal from the /A coverter is resampled at the desired rate, i.e., the resultig aalog sigal is passed through a aalog-todigital (A/) coverter. The advatage of this method is that the ew samplig rate ca be arbitrarily selected ad eed ot have ay special relatioship to the old samplig rate. The major disadvatage of this method is the sigal distortio itroduced by the /A coverter i the sigal recostructio, ad by the quatizatio effects i the A/ coversio. The secod method of samplig rate coversio performs the samplig rate coversio etirely i the digital domai. This method avoids the major disadvatages of the first method [3, 4]. * Egyptia Armed Forces /6
Figure describes the process of samplig rate coversio i the digital domai as a liear filterig process. The iput sigal x () is characterized by the samplig rate F x / Tx, where Tx is the samplig iterval of the iput sigal. The output sigal y () is characterized by the samplig rate F / T. The ratio F / F I is cosidered to be ratioal, where y y y x / ad I are relatively prime itegers. The samplig rate coversio process ca also be uderstood from the poit of view of digital resamplig of a iput aalog sigal x (t). If we assume that the aalog sigal x (t) is sampled at a rate F x to geerate x (), the goal of samplig rate coversio is to obtai aother sequece y(m) at aother rate F y. It is clear that the sequece y (m) is a time-shifted versio of x (). Such a time shift ca be realized by usig a liear filter that has a flat magitude respose ad a liear phase respose. If the two samplig rates are ot equal, the required amout of time shiftig will vary from sample to sample. Thus the rate coverter ca be implemeted usig a set of liear filters that have the same flat magitude respose but geerate differet time delays. F x T x() x Liear filter h (, m) Fig. Samplig rate coversio. F y() y T y The case of samplig rate reductio by a iteger factor (dowsamplig by ) is called decimatio. The process of icreasig the samplig rate by a iteger I (upsamplig by I ) is called iterpolatio. The geeral case of samplig rate coversio is to covert the iput sequece by a ratioal factor I [, 5]. I this paper we address the problem of decomposig a sigal ito low frequecy ad high frequecy compoets ad its use i data compressio by performig decimatio ad iterpolatio i the frequecy domai. The remaider of this paper is orgaized as follows. A brief review of decimatio ad iterpolatio of a digital sigal is addressed i Sectio. I Sectio 3, a structure usig decimators, iterpolators, low ad high pass filters, is preseted to perform data compressio. I sectio 4, The performace of the structure is evaluated ad compared with the delta modulatio data compressio systems. Fially, Sectio 5 cotais coclusios.. Multirate SP Usig ecimatio ad Iterpolatio.. ecimatio ecimatio of a sigal x() by a factor meas that its samplig rate is reduced by a factor. This process is called dowsamplig. Let us assume that the sigal x() with spectrum X () is to be dow sampled by a iteger factor. The spectrum X () is assumed to be Fx ozero i the frequecy iterval or equivaletly, F. It is required to reduce the samplig rate simply by selectig every th value of x (). The resultig sigal /6
will be a aliased versio of x (), with a foldig frequecy of F x. To avoid aliasig, the Fx badwidth of x() must be reduced to Fmax or equivaletly, to max. I this case, the sigal x() is dowsampled correctly ad thus avoid aliasig. The decimatio process is show i Fig. [-3, 6]. x () v () y (m) h() owsampler Fy / Ty F x / T x Fx / Fig. ecimatio by a factor of. The iput sequece x () is passed through a low pass filter to elimiate the spectrum of X () i the rage. The implicatio is that oly the spectrum of x() i the rage is of iterest i further processig of the sigal. The low pass filter is characterized by the impulse respose h () ad a frequecy respose H ( ), give by, / H ( )...(), otherwise Usig the z - trasform of the output sequece y (m), it is easy to prove that [-3] y k y k Y ( y ) H ( ) X ( )....() k The aliasig i (8) ca be elimiated with a properly desiged filter H ( ), cosequetly, all but the first term i () vaish. Hece Y ( ) X ( ),...(3) A example of a iput sequece x () ad the output sequece after decimatio, y (m), assumig that 3, is show i Fig. 3. The correspodig spectra are show i Fig. 4. 6 5 y(m): ecimatio of x() =3 x(7) 4 x() 3 x() x() x(4) x(8) x() y() x(3) y() x(5) x(6) y() x(9) y(3) 3 4 5 6 7 8 9 Fig. 3 ecimatio of a sequece x() by a factor of =3. 3/6
3.5 Am Origial Sigal (solid) Sigal Spectrum.5 Am/.5 -m/ -m After ecimatio (=3) (dashed) m m/ -3 - - 3 Fig. 4 Spectrum of the iput sequece before ad after decimatio... Iterpolatio Iterpolatio of a sigal x() by a iteger factor I meas that its samplig rate is icreased by a factor I. The iterpolatio process is show i Fig. 5 [-3, 6]. This process is called upsamplig. Let us assume that the sigal x() with spectrum X () is to be upsampled by a iteger factor I. The spectrum X () is assumed to be ozero i the frequecy iterval. A icrease i the samplig rate by a iteger factor of I ca be accomplished by iterpolatig I ew samples betwee successive values of the sigal. The iterpolatio process ca be accomplished i a variety of ways. e cosider the way that preserves the spectral shape of the sigal sequece x () [8, 9]. x () Upsampler v () y (m) I h() F x / T x F y / Ty F x I Fig. 5 Iterpolatio by a factor of I. Let v(m) deote a sequece with a rate Fy I Fx, which is obtaied from x () by addig I zeros betwee successive values of x (). Thus x( m / I), m, I, I,... v ( m)...(4), otherwise 4/6
The samplig rate of v (m) is idetical to the rate of y (m). Usig the z - trasform of () we ca deduce that [5] C, / I H I ( ),...(5), otherwise Y ( ) I X ( I), / I...(6) A example of a iput sequece x () ad the output sequece after iterpolatio, y (m), assumig that I 3, is show i Fig. 6. The correspodig spectra are show i Fig. 7. 3 x() y(6).5 y(m): Iterpolatio of x() I=3 x().5 x() y(3).5 x() y() x(3) y(9) y() y() y(4) y(5) y(7) y(8) 3 4 5 6 7 8 9 Fig. 6 Iterpolatio of a Sequece x() by a factor of I =3. 3.5 Am*I After Iterpolatio (I=3) (dashed) Sigal Spectrum.5 Am.5 Origial Sigal (solid) -m m -m/i m/i -3 - - 3 Fig. 7 Spectrum of the iput sequece before ad after iterpolatio. 5/6
3. Subbad Codig Usig ecimatio ad Iterpolatio Cosider the structure of Figure 8. The speech sigal is cosidered to be sampled at a rate Fs samples per secod. The first frequecy subdivisio splits the sigal spectrum ito two equal-width segmets, a lowpass sigal F F / 4) ad a highpass sigal ( s ( Fs / 4 F Fs / ). The secod frequecy subdivisio splits the low pass sigal from the first stage ito two equal bads, a lowpass sigal F F / 8) ad a highpass sigal ( Fs / 8 F Fs / 4) ( s. Fially, the third frequecy subdivisio splits the low pass sigal from the secod stage ito two equal badwidth sigals. Thus the sigal is subdivided ito four frequecy bads, coverig three octaves, as show i Fig. 8. ecimatio by a factor of is performed after frequecy divisio. By allocatig a differet umber of bits per sample to the sigal i the four subbads, we ca achieve a reductio i the bit rate of the digitalized speech sigal. For simplicity, we cosider the case of oe frequecy subdivisio as show i Fig. 8. The filters desigs are very importat i achievig good performace i subbad codig [4, 5]. Aliasig resultig from decimatio of the subbad sigals must be egligible. The two filters (lowpass ad high pass filters) are called quadrature mirror filters (QMF) [6]. The decodig process for the subbad ecoded speech sigal is basically the reverse of the ecodig process. The sigals i adjacet lowpass ad highpass frequecy bads are iterpolated, filtered, ad combied as show i Fig. 9. A pair of QMF is used i the sigal decodig sectio as show i Fig. 8. Subbad codig of sigals is a effective method for achievig badwidth compressio i a digital represetatio of the sigal, whe the sigal eergy is ecoutered i a particular regio of the frequecy bad. Multirate sigal processig provides efficiet implemetatio of the subbad ecodig. Speech sigal LPF LPF HPF LPF HPF Ecoder Ecoder Ecoder To chael HPF Ecoder To chael 8 4 3 4 Fig. 8 block diagram of a subbad speech ecoder ( ) with three frequecy subdivisios. 6/6
ecoder I Filter + I Filter ecoder I Filter + I Filter ecoder I Filter + ecoder I Filter o/p Fig. 9 Block diagram of a subbad speech decoder ( I ) with three frequecy subdivisios. The two-chael QMF show i Fig. is the basic buildig block i speech sigal ecodig. It employs two decimators i the sigal ecodig sectio ad two iterpolators i the sigal decodig sectio. The lowpass ad highpass filters i the ecodig sectio have impulse resposes h ( ) ad h ( ), respectively. Similarly, the lowpass ad highpass filters i the decodig sectio have impulse resposes g ( ) ad g ( ), respectively. LPF H ( ) x LP () x ( ) x ( ) x b ( ) a i G ( ) x() + xˆ ( ) HPF H ( ) G ( ) x ( ) x ( ) x ( ) x b ( ) HP a i Ecoder sectio ecoder sectio Fig. Two-chael quadrature mirror filter bak. 7/6
The Fourier trasform of the sigals at the outputs of the two decimators are X a ( ) X ( ) H ( ) X ( ) H ( )...(7) X a ( ) X ( ) H( ) X ( ) H( )...(8) If X d ( ) ad X d( ) represet the two iputs to the decodig sectio, the output is simply X ˆ ( ) X d ( ) G ( ) X d() G ( )...(9) Suppose that we coect the ecodig sectio to the correspodig decodig sectio so that X a( ) = X d ( ) ad X a( ) = X d( ). Substitutio from (33) ito (34) yields Xˆ ( ) [ H ( ) G ( ) H( ) G ( ) ] X ( )...() [ H ( ) G ( ) H( ) G ( ) ] X ( ) The desired sigal output from the QMF is the first term i (35). The secod term represets the effect of aliasig, which we would like to elimiate. Hece we require that H ( ) G ( ) H( ) G ( )...() The coditio of () ca be simply satisfied by selectig G ( ) ad G ( ) as G ( ) H( ), G ( ) H ( )...() If () is satisfied, the the secod term i () is vaished. Let us assume that H ( ) is a lowpass filter ad H ( ) is a mirror-image high pass filter. Thus H ( ) ad H ( ) ca be expressed as H ( ) H ( ),...(3-a) H ( ) H ( ),... (3-b) where H () is the frequecy respose of a lowpass filter. I the time domai, the correspodig relatios are h ( ) h( ),...(4-a) h ( ) ( ) h( )... (4-b) As a cosequece, H ( ) ad H ( ) have mirror-image symmetry about the frequecy. To be cosistet with the costrait i (), we select the low pass filter G ( ) as G ( ) H ( ),...(5) Ad the output highpass filter G ( ) as G ( ) H ( )....(6) I the time domai, the correspodig relatios become g( ) h( ),...(7-a) g( ) ( ) h( )... (7-b) The scale factor of i g ( ) ad g ( ) correspods to the iterpolatio factor used to ormalize the overall frequecy respose of the QMF. ith these choices of the filter characteristics, the compoet due to aliasig vaishes. Thus the aliasig resultig from decimatio i the ecodig sectio of the QMF is perfectly cacelled by the image sigal spectrum that arises due to iterpolatio. As a result, the two-chael QMF behaves as a liear, time-ivariat system. 8/6
If we substitute for H ( ), H ( ), G ( ) ad G ( ) ito the first term of (), we obtai ˆ X ( ) [ H ( ) H ( )] X ( )...(8) Ideally, the two-chael QMF should have uity gai, i.e. H ( ) H ( ) for all...(9) where H () is the frequecy respose of a lowpass filter. It is also desired that the QMF to have a liear phase. 4. Simulatio The two chaels QMF, show i Fig., is simulated as follow. 4.. esig of H ( ) ad H ( ) - Cut off frequecy: c - idow type: Hammig widow of legth M 4 - Impulse respose: si (.5 ( L)) w( ), L ( L) h ( )...() M.5 L, L - H ( ) H ( )...(-a) - H ( ) H ( )... (-b) - h ) ( ) h ( )...(-c) ( 4.. esig of G ( ) ad G ( ) ( ) h( - G ) H ( ), g )...(-a) ( - G ( ) H ( ), g ) ( ) h ( ) h ( )... (-b) ( 4.3. The outputs from decimators x ) x (),,,,......(3-a) a ( LP a( ) xhp x (),,,,... (3-b) 4.4. The outputs from iterpolators xa ( ),,, 4, xi ( ) otherwise...(4-a) xa( ),,, 4, xi ( ) otherwise... (4-b) 9/6
Let the origial sequece x () cotais x samples. To obtai the frequecy domai of the origial sequece we use fast Fourier trasform (FFT) of legth N x to avoid aliasig. The origial sequece x () is show i Fig.. The spectrum of the origial sequece is show i Fig.. The desiged frequecy resposes of H ( ) ad H ( ) are show i Fig. 3. The low pass filter passes the frequecy compoets from to ad the high pass filter passes the frequecy compoets from to. However there is some iterferece aroud sice the magitude spectra of H ( ) ad H ( ) are ot sharp. Fig. 4 shows the spectra of the outputs after decimatio (spectra of x a ( ) ad x a ( ) ). It is clear that the frequecy compoets are stretched by a factor of. Fig. 5 shows the spectra of the outputs after iterpolatio (spectra of x ai ( ) ad x ai ( ) ). It is clear that the frequecy compoets are compressed by a factor of.5. Fig. 6 shows the spectrum of the estimated sigal X ˆ ( ) (spectrum of x ˆ( ) ) after recombiig the two compoets from the two chaels. Fig. 7 shows the differece error betwee the spectra X () ad X ˆ ( ) (oiseless case). Fig. 7 shows that there is a very small error betwee X () ad ˆ X ( ) especially aroud. It meas that there is a very small distortio betwee the origial sigal ad the estimated sigal. From Fig.7, it is clear that the error is idetically zero except aroud as expected. The performace of the previous QMF is also compared with the performace of the delta modulatio (M) ecodig system [, 7]. I this system, the origial sigal is represeted by a staircase approximatio with a step size. Large values of icreases the graular oise ad small values of icreases the slope overload distortio. Thus the choice of the step size is crucial. To fid the optimum (best) value of the step size, a histogram for the samples of the origial sigal is performed as show i Fig. 8. The optimum value of the step size is foud to be aroud.5. Thus we pick the value.5 as the step size. Usig other values of step size, differet from.5 (. 5 ad. 5 ), icreases the distortio. This result is expected sice the optimum value of the step size is.5. Fig. 9 shows the differece error betwee the spectra X () ad X ˆ ( ) i case of M system (oiseless case). Table compares the mea square error of the QMF ad the delta modulatio ecodig system at differet values of sigal to oise ratios (SNR) assumig Mote Carlo simulatios. Figure 9 ad Table show that ecodig usig the QMF outperforms the delta modulatio ecodig system. /6
4 3 x() - - -3 3 4 5 6 Fig. The origial sequece x (). 35 3 5 X() 5 5 3 4 5 6 Fig. The spectrum of the origial sequece. /6
.5 Ho() LPF.5 3 4 5 6.5 H() HPF.5 3 4 5 6 Fig. 3 The desiged frequecy resposes of H ( ) (LPF) ad H ( ) (HPF). 5 Xao() 5 3 4 5 6 5 Xa() 5 3 4 5 6 Fig. 4 The spectra of the outputs after decimatio. /6
5 Xbo() 5 3 4 5 6 5 Xb() 5 3 4 5 6 Fig. 5 The spectra of the outputs after iterpolatio. 5 Spectrum of the estimated sigal 5 5 3 4 5 6 Fig. 6 Spectrum of the estimated sigal X ˆ ( ) (spectrum of x ˆ( ) ) after recombiig the two compoets from the two chaels. 3/6
The differece error betwee spectra i QMF.9.8.7.6.5.4.3.. oiseless case 3 4 5 6 Fig. 7 The differece error betwee the spectra X () ad X ˆ ( ) (oiseless case). 8 6 4-3 - - 3 4 Fig. 8 Histogram of the origial sigal. 4/6
The differece error betwee spectra i M.8.6.4. 5 5 5 3 35 4 Fig. 9 The differece error betwee the spectra X () ad X ˆ ( ) i case of M. Table Comparisos of mea square errors SNR (db) QMF M -3 7.8 3.53-3.9 7.6.77 3.8..6 3..34 5. Coclusio The problem of samplig rate coversio ad multirate sigal processig i the digital domai has bee cosidered. The problem of decomposig a sigal ito low frequecy ad high frequecy compoets ad its use i data compressio has bee addressed. A brief review of decimatio ad iterpolatio of a digital sigal ad the geeral case of samplig rate coversio have bee also addressed. A structure of a two-chael quadrature mirror filter with low pass filter, high pass filter, decimators ad iterpolators, has bee proposed to perform subbad codig of speech sigals i the digital domai. The proposed structure decomposes a sigal ito low frequecy ad high frequecy compoets ad performs decimatio ad iterpolatio i the frequecy domai. The performace of the proposed structure has bee compared to the performace of the delta-modulatio ecodig systems. The results show that the proposed structure is efficiet ad sigificatly reduces the error. The proposed structure achieves cosiderable performace improvemet compared to deltamodulatio ecodig systems. 5/6
Refereces []. Joh G. Proakis ad imitris G. Maolakis. igital Sigal Processig, Priciples, Algorithms, ad Applicatios. Pretice Hall. New Jersey, 8. []. Roberts R. A. ad Mullis C. T. igital Sigal Processig. Addiso-esley, Readig. Mass, 6. [3]. Oppeheim A. V. ad Schafer R.. iscrete-time Sigal Processig. Pretice Hall. Eglewood Cliffs, New Jersey, 7. [4]. Crochiere R. E. ad Rabier L. R. Multirate igital Sigal Processig. Pretice Hall, Egelwood Cliffs, New Jersey, 983. [5]. Schafer R.. ad Rabier L. R., "A igital Sigal Processig Approach to Iterpolatio," Proc. IEEE, Vol. 6, pp. 69-7, Jue 3. [6]. Mcgillem C.. ad Cooper G. R. Cotious ad iscrete Sigal ad System Aalysis, d ed., Holt Riehart ad isto, New York, 984. [7]. Crochiere R. E. ad Rabier L. R.,"Optimum FIR igital Filter Implemetatios for ecimatios, Iterpolatio, ad Narrowbad Filterig," IEEE Tras. o Acoustics, Speech, ad Sigal Processig," Vol. ASSP-3, pp. 444-456, Oct. 4. [8]. Crochiere R. E. ad Rabier L. R.,"Further Cosideratios i the esig of ecimators ad Iterpolators," IEEE Tras. o Acoustics, Speech, ad Sigal Processig," Vol. ASSP-4, pp. 96-3, August 7. [9]. Crochiere R. E. ad Rabier L. R.,"Iterpolatio ad ecimatios of igital Sigals A Tutorial Review," Proc. IEEE, Vol. 69, pp. 3-33, March 8. []. Simo Hayki. A Itroductio to Aalog ad igital Commuicatios. Joh iley & Sos. New York, 989. []. Crochiere R. E., "O the esig of Sub-bad Coders for Low Bit Rate Speech Commuicatio," Bell Syst. Tech. J., Vol. 56, pp. 747-7, May-Jue 977. []. Blahut R. E. Fast Algorithms for igital Sigal Processig, Addiso-esley, Readig, Mass, 985. [3]. Gray A. H. Source Codig Theory, Kluwer, Bosto, MA, 99. [4]. Crochiere R. E., "Sub-bad Codig," Bell Syst. Tech. J., Vol. 6, pp. 633-654, Sept. 98. [5]. Vetterli. J., "Multi-dimesioal Sub-bad Codig: Some Theory ad Algorithms," Sigal Processig, Vol. 6, pp. 97-, April 984. [6]. Jai V. K. ad Crochiere R. E, "Quadrature Mirror Filter esig i the Time omai," IEEE Tras. o Acoustics, Speech, ad Sigal Processig," Vol. ASSP-3, pp. 353-36, April 984. [7]. Leo. Couch. igital ad aalog Commuicatio Systems. Pretice Hall, New Jersey, 993. 6/6