[0001] The invention relates to a method for coding a sampled analog signal having a repetitive
nature, in which, for a signal segment to be coded consisting of a predetermined first
number of samples, a search is always made in a preceding segment containing a predetermined
second number of samples which is greater than the first number of samples for a signal
segment which is as similar as possible by always comparing the signal segment to
be coded, in steps of one sample interval, with a segment containing the first number
of samples which forms part of the segment containing the second number of samples,
and in which the difference signal is determined between the found, most similar segment
and the segment to be coded as well as the difference between a reference time instant
in the segment to be coded and a reference time instant in the found, most similar
segment, expressed in the number of samples D between the two time instants.
[0002] It is known that analog signals having a strongly consistent nature such as, for
example, speech signals can be coded after sampling in an efficient manner by consecutively
carrying out a number of different transformations on consecutive segments of the
signalwhich each have a particular time duration. One of the known transforma-tions
for this purpose is linear predictive coding (LPC), for an explanation of which a
reference can be made to the book entitled "Digital Processing of Speech Signals"
by L.R. Rabiner and R.W. Schafer; Prentice Hall, New Jersey; chapter 8. As stated,
LPC is always used for signal segments having a particular time duration, in the case
of speech signals, for example, 20 ms, and is considered as short-term coding. It
is also known to make use not only of a short-term prediction but also of long-term
prediction (LTP), in which a very efficient coding is obtained by a combination of
these two techniques. The principle of LTP is described in Frequenz (Frequency), volume
42, no. 2-3, 1988; pages 85-93; P.Vary et al.: "Sprachcodec fur dass Europäische Funkfernsprechnetz"
("Speech Coder/Decoder for the European Radio Telephone Network").
[0003] In LTP, for a signal segment to be coded, a search is made for a segment with the
greatest possible similarity in a signal period, preceding the said segment, having
a particular duration and a signal which is representative of the difference between
the segment to be coded and the found segment, and also a signal which is representative
of the time duration which has elapsed since the found segment, is transmitted in
coded form, which can result in an appreciable reduction of the information to be
transmitted. Because the basic principle of LTP does not appear to result in all cases
in finding a signal segment with optimum similarity, an improvement of the LTP principle
has been proposed under the name HLTP (high-resolution LTP). A possible implementation
of HLTP is described in Eurospeech 89, European Conference on Speech Communication
and Technology, Paris, September 1989, in the article entitled "Pitch Prediction with
Fractional Delays in CELP coding" by J. S. Marques et al. In the case of HLTP, the
chance that the signal segment with the greatest similarity is found is increased
by an increase in the sampling frequency of the preceding signal period by means of
interpolation. A draw-back of HLTP is, however, that, as will be explained in greater
detail below, the complexity of the coding is much greater than in the case of LTP
as a result of an appreciable increase in the number of operations.
[0004] The object of the invention is to provide a method in which an improvement in the
LTP principle is obtained in that the chance that the segment with the greatest similarity
in a preceding period having a particular duration is found increases considerably
without the number of operations needed in doing this increasing to the same extent
as in the case of HLTP.
[0005] For this purpose, the invention provides a method of the above type, characterised
in that the number of samples in the segment to be coded is increased by a predetermined
factor Ob by always placing (Ob - 1) samples having a value equal to 0 between two
consecutive samples, in that the number of samples in the preceding segment is also
increased by the factor Ob, in that, inthe preceding segment, partial segments Cd
are determined for which it is the case that the number of samples Dd, expressed in
the numbers of samples after oversampling, between the reference time instant in the
segment to be coded and the reference time instant in a partial segment Cd fulfils:

,
in which d = 1, 2, 3, 4 ...n, where n is a positive integer, and Ob and n are chosen
in a manner such that Dd is always an integer, in that, in the segments Cd, sample
values are determined by an interpolation technique at predetermined positions, which
predetermined positions are situated at a spacing Dd from the original samples in
the segment to be coded before its number of samples was increased, and in that a
partial segment Cd is determined which is the most similar to the segment to be coded.
[0006] The invention also provides a device for the application of the method according
to the invention, comprising means for sampling the signal to be coded; means for
splitting off a signal segment to be coded containing a predetermined first number
of samples; means for splitting off a preceding signal segment containing a second
number of samples, means for always comparing, in steps of one sample interval, the
sample values of the first segment with corresponding sample values of a partial segment
containing the first number of samples which forms part of the preceding segment;
means for determining the partial segment which shows the greatest similarity to the
signal segment to be coded; means for determining a signal which is representative
of the difference between the segment to be coded and the found partial segment and
means for determining the number of samples D between a reference time instant in
the segment to be coded and a reference time instant in the found partial segment,
characterised by means for oversampling the signal segment to be coded by a predetermined
factor O
b, by means for determining the value

, where d = 2, 3, 4, ...n;
by means for determining for every value of d, by means of interpolation, the samples
at all the time instants which differ by Dd from the time instants associated with
the original sample values; and by means for correlating the sample values of the
segment to be coded and the sample values determined for a value of d.
[0007] The invention will be explained in greater detail below with reference to the drawing,
wherein:
Figure 1a-c shows various signal forms to explain the LTP principle and the difficulties
associated therewith;
Figure 2 shows a flow chart to explain an aspect of the invention;
Figure 3a, b shows a block diagram of an exemplary embodiment of a device according
to the invention.
[0008] Figure 1a shows, in the time domain, an example of the sampled version of a signal
having a strongly repetitive nature, such as a speech signal. To explain the principles
of LTP and HLTP it will be assumed that, before a segment having a duration of 5 ms,
a search is always made in a preceding period of 15 ms for the segment of likewise
5 ms having the greatest similarity and that the sampling frequency is 8kHz. The segment
to be coded in this connection will be termed segment A, the period of 15 ms segment
B and the wanted segment with the greatest similarity segment C. These segments are
shown in Figure 1a. Now the principle of LTP is that, before the transmission of segment
A, no signals are transmitted which are directly related to the samples in segment
A, but firstly signals which are related to the sample values which are produced if
the difference signal between segment A and segment C is determined, and in the second
place, signals which are related to the time difference between segment A and segment
C, expressed, for example, in the number of samples D between the beginning of segment
A and the beginning of segment C. In a decoder which receives said transmitted signal,
the segment A can now be formed because segment C is in principle already known in
the decoder, for example because the samples over the preceding 15 ms are always stored
in a memory so that the samples from the segment can be read out of the memory with
the received signal which is representative of the difference D in number of samples
between the beginning of the segments A and C, after which the segment A can be formed
with the signal, also received, which is representative of the difference between
the sample values of segment A and segment C.
[0009] The complexity of the LTP principle can be defined as follows. In segment A, 40 samples
are present,and in segment B 120 samples. The segment B therefore has to be investigated
in 81 steps by "shifting" the entire segment A in steps equal to a sample interval
over segment B and at every step determining the degree of agreement, expressed in
a correlation value, by means of correlation techniques. Said correlation value R(k)
can be calculated by means of the formula:

where:
N = 40, the number of samples in segment A;
k = 0 ... 80, the starting value of a partial segment (a possible segment C) within
segment B; and
m = the sample number within segment A.
[0010] For a more detailed explanation of this correla-tion technique, reference can be
made to page 147 of the abovementioned book by L. R. Rabiner. Of course, other correlation
techniques can also be used in principle, as well as other techniques for determining
the agreement between two groups of sample values, which other techniques are deemed
to fall within the definition of correlation.
[0011] To calculate the correlation value, 40 multiplications and 39 additions are necessary
for each value of k, so that the total number of operations required is equal to:
81 * 79 = 6399.
[0012] As has already been stated above, a problem in using the LTP principle is that the
segment C with the greatest similarity in segment A cannot always be found. This is
shown diagrammatically in Figure 1b, from which it is evident that, in terms of signal
form (the envelope of the samples), the segment C1 shows the greatest similarity to
the segment A, but the sample values of segment C2 shows the greatest similarity to
those of segment A so that segment C2 is incorrectly chosen as the most suitable segment
for subtraction from segment A to form a difference signal. The HLTP principle effects
an improvement in this because the sampling frequency in the segment B has been increased,
for example, by a factor of 12. This increases the chance that the correct segment
C is found. As has already been stated, this takes place at the expense of an appreciable
increase in the complexity, as can be calculated as follows: the sampling frequency
of segment B is increased by means of interpolation techniques by a factor of 12,
it being assumed that every intermediate sample is calculated from 7 already known
samples.
[0013] The segment B will now contain 12 * 120 = 1440 samples. To calculate the intermediate
samples, (120 * 11) * 7 = 9240 multiplications are necessary and (120 * 11) * 6 =
7920 additions, that is to say 17160 operations.
[0014] The sampling frequency of segment A is also increased by a factor of 12 by always
inserting 11 samples having a value = 0 between two subsequent known samples. The
segment B of 1440 samples now has to be searched in 961 steps by again shifting segment
A oversegment B. In calculating the correlation value R(k), the above formula explained
for the LTP principle can be used. At the same time, it is not necessary to calculate
a correlation value also for the intermediate sample values, so that for every value
of k (k = 0 ... 960) 79 operations are necessary, just as in the case of LTP.
[0015] The total number of operations needed in HLTP is therefore (961 * 79) + 17160 = 93097.
[0016] This means that, with the abovementioned (real) assumptions for the increase in the
sampling frequency and the manner of interpolation, the complexity of the HLTP principle
is approximately 14.5 times as complex as the LTP principle.
[0017] In the example of the HLTP principle described, the spacing D between the beginning
of segment A and the beginning of the segment C found can again be expressed in the
number of samples between the two time instants (not more than 961) and can thus be
reproduced in 10 bits.
[0018] According to the invention, the segment C with the greatest similarity is sought
in the manner to be described below, which is less complex than the HLTP principle,
the chance that the segment found is actually the segment with the greatest similarity
being appreciably greater than in the case of the LTP principle.
[0019] According to the invention, the segment C having the greatest similarity to the segment
A is first sought, according to the LTP principle explained above, in a segment B
preceding a segment A to be coded. This segment C is situated at a number D of samples
from the segment A. According to the invention, the sampling frequency is then also
increased by a factor of Ob, for example also by a factor of Ob = 12. As a result
of this, the found segment C ends up at a spacing equal to (D * Ob) from segment A.
After that, whether a segment Cd at a spacing of

from segment A possibly shows more similarity to segment A than the segment C found
with the aid of the LTP technique for the value d = 1, which will therefore hereinafter
be termed C1, is determined. Possible values of d are: d = 1, 2, 3, 4 .....
[0020] For which values of d an investigation can be made of whether a segment Cd agrees
better with segment A than the segment C1 follows from the lengths of the segments
A and B. The found value of d at which the best agreement is observed is denoted by
d
optimum.
[0021] The complexity of the method according to the invention with respect to that of LTP
and HLTP can be calculated as follows:
In the method according to the invention, if the same time duration of the segments
A and B (5 and 15 ms, respectively) and the same sampling frequency (8 kHz) is assumed
as in the example of the LTP principle described above, 6399 operations are necessary
to find the segment C1.
[0022] To seek the segment Cd with d = 2, 3 and 4 in the present example, the sampling frequency
is increased by a factor of 12, for example by always placing 11 samplevalues equal
to 0 between two consecutive known samples and by only calculating the actual sample
value for samples at predetermined positions, for example by means of interpolating
7 already known samples. These predetermined positions are the positions of the samples
which are situated at a spacing Dd from the original samples in the segment A. The
sampling frequency of the segment A is also increased and, just as in the case of
HLTP, this is done by always placing 11 samples having a value equal to 0 between
two known samples. Segment A therefore consists of 480 samples, of which a maximum
of 40 are not equal to 0. As a result of this, in principle, only a maximum of 40
intermediate sample values need to be calculated by interpolation in segment Cd and
not, as in the case of HLTP, 440 intermediate values. Only a maximum of 40 * (7 multiplications
+ 6 additions) = 520 operations are therefore necessary for each segment Cd to calculate
the intermediate sample values by means of interpolation. This therefore means 1560
operations for 3 segments Cd. The actual comparison of the segment A with the segments
Cd by means of the correlation technique explained above requires for each segment
Cd: 40 multiplications + 39 additions = 79 operations. That is to say, for 3 segments
Cd: 237 operations.
[0023] The total number of operations needed to determine the segment C1 and the subsequent
comparison of 3 possibly suitable segments Cd with segment A is, with the method according
to the invention, therefore 6399 + 1560 + 237 = 8197. If determined values of Dd aredivisible
by 12, this means that the associated segment Cd has already been investigated in
the first search procedure according to the LTP principle, so that this does not need
to be done again. In such a case, the number of operations needed is therefore less
than 8197.
[0024] It will be clear that, with the method according to the invention, an appreciable
simplification is obtained with respect to the HLTP principle, while the chance that
the most similar segment C is found is nevertheless appreciably greater than in the
case of the LTP principle. Even if segments Cd were to be investigated for greater
values of d than 4 in the case of, for example, other lengths of segment A and segment
B, the method according to the invention remains simpler than that according to the
HLTP principle. Once the segment Cd with the greatest similarity has been found and
d
optimum is therefore known, the Dd associated therewith can also be calculated. In the example,
the value of Dd may be situated between 1 and 120 and that of d
optimum between 1 and 4, so that a total of not more than 9 bits are necessary to transmit
these two values, which is again more efficient than in the case of HLTP.
[0025] According to a further aspect of the invention, to increase the chance further that
the most similar segment C is found, segments Cd at spacings of

are also examined, where eps = -(Ob-1), ......., -2, -1, 1, 2, ....... (Ob-1) or
a portion of these values; in practice, the values eps = -2, -1, 1, 2 are, for example,
sufficient. Even if the HLTP principle is used, the situation may arise which is shown
in Figure 1c. The segment C2 appears to show more resemblance to the segment A than
the segment C1 situated nearer the segment A. More detailed analysis shows, however,
that this latter segment is in fact the wanted segment because the fundamental regularity
P which is present in the signal and which, for example in the case of speech, is
determined by the fundamental frequency of the vocal cords, is determined by the spacing
D1 between segment A and segment C1 and not by the spacing D2 between segment A and
segment C2. This phenomenon may be due, for example, to the presence of noise.
[0026] It is important that the fundamental regularity P in the signal is found as often
as possible every time a segment C is sought because at the end where the transmitted
coded signal is decoded, this regularity, expressed in the spacing D, is again provided
in the decoded signal by the decoder. If this regularity is disturbed too often between
consecutive coded segments, this results in undesirable interferences in the decoded
signal. Said interference is a known problem in HLTP and in LTP.
[0027] In order to offer a solution for this as well, according to a further aspect of the
invention, after the segment Cd with the greatest similarity has been found with the
aid of the method described above, which is established in that the highest value
is found for that segment in calculating the correlation value Rd with the aid of
formula (1), hereinafter to be termed R
max, it is investigated whether there are segments Cd which are situated at a smaller
spacing D from the segment A and have a correlation value Rd which is greater to q
* R
max, where q < 1, for example q = 0.8. Of all the segments Cd, the correlation value
Rd of which fulfils this condition, the segment Cd which is situated nearest segment
A, that is to say the segment having the smallest value for D, is then chosen as the
most suitable segment, despite the fact that there are one or more segments with greater
similarity. This choice is based on the insight that such a segment C situated nearer
segment A is most probably the correct one because of the smaller value of D in view
of the specific properties of the (speech) signal to be coded. If none of the segments
Cd investigated fulfils said condition, the segment C1 is chosen. The method described
above for seeking the most suitable segment C, taking account of the regularity P
in the signal, is shown in a flow chart in Figure 2. It is pointed out that this principle
for determining the fundamental regularity as well as possible can also be used in
the conventional LTP and HLTP techniques. In that case it is then necessary to investigate
which correlation values Ri are greater than q * R
max, where q < 1, for example q = 0.8. Of the spacings Di, or Di * Ob respectively, associated
therewith, the smallest spacing is selected, which is denoted by D
optimum. D
optimum will never be greater than D because, after all, it is the case that R
max > R
max * q. The invention therefore also relates to a method for coding a sampled analog
signal having a repetitive nature, in which, for a signal segment to be coded consisting
of a predetermined first number of samples, a search is always made in a preceding
segment containing a predetermined second number of samples which is greater than
the first number of samples for a signal segment which agrees as well as possible
by always comparing the signal segment to be coded, in steps of one sample interval,
with a segment containing the first number of samples which forms part of the segment
containing the second number of samples, and in which the difference signal is determined
between the found, most similar segment and the segment to be coded as well as the
difference between a reference time instant in the segment to be coded and a reference
time instant in the found, most similar segment, expressed in the number of samples
D between the two time instants, characterised in that of the partial segments compared
with the segment to be coded that segment is chosen as the partial segment with the
greatest agreement which has a correlation value R with the samples of the segment
to be coded for which it is the case that R ≧ q. R
max, where q < 1 and R
max is the maximum correlation value which has been found in correlating the partial
segment from the preceding segments and the segment to be coded, and is that segment
which yields the smallest associated value for D.
[0028] Figure 3a shows a block diagram of a coding/decoding system for carrying out the
method according to the invention in the case of a speech signal comprising a coding
unit 10 and a decoding unit 30. An analog signal delivered by a microphone 11 is limited
in bandwidth by a low pass filter 12 and converted in an analog/digital convertor
into a series of sampled values which are representative of the analog signal. The
output signal of the convertor 13 is fed to the inputs of a short-term prediction
filter 14 and of a short-term analysis unit 15. These two units provide the above-mentioned
short-term prediction and the analysis unit 15 provides an output signal in the form
of short-term prediction filter coefficients, which output signal is transmitted to
the decoder 30. The structure and the operation of the filter 14 and the unit 15 are
well known to those skilled in the field of speech coding and are not of further importance
for the essence of the present invention, so that a further explanation can be omitted.
[0029] The output signal of the filter 14, which consists of a series of equidistant samples
of the analog input signal, is fed to a circuit 16 in which a pre-determined number
(40 samples in the example given above) is always split off from the incoming series
of samples, and to a long-term prediction analysis unit 17 in which a part of the
method according to the invention is carried out. Said unit 17 is shown in greater
detail in Figure 3b and comprises a unit 18 for splitting off the segment A, possibly
the output signal of unit 16 can also be used for this purpose, and also a unit 19
for splitting off the segment B. The output signals of the units 18 and 19 are fed
to a circuit 20 in which the correlation value R
c1 is calculated for the segment C1 in the manner outlined above and also the value
of D is determined. The calculated value of D is transmitted to the decoder 30 and
is also fed to a unit 21 which is designed to calculate the different values of Dd
on the basis of the pre-chosen values for d and Ob. The value of Dd and the segment
B are fed to a unit 22 for the purpose of calculating the segments Cd. The calculated
Cd's are fed to a circuit 23 which calculates with the aid of formula (1) the correlation
values R
cd for the different segments Cd on the basis of the segment A also fed to it. In a
circuit 24, the correlation values R
c1 and R
cd are compared with one another (see also Figure 2), and d
optimum is determined in the manner described above and transmitted to the decoder.
[0030] The optimum segment Cd determined in the unit 25 is subtracted sample by sample from
corresponding samples of the segment A in a subtraction unit 26 and the resultant
difference signal is quantified in a manner known per se in a unit 27 and coded in
a unit 28 in order to be transmitted to the decoding unit 30.
[0031] In the decoding unit 30, the difference signal received is decoded in a decoder 31
while the segment Cd
opt is reconstructed in a unit 32 from the received values of D and d
opt and from the previously received and reconstructed signal segment B. In an adder
33, the decoded difference signal and the segment Cd
opt are added sample by sample in order thus to reconstruct the segment A. The reconstructed
segment Aand the received short-term prediction filter coefficients are fed to an
inverse short-term prediction filter which reconstructs the transmitted signal samples
as well as possible in a manner known per se. The output signal of the filter 34 is
converted in a digital/analog convertor into an analog signal which is fed to a loudspeaker
37 via a pass filter 36.
1. Method for coding a sampled analog signal having a repetitive nature, in which, for
a signal segment to be coded consisting of a predetermined first number of samples,
a search is always made in a preceding segment containing a predetermined second number
of samples which is greater than the first number of samples for a signal segment
which is as similar as possible by always comparing the signal segment to be coded,
in steps of one sample interval, with a segment containing the first number of samples
which forms part of the segment containing the second number of samples, and in which
the difference signal is determined between the found, most similar segment and the
segment to be coded as well as the difference between a reference time instant in
the segment to be coded and a reference time instant in the found, most similar segment,
expressed in the number of samples D between the two time instants, characterised
in that the number of samples in the segment to be coded is increased by a predetermined
factor Ob by always placing (Ob - 1) samples having a value equal to 0 between two
consecutive samples, in that the number of samples in the preceding segment is also
increased by the factor Ob, in that, in the preceding segment, partial segments Cd
are determined for which it is the case that the number of samples Dd, expressed in
the numbers of samples after oversampling, between the reference time instant in the
segment to be coded and the reference time instant in apartial segment Cd fulfils:

in which d = 1, 2, 3, 4 ...n, where n is a positive integer, and Ob and n are chosen
in a manner such that Dd is always an integer, in that, in the segments Cd, sample
values are determined by an interpolation technique at predetermined positions, which
predetermined positions are situated at a spacing Dd from the original samples in
the segment to be coded before its number of samples was increased, and in that a
partial segment Cd is determined which is most similar to the segment to be coded.
2. Method according to Claim 1, characterised in that the comparison between the segment
to be coded and segments Cd is also carried out for segments for which it is the case
that

, where eps is equal to at least a portion of the values in the range eps = -(Ob-1),
...-2, -1, +1, +2, .. (Ob-1).
3. Method according to Claim 1 or 2, characterised in that, of the segments Cd, that
segment Cd is chosen as the most similar segment which has a correlation value Rd
with the samples of the segment to be coded for which it is the case that
Rd ≧ q * Rmax, where q < 1 and Rmax is the maximum correlation value which has been found in correlating the segments
Cd and the segment to be coded, and is that segment which yields the smallest associated
value of Dd.
4. Method for coding a sampled analog signal having a repetitive nature, in which, for
a signal segment to be coded consisting of a predetermined first number of samples,
a search is always made in a preceding segmentcontaining a predetermined second number
of samples which is greater than the first number of samples for a signal segment
which is as similar as possible by always comparing the signal segment to be coded,
in steps of one sample interval, with a segment containing the first number of samples
which forms part of the segment containing the second number of samples, and in which
the difference signal is determined between the found, most similar segment and the
segment to be coded as well as the difference between a reference time instant in
the partial segment to be coded and a reference time instant in the found, most similar
partial segment, expressed in the number of samples D between the two time instants,
characterised in that, of the partial segments compared with the segment to be coded,
a segment is chosen as the partial segment with the greatest agreement which has a
correlation value R with the samples of the segment to be coded for which it is the
case that Rd ≧ q * Rmax, where q < 1 and Rmax is the maximum correlation value which has been found in correlating the partial
segments from the preceding segment and the segment to be coded, and is the partial
segment which yields the smallest associated value for D.
5. Device for coding an analog signal having a repetitive nature, comprising means for
sampling the signal to be coded; means for splitting off a signal segment to be coded
containing a predetermined first number of samples; means for splitting off a preceding
signal segment containing a second number of samples,means for always comparing, in
steps of one sample interval, the sample values of the first segment with corresponding
sample values of a partial segment containing the first number of samples which forms
part of the preceding segment; means for determining the partial segment which shows
the greatest similarity to the signal segment to be coded; means for determining a
signal which is representative of the difference between the segment to be coded and
the found partial segment and means for determining the number of samples D between
a reference time instant in the segment to be coded and a reference time instant in
the found partial segment, characterised by means for oversampling the signal segment
to be coded and the preceding segment by a predetermined factor O
b; by means for determining the value

, where d = 2, 3, 4, ...n;
by means for determining for every value of d, by means of interpolation, the samples
at all the time instants which differ by Dd from the time instants associated with
the original sample values; and by means for correlating the sample values of the
segment to be coded and the sample values determined for a value of d.