Chapter 6 Linear Predictive Coding (LPC) of Speech Signals 6.1 Basic Concepts of LPC 6.2 Auto-Correlated Solution of LPC 6.3 Covariance Solution of LPC.

Slides:



Advertisements
Similar presentations
Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
Advertisements

ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: The Linear Prediction Model The Autocorrelation Method Levinson and Durbin.
Use of Kalman filters in time and frequency analysis John Davis 1st May 2011.
OPTIMUM FILTERING.
A 12-WEEK PROJECT IN Speech Coding and Recognition by Fu-Tien Hsiao and Vedrana Andersen.
ELE Adaptive Signal Processing
AGC DSP AGC DSP Professor A G Constantinides©1 A Prediction Problem Problem: Given a sample set of a stationary processes to predict the value of the process.
AMI 4622 Digital Signal Processing
Overview of Adaptive Multi-Rate Narrow Band (AMR-NB) Speech Codec
SYSTEMS Identification
Wide/Narrow Band Spectrograms
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
Linear Prediction Problem: Forward Prediction Backward Prediction
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Linear Prediction Coding (LPC)
1 CS 551/651: Structure of Spoken Language Lecture 8: Mathematical Descriptions of the Speech Signal John-Paul Hosom Fall 2008.
Digital Systems: Hardware Organization and Design
Linear Prediction Coding of Speech Signal Jun-Won Suh.
Speech Coding Using LPC. What is Speech Coding  Speech coding is the procedure of transforming speech signal into more compact form for Transmission.
Geo479/579: Geostatistics Ch12. Ordinary Kriging (1)
1 Part 5 Response of Linear Systems 6.Linear Filtering of a Random Signals 7.Power Spectrum Analysis 8.Linear Estimation and Prediction Filters 9.Mean-Square.
Chapter 16 Speech Synthesis Algorithms 16.1 Synthesis based on LPC 16.2 Synthesis based on formants 16.3 Synthesis based on homomorphic processing 16.4.
T – Biomedical Signal Processing Chapters
1 Linear Prediction. 2 Linear Prediction (Introduction) : The object of linear prediction is to estimate the output sequence from a linear combination.
1 PATTERN COMPARISON TECHNIQUES Test Pattern:Reference Pattern:
1 Linear Prediction. Outline Windowing LPC Introduction to Vocoders Excitation modeling  Pitch Detection.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Definitions Random Signal Analysis (Review) Discrete Random Signals Random.
Speech Signal Representations I Seminar Speech Recognition 2002 F.R. Verhage.
Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational.
Automatic Control Theory School of Automation NWPU Teaching Group of Automatic Control Theory.
Linear Predictive Analysis 主講人:虞台文. Contents Introduction Basic Principles of Linear Predictive Analysis The Autocorrelation Method The Covariance Method.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
ECE 5525 Osama Saraireh Fall 2005 Dr. Veton Kepuska
EE Audio Signals and Systems Linear Prediction Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 3 Time Domain Analysis of Speech Signal. 3.1 Short-time windowing signal (1) Three types windows : –Rectangular window –h r [n] = u[n] – u[n –
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Derivation Computational Simplifications Stability Lattice Structures.
Robotics Research Laboratory 1 Chapter 7 Multivariable and Optimal Control.
Z bigniew Leonowicz, Wroclaw University of Technology Z bigniew Leonowicz, Wroclaw University of Technology, Poland XXIX  IC-SPETO.
1 Lecture 4: March 13, 2007 Topic: 1. Uniform Frequency-Sampling Methods (cont.)
Professors: Eng. Diego Barral Eng. Mariano Llamedo Soria Julian Bruno
More On Linear Predictive Analysis
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Normal Equations The Orthogonality Principle Solution of the Normal Equations.
Autoregressive (AR) Spectral Estimation
Chapter 20 Speech Encoding by Parameters 20.1 Linear Predictive Coding (LPC) 20.2 Linear Predictive Vocoder 20.3 Code Excited Linear Prediction (CELP)
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
Lecture 12: Parametric Signal Modeling XILIANG LUO 2014/11 1.
Project-Final Presentation Blind Dereverberation Algorithm for Speech Signals Based on Multi-channel Linear Prediction Supervisor: Alexander Bertrand Authors:
By Sarita Jondhale 1 Signal preprocessor: “conditions” the speech signal s(n) to new form which is more suitable for the analysis Postprocessor: operate.
Bayesian Enhancement of Speech Signals Jeremy Reed.
Adv DSP Spring-2015 Lecture#11 Spectrum Estimation Parametric Methods.
Chapter 2 The z-transform and Fourier Transforms The Z Transform The Inverse of Z Transform The Prosperity of Z Transform System Function System Function.
Application of digital filter in engineering
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
PATTERN COMPARISON TECHNIQUES
Chapter 5 Homomorphic Processing(1)
Figure 11.1 Linear system model for a signal s[n].
Linear Prediction Simple first- and second-order systems
Linear Prediction.
Microcomputer Systems 2
Linear Predictive Coding Methods
Chapter 6 Discrete-Time System
Digital Systems: Hardware Organization and Design
Generally Discriminant Analysis
Linear Prediction.
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 7 Finite Impulse Response(FIR) Filter Design
Speech Processing Final Project
16. Mean Square Estimation
Presentation transcript:

Chapter 6 Linear Predictive Coding (LPC) of Speech Signals 6.1 Basic Concepts of LPC 6.2 Auto-Correlated Solution of LPC 6.3 Covariance Solution of LPC 6.4 LPC related parameters and their relationships

6.1 Basic Concepts of LPC (1) It is a parametric de-convolution algorithm x(n) is generated by an unknown sequence e(n) exciting a unknown system V(Z) which is supposed to be a linear non time-variant system. V(Z) = G(Z)/A(Z), E(Z)V(Z) = X(Z) G(Z) = Σ j=0 Q g j Z -j, A(Z) = Σ i=0 P a i Z -i Where a i and g j are parameters, real and a 0 = 1 If an algorithm could estimate all these parameters, then V(Z) could be found, and E(Z) could be found also. This finishes de-convolution.

Basic Concepts of LPC (2) There are some limitations for the model (1) G(Z) = 1 then V(Z) = 1/A(Z) this is so called “Full Poles Models” and the parametric de-convolution became coefficients(a i ) estimation problem. (2) e(n) sequence is of form Ge(n), where e(n) is a periodic pulse or a Gaussian white noise sequence. For the first case e(n) = Σδ (n-rN p ) and for the second case R(k) = E[e(n)e(n+k)] = δ (k) and the value of e(n) satisfied with Normal distribution. G is a non- negative real number controlling the amplitude. The way is x(n)->V(Z)(P,a i )->e(n),G->type of e(n)

Basic Concepts of LPC (3) Suppose x(n) and type of e(n) are known, what is the optimized estimation of P and a i, e(n) and G? It is the LMS algorithm. Suppose x(n) is the predicted value of x(n), it is the linear sum of previous P’ known values of x: x(n) = Σ i=1 P’ a i x(n-i) The predicted error ε (n) = x(n)-x(n) = x(n) - Σ i=1 P’ a i x(n-i) It is a stochastic sequence. The variance of it could be used to evaluate the quality of prediction.

Basic Concepts of LPC (4) σ 2 = Σ n ε 2 (n) (time average replaced means) It could be proved that if x(n) is generated by “full poles” model : x(n) = -Σ i=1 P a i x(n-i) + Ge(n) and optimized P’ = P, optimized a i = a i, σ 2 is minimal. σ 2 = Σ n [x(n) -Σ i=1 P a i x(n-i)] 2 ={Σ n x 2 (n)}-2Σ i=1 P a k {Σ n x(n-k)x(n)}+ Σ k=1 P Σ i=1 P a k a i {Σ n x(n-k)x(n-i)} By setting δ(σ 2 )/ δa k = 0 we can get -2 {Σ n x(n-k)x(n)}+2Σ i=1 P a i {Σ n x(n-k)x(n-i)}=0 Or Σ i=1 P a i φ(k,i) = φ(k,0) if φ(k,i) =Σ n x(n-k)x(n-i) 1<=i<=P and 1<=k<=P

Basic Concepts of LPC (5) Σ i=1 P a i φ(k,i) = φ(k,0), k=1~P is called LPC canonical equations. There are some different algorithms to deal with the solution. [σ 2 ] min = Σ k=0 P a k φ(k,0) with a 0 = 1 So if we have x(n), φ(k,i) could be calculated, and equations could be solved to get a i and [σ 2 ] min also could be obtained. For short-time speech signal according to different lower and upper limitation of the summary we could have different types of equations. We will discuss these different algorithms later.

6.2 Auto-Correlated Solution of LPC (1) Suppose windowed signal is x w (n) φ(k,i) = Σ n x w (n-k)x w (n-i) If window length is N-1 then the summation range will be 0~N+P-1 φ(k,i) = Σ m x w (m+(i-k))x w (m) = R(i-k) if n-i = m φ(k,i) = R(i-k) = R(k-i) = R(|i-k|) <= R(0) The equations became Σ i=1 P a i R(|i-k|)= - R(k) 1<=k<=P These are Toplitz equations and have high efficient solution.

Auto-Correlated Solution of LPC (2) |R(0) R(1) …… R(P-1)| |a 1 | | R(1) | |R(1) R(0) …… R(P-2)| |a 2 | | R(2) | |………………………………….| |...| = …... |R(P-1) R(P-2) … R(0) | |a p | | R(P) | Durbin Algorithm 1. E (0) = R(0) 2. K i = [ R(i) - Σ a j (i-1) R(i-j)]/E (i-1) 1<=i<=p 3. a i (i) = K i 4. a j (i) = a j (i-1) – K i a i-j (i-j) 1<=j<=i-1 5. E (i) = (1-K i 2 )E (i-1) Final solution is a j = a j (p) 1<=j<=p

Auto-Correlated Solution of LPC (3) For iteration i we got a set of coefficients for the predictor of i-th order and the minimal predicted error energy E (i). We also can get it by {R(k)} : E (i) = R(0) – Σ k=1 i a k R(k), 1<=i<=p K i is the reflect coefficient : -1<=K i <=1 It is a sufficient and necessary condition for stable H(z) during iteration.

Auto-Correlated Solution of LPC (4) Schur algorithm At first an auxilary sequence is defined. Its properties are : (1) q i (j) = R(j) when i = 0 (2) q i (j) = 0 when i > 0, j=1~p (3) q p (0) = E (p) is the predicted error energy. (4) |q i (j)| <= R(0), it is equal only if i=j=0 The algorithm is as following: 1. r(j) = R(j)/R(0), r(-j) = r(j), j=0~p 2. a 0 = 1, E (0) = 1 3. q 0 (j) = r(j) -p<j<p

Auto-Correlated Solution of LPC (5) 4. i = 1, k 1 = r(1) 5. For i-p<=j<=p q i (j) = q i-1 (j) + k i *q i-1 (i-j) k i = q i-1 (j)/q i (0) a j (i) = q i-1 (i-j) E (i) = E (i-1) (1-k i 2 ) 6. If i<p, back to step 5 7. Stop If we only calculate k i, then only first two expressions in step 5 are enough. It is suitable for fix-point calculation (r<=1) or hardware implementation.

Covariance Solution of LPC (1) If not using windowing, but limiting the range of summation, we could get : σ 2 = Σ n=0 N-1 ε 2 (n) n=0~N-1 φ(k,i) = Σ n=0 N-1 x(n-k)x(n-i) k=1~p, i=0~p = Σ m=-i N-i-1 x(m+(i-k))x(m) let n-i=m, m=-i~N-i-1 The equations will be like following : |φ(1,1) φ(1,2) …… φ(1,p)| |a 1 | |φ(1,0)| |φ(2,1) φ(2,2) …… φ(2,p)| |a 2 | |φ(2,0)|.………………………………………………=………… |φ(p,1) φ(p,2) …… φ(p,p)| |a p | |φ(p,0)|

Covariance Solution of LPC (2) The matrix is a covariance matrix and it is positive determined, but not Toplitz. There is no high efficient algorithm to solve. Only common used LU algorithm could be applied. Its advantage is not having big predicted error on the two ends of window. So when N~P the estimated parameters have more accuracy than auto-correlated method. But in speech processing very often N>>P, so the advantage is not obvious.

Burg(Lattice) Algorithm (1) It is an iterative procedure. It directly calculates the linear predicted coefficients and reflect coefficients. It does not have stable problems, nor windowing. But the computing time is much longer than the auto- correlated approach. (1) Init : f (0) (m)=b (0) (m)=x(m) m=0~N-1, i=1 (2) calculate k i and predicted coefficients a j (i) : k i =2Σ m=0 N-1 [f (i-1) (m)*b (i-1) (m-1)]/ {Σ m=0 N-1 [f (i-1) (m)] 2 + Σ m=0 N- 1 [b (i-1) (m)] 2 } a j (i) = a j (i-1) - k i a i-j (i-1) 1<=j<=i-1 a i (i) = k i

Burg(Lattice) Algorithm (2) (3) Calculate forward and backward predicted errors: f (i) (m) = f (i-1) (m) – k i b (i-1) (m-1) and b (i) (m) = b (i-1) (m-1) –k i f (i-1) (m) m=0~N-1 (4) i++ (5) If i<p goto (2) (6) Stop Final result is a j = a j (p) j=1~p Its disadvantage is based on stability. In real case speech is not stationary, so sometime it does not work well, in particular for the formant estimation. It is good for parameter analysis in speech synthesis.

LPC parameters and their relationships (1) (1) Reflect Coefficients Also known as PARCOR coefficients If {a j } are known, k i could be found as following : a j (p) = a j 1<=j<=p k i = a i (i) a j (i-1) = (a j (i) + a j (i) a i-j (i) )/(1-k i 2 ) 1<=j<=i-1 The inverse process : a j (i) = k i a j (i) = a j (I-1) - k j a i-j (i-1) at last a j = a j (p) 1<=j<=p -1<=k i <=1 is the sufficient and necessary condition for stable system function

LPC parameters and their relationships (2) (2) Coefficients of Logarithm Area Ratio g i = log(A i+1 /A i ) = log[(1-k i )/1+k i ]) i=1~p Where A is the intersection area of i-th segment of the lossless tube. k i = (1-exp(g i ))/(1+exp(g i )) i=1~p (3) Cepstrum Coefficients c n = a n + Σ k=1 n kc k a n-k /n, 1<=n<=p+1 = a n + Σ k=n-p n-1 kc k a n-k /n, n>p+1

