The coding of speech signal refers to the digitization of analog speech signal, that is, source coding.
PCM quantizes and codes the instantaneous sampled values of analog signals and converts the analog signals into digital signals. That is, PCM is a method of analog-to-digital conversion, and there are many methods of analog-to-digital conversion, so the array communication system composed of PCM is called PCM communication system.
Characteristics of pulse code modulation:
Sampling is to extract the instantaneous amplitude (sample value) of an analog signal every certain time interval t, that is, the analog signal is discretized in time to get PAM signal.
Let the frequency range of analog signal be f 0 ~ f m, and b = f m-f 0, when f 0 < B is a low-pass signal (voice signal, etc. ), and when f 0 ≥ B, it is a bandpass signal. Yes, the frequency components of the sampled signal spectrum are:
The low generality of the receiving end is used to restore or reconstruct the original analog signal. In order to accurately recover the original analog signal at the receiving end and avoid folding noise, the sampling theorem f s ≥ 2 f M should be satisfied, otherwise the PAM signal will produce folding noise, and the receiving end cannot accurately recover the original analog speech signal with a low-pass filter. However, in order to maintain a certain defense zone, F S > 2 F M is required.
Then, for speech signal, its frequency spectrum range is 300~3400 Hz, f M = 3400 Hz, because f s ≥ 2 f M = 6800Hz, and in order to leave a certain defense band, f s = 8000Hz, that is, T= = 125μs, which is also stipulated in CCITT. (CCITT, International Telephone and Telegraph Advisory Committee, later changed to ITU-T, whose Chinese name is ITU-T, is the ITU telecom standardization department, which is a branch under the management of ITU. )
Quantization means that PAM signals (samples) are discrete in amplitude. Divided into uniform quantization and non-uniform quantization.
Uniform quantization, that is, within the quantization area (that is, from -u to +u, where U is the overload voltage and the amplitude of voice signal is mainly distributed in this interval), it is evenly divided into n (quantization series) cells (δ =).
If it is in the quantization area, the middle value of each quantization interval is taken; In the overload area, take the maximum quantization value (absolute value) of the quantization area, that is |u q | = U-. Then there is
1) The number of quantized values is equal to the quantization series N. After quantization, N quantized values should be binary coded, with the number of coded bits being L and n = 2 L. ..
2) quantization error = quantization value-sample value =u q (t)-u(t)
In the quantization area, emax (t) =;
In the overload area, emax (t) >; ;
Quantization error will cause quantization noise, which will be superimposed on the original signal and interfere with the original signal. Quantization error is usually measured by quantization SNR. The larger the quantization noise ratio, the smaller the influence of noise on the signal.
(serial number q) db = 10lg (dB)
Where s is the average power of speech signal and quantization noise power.
As can be seen from the above, the disadvantage of uniform quantization is that when the size of n (or l) is appropriate, the quantization signal-to-noise ratio of small signals is too small to meet the requirements, while the quantization signal-to-noise ratio of large signals is too large to meet the requirements. In digital communication systems, the quantization signal-to-noise ratio is generally required to be greater than or equal to 26db. For uniform quantization, the maximum quantization of large and small signals in the quantization area is that the quantization error is equivalent to the quantization noise power, while the signal power of small signals is small, so the signal-to-noise ratio is large, and the signal power of large signals is large, so the signal-to-noise ratio is large. In order to solve this problem, if uniform quantization is still used, the signal-to-noise ratio needs to be improved for small signals, and the quantization noise power needs to be reduced because the voice signal power is unchanged, that is, the quantization error e max (t) needs to be reduced, and δ = needs to be reduced, then n needs to be increased, and N=2 l will inevitably lead to an increase in L, which will inevitably lead to other problems, such as an increase in coding complexity and a decrease in channel utilization (although the signal transmission rate will also increase with the increase of L, the numerical value of the digital rate will also increase).
The purpose of non-uniform quantization is to improve the quantization signal-to-noise ratio of small signals by reducing the quantization signal-to-noise ratio of large signals without increasing the quantization series n. To achieve this goal, it is necessary to reduce the quantization interval of small signals (small signal amplitude), and then reduce the quantization error by reducing the equivalent noise power, thus improving the quantization signal-to-noise ratio. For large signals (with large signal amplitude), if quantization increases the quantization interval, the quantization error will decrease and the equivalent noise power will increase, thus reducing the quantization signal-to-noise ratio.
Commonly used non-uniform quantization methods include analog companding method and direct non-uniform coding and decoding method (according to the division of non-uniform quantization, coding is directly based on which interval the sample falls in, which is equivalent to quantization in the coding process. )
In digital communication system, it is necessary to sample and quantize theoretically.
However, in practice, samples are usually encoded directly according to the division of quantization interval, which is equivalent to quantization in the encoding process.
Coding is to convert samples of analog signals into corresponding binary code groups. There are three commonly used binary code groups:
Coding is mainly divided into:
Generally, PCM communication systems adopt nonlinear coding and decoding. Usually, the samples are directly encoded according to the non-uniform quantization interval division of A-law 13 polyline, and then decoded at the receiving end.
For the A-law 13 polyline encoder, it can be divided into positive polarity and negative polarity, each polarity has 8 quantization segments, and each quantization segment is divided into 16 equal parts, that is, if there is N = 2x8x 16 = 256, there is.
l = log 2 N = log 2 256 = 8
The corresponding code words are arranged as follows
A 13 normal polyline coding program;
The key of coding process is to determine the decision value. The decision value is the cut-off point level (I Ri or U Ri) of each quantization segment or stage, and the number n R =-1 = 127 (l=8).
As for the segment code, according to the unipolar quantization table of the A-law 13 broken line, it is divided into segments by quantization unit, and the demarcation points are determined values of a2~a4 in turn. Bisect the whole quantization segment, the bisection point is 128δ, and the judgment value of a2 is between segment 4 and segment 5, so when a2=0, it is the sample value; 32 δ, indicated in the last two paragraphs; The last two paragraphs are equally divided, and the bisection point is 64δ, that is, I R4 is between the third and fourth paragraphs. When a4=0, the sample value
Similarly, for the determination of the decision value of the intra-segment code, the decision values of a5 to a8 are divided one by one based on the quantization level in the quantization segment, and the decision point of A8 is determined according to the values of A5, a6 and a7.
(1) coding level and coding error.
Coding level, that is, the level corresponding to the codeword output by the encoder (I C or U C). Take I C as an example:
The coding error is:
(2) decoding level and decoding error
The decoding level is the output level (I C or U C) of the decoder.
Decoding error: