Difference between revisions of "Aufgaben:Exercise 3.5: GSM Full Rate Vocoder"

From LNTwww
m (Text replacement - "Category:Aufgaben zu Beispiele von Nachrichtensystemen" to "Category:Examples of Communication Systems: Exercises")
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Beispiele von Nachrichtensystemen/Sprachcodierung
+
{{quiz-Header|Buchseite=Examples_of_Communication_Systems/Voice_Coding
 
}}  
 
}}  
  
[[File:P_ID1232__Bei_A_3_5.png|right|frame|LPC–, LTP– und RPE–Parameter beim GSM–Vollraten–Codec]]
+
[[File:EN_Mob_A_3_4_Z.png|right|frame|LPC, LTP and RPE parameters in the GSM Full Rate Vocoder]]
Dieser 1991 für das GSM–System standardisierte Codec – dieses Kunstwort steht für eine gemeinsame Realisierung von Coder und Decoder – mit der englischen Bezeichnung  $\text{GSM Fullrate  Vocoder}$  kombiniert drei verschiedene Methoden der Sprachsignalkompression:
+
This codec called  "GSM Full Rate Vocoder"  (which was standardized for the GSM system in 1991)  stands for a joint realization of encoder and decoder and combines three methods for the compression of speech signals:
*Linear Predictive Coding (LPC),
+
*Linear Predictive Coding  $\rm (LPC)$,
*Long Term Prediction (LTP) und
 
*Regular Pulse Excitation (RPE).
 
  
 +
*Long Term Prediction  $\rm (LTP)$,  and
  
Die in der Grafik angegebenen Zahlen geben die Anzahl der Bit an, die von den drei Einheiten dieses Sprachcodecs pro Rahmen von  $20 \ \rm ms$  Dauer generiert werden. Anzumerken ist dabei, dass LTP und RPE nicht rahmenweise, sondern mit Unterblöcken von  $5 \ \rm ms$  arbeiten. Dies hat jedoch keinen Einfluss auf die Lösung der Aufgabe.
+
*Regular Pulse Excitation  $\rm (RPE)$.
  
Das Eingangssignal in der Grafik ist das digitalisierte Sprachsignal  $s_{\rm R}(n)$. Es entsteht aus dem analogen Sprachsignal  $s(t)$  durch
 
*eine geeignete Begrenzung auf die Bandbreite  $B$,
 
*Abtastung mit der Abtastrate  $f_{\rm A} = 8 \ \rm kHz$,
 
*Quantisierung mit  $13$  Bit und
 
*anschließender Segmentierung in Blöcke zu je  $20 \ \rm ms$.
 
  
 +
The numbers shown in the graphic indicate the number of bits generated by the three units of this full rate speech codec per frame of  $20$  millisecond duration each.
  
Auf die weiteren Aufgaben der Vorverarbeitung soll hier nicht näher eingegangen werden.
+
It should be noted that LTP and RPE,  unlike LPC,  do not work frame by frame,  but with sub-blocks of  $5$  milliseconds.  However,  this has no influence on solving the exercise.
  
 +
The input signal in the above graphic is the digitalized speech signal   $s_{\rm block}(n)$.  This results from the analog speech signal  $s(t)$  by
 +
*a suitable limitation to the bandwidth  $B$,
  
 +
*sampling at the sampling rate  $f_{\rm A} = 8 \ \rm kHz$,
  
 +
*quantization with  $13 \ \rm bits$,
  
 +
*following segmentation into blocks of each $20 \ \rm ms$.
  
  
 +
The further tasks of preprocessing will not be discussed in detail here.
  
''Hinweis:''
 
  
*Diese Aufgabe gehört zum Kapitel  [[Examples_of_Communication_Systems/Sprachcodierung|Sprachcodierung]].
+
 
 +
<u>Hint:</u> &nbsp; This exercise belongs to the chapter&nbsp; [[Examples_of_Communication_Systems/Voice_Coding|"Speech Coding"]].
 
   
 
   
  
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
  
{Auf welche Bandbreite muss das Sprachsignal begrenzt werden?
+
{To what bandwidth must the speech signal be limited?
 
|type="{}"}
 
|type="{}"}
 
$B \ = \ $ { 4 3% } $ \ \rm kHz$
 
$B \ = \ $ { 4 3% } $ \ \rm kHz$
  
{Aus wievielen Abtastwerten&nbsp; $(N_{\rm R})$&nbsp; besteht ein Sprachrahmen? Wie groß ist die Eingangsdatenrate&nbsp; $R_{\rm In}$?
+
{How many samples&nbsp; $(N_{\rm block})$&nbsp; does a speech lock consist of?&nbsp; What is the input data rate&nbsp; $R_{\rm in}$?
 
|type="{}"}
 
|type="{}"}
$N_{\rm R} \hspace{0.25cm} = \ $ { 160 3% }  
+
$N_{\rm block} \hspace{0.25cm} = \ $ { 160 3% }  
$R_{\rm In} \hspace{0.22cm} = \ $ { 104 3% } $\ \rm kbit/s$
+
$R_{\rm in} \hspace{0.22cm} = \ $ { 104 3% } $\ \rm kbit/s$
  
{Wie groß ist die Ausgangsdatenrate&nbsp; $R_{\rm Out}$&nbsp; des GSM-Vollraten-Codecs?
+
{What is the output data rate&nbsp; $R_{\rm out}$&nbsp; of the GSM full rate codec?
 
|type="{}"}
 
|type="{}"}
$R_{\rm Out} \hspace{0.09cm} = \ $ { 13 3% } $ \ \rm kbit/s$
+
$R_{\rm out} \hspace{0.09cm} = \ $ { 13 3% } $ \ \rm kbit/s$
  
  
{Welche Aussagen treffen hinsichtlich des Blocks „LPC” zu?
+
{Which statements are true regarding the block&nbsp; "LPC"?
 
|type="[]"}
 
|type="[]"}
+ LPC macht eine Kurzzeitprädiktion über eine Millisekunde.
+
+ LPC makes a short-term prediction over one millisecond.
+ Die&nbsp; $36$&nbsp; LPC–Bits sind Filterkoeffizienten, die beim Empfänger genutzt werden, um die LPC–Filterung rückgängig zu machen.
+
+ The&nbsp; $36$&nbsp; LPC bits are filter coefficients used at the receiver to undo the LPC filtering.
- Das Filter zur Langzeitprädiktion ist rekursiv.
+
- The filter for long-term prediction is recursive.
- Der LPC–Ausgang ist identisch mit seinem Eingang&nbsp; $s_{\rm R}(t)$.
+
- The LPC output is identical to its input&nbsp; $s_{\rm block}(t)$.
  
{Welche Aussagen sind hinsichtlich des Blocks „LTP” zutreffend?
+
{Which statements are true regarding the block "LTP"?
 
|type="[]"}
 
|type="[]"}
+ Es werden periodische Strukturen des Sprachsignals entfernt.
+
+ Periodic structures of the speech signal are removed.
- Die Langzeitprädiktion wird pro Rahmen einmal durchgeführt.
+
- Long-term prediction is performed once per block.
+ Das Gedächtnis des LTP–Prädiktors beträgt bis zu&nbsp; $15 \ \rm ms$.
+
+ The memory of the LTP predictor is up to&nbsp; $15 \ \rm ms$.
  
{Welche Aussagen treffen für den Block „RPE” zu?
+
{Which statements are true for the block "RPE"?
 
|type="[]"}
 
|type="[]"}
- RPE liefert weniger Informationen als LPC und LTP.
+
- RPE provides less information than LPC and LTP.
+ RPE entfernt für den subjektiven Eindruck unwichtige Anteile.
+
+ RPE removes parts that are unimportant for the subjective impression.
+ RPE unterteilt jeden Subblock nochmals in vier Teilfolgen.
+
+ RPE divides each subblock again into four sub-sequences.
- RPE wählt davon die Teilfolge mit der minimalen Energie aus.
+
- RPE selects the subsequence with the minimum energy.
  
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
  
'''(1)'''&nbsp; Um das Abtasttheorem zu erfüllen, darf die Bandbreite nicht größer als $f_{\rm A}/2 \hspace{0.15cm} \underline{= 4 \ \rm kHz}$ sein.
+
'''(1)'''&nbsp; To satisfy the sampling theorem,&nbsp; the bandwidth must not exceed&nbsp; $f_{\rm A}/2 \hspace{0.15cm} \underline{= 4 \ \rm kHz}$.
 +
 
 +
 
 +
'''(2)'''&nbsp; From the given sampling rate&nbsp; $f_{\rm A} = 8 \ \rm kHz$ &nbsp; results a distance between individual samples of&nbsp; $T_{\rm A} = 0.125 \ \rm ms$.
 +
*Thus,&nbsp; a speech block $(20 \ \rm ms)$ consists of $N_{\rm block} = 20/0.125\hspace{0.15cm} \underline{= 160 \ \rm samples}$,&nbsp; each quantized with&nbsp; $13 \ \rm bits$.
 +
 +
*The data rate&nbsp; is thus
 +
:$$R_{\rm in} = \frac{160 \cdot 13}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 104\,{\rm kbit/s}}\hspace{0.05cm}.$$
 +
 
 +
 
 +
'''(3)'''&nbsp; From the graph,&nbsp; it can be seen that&nbsp; $36$&nbsp; (LPC)&nbsp; $+\ 36$&nbsp; (LTP) $+\ 188$&nbsp; (RPE)&nbsp; $= 260 \ \rm bits$&nbsp; are output per speech block.
 +
*From this,&nbsp; the output data rate is calculated to be
 +
:$$R_{\rm out} = \frac{260}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 13\,{\rm kbit/s}}\hspace{0.05cm}.$$
 +
 
 +
*The compression factor achieved by the full rate speech codec is thus&nbsp; $104/13 = 8$.
  
  
'''(2)'''&nbsp; Aus der gegebenen Abtastrate $f_{\rm A} = 8 \ \rm kHz$ ergibt sich ein Abstand zwischen einzelnen Samples von $T_{\rm A} = 0.125 \ \rm ms$.
 
*Somit besteht ein Sprachrahmen $(20 \ \rm ms)$ aus $N_{\rm R} = 20/0.125\hspace{0.15cm} \underline{= 160 \ \rm Abtastwerten}$, jeweils quantisiert mit $13 \ \rm Bit$.
 
*Die Datenrate beträgt somit
 
:$$R_{\rm In} = \frac{160 \cdot 13}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 104\,{\rm kbit/s}}\hspace{0.05cm}.$$
 
  
 +
'''(4)'''&nbsp; Correct are the&nbsp; <u>statements 1 and 2</u>:
 +
*The&nbsp; $36$&nbsp; LPC bits describe a total of eight filter coefficients of a non-recursive filter,&nbsp; where eight ACF values are determined from the short-time analysis.
  
'''(3)'''&nbsp;   Aus der Grafik ist ersichtlich, dass pro Sprachrahmen $36$ (LPC) $+ 36$ (LTP) $+ 188$ (RPE) $= 260 \ \rm Bit$ ausgegeben werden.  
+
*These are converted into reflection coefficients&nbsp; $r_{k}$&nbsp; according to the so-called&nbsp; "Schur recursion".
*Daraus berechnet sich die Ausgangsdatenrate zu
+
:$$R_{\rm Out} = \frac{260}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 13\,{\rm kbit/s}}\hspace{0.05cm}.$$
+
*From these,&nbsp; the eight LAR coefficients are calculated according to the function&nbsp; ${\rm ln}[(1 - r_{k})/(1 + r_{k})]$,&nbsp; quantized with a different number of bits and passed on to the receiver.
*Der vom Vollraten–Sprachcodec erzielte Kompressionsfaktor ist somit $104/13 = 8$.
 
  
 +
*The LPC output signal has a significantly smaller amplitude compared to its input&nbsp; $s_{\rm block}(n)$,&nbsp; has a significantly reduced dynamic range and a flatter spectrum.
  
  
'''(4)'''&nbsp; Richtig sind die <u>Aussagen 1 und 2</u>:
 
*Die $36$ LPC–Bits beschreiben insgesamt acht Filterkoeffizienten eines nichtrekursiven Filters, wobei aus der Kurzzeitanalyse acht AKF–Werte ermittelt und diese nach der so genannten Schur-Rekursion in Reflexionsfaktoren $r_{k}$ umgerechnet werden.
 
*Aus diesen werden die acht LAR–Koeffizienten entsprechend der Funktion ${\rm ln}[(1 – r_{k})/(1 + r_{k})]$ berechnet, mit einer unterschiedlichen Anzahl von Bits quantisiert und an den Empfänger weitergereicht.
 
*Das LPC–Ausgangssignal besitzt gegenüber seinem Eingang $s_{\rm R}(n)$ eine deutlich kleinere Amplitude, hat einen deutlich reduzierten Dynamikumfang und ein flacheres Spektrum.
 
  
 +
'''(5)'''&nbsp; Correct are the&nbsp;  <u>statements 1 and 3</u>,&nbsp; but not the second:
 +
*The LTP analysis and filtering is done in blocks every $5 \rm ms \ (40 \rm samples)$,&nbsp; i.e.&nbsp; four times per speech block.
 +
 +
*To do this,&nbsp; the cross-correlation function (CCF) is formed between the current and the three preceding sub-blocks.
 +
 +
*For each sub-block,&nbsp; an LTP delay and an LTP gain are determined that best fit the sub-block.
 +
 +
*A correction signal of the subsequent component&nbsp; "RPE"&nbsp; is also taken into account.
 +
 +
*In the case of long-term prediction,&nbsp; as with LPC,&nbsp; the output is redundancy-reduced compared to the input.
  
  
'''(5)'''&nbsp; Richtig sind die <u>Aussagen 1 und 3</u>, nicht jedoch die zweite:
 
*Die LTP–Analyse und –Filterung erfolgt blockweise alle $5 \rm ms \ (40 \ \rm Abtastwerte)$, also viermal pro Sprachrahmen.
 
*Man bildet hierzu die Kreuzkorrelationsfunktion (KKF) zwischen dem aktuellen und den drei vorangegangenen Subblöcken.
 
*Für jeden Subblock werden dabei eine LTP–Verzögerung und eine LTP–Verstärkung ermittelt, die am besten zum Subblock passen.
 
*Berücksichtigt wird hierbei auch ein Korrektursignal der anschließenden Komponente „RPE”.
 
*Bei der Langzeitprädiktion ist wie bei der LPC der Ausgang gegenüber dem Eingang redundanzvermindert.
 
  
 +
'''(6)'''&nbsp; Correct are the&nbsp; <u>statements 2 and 3</u>:
 +
*That statement 1 is false can already be seen from the graph on the statements page,&nbsp; since $188$&nbsp; of the&nbsp; $260$&nbsp; output bits come from the RPE.
  
 +
*To the last statement:&nbsp; The RPE searches for the sub-sequence with the maximum energy.
  
'''(6)'''&nbsp; Richtig sind die <u>Aussagen 2 und 3</u>:
+
*This parameter&nbsp; "RPE pulses"&nbsp; alone occupies&nbsp; $188$&nbsp; of the&nbsp; $260$&nbsp; output bits.  
*Dass die Aussage 1 falsch ist, erkennt man schon aus der Grafik auf der Angabenseite, da $188$ der $260$ Ausgabebits von der RPE stammen.
 
*Zur letzten Aussage:&nbsp; Die RPE sucht die Teilfolge mit der maximalen Energie.
 
*Dieser Parameter „RPE–Pulse” belegt allein $156$ der $260$ Ausgabebit.  
 
  
 
{{ML-Fuß}}
 
{{ML-Fuß}}
Line 118: Line 131:
  
  
[[Category:Examples of Communication Systems: Exercises|^3.3 Sprachcodierung^]]
+
[[Category:Examples of Communication Systems: Exercises|^3.3 Speech Coding^]]

Latest revision as of 11:39, 25 January 2023

LPC, LTP and RPE parameters in the GSM Full Rate Vocoder

This codec called  "GSM Full Rate Vocoder"  (which was standardized for the GSM system in 1991)  stands for a joint realization of encoder and decoder and combines three methods for the compression of speech signals:

  • Linear Predictive Coding  $\rm (LPC)$,
  • Long Term Prediction  $\rm (LTP)$,  and
  • Regular Pulse Excitation  $\rm (RPE)$.


The numbers shown in the graphic indicate the number of bits generated by the three units of this full rate speech codec per frame of  $20$  millisecond duration each.

It should be noted that LTP and RPE,  unlike LPC,  do not work frame by frame,  but with sub-blocks of  $5$  milliseconds.  However,  this has no influence on solving the exercise.

The input signal in the above graphic is the digitalized speech signal  $s_{\rm block}(n)$.  This results from the analog speech signal  $s(t)$  by

  • a suitable limitation to the bandwidth  $B$,
  • sampling at the sampling rate  $f_{\rm A} = 8 \ \rm kHz$,
  • quantization with  $13 \ \rm bits$,
  • following segmentation into blocks of each $20 \ \rm ms$.


The further tasks of preprocessing will not be discussed in detail here.


Hint:   This exercise belongs to the chapter  "Speech Coding".



Questions

1

To what bandwidth must the speech signal be limited?

$B \ = \ $

$ \ \rm kHz$

2

How many samples  $(N_{\rm block})$  does a speech lock consist of?  What is the input data rate  $R_{\rm in}$?

$N_{\rm block} \hspace{0.25cm} = \ $

$R_{\rm in} \hspace{0.22cm} = \ $

$\ \rm kbit/s$

3

What is the output data rate  $R_{\rm out}$  of the GSM full rate codec?

$R_{\rm out} \hspace{0.09cm} = \ $

$ \ \rm kbit/s$

4

Which statements are true regarding the block  "LPC"?

LPC makes a short-term prediction over one millisecond.
The  $36$  LPC bits are filter coefficients used at the receiver to undo the LPC filtering.
The filter for long-term prediction is recursive.
The LPC output is identical to its input  $s_{\rm block}(t)$.

5

Which statements are true regarding the block "LTP"?

Periodic structures of the speech signal are removed.
Long-term prediction is performed once per block.
The memory of the LTP predictor is up to  $15 \ \rm ms$.

6

Which statements are true for the block "RPE"?

RPE provides less information than LPC and LTP.
RPE removes parts that are unimportant for the subjective impression.
RPE divides each subblock again into four sub-sequences.
RPE selects the subsequence with the minimum energy.


Solution

(1)  To satisfy the sampling theorem,  the bandwidth must not exceed  $f_{\rm A}/2 \hspace{0.15cm} \underline{= 4 \ \rm kHz}$.


(2)  From the given sampling rate  $f_{\rm A} = 8 \ \rm kHz$   results a distance between individual samples of  $T_{\rm A} = 0.125 \ \rm ms$.

  • Thus,  a speech block $(20 \ \rm ms)$ consists of $N_{\rm block} = 20/0.125\hspace{0.15cm} \underline{= 160 \ \rm samples}$,  each quantized with  $13 \ \rm bits$.
  • The data rate  is thus
$$R_{\rm in} = \frac{160 \cdot 13}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 104\,{\rm kbit/s}}\hspace{0.05cm}.$$


(3)  From the graph,  it can be seen that  $36$  (LPC)  $+\ 36$  (LTP) $+\ 188$  (RPE)  $= 260 \ \rm bits$  are output per speech block.

  • From this,  the output data rate is calculated to be
$$R_{\rm out} = \frac{260}{20 \,{\rm ms}} \hspace{0.15cm} \underline {= 13\,{\rm kbit/s}}\hspace{0.05cm}.$$
  • The compression factor achieved by the full rate speech codec is thus  $104/13 = 8$.


(4)  Correct are the  statements 1 and 2:

  • The  $36$  LPC bits describe a total of eight filter coefficients of a non-recursive filter,  where eight ACF values are determined from the short-time analysis.
  • These are converted into reflection coefficients  $r_{k}$  according to the so-called  "Schur recursion".
  • From these,  the eight LAR coefficients are calculated according to the function  ${\rm ln}[(1 - r_{k})/(1 + r_{k})]$,  quantized with a different number of bits and passed on to the receiver.
  • The LPC output signal has a significantly smaller amplitude compared to its input  $s_{\rm block}(n)$,  has a significantly reduced dynamic range and a flatter spectrum.


(5)  Correct are the  statements 1 and 3,  but not the second:

  • The LTP analysis and filtering is done in blocks every $5 \rm ms \ (40 \rm samples)$,  i.e.  four times per speech block.
  • To do this,  the cross-correlation function (CCF) is formed between the current and the three preceding sub-blocks.
  • For each sub-block,  an LTP delay and an LTP gain are determined that best fit the sub-block.
  • A correction signal of the subsequent component  "RPE"  is also taken into account.
  • In the case of long-term prediction,  as with LPC,  the output is redundancy-reduced compared to the input.


(6)  Correct are the  statements 2 and 3:

  • That statement 1 is false can already be seen from the graph on the statements page,  since $188$  of the  $260$  output bits come from the RPE.
  • To the last statement:  The RPE searches for the sub-sequence with the maximum energy.
  • This parameter  "RPE pulses"  alone occupies  $188$  of the  $260$  output bits.