LPC parameters and their relationships (3) (4) The Roots of Predictor A(z) = 1 – Σ k=1 p a k z -k = Π k=1 p (1-z k z -1 ) = 0 Transfer to S-plane: z i = exp(s i T) Suppose s i = σ i + jΩ i, z i = z ir + jz ii, then Ω i = tan(z ii /z ir )/T andσ i = log(z ii 2 + z ir 2 )/(2T) (5)The impulse response of full poles system h(n) = Σ k=1 p a k h(n-k)+ σ (n) n>=0 = 0 n<0 Σ

LPC parameters and their relationships (4) (6) Auto-correlated Coefficients of impulse response of the full poles system H(z) = S(z)/U(z) = G/(1- Σ k=1 p a k z -k ) The auto-correlated coefficients of h(n) is : R(i) = Σ n=0 h(n)h(n-i) = R(-i) It could be proved that : R(i) = Σ k=1 p a k R(|i-k|) 1<=i<=p And R(0) = Σ k=0 p a k R(k) + G 2 {a k } -> {R(i)} and {R(i)} -> {a k } are equivalent

LPC parameters and their relationships (5) (7) Auto-correlated coefficients of impulse response of the predicted error filter (inverse filter) A(z) = 1 - Σ a k z -k The impulse response is : a(n) = δ (n) - Σ k=1 p a k δ (n-k) = 1, n = 0; a n, 0<n<=p; 0, otherwise Its auto-correlated function is : R(i) = Σ k=1 p a(k)a(k+i) 0<=i<=p

