Aufgaben:Exercise 2.4: Dual Code and Gray Code: Difference between revisions

From LNTwww
No edit summary
Fix interlanguage link: resolve redirect chain
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:


{{quiz-Header|Buchseite=Digitalsignalübertragung/Redundanzfreie Codierung
{{quiz-Header|Buchseite=Digital_Signal_Transmission/Redundancy-Free_Coding
}}
}}


[[File:P_ID1325__Dig_A_2_4.png|right|frame|Quaternärsignale mit Dual– und Graycodierung]]
[[File:P_ID1325__Dig_A_2_4.png|right|frame|Quaternary signals with dual and Gray coding]]
Die beiden dargestellten Signale  $s_{1}(t)$  und  $s_{2}(t)$  sind zwei unterschiedliche Realisierungen eines redundanzfreien quaternären Sendesignals, die beide vom blau gezeichneten Quellensignal  $q(t)$  abgeleitet wurden.
The two shown signals  $s_{1}(t)$  and  $s_{2}(t)$  are two different realizations of a redundancy-free quaternary transmitted signal,  both derived from the blue drawn binary source signal  $q(t)$.   


Bei einem der Sendesignale wurde der so genannte '''Dualcode''' mit der Zuordnung
For one of the transmitted signals,  the so-called  '''dual code'''  with mapping
:$$\mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0/3,\hspace{0.35cm}  
:$$\mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0/3,\hspace{0.35cm}\mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0/3, \hspace{0.35cm} \mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0$$
\mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0/3, \hspace{0.35cm} \mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0$$
was used,  for the other one a certain form of a  '''Gray code'''.  This is characterized by the fact that the binary representation of adjacent amplitude values always differ only in a single bit.
verwendet, beim anderen eine bestimmte Form eines '''Graycodes'''. Dieser zeichnet sich dadurch aus, dass sich die Binärdarstellung benachbarter Amplitudenwerte immer nur in einem einzigen Bit unterscheiden.


Bei der Lösung der Aufgabe soll von folgenden Voraussetzungen ausgegangen werden:
The solution of the exercise should be based on the following assumptions:
*Die Amplitudenstufen liegen bei  $±3\, \rm V$ und $±1 \, \rm V$.  
*The amplitude levels are  $±3\, \rm V$  and  $±1 \, \rm V$.
*Die Entscheiderschwellen liegen in der Mitte zwischen zwei benachbarten Amplitudenwerten, also bei  $–2\, \rm V$, $0\, \rm V$  und  $+2\, \rm V$.
*Der Rauscheffektivwert  $\sigma_{d}$  ist so zu wählen, dass die Verfälschungswahrscheinlichkeit vom äußeren Symbol  $(+s_0)$  zum nächstgelegenen Symbol  $(+s_{0}/3)$  genau  $p = 1\%$ beträgt.
*The decision thresholds lie in the middle between two adjacent amplitude values,  i.e. at  $–2\, \rm V$,  $0\, \rm V$  and  $+2\, \rm V$.
*Verfälschungen zu nicht benachbarten Symbolen können ausgeschlossen werden; bei Gaußschen Störungen ist diese Vereinfachung in der Praxis stets erlaubt.
 
*The noise rms value  $\sigma_{d}$  is to be chosen so that the falsification  probability from the outer symbol  $(+s_0)$  to the nearest symbol  $(+s_{0}/3)$  is exactly  $p = 1\%$.


*Falsification to non-adjacent symbols can be excluded;  in the case of Gaussian perturbations,  this simplification is always allowed in practice.




Man unterscheidet grundsätzlich zwischen
*der  ''Symbolfehlerwahrscheinlichkeit''  $p_{\rm S}$  (bezogen auf das Quaternärsignal) und
*der  ''Bitfehlerwahrscheinlichkeit''  $p_{B}$  (bezogen auf das binäre Quellensignal).


One distinguishes in principle between
*the  "symbol error probability"  $p_{\rm S}$  (related to the quaternary signal)  and
*the  "bit error probability"  $p_{B}$  (related to the binary source signal).




