A Novel Multi-Exponential Function-Based Companding Technique for Uniform Signal Compression Over Channels
Total Page:16
File Type:pdf, Size:1020Kb
INTL JOURNAL OF ELECTRONICS AND TELECOMMUNICATIONS, 2010, VOL. 56, NO. 2, PP. 125-128 Manuscript received April 8, 2010; revised June, 2010. 10.2478/v10177-010-0016-1 $1RYHO0XOWL([SRQHQWLDO)XQFWLRQEDVHG &RPSDQGLQJ7HFKQLTXHIRU8QLIRUP6LJQDO &RPSUHVVLRQRYHU&KDQQHOVZLWK/LPLWHG '\QDPLF5DQJH 7DOHE0RD]]HQL+HQU\6HOYDUDMDQG<LQJWDR-LDQJ ^ $EVWUDFW²&RPSDQGLQJ DV D YDULDQW RI DXGLR OHYHO FRPSDQGLQJVLJQDOVȝODZLQ1RUWK$PHULFDDQG-DSDQDQG$ FRPSUHVVLRQ FDQ KHOS UHGXFH WKH G\QDPLF UDQJH RI DQ DXGLR ODZ LQ (XURSH >@ $OWKRXJK ȝODZ VLPLODU WR $ODZ VLJQDO,QDQDORJ GLJLWDO V\VWHPVWKLVFDQLQFUHDVHWKHVLJQDOWR LPSURYHV YRLFH TXDOLW\ DW ORZHU VLJQDO OHYHOV FRPSDUHG WR QRLVH UDWLR VLJQDO WR TXDQWL]DWLRQ QRLVH UDWLR DFKLHYHG GXULQJ XQLIRUP TXDQWL]DWLRQ DV LQ XQLIRUP 3&0 WKLV WHFKQLTXH WUDQVPLVVLRQ 7KH ODZ DOJRULWKP WKDW LV SULPDULO\ XVHG LQ WKH IRFXVHV RQ HQODUJLQJ VPDOO VLJQDOV DQG GRHV QRW FKDQJH KLJK GLJLWDO WHOHFRPPXQLFDWLRQ V\VWHPV RI1RUWK$PHULFDDQG-DSDQ VLJQDO SHDNV ZKLFK OHDGV WRDKLJKHUDYHUDJHSRZHUOHYHORI DGDSWV D FRPSDQGLQJ VFKHPH WKDW FDQ H[SDQG VPDOO VLJQDOV DQG RXWSXWVLJQDOV>@>@>@$VVKRZQLQ)LJWKHILUVWSHDN FRPSUH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GHGIRUODUJHUVLJQDOV+RZHYHUVLQFHWKH FRPSDQGHG VLJQDO LV QRW XQLIRUPO\ GLVWULEXWHG WKLV OHDGV WR 1RUPDOL]HG$PSOLWXGH LQFUHDVHGTXDQWL]DWLRQHUURUV>@ 2QH GLUHFW VROXWLRQ WR UHGXFH TXDQWL]DWLRQ HUURU LV WR LQFUHDVH WKH QXPEHU RI TXDQWL]DWLRQ LQWHUYDOV 7KLV ZRXOG 6DPSOH7LPH UHTXLUH WKH QXPEHU RI FRGH ZRUGV WR EH LQFUHDVHG LQ SURSRUWLRQWRWKHQXPEHURITXDQWL]DWLRQLQWHUYDOVUHVXOWLQJLQ )LJ6LJQDODPSOLWXGHYVWLPHIRU L RULJLQDOVLJQDO LL ȝODZFRPSDQGHG LQFUHDVHGV\VWHPFDSDFLW\DQGWKXVDKLJKHUFRVW>@ VLJQDODQG LL H[SRQHQWLDOFRPSDQGHGVLJQDO &XUUHQWO\ WZR QHDUO\ LGHQWLFDO VWDQGDUGV DUH XVHG IRU ,Q WKLV SDSHU ZH SUHVHQW D QRQVLJQDO VWUXFWXUH EDVHG WHFKQLTXH KHUHLQ UHIHUUHG WR DV ³PXOWLH[SRQHQWLDO 7DOHE0RD]]HQL+HQU\6HOYDUDMDQG<LQJWDR-LDQJDUHZLWKWKH'HSWRI FRPSDQGLQJ´ZKLFKFDQDFKLHYHPRUHXQLIRUPFRPSUHVVLRQV (OHFWULFDODQG&RPSXWHU(QJLQHHULQJ8QLYHUVLW\RI1HYDGD/DV9HJDV19 RQ ERWK ODUJH DQG VPDOO VLJQDOV VR WKDW WKH UHODWLYH VLJQDO 86$ HPDLOPRD]]HQ#XQOYQHYDGDHGX+HQU\6HOYDUDM#XQOYHGX VWUHQJWK RYHU WKH WLPH LV VWLOO SUHVHUYHG 7KDW LV DOWKRXJK \LQJWDR#HJUXQOYHGX 126 T. MOAZZENI, H. SELVARAJ, Y. JIANG larger signals may get considerably compressed, unlike µ-law percentage of data, pi, that fall in the subinterval i in algorithm, it is guaranteed that these signals after companding n compressed space can be found by p = i , where is the will definitely not be smaller than originally small but i expanded signals. The more uniform the source signal is, the total number of signal data points. That is, less quantization error and thus a higher signal to noise ratio is achieved. [0,r )→ p This paper is organized as follows. In sections 2, µ-law 1 1 algorithm is briefly discussed. Section 3 describes the [,)r1 r 2 → p2 proposed companding algorithm, followed by quantization [,)r2 r 3 → p3 error analysis in Section 4. Section 5 presents the simulation [r ,1] → p results, and finally, conclusion is drawn in Section 6. 3 4 4) Calculation of compressing function, II. µ-LAW The following functions are employed for compressing µ-law is a logarithmic conversion algorithm used in North function, America and Japan that is defined by CCITT G.711. It compresses 16−bit linear PCM data down to eight bits of 1− b1 exp( a1 x ) 0 ≤ x < r1 logarithmic data. The compressing and expanding functions of bexp( a x ) r≤ x < r this algorithm are defined by the following equations, 2 2 1 2 (3) F() x = respectively. b3 exp( a3 x ) r2 ≤ x < r3 bexp( a x ) r≤ x ≤ 1 ln( 1+ µ x ) 4 4 3 F( x )= sgn( x ) −1 ≤x ≤ 1 (1) ln() 1+ µ As shown in Fig. 2, in order to map signal data from the where µ is the compression parameter (µ in the U.S. and original space to the compressed space, by applying the Japan) and x is the normalized integer to be compressed. above function, we shall have, −1 y 1 F( y )= sgn(y )( 1/µ)[( 1+ µ) − 1] − 1 ≤y ≤ 1 (2) , b1 is set to 1, a1 ln(1− p=1 ) r1 1 r2 , b rexp(− a r= ) a2 = ln( ) 2 2 2 2 III. PROPOSED COMPANDING ALGORITHM 2 − r1 r1 1 r To compand the signal, more than one function is utilized: 3 , b= rexp(− a r ) a3 = ln( ) 3 3 3 3 an exponential function for compressing stage and a 3 − r2 r2 logarithmic function for expanding. In each exponential 1 1 , a = ln( ) b4 = exp(− a3 ) function, to make the output signal more uniformly distributed, 4 1− r r a set of companding parameters are properly adjusted. This 3 3 algorithm is described below. A. Compression Stage To compress the original signal, the whole signal range is divided into several subintervals and each set of these subs is mapped to a new interval. In this work, we consider 4 100p4 % of p3 subintervals and assign a different exponential function as a Samples compressor function for each subinterval. To do so, the p2 following steps are necessary: 100p3 % of r3 p1 1) ormalizing signal to [0, 1]: for simplicity, the Samples r2 amplitude of original signal is normalized to [0, 1]. 100p % o f 2) Choosing the range of each subinterval: in this work, 2 the whole range of original signal is divided into 4 Samples subintervals, [0,r1 ) , [,)r1 r 2 , [,r2 r 3 ) , and [r3 ,1] . r1 100p1 % of 3) Counting the number of signal data that fall into each Samples subinterval. In this step, it is necessary to determine the number of data points in each subinterval. Let n1, n2, n3 and n be the number of data points falling into subintervals 4 [0,r1 ) , [,)r1 r 2 , [,)r2 r 3 and [r3 ,1] , respectively. The Fig. 2. A schematic of the technique. A NOVEL MULTI-EXPONENTIAL FUNCTION-BASED COMPANDING TECHNIQUE FOR UNIFORM SIGNAL COMPRESSION OVER CHANNELS... 127 B. Expansion Stage verification, we constructed an audio signal using MATLAB The de-companding function is the inverse function of that audio recording command (Fig. 3). The amplitude of the can be found as, signals are normalized into [0, 1], and the whole dynamic range is divided into 128 (7 bits) and 256 (8 bits) quantization 1 ln(1− y ) 0 ≤y < p levels, respectively. a 1 1 From Tables 1 and 2, it can be seen that in terms of 1 y quantization error, in good agreement with the theoretical ln( ) p1 ≤ y < p2 (4) a b analyses shown in Section 4, the proposed companing −1 2 2 F() y = algorithm shows less quantization errors than that obtained 1 y ln( ) p≤ y < p from µ-law at a modest increase of computation cost. It is also 2 3 a3b 3 0.8 1 y ln( ) p≤ y ≤ 1 0.6 a b 3 4 4 0.4 0.2 UANTIZATION RROR NALYSIS IV. Q E A 0 As described in previous section, the original signal is Amplitude -0.2 mapped to a compressed space in such a way that the number -0.4 of data in each subinterval is proportional to the length of that subinterval. By doing so, the compressed signal exhibits a -0.6 -0.8 uniform distribution and it can be quantized using a uniform 0 500 1000 1500 2000 2500 3000 3500 4000 Time (Milliseconds) quantizer. For uniform quantization of a uniform distributed signal, since the quantization error is also uniform over each Fig. 3. A real audio signal for data processing. quantization interval, we have, TABLE I 1 +∆ 2/ ∆2 1 2x (x )2 2 2 max 2 max (5) RESULTS FOR SYNTHETIC DATA σ q = ∫ q dq = = ( ) = 2 ∆ −∆ 2/ 12 12 M 3M No Multi- Theoretical Criteria µ-law where σ 2 is the mean square quantization error, ∆ is the Companding Exponential Results q Quantization 8 Bits 0.00018 0.00010 0.00006 0.00005 length of quantization interval, xmax is the maximum signal Error 7 Bits 0.00034 0.00019 0.00010 0.00008 amplitude level, and M is the number of quantization levels. Relative CPU Time 1 1.06 1.92 --- In general, it can be shown that the mean square quantization error is obtained by [7], [8], 2 2 TABLE II 2 α σ x σ = (6) RESULTS FOR REAL DATA q 3M 2 No Multi- Theoretical x Criteria µ-law α = max Companding Exponential Results x C'() x Quantization 8 Bits 0.00098 0.00075 0.00042 0.00035 Error 7 Bits 0.00190 0.00140 0.00110 0.00088 2 where σ x is the variance of the signal, and C’(x) is the Relative CPU Time 1 1.07 2 --- derivative of the companding function with respect to x.