LPC parameters and their relationships (6) (8)Line Spectrum Pair (LSP) or Line Spectrum Frequency (LSF) A (p) (z)= 1- Σ k=1 p a k z -k ( p is even) Define P(z) = A (p) (z)+z -(p+1) A (p) (z -1 ) Q(z) = A (p) (z)- z -(p+1) A (p) (z -1 ) It could be proved that : All roots of P(z) and Q(z) are on the unit circle and alternatively arranged on it provided the roots of A(z) are inside the unit circle.

LPC parameters and their relationships (7) Replace z with expj ω : P(expj ω )=|A (P) (expj ω )|expj φ ( ω )[1+exp[-j((p+1) ω + 2 φ ( ω ))] Q(expj ω )=|A (P) (expj ω )|expj φ ( ω )[1+exp[-j((p+1) ω + 2 φ ( ω )+ π )] If the roots of A (P) (z) are inside the unit circle, when ω is 0~ π, φ ( ω ) changes from 0 and returns to 0, the amount [(p+1) ω +2 φ ( ω )] will be 0~(p+1) π P(expj ω )=0 : [(p+1) ω +2 φ ( ω )]=k π, k=1,3,…P+1 Q(expj ω )=0 : [(p+1) ω +2 φ ( ω )]=k π, k=0,2,…P The roots of P and Q : Z k = expj ω k [(p+1) ω +2 φ ( ω )]=k π, k=0,1,2,…P+1 And ω 0 < ω 1 < ω 2 < … < ω P < ω P+1

LPC parameters and their relationships (8) If a 1 (p) ~a p (p) are known, LSP could be found by A(z) -> P(z) -> p(w) -> f 1, f 2, … f p If f 1 ~f p are known, a i (p) could be found by P(z) and Q(z) -> A(z) = P(z) + Q(z) -> a 1 (p) ~a p (p)