Line 28: Line 29:




Notes:
*The exercise is part of the chapter   [[Digital_Signal_Transmission/Grundlagen_der_codierten_Übertragung|"Basics of Coded Transmission"]].


''Hinweise:''
*Reference is also made to the chapter  [[Digital_Signal_Transmission/Redundanzfreie_Codierung|"Redundancy-Free Coding"]].
*Die Aufgabe gehört zum  Kapitel  [[Digitalsignalübertragung/Grundlagen_der_codierten_Übertragung|Grundlagen der codierten Übertragung]].
*Bezug genommen wird auch auf das Kapitel  [[Digitalsignalübertragung/Redundanzfreie_Codierung|Redundanzfreie Codierung]].
   
   
*Zur numerischen Auswertung der Q–Funktion können Sie das interaktive Applet  [[Applets:Komplementäre_Gaußsche_Fehlerfunktionen_(neues_Applet)|Komplementäre Gaußsche Fehlerfunktionen]]  benutzen.
*For numerical evaluation of the Q–function you can use the HTML5/JavaScript applet  [[Applets:Komplementäre_Gaußsche_Fehlerfunktionen|"Complementary Gaussian Error Functions"]].




===Fragebogen===
===Questions===


<quiz display=simple>
<quiz display=simple>


{Welches der Signale &nbsp;$s_{1}(t)$&nbsp; bzw. &nbsp;$s_{2}(t)$&nbsp; verwendet eine '''Graycodierung'''?
{Which of the signals &nbsp;$s_{1}(t)$&nbsp; or &nbsp;$s_{2}(t)$&nbsp; uses&nbsp; '''Gray coding'''?
|type="()"}
|type="[]"}
+$s_{1}(t)$&nbsp; verwendet eine Graycodierung.
+$s_{1}(t)$&nbsp; uses Gray coding.
-$s_{2}(t)$&nbsp; verwendet eine Graycodierung.
-$s_{2}(t)$&nbsp; uses Gray coding.


{Bestimmen Sie den Rauscheffektivwert aus der angegebenen Bedingung.
{Determine the noise rms value from the given condition.
|type="{}"}
|type="{}"}
$\sigma_{d} \ = \ $ { 0.43 3% } $\ \rm V$
$\sigma_{d} \ = \ $ { 0.43 3% } $\ \rm V$


{Welche Symbolfehlerwahrscheinlichkeit ergibt sich mit dem '''Graycode'''?
{What is the symbol error probability using the&nbsp; '''Gray code'''?
|type="{}"}
|type="{}"}
$p_{\rm S} \ = \ $ { 1.5 3% } $\ \%$
$p_{\rm S} \ = \ $ { 1.5 3% } $\ \%$


{Welche Bitfehlerwahrscheinlichkeit ergibt sich mit dem Graycode?
{What is the bit error probability with the Gray code?
|type="{}"}
|type="{}"}
$p_{\rm B} \ = \ $ { 0.75 3% } $\ \%$
$p_{\rm B} \ = \ $ { 0.75 3% } $\ \%$


{Welche Symbolfehlerwahrscheinlichkeit ergibt sich mit dem '''Dualcode'''?
{What is the symbol error probability with the&nbsp; '''dual code'''?
|type="{}"}
|type="{}"}
$p_{\rm S} \ = \ $ { 1.5 3% } $\ \%$
$p_{\rm S} \ = \ $ { 1.5 3% } $\ \%$


{Welche Bitfehlerwahrscheinlichkeit ergibt sich mit dem Dualcode?
{What is the bit error probability with the dual code?
|type="{}"}
|type="{}"}
$p_{\rm B} \ = \ $ { 1 3% } $\ \%$
$p_{\rm B} \ = \ $ { 1 3% } $\ \%$
Line 67: Line 68:
</quiz>
</quiz>


===Musterlösung===
===Solution===
{{ML-Kopf}}
{{ML-Kopf}}
'''(1)'''&nbsp; Im Signal $s_{2}(t)$ erkennt man die Realisierung des vorne angegebenen Dualcodes. Dagegen wurde beim Signal $s_{2}(t)$ ein Graycode $\Rightarrow$ <u>Lösungsvorschlag 1</u> mit folgender Zuordnung verwendet:
'''(1)'''&nbsp; In the signal&nbsp; $s_{2}(t)$&nbsp; one recognizes the realization of the dual code indicated at the beginning.&nbsp; On the other hand,&nbsp; in the signal&nbsp; $s_{2}(t)$&nbsp; a Gray code &nbsp; $\Rightarrow$ &nbsp; <u>solution 1</u> with the following mapping was used:
:$$\mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1, \hspace{0.35cm} \mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1/3, \hspace{0.35cm} \mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1/3, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1 \hspace{0.05cm}.$$
:$$\mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1, \hspace{0.35cm} \mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1/3, \hspace{0.35cm} \mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1/3, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1 \hspace{0.05cm}.$$


'''(2)'''&nbsp; Die Wahrscheinlichkeit $p$, dass der Amplitudenwert $3 \, \rm V$ aufgrund des gaußverteilten Rauschens mit der Streuung $\sigma_{d}$ die benachbarte Entscheiderschwelle $2\,  \rm V$ unterschreitet, soll $1\,  \%$ betragen. Daraus folgt:
 
'''(2)'''&nbsp; Let the probability&nbsp; $p$&nbsp; that the amplitude value&nbsp; $3 \, \rm V$&nbsp; falls below the adjacent decision threshold&nbsp; $2\,  \rm V$&nbsp; due to the Gaussian distributed noise with standard deviation&nbsp; $\sigma_{d}$&nbsp; be $1\,  \%$.&nbsp; It follows that:
:$$ p = {\rm Q} \left ( \frac{3\,{\rm V} - 2\,{\rm V}} { \sigma_d}\right ) = 1 \%\hspace{0.3cm}\Rightarrow \hspace{0.3cm} {1\,{\rm V} }/ { \sigma_d} \approx 2.33 \hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \sigma_d}\hspace{0.15cm}\underline {\approx 0.43\,{\rm V}}\hspace{0.05cm}.$$
:$$ p = {\rm Q} \left ( \frac{3\,{\rm V} - 2\,{\rm V}} { \sigma_d}\right ) = 1 \%\hspace{0.3cm}\Rightarrow \hspace{0.3cm} {1\,{\rm V} }/ { \sigma_d} \approx 2.33 \hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \sigma_d}\hspace{0.15cm}\underline {\approx 0.43\,{\rm V}}\hspace{0.05cm}.$$


'''(3)'''&nbsp;  Die beiden äußeren Symbole werden jeweils mit der Wahrscheinlichkeit $p$ verfälscht, die beiden inneren mit der doppelten Wahrscheinlichkeit $(2p)$. Durch Mittelung unter Berücksichtigung gleicher Symbolauftrittswahrscheinlichkeiten erhält man
 
'''(3)'''&nbsp;  The two outer symbols are each falsified with probability&nbsp; $p$,&nbsp; the two inner symbols with double probability&nbsp; $(2p)$.&nbsp; By averaging considering equal symbol occurrence probabilities,&nbsp; we obtain
:$$p_{\rm S} = 1.5 \cdot p \hspace{0.15cm}\underline { = 1.5 \,\%} \hspace{0.05cm}.$$
:$$p_{\rm S} = 1.5 \cdot p \hspace{0.15cm}\underline { = 1.5 \,\%} \hspace{0.05cm}.$$


'''(4)'''&nbsp; Jeder Symbolfehler führt genau zu einem Bitfehler. Da jedoch jedes Quaternärsymbol genau zwei Binärsymbole beinhaltet, ergibt sich für die Bitfehlerwahrscheinlichkeit:
 
'''(4)'''&nbsp; Each symbol error results in exactly one bit error.&nbsp; However,&nbsp; since each quaternary symbol contains exactly two binary symbols,&nbsp; the bit error probability is obtained:
:$$p_{\rm B} = {p_{\rm S}}/ { 2}\hspace{0.15cm}\underline { = 0.75 \,\%} \hspace{0.05cm}.$$
:$$p_{\rm B} = {p_{\rm S}}/ { 2}\hspace{0.15cm}\underline { = 0.75 \,\%} \hspace{0.05cm}.$$


'''(5)'''&nbsp; Bei der Berechnung der Symbolfehlerwahrscheinlichkeit $p_{\rm S}$ wird das verwendete Mapping nicht berücksichtigt. Wie in der Teilaufgabe (3) erhält man somit $p_{\rm S} \hspace{0.15cm}\underline{ = 1.5 \, \%}$.


'''(6)'''&nbsp; Die beiden äußeren Symbole werden mit $p$ verfälscht und führen auch beim Dualcode jeweils nur zu einem Bitfehler. Die inneren Symbole werden mit $2p$ verfälscht und führen nun im Mittel zu $1.5$ Bitfehlern. Unter Berücksichtigung des Faktors $2$ im Nenner siehe Teilaufgabe (2) – erhält man somit für die Bitfehlerwahrscheinlichkeit des Dualcodes:
'''(5)'''&nbsp; When calculating the symbol error probability&nbsp; $p_{\rm S}$,&nbsp; the mapping used is not taken into account.&nbsp; As in subtask&nbsp; '''(3)''',&nbsp; we obtain&nbsp;  $p_{\rm S} \hspace{0.15cm}\underline{ = 1.5 \, \%}$.
 
 
'''(6)'''&nbsp; The two outer symbols are falsified with&nbsp; $p$&nbsp; and lead to only one bit error each even with dual code.
* The inner symbols are falsified with&nbsp; $2p$&nbsp; and now lead to&nbsp; $1.5$&nbsp; bit errors on average.
*Taking into account the factor&nbsp; $2$&nbsp; in the denominator see subtask&nbsp; '''(2)'''&nbsp; we thus obtain for the bit error probability of the dual code:
:$$p_{\rm B} = \frac{1} { 4} \cdot \frac{p + 2p \cdot 1.5 + 2p \cdot 1.5 + p} { 2} = p \hspace{0.15cm}\underline { = 1 \,\%} \hspace{0.05cm}.$$
:$$p_{\rm B} = \frac{1} { 4} \cdot \frac{p + 2p \cdot 1.5 + 2p \cdot 1.5 + p} { 2} = p \hspace{0.15cm}\underline { = 1 \,\%} \hspace{0.05cm}.$$


Line 90: Line 98:




[[Category:Aufgaben zu Digitalsignalübertragung|^2.2 Redundanzfreie Codierung^]]
[[Category:Digital Signal Transmission: Exercises|^2.2 Redundancy-Free Coding^]]
[[de:Aufgaben:Aufgabe 2.4: Dualcodierung und Graycodierung]]

Latest revision as of 17:55, 16 March 2026

Quaternary signals with dual and Gray coding

The two shown signals  $s_{1}(t)$  and  $s_{2}(t)$  are two different realizations of a redundancy-free quaternary transmitted signal,  both derived from the blue drawn binary source signal  $q(t)$. 

For one of the transmitted signals,  the so-called  dual code  with mapping

$$\mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -s_0/3,\hspace{0.35cm}\mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0/3, \hspace{0.35cm} \mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +s_0$$

was used,  for the other one a certain form of a  Gray code.  This is characterized by the fact that the binary representation of adjacent amplitude values always differ only in a single bit.

The solution of the exercise should be based on the following assumptions:

  • The amplitude levels are  $±3\, \rm V$  and  $±1 \, \rm V$.
  • The decision thresholds lie in the middle between two adjacent amplitude values,  i.e. at  $–2\, \rm V$,  $0\, \rm V$  and  $+2\, \rm V$.
  • The noise rms value  $\sigma_{d}$  is to be chosen so that the falsification probability from the outer symbol  $(+s_0)$  to the nearest symbol  $(+s_{0}/3)$  is exactly  $p = 1\%$.
  • Falsification to non-adjacent symbols can be excluded;  in the case of Gaussian perturbations,  this simplification is always allowed in practice.


One distinguishes in principle between

  • the  "symbol error probability"  $p_{\rm S}$  (related to the quaternary signal)  and
  • the  "bit error probability"  $p_{B}$  (related to the binary source signal).



Notes:


Questions

1 Which of the signals  $s_{1}(t)$  or  $s_{2}(t)$  uses  Gray coding?

$s_{1}(t)$  uses Gray coding.
$s_{2}(t)$  uses Gray coding.

2 Determine the noise rms value from the given condition.

$\sigma_{d} \ = \ $ $\ \rm V$

3 What is the symbol error probability using the  Gray code?

$p_{\rm S} \ = \ $ $\ \%$

4 What is the bit error probability with the Gray code?

$p_{\rm B} \ = \ $ $\ \%$

5 What is the symbol error probability with the  dual code?

$p_{\rm S} \ = \ $ $\ \%$

6 What is the bit error probability with the dual code?

$p_{\rm B} \ = \ $ $\ \%$


Solution

(1)  In the signal  $s_{2}(t)$  one recognizes the realization of the dual code indicated at the beginning.  On the other hand,  in the signal  $s_{2}(t)$  a Gray code   $\Rightarrow$   solution 1 with the following mapping was used:

$$\mathbf{HH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1, \hspace{0.35cm} \mathbf{HL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} -1/3, \hspace{0.35cm} \mathbf{LL}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1/3, \hspace{0.35cm} \mathbf{LH}\hspace{0.1cm}\Leftrightarrow \hspace{0.1cm} +1 \hspace{0.05cm}.$$


(2)  Let the probability  $p$  that the amplitude value  $3 \, \rm V$  falls below the adjacent decision threshold  $2\, \rm V$  due to the Gaussian distributed noise with standard deviation  $\sigma_{d}$  be $1\, \%$.  It follows that:

$$ p = {\rm Q} \left ( \frac{3\,{\rm V} - 2\,{\rm V}} { \sigma_d}\right ) = 1 \%\hspace{0.3cm}\Rightarrow \hspace{0.3cm} {1\,{\rm V} }/ { \sigma_d} \approx 2.33 \hspace{0.3cm}\Rightarrow \hspace{0.3cm} { \sigma_d}\hspace{0.15cm}\underline {\approx 0.43\,{\rm V}}\hspace{0.05cm}.$$


(3)  The two outer symbols are each falsified with probability  $p$,  the two inner symbols with double probability  $(2p)$.  By averaging considering equal symbol occurrence probabilities,  we obtain

$$p_{\rm S} = 1.5 \cdot p \hspace{0.15cm}\underline { = 1.5 \,\%} \hspace{0.05cm}.$$


(4)  Each symbol error results in exactly one bit error.  However,  since each quaternary symbol contains exactly two binary symbols,  the bit error probability is obtained:

$$p_{\rm B} = {p_{\rm S}}/ { 2}\hspace{0.15cm}\underline { = 0.75 \,\%} \hspace{0.05cm}.$$


(5)  When calculating the symbol error probability  $p_{\rm S}$,  the mapping used is not taken into account.  As in subtask  (3),  we obtain  $p_{\rm S} \hspace{0.15cm}\underline{ = 1.5 \, \%}$.


(6)  The two outer symbols are falsified with  $p$  and lead to only one bit error each even with dual code.

  • The inner symbols are falsified with  $2p$  and now lead to  $1.5$  bit errors on average.
  • Taking into account the factor  $2$  in the denominator – see subtask  (2)  – we thus obtain for the bit error probability of the dual code:
$$p_{\rm B} = \frac{1} { 4} \cdot \frac{p + 2p \cdot 1.5 + 2p \cdot 1.5 + p} { 2} = p \hspace{0.15cm}\underline { = 1 \,\%} \hspace{0.05cm}.$$