Prediction Error Signal 1. Speech Production Model p sn()=−+ asn ( k ) Gun () ∑ k Gu(n) s(n) k =1 H(z) Digital Speech Processing— Sz() G Hz()== Uz() p 1− az−k Lecture 14 ∑ k k =1 2. LPC Model: p en()= sn ()−=− sn () sn ()α sn ( − k ) % ∑ k s(n) e(n) k =1 A(z) Ez() p Az()==−1 α z−k Linear Predictive ∑ k Sz() k =1 3. LPC Error Model: Coding (LPC)-Lattice 11Sz() == Az() Ez () p 1− α z−k e(n) s(n) ∑ k 1/A(z) Methods, Applications k =1 p sn()=+ en ()α sn ( − k ) ∑ k Perfect reconstruction even if 1 k =1 2 ak not equal to αk Lattice Formulations of LP Lattice Formulations of LP • define the system function of the i th order inverse filter • both covariance and autocorrelation methods use (prediction error filter) as two step solutions i Az()iik( ) =−1 α () z− 1. computation of a matrix of correlation values ∑ k k =1 2. efficient solution of a set of linear equations • if the input to this filter is the input segment ˆ ()ii () ˆ • another class of LP methods, called lattice methods, smnˆ ()=+ snmwm ( )(), with output emnˆ ( )=+ enm ( ) i has evolved in which the two steps are combined into em()ii()=− sm ()α () smk ( − ) ∑ k a recursive algorithm for determining LP parameters k =1 ˆ th • where we have dropped subscript n - the absolute • begin with Durbin algorithm--at the i stage the set of location of the signal ()ith• the z-transform gives coefficients {α j ,ji= 12 , ,..., } are coefficients of the i order ⎛⎞i optimum LP Ez()ii( )==− AzSz () ( ) ( ) ⎜⎟1 α ()ikzSz− () ⎜⎟∑ k ⎝⎠k =1 3 4 Lattice Formulations of LP Lattice Formulations of LP • where we can interpret the first term as the z-transform • using the steps of the Durbin recursion of the forward prediction error for an (i −1 )st order predictor, ()ii (-)11 (-) i () i and the second term can be similarly interpreted based on (ααjj =−=kkii α ij- , and α i ) defining a backward prediction error ()i ()iii−− ()1111 −−− ii () () i − we can obtain a recurrence formula for Az( ) Bz()== zAzSzzA ( )() ( zSzkAzSz )() −i ()() −−11()ii () − 1 of the form =−zB() z kEi () z ()ii (−−−11 ) ii ( ) −1 • with inverse transform Az( )=− A ( zkzA ) i ()z i bm()iii( )=−− smi ( )α () smki ( +−= ) b (−1 ) ( m −1)()− ke()i −1 m • giving for the error transform the expression ∑ k i k =1 ()ii ()−−−−111 ii () •− with the interpretation that we are attempting to predict sm( i ) from the EzAzSzkzAzSz( )=− ( ) ( )i ( ) ( ) ismi samples of the input that follow (− ) => we are doing a backward ()ii ()−−11 () i ()i em()=− e () mkbmi ( −1 ) prediction and bm( ) is called the backward prediction error sequence 5 6 1 Lattice Formulations of LP Lattice Formulations of LP • the prediction error transform and sequence Ezem()ii( ), () ( ) can now be expressed in terms of forward and backward errors, namely ()ii ()−−−111 () i Ez()=− E () zkzBi () z ()ii (−−11 ) ( i) em( )=− e ( mkb ) i ()1m −∗1 • similarly we can derive an expression for the backward error transform and sequence at sample m of the form ()ii−−11 () () i − 1 Bz()=− zB () zkEzi () ()ii ()−−11 () i bm( )=−−∗ b ( m1 ) kemi ( ) 2 • these two equations define the forward and backward prediction error for an i th order predictor in terms of the corresponding prediction errors of an (i −1 )th order predictor, with the reminder that a zeroth order predictor does no prediction, so embmsm()00( )== () ( ) ( ) 01 ≤≤− mL ∗ 3 same set of samples is used to forward predict s(m) Ez()== E()p () z Az ()/() Sz and backward predict s(m-i) 7 8 Lattice Formulations of LP Lattice Formulations of LP Assume we know k1 (from external computation): 1. we compute em(1)[]and bm (1) []from sm[],0≤≤ m L using Eqs. ∗1 and ∗2 2. we next compute em(2)[]and bm (2) []for 01≤≤+mL using Eqs. ∗1 and ∗2 3. extend solution (lattice) to p sections giving em()pp[]and bm () []for 0≤ mLp ≤+− 1 ()p 4. solution is en[]= e [] n at the output of the • lattice network with p sections—the output of • no direct correlations pth lattice section which is the forward prediction error • no alphas • digital network implementation of the prediction • k’s computed from forward 9 error filter with transfer function A(z) and backward error signals10 Lattice Filter for A(z) All-Pole Lattice Filter for H(z) en()p [] en(1)p − [] en(1) [] en(0)[] s []n k k p −1 p k1 − k − k − k p p −1 1 −1 −1 z z bn()p [] bn(1)p − [] bn(1) [] bn(0)[] en()00[]== bn () [] sn []01 ≤≤− nL en()p []= en [],01≤≤−+ nL p ()ii−−11 () () i ()ii (−−11 ) ( i ) enenkbn[]=+ []i [ −1 ] en[ ]=− e [ n ] kbni [ −=1120 ] i , ,..., p , ≤≤−+ nL 1 i ()iii (−−11 ) ( ) ipp= ,−≤≤−+−110 ,..., , nL 1 i 1 bn[ ]=− keni [ ] + b [ n −1120 ] i = , ,..., p , ≤ nL ≤ − 1 + i ()iii ()−−11 () bn[]=− keni [] + b [ n −1 ] en[]=≤≤−+ e()p [], n01 n L p ipp= ,−≤≤−+110 ,..., , nL 1 i 1 11 ()00 () Sz()= 12 Ez () Ez()= AzSz ()() sn[]= e [] n=≤≤− b [], n01 n L Az() 2 All-Pole Lattice Filter for H(z) Lattice Formulations of LP 1. since bi()ii[1]0,−= ∀ , we can first solve for e (− 1) [0] for (1)ii− () ipp=−, 1,...,1,using the relationship: e [0] = e [0] • the lattice structure comes directly out of the Durbin algorithm (0) (0) (i ) This image cannot currently2. be displayed. since be[0]= [0] we can then solve for b [0] for • the ki parameters are obtained from the Durbin equations ()ii (− 1) • the predictor coefficients, αk , do not appear explicitly in the lattice structure ip=1,2,..., using the equation: bke[0]=− i [0] • can relate the k parameters to the forward and backward errors via (1)i− i 3. we can now begin to solve for e [1] as: Li−+1 (1)ii−− () (1) i embm()ii−−11() () (−1 ) eekbipp[1]=+ [1]i [0], =− , 1,...,1 ∑ k =∗m=0 4 (0) (0) (i ) i 12/ 4. we set be[1]= [1] and we can then solve for b [1] for ⎧⎫⎡⎤⎡⎤Li−+11 Li −+ ⎪⎪()ii−−12 () 1 2 ip=1,2,..., using the equation: ⎨⎬⎢⎥⎢⎥∑∑[()][()]em bm−1 ⎩⎭⎪⎪⎣⎦⎣⎦⎢⎥⎢⎥mm==00 ()iii (−− 1) ( 1) bkebi[1]=−i [1] + [0], = 1,2,..., p • where ki is a normalized cross correlation between the forward and backward 5. we iterate for nN=−2,3,..., 1 and end up with prediction error, and is therefore called a partial correlation or PARCOR coefficient sn[]== e(0) [] n b (0) [] n • can compute predictor coefficients recursively from the PARCOR coefficients 13 14 Direct Computation of k Parameters Direct Computation of k Parameters assume sn[ ] non-zero for 01≤≤− n L assume k chosen to minimize total energy of the forward i • we can also choose to minimize the backward prediction error (or backward) prediction errors 2 Li−+112 Li −+ Ebmkembm()ii==−+−⎡⎤ ()( ) ⎡ ( ii−−11 ) ( ) ( ) (1 ) ⎤ we can then minimize forward prediction error as : backward∑∑⎣⎦ ⎣ i ⎦ mm==00 Li−+11 Li −+ 2 ()ii () 2 ()ii−−11 () ()i Li−+1 Eem= ⎡⎤( )()()=−− ⎡emkbm1 ⎤ ∂E ()ii−−11 () ()i −1 forward ∑∑⎣⎦ ⎣i ⎦ backward ==−02⎡⎤ −ke() m + b ( m − 1 )em() mm==00 ∑ ⎣⎦i ∂ki m=0 ()i Li−+1 ∂Eforward ()ii−−11 () () i − 1 Li−+1 ==−02⎡⎤emkbm() − ( − 1 ) bm ( − 1 ) ()ii () ∑ ⎣⎦i ⎡⎤embm−−11() (−1 ) ∂ki m=0 ∑ ⎣⎦ backward m=0 Li−+1 ki = Li−+1 ()ii−−11 () ()i −1 2 ∑ ⎣⎦⎡⎤embm()⋅− (1 ) ⎡⎤em() forward ∑ ⎣⎦ m=0 m=0 ki = Li−+1 ()i −1 2 ∑ ⎣⎦⎡⎤bm()−1 m=0 15 16 Direct Computation of k Parameters Direct Computation of k Parameters • minimize sum of forward and backward prediction errors over if we window and sum over all time, then • fixed interval (covariance method) 22 Li−+11 Li −+ L−1 22 ()ii−−11 () Eembm()iii=+⎡⎤⎡⎤ ()( ) () ( ) ⎡⎤⎡em( )=− bm (1 ) ⎤ Burg ∑{}⎣⎦⎣⎦ ∑∑⎣⎦⎣ ⎦ m=0 mm==00 L−1 2 ∞ 2 ⎡⎤emkbm()ii−−11() () ( )⎡⎤ kemb () ii −− 11 () ()()m =−−+−+∑ ⎣⎦ii1 ∑ ⎣⎦−1 therefore m=0 m=−∞ ∂E ()i L−1 Burg 02⎡⎤emkbm()ii−−11() () ( 1 ) bm () i − 1 ( 1 ) ==−∑ ⎣⎦ −i − − ∂ki m=0 PARCOR forward backward forward backward L−1 ()ii−−11 () () i − 1 kkkkkiiiii=== 21⎡⎤ke() m b ( m ) e () m −−∑ ⎣⎦i + − Li−+1 m=0 ()ii−−11 () L−1 embm() (−1 ) ()ii−−11 () ∑ 21∑ ⎣⎦⎡⎤embm()⋅− ( ) m=0 Burg m=0 = ki = 12/ L−−1122L ⎧⎫Li−+1122 Li −+ ()ii−−11 () ⎡⎤⎡⎤e(i −1)()()mbmi −1 (−1 ) ∑∑⎣⎦⎣⎡⎤⎡em()+− bm (1 ) ⎦⎤ ⎨⎬∑∑⎣⎦⎣⎦ m=0 m=0 mm==00 ⎩⎭17 Burg 18 •−≤11ki ≤ always 3 Comparison of Autocorrelation and Burg Spectra Summary of Lattice Procedure • steps involved in determining the predictor coefficients and the k parameters for the lattice method are as follows 1. initial condition, emsmbm()00( )== ( ) () ( ) from Eq. *3 ()1 2. compute k1 = α1 from Eq. *4 3. determine forward and backward prediciton errors embm()11( ), () ( ) from Eqs. *1 and *2 4. set i = 2 ()i • significantly less 5. determine ki = αi from Eq. *4 ()i smearing of formant 6. determine α j for j =−12, ,...,i 1 from Durbin iteration peaks using Burg 7. determine em()ii( ) and bm ()( ) from Eqs. *1 and *2 method 8. set ii=+1 9. if ip is less than or equal to , go to step 5 10. procedure is terminated • predictor coefficients obtained directly from speech samples => without calculation of autocorrelation function • method is guaranteed to yield stable filters (ki <1) without using window 19 20 Summary of Lattice Procedure Summary of Lattice Procedure (0) (1) (2) s[n] e [n] e [n] e [n] e( p)[n] e[n] − k1 − k2 − k p −1 − k1 −1 − k − k z z 2 z−1 p ( p) b(0)[n] b(1)[n] b(2)[n] b [n] embmsm()00()= () ()=∗ () 3 Li−+1 ∑ embm()ii−−11() () (−1 ) k = m=0 ∗4 i 12/ ⎧⎫⎡⎤⎡⎤Li−+11 Li −+ ⎪⎪()ii−−12 () 1 2 ⎨⎬⎢⎥⎢⎥∑∑[()][()]em bm−1 ⎩⎭⎪⎪⎣⎦⎣⎦⎢⎥⎢⎥mm==00 ()ii ()−−11 () i em( )= e ( mkbm )−−∗i (1 ) 1 bm()ii( )= b ()−−11 ( m−−1 ) kem () i ( ) ∗ 2 21 i 22 Prediction Error Signal LPC Comparisons 1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-