Linear prediction and its implementation in Matlab

Publisher:SHow111timeLatest update time:2012-12-01 Source: 21IC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Linear prediction analysis is one of the core technologies in modern speech signal processing. It has made great contributions to the rapid development of modern speech signal processing. It has been widely used in speech analysis, synthesis, coding, recognition, etc., and is still one of the most effective speech analysis technologies. For example, the G.729 CS-ACELP speech coding algorithm used in VoIP and H.323 online multimedia communication systems is a high-quality speech coding standard based on conjugate algebraic code excited linear prediction.

1 Basic principles of linear prediction

The most commonly used model in speech signal processing is the full-pole model. The basic concept of linear prediction is that a unique set of predictor coefficients can be determined by minimizing the sum of squares of the differences between the actual speech samples and the linear prediction samples, that is, approximating the minimum mean square error. If a random process is simulated by the output generated by a p-order full-pole system excited by white noise, let the transfer function of this system be:


Where: p is the predictor order; G is the channel filter gain. Therefore, the relationship between the speech sample s(n) and the excitation signal e(n) can be expressed by the following difference equation:


That is, there is a correlation between speech samples, and the past sample values ​​can be used to predict future sample values. For voiced sounds, the excitation e(n) is a unit impulse repeated at the pitch period; for unvoiced sounds, e(n) is a stationary white noise.

In the process of model parameter estimation, the following system is called a linear predictor:


Where: ai is called the linear prediction coefficient. Therefore, the system function of the p-order linear predictor has the following form:


A(z) in equation (1) is called the inverse filter, and the base transfer function is:


The linear prediction equation can be obtained as follows: The short-term average prediction error within a certain frame is defined as:


From this, the prediction coefficients can be calculated.

Due to the short-term stability of speech signals, they need to be processed in frames (10 to 30 ms). For a speech segment s(n) with N sample points selected from the window at time n, it is recorded as Φn(j, i):


2 Basic Principles of Linear Prediction Analysis in G.729

Using 10th order linear prediction (LP) for short-term analysis, the LP synthesis filter is defined as:

[page]

3 Implementing Linear Prediction on Matlab

3.1 Windowing and autocorrelation function calculation

G.729 speech coding algorithms are mostly implemented in C language, which makes the program very lengthy and has certain limitations. Since Matlab has powerful functions in data analysis, automatic control, digital signal processing, and drawing, for intuitive expression, Matlab is used to implement the linear prediction analysis algorithm.

Figure 1 shows a schematic diagram of a hybrid window, which consists of two parts. The first half is a 1/2 Hamming window; the second half is a 1/4 cosine function:


Where: 5 ms (40 samples) come from the next frame, 15 ms (120 samples) come from the previous frame, and the windowing process of the current frame 10 ms (80 samples) is shown in Figure 1.

The windowed image is shown in Figure 2.


3.2 Determination of LP coefficients

To solve the linear prediction filter coefficients ai, the most classic Levinson-Durbin algorithm will be used. The steps of this algorithm are:


The superscripts in brackets in the above formulas represent the divisors of the predictor. Steps (1) to (4) can be recursively solved for I=1, 2, ..., P, where: E is the minimum mean square prediction error; R is the autocorrelation coefficient; k is the reflection coefficient, which ranges from [-1, 1]; aij is the jth coefficient of the i-th order predictor. Through calculation, it is found that in fact, in the calculation process, although the goal is to calculate all the coefficients of a p-order linear predictor, in fact, in the recursive process, only all the coefficients with divisors lower than the p-order linear predictor are calculated, and the minimum prediction error energy is calculated at the same time (the range of the reflection coefficient in the recursive formula is a necessary and sufficient condition to ensure the stability of the system H(z), that is, all the roots of the polynomial A(z) fall within the unit circle).

From the derivation, we know that the physical meaning of φn(j, i) can be understood as the short-time autocorrelation function of sn. Therefore, it reflects the actual situation of the speech waveform, that is, different waveforms have different values. However, the value of ai is determined by φn(j, i) and changes with the change of φn(j, i), so it can also be said that ai reflects the actual situation of the speech waveform.

Its Matlab description is as follows:

4 Conclusion

Linear prediction is widely used in speech processing, and using Matlab to implement it can intuitively know the analysis results, laying the foundation for the next step of implementing the algorithm on DSP.

Reference address:Linear prediction and its implementation in Matlab

Previous article:Prediction of CH4 concentration in biogas based on support vector machine
Next article:Real-time monitoring system of intelligent instruments based on Kingview and VB

Recommended ReadingLatest update time:2024-11-16 17:48

Application of DSP/BIOS in Power Quality Monitoring Terminal
DSP (digital signal processor ) is used more and more frequently in today's engineering applications. There are three main reasons for this: first, it has powerful computing power and is capable of various digital signal processing algorithms such as FFT and digital filtering ; second, m
[Test Measurement]
Online programming method of DSP chip's Flash memory
In embedded systems, in order to realize offline automatic operation of programs, programs are often solidified in electrically erasable Flash memories. To realize the offline operation of an embedded system with power on, online programming becomes a must in the embedded system development process. Since online p
[Embedded]
Online programming method of DSP chip's Flash memory
Design of Airborne Intelligent Power Supply Based on DSP
  The stable operation of airborne equipment is inseparable from a safe and reliable power supply system. With the increasing integration of airborne equipment, high-density, high-reliability power supply systems will become a key part of integrated core processor applications. Airborne equipment may sometimes encount
[Embedded]
Design of Airborne Intelligent Power Supply Based on DSP
Design of a high-frequency and high-voltage power supply for electrostatic precipitator based on DSP
At present, more than 95% of the dust removal equipment in my country's coal-fired power plants use electrostatic precipitators, and industrial frequency power supplies are generally used in electrostatic precipitators. However, the spark control characteristics of industrial frequency power supplies are poor, the spa
[Embedded]
Design of a high-frequency and high-voltage power supply for electrostatic precipitator based on DSP
A Design of DSP Human-Machine Interface Module Based on CPLD
It has very wide applications in ultra-high-speed fields and real-time measurement and control. Today's CPLDs are generally based on E2PROM and Flash electrically erasable technology, and can achieve more than 100 erase and write cycles. CPLD selection and design of its expansion module Since A is powered by 3.3v,
[Embedded]
A Design of DSP Human-Machine Interface Module Based on CPLD
Implementation of Embedded Synchronous Controller Based on DSP and FPGA
Abstract: Aiming at the problems of dynamics and stability in the synchronous control of multiple units of printing and dyeing equipment, a design scheme of embedded synchronous controller based on DSP and FPGA is proposed. As the core of operation control, DSP is responsible for the implementation of control algo
[Embedded]
Implementation of Embedded Synchronous Controller Based on DSP and FPGA
Application of DSP/BIOS in Power Quality Monitoring Terminal
  DSP (digital signal processor) is used more and more frequently in today's engineering applications. There are three main reasons for this: first, it has powerful computing power and is capable of various digital signal processing algorithms such as FFT and digital filtering; second, major DSP manufacturers have
[Embedded]
Application of DSP/BIOS in Power Quality Monitoring Terminal
Combining Matlab with LabVIEW
Starting from LabVIEW 8.0, LabVIEW provides a very useful function called Mathscript, which can be used to program using a text-based mathematical programming language similar to MATLAB. After the development of several versions 8.0, 8.2, 8.5, and 8.6, the functions of Mathscript have become more and more powerful. In
[Test Measurement]
Combining Matlab with LabVIEW
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号