Linear Predictive Coding (LPC)-Lattice Methods, Applications

Linear Predictive Coding (LPC)-Lattice Methods, Applications

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

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    87 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us