You are on page 1of 17

1 Linear prediction

Speech production can be modelled by simple structure as shown in

figure

Figure 1.1 speech production Model


Lung generated air pressure to excite vocal track can be modelled as white noise
generator, and All acoustic path in our body such as Trachea, Nasal cavity, Oral
cavity, Nostril, Mouth can be modelled as Time varying filter .

Time varying Speech model are assumed to constant for less than 30 msec due to
muscle relaxation time i.e., it will take certain amount of time for muscle to come
back to its position. During this time we can calculate time varying filter parameters
by simple technique called linear prediction .
Linear prediction is heart of all speech (CELP) coding algorithm studying of it is very
important for understanding the working of almost all coder . The main idea is
speech depends on linear combination of past M samples. And the corresponding

filter model

This weighted coefficients ai are called linear predictor coefficients. The ai are
calculated by minimizing the man square error between original speech and
predicted speech. The predictor error is

Figure 1.2 Shows Signal Source Model, Prediction signal and Prediction Error
1.1 Error Minimization
In order to calculate Lpc parameters we need to minimize mean
square error

By taking partial derivatives of J w.r.t ai to zero and simplifying we get normal


equation

After simplification,

For k=1,2 ,M

Where

This can be easily solved by either matrix inversion method or


Levinson -Durbin Recursion algorithm.

1.2 Prediction Schemes


There are two prediction schemes Internal Prediction and External Prediction.

1.2.1Internal Prediction
Most speech coding algorithm uses internal Prediction where LPC are
derived from the frame pertaining to the frame under processing. Frame length
taken usually around 160 to 240 samples. Here in this thesis we have used internal
prediction.

1.2.2External Prediction
Where LPC are derived from past frame are used in current frame
under processing this are used when low delay is prime concern, such as LD-CELP.
Frame length taken around 20 samples because for short frame length prediction
coefficients will not change much from past frame i.e., slowly varying nature of
speech.

1.3 Prediction order


Prime doubt what should be the order of the predictor in order to
answer, first we will first define prediction gain here

1.3.1Prediction gain
It gives the measure of performance of predictor it is defined as

Higher is the gain better is the performance.


Experiment is performed by calculating prediction gain vs prediction order ,It was
found around order 10 , PG is max with increasing prediction order, PG almost
remain same.

Figure 1.3 PG vs Prediction Gain

Low order may not able to produce exact spectrum and Excess high order leads to
spectrum outfit producing undesirable errors. So optimal order 10 is taken and one
point to remember even 50 order predictor are also in use coder such as in LD-CELP.

Figure 1.3.1 shows not able to fit spectrum for M=2

Figure 1.3.2 shows approximately fits the spectrum.

Figure 1.3.1 M=20 gets over fits the spectrum

1.4 CONCLUSION:

From above we can say prediction order M=10 is able produce approximately
speech spectrum .so, optimum prediction order for speech coding usually taken
around M=10.

2 Levinson-Durbin algorithm

One of the less computational procedure to calculate Lpc parameters


from the other methods such as matrix inversion and gauss Jordan elimination
method is Levinson-Durbin recursion algorithm.
Complexity with Matrix inversion method is cubically related to order M, where as
Levinson-Durbin complexity related to square order M.
Thus results in computation saving and storage when compared to other methods.
Another byproduct of this is reflection coefficients, which can be used for checking
stability of prediction filter.

Normal equations are given by

Which can be represented in matrix form as

Where

Algorithm takes advantage of Toeplitz matrix in which all diagonal element are
equal.
It is stated as

After the pth iteration we get

The reflection coefficients absolute magnitude is less than 1 then Filter is guarantee
to be stable otherwise we need to take other previous frame because LPC
coefficients can be taken without having much distortion.

Flow chart for Levinson-Durbin algorithm is

Figure 2.1 flow chart for Levinson-Durbin algorithm


2.1 Filter Realization

This can be realized in direct form, Lattice form and LSF form based on which
parameters.
2.1.1 Direct form

Figure 2.1.1 Direct form realization


2.2 Lattice form

Reflection coefficients are corresponds to lattice filter structures which can be


used to model vocal track tube model. They are used in many speech compression
algorithms FS1015, RPLTP because of good quantization properties.

Figure 2.1.2 Lattice Filter realization


2.3 Conclusion:
Levinson-Durbin algorithm provides computation saving as wells storage and also
calculation of reflection coefficient + linear prediction coefficients directly.

3 Line Spectral Frequency


Line Spectral frequency another representation of LPC. LSF polynomial are formed
from LPC coefficients A(z).
P(z) is symmetric polynomial and Q(z) is antisymmetric polynomial.

LSF has two important properties:

All zero s of LSF polynomial lies on unit circle.


Zero s of two polynomial are interlaced.

Figure 3.1 showing A(z), P(z) and Q(z) coefficients

Figure 3.1.1 showing two properties of LSF

3.1.1 Finding LSF from LPC


Since for order P(z) has zero at 1 and Q(z) has zero at -1 .This can be used
to reduce the order of P and Q.

Order reduction

After simplification we get

Using trigonometric expansion we can express above equations in power of cosine.

Above equation can be solved using root finding algorithm such as Runga-Kutta
method, Newtons method, above methods does not take into account leading to
high computations.
One can use the interlacing property of LSF in finding roots Po and Qo.
Such algorithm procedure described here, first take

Above equations after substituting are

If xi are roots ,then LSF are given

Flow chart for root finding is shown below


It starts with backward from initial guess x=1 for Po because first root is near to 1,
searches incrementally with

= 0.02 until sign changes then it is searched further

small interval up to 3 decimal, the root obtained above is used as initial guess for
Qo, this continues.

Figure 3.1.2 Flow chart for root function


The initial value of interval must be small, it has to satisfy

It is given

that

is sufficiently enough to avoid missing sign changes .

Figure 3.1.3 continuation of flow chart of root function

Figure 3.1.4 using interlacing property (fast) and Newtons method

3.2 Conversation of LSF to LPC

Each LSF frequency represented by second order equation cascaded


connection of this forms gives symmetric and anti-symmetric polynomial.

Finally predictor coefficients are given by

That is impulse response of symmetric and anti-symmetric polynomial.

3.3 Benefits of LSF


If one LSF changes then it affects power spectrum density nearby its changed
LSF. This property is

You might also like