Difference between revisions of "Exercise 2.6Z: PN Generator of Length 3"

From LNTwww
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Stochastische Signaltheorie/Erzeugung von diskreten Zufallsgrößen
+
{{quiz-Header|Buchseite=Theory_of_Stochastic_Signals/Generation_of_Discrete_Random_Variables
 
}}
 
}}
  
[[File:P_ID106__Sto_Z_2_6.png|right|PN-Generator der Länge 3]]
+
[[File:P_ID106__Sto_Z_2_6.png|right|frame|PN generator with  $L = 3$]]
Nebenstehende Skizze zeigt einen PN-Generator der Länge $L = 3$ mit dem Generatorpolynom
+
The adjacent sketch shows a PN generator of length  $L = 3$  with generator polynomial
 
:$$G( D) = D^{\rm 3} + D^{\rm 2} + \rm 1$$
 
:$$G( D) = D^{\rm 3} + D^{\rm 2} + \rm 1$$
  
und somit der Oktalkennung ($g_3 \ g_2 \ g_1 \ g_0$) = $(1 \ 1 \ 0 \ 1)_{\rm bin} = (15)_{\rm oct}$.  
+
and thus the octal identifier  $(g_3 \ g_2 \ g_1 \ g_0)$ = $(1 \ 1 \ 0 \ 1)_{\rm bin} = (15)_{\rm oct}$.  
  
Das zugehörige reziproke Polynom
+
The corresponding reciprocal polynomial
$$G_{\rm R}(D) = D^{\rm 3} ( D^{\rm -3} + D^{\rm -2} + 1) = D^{\rm 3} + D^{\rm 1} + \rm 1$$
+
:$$G_{\rm R}(D) = D^{\rm 3}\cdot ( D^{\rm -3} + D^{\rm -2} + 1) = D^{\rm 3} + D^{\rm 1} + \rm 1$$
  
hat die Oktalkennung $(1 \ 0 \ 1 \ 1)_{\rm bin} = (13)_{\rm oct}$.
+
has the octal identifier  $(1 \ 0 \ 1 \ 1)_{\rm bin} = (13)_{\rm oct}$.
  
*Zum Startzeitpunkt seien die drei Speicherzellen mit den Binärwerten $1$, $0$ und $1$ vorbelegt.
+
*At start time,  let the three memory cells be preallocated with the binary values  $1$,  $0$  and  $1$ .
*Beide Anordnungen erzeugen eine M-Sequenz.  
+
*Both arrangements generate an  "M-sequence".  
  
  
''Hinweise:''
 
*Die Aufgabe gehört zum  Kapitel [[Stochastische_Signaltheorie/Erzeugung_von_diskreten_Zufallsgrößen|Erzeugung von diskreten Zufallsgrößen]].
 
*Sollte die Eingabe des Zahlenwertes „0” erforderlich sein, so geben Sie bitte „0.” ein.
 
*Wir möchten Sie gerne auch auf das folgende Lernvideo hinweisen:
 
  
:[[Verdeutlichung der PN-Generatoren am Beispiel ''L'' = 4]] 
 
  
  
===Fragebogen===
+
 
 +
Hints:
 +
*The exercise belongs to the chapter  [[Theory_of_Stochastic_Signals/Generation_of_Discrete_Random_Variables|Generation of Discrete Random Variables]].
 +
 +
*The topic of this chapter is illustrated with examples in the&nbsp; (German language)&nbsp;  learning video: <br> &nbsp; &nbsp; [[Erläuterung_der_PN–Generatoren_an_einem_Beispiel_(Lernvideo)|"Erläuterung der PN-Generatoren an einem Beispiel"]] &nbsp; $\Rightarrow$ &nbsp; "Explanation of PN generators using an example".
 +
 
 +
 
 +
 
 +
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Wie gro&szlig; ist die Periodenl&auml;nge der Konfiguration $(15)$?
+
{How long is the period length of the configuration&nbsp; $(15)$?
 
|type="{}"}
 
|type="{}"}
$P \ = $ { 7 }
+
$P \ = \ $ { 7 }
  
  
{Ermitteln Sie die Ausgangsfolge $〈z_ν\rangle$ f&uuml;r die Zeitpunkte $1$, ... , $P$. Wie lauten die ersten 15 Bin&auml;rwerte der Ausgangsfolge? ''Hinweis:'' Bezeichnen Sie die Zellen von links nach rechts mit $S_1$, $S_2$ und $S_3$. Ausgegeben wird der Wert $z_ν$, der zum Zeitpunkt $\nu$ in die Speicherzelle $S_1$ eingetragen wird.
+
{Determine the output sequence&nbsp; $〈z_ν\rangle$&nbsp; for the time points&nbsp; $1$, ... , $P$.&nbsp; What are the first&nbsp; $15$&nbsp; binary values of the output sequence? <br>Hint:&nbsp;From left to right,&nbsp; label the cells with&nbsp; $S_1$,&nbsp; $S_2$&nbsp; and&nbsp; $S_3$.&nbsp; Output the value&nbsp; $z_ν$&nbsp; that is currently&nbsp; (at time&nbsp; $\nu$)&nbsp; entered into the memory cell&nbsp; $S_1$.
|type="[]"}
+
|type="()"}
 
- $1\ 0 \ 0 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 0 \ 0$ . . .
 
- $1\ 0 \ 0 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 0 \ 0$ . . .
 
- $1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 $ . . .
 
- $1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 $ . . .
 
+ $1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1$ . . .
 
+ $1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1$ . . .
- $0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $. . .
+
- $0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $. . .
  
{Welche der folgenden Aussagen treffen f&uuml;r jede M-Sequenz zu?
+
{Which of the following statements are true for each M-sequence?
 
|type="[]"}
 
|type="[]"}
- Die Anzahl der Nullen und Einsen ist gleich.
+
- The number of&nbsp; "zeros"&nbsp; and&nbsp; "ones"&nbsp; is equal.
+ In jeder Periode gibt es eine Eins mehr als Nullen.
+
+ In each period there is one more&nbsp; "one"&nbsp; than&nbsp; "zeros".
+ Die maximale Anzahl aufeinander folgender Einsen ist $L$.
+
+ The maximum number of consecutive&nbsp; "ones"&nbsp; is&nbsp; $L$.
+ Die Folge $1 \ 0 \ 1 \ 0 \ 1 \ 0 $ . . . ist nicht m&ouml;glich.
+
+ The sequence&nbsp; $1 \ 0 \ 1 \ 0 \ 1 \ 0 $ ... &nbsp; is not possible.
  
  
{Betrachten Sie nun die reziproke Anordnung $(13)$. Wie lauten hier die ersten 15 Bin&auml;rwerte der Ausgangsfolge bei gleicher Anfangsbelegung?
+
{Now consider the reciprocal order&nbsp; $(13)$.&nbsp; What are the first&nbsp; $15$&nbsp; binary values of the output sequence with the same initial assignment here?
|type="[]"}
+
|type="()"}
- $0 \   0 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 $ . . .
+
- $0 \ 0 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 $ . . .
+ $0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $ . . .
+
+ $0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $ . . .
- $0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 $ . . .
+
- $0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 $ . . .
  
  
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
:[[File:P_ID107__Sto_Z_2_6b.png|right|]]
+
[[File:EN_Sto_Z_2_6b.png|right|frame|PN generator with octal identifier&nbsp; $15$]]
:<b>1.</b>&nbsp;&nbsp;Es handelt sich um eine M-Sequenz mit <i>L</i> = 3. Daraus folgt <u><i>P</i> = 2<sup><i>L</i></sup> - 1 = 7</u>.
+
'''(1)'''&nbsp; It is an M-sequence with&nbsp; $L= 3$.&nbsp; It follows that $P= 2^L - 1 \hspace{0.15cm}\underline{= 7}$.
  
:<b>2.</b>&nbsp;&nbsp;Wir bezeichnen die Zellen von links nach rechts mit <i>S</i><sub>1</sub>, <i>S</i><sub>2</sub> und <i>S</i><sub>3</sub>. Dann gilt:
 
  
:* <i>S</i><sub>2</sub>(<i>&nu;</i>) = <i>S</i><sub>1</sub>(<i>&nu;</i> &ndash; 1),
+
'''(2)'''&nbsp; We denote the cells from left to right by&nbsp; $S_1$,&nbsp; $S_2$&nbsp; and&nbsp; $S_3$.&nbsp; Then holds:
  
:* <i>S</i><sub>3</sub>(<i>&nu;</i>) = <i>S</i><sub>2</sub>(<i>&nu;</i> &ndash; 1),
+
* $S_2(\nu) = S_1(\nu - 1)$,
 +
* $S_3(\nu) = S_2(\nu - 1)$,
 +
* $S_1(\nu) = S_2(\nu - 1) \ {\rm mod } \ S_3(\nu - 1)$.
  
:* <i>S</i><sub>3</sub>(<i>&nu;</i>) = <i>S</i><sub>2</sub>(<i>&nu;</i> &ndash; 1) mod <i>S</i><sub>3</sub>(<i>&nu;</i> &ndash; 1).
 
  
:Das Ergebnis ist in der ersten Zeile obiger Tabelle (rot markiert) eingetragen:
+
The result is entered in the first row of the above table&nbsp; (marked in red):
 +
*At the clock time&nbsp; $\nu = 7$&nbsp; results in the same memory usage as at the time&nbsp; $\nu = 0$.
 +
*From this follows&nbsp; $ {P = 7}$&nbsp; and the sequence is from&nbsp; $\nu = 1$&nbsp; corresponding to&nbsp; <u>solution 3</u>:
 +
:$$\langle z_\nu \rangle = 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \text{...}$$
 +
 +
*In contrast,&nbsp; proposal 1 describes the M sequence of the PN generator with length&nbsp; $L=4$&nbsp; and identifier&nbsp; $(31)$ &nbsp; &rArr; &nbsp; period length is&nbsp; $P= 15$.
 +
*In proposal 2,&nbsp; the period length&nbsp; $P= 4$&nbsp; is too short.
  
:Zum Taktzeitpunkt <i>&nu;</i> = 7 ergibt sich die gleiche Speicherbelegung wie zum Zeitpunkt <i>&nu;</i> = 0. Daraus folgt <i>P</i> = 7 und die Folge ist ab <i>&nu;</i> = 1: &#9001;<i>z<sub>&nu;</sub></i>&#9002; = &#9001; 1 1 0 0 1 0 1 1 1 0 0 1 0 1 1 ... &#9002;.
+
*Finally,&nbsp; the last proposal would have the desired period length&nbsp; $P= 7$,&nbsp; but from the modulo 2 addition of&nbsp; $S_2= 0$&nbsp; and&nbsp; $S_3= 1$&nbsp; $($for&nbsp; $\nu = 0)$&nbsp; it necessarily follows at the next time&nbsp; $(\nu = 1)$: &nbsp; $S_1= 1$. &nbsp; This property is not exhibited by sequence 4.
  
:<u>Vorschlag 3</u> ist der richtige. Vorschlag 1 beschreibt die M-Sequenz des PN-Generators mit L&auml;nge <i>L</i> = 4 und Kennung (31); die Periodenl&auml;nge ist <i>P</i> = 15. Beim Vorschlag 2 ist <i>P</i> = 4.
 
  
:Der letzte Vorschlag schließlich hätte zwar die gew&uuml;nschte Periodenl&auml;nge <i>P</i> = 7, aber aus der Modulo-2-Addition von <i>S</i><sub>2</sub> = 0 und <i>S</i><sub>3</sub> = 1 (f&uuml;r <i>&nu;</i> = 0) folgt zum n&auml;chsten Zeitpunkt (<i>&nu;</i> = 1) zwingend: <i>S</i><sub>1</sub> = 1. Diese Eigenschaft zeigt die Folge 4 nicht.
 
  
:<b>3.</b>&nbsp;&nbsp;Die maximale Anzahl aufeinander folgender Einsen ist <i>L</i> (n&auml;mlich dann, wenn in allen <i>L</i> Speicherzellen eine Eins steht). Es ist dagegen nicht m&ouml;glich, dass alle Speicherzellen mit Nullen belegt sind. Deshalb gibt es stets eine Eins mehr als Nullen.
+
'''(3)'''&nbsp; Correct are <u>solutions 2, 3, and 4</u>:
 +
*The maximum number of consecutive&nbsp; "ones"&nbsp; is&nbsp; $L$&nbsp; (namely if there is a&nbsp; "one"&nbsp; in all&nbsp; $L$&nbsp; memory cells).  
 +
*On the other hand,&nbsp; it is not possible that all memory cells are filled with&nbsp; "zeros".&nbsp; Therefore,&nbsp; there is always one more&nbsp; "one"&nbsp; than&nbsp; "zeros".
 +
*The period length of the last sequence is&nbsp; $P = 2$.&nbsp; On the other hand,&nbsp; for an M-sequence&nbsp; $P= 2^L - 1.$&nbsp; For no value of&nbsp; $L$:&nbsp; &nbsp; $P = 2$&nbsp; is possible.
  
:Die Periodenl&auml;nge der letzten Folge betr&auml;gt <i>P</i> = 2. Bei einer M-Sequenz gilt dagegen <i>P</i> = 2<sup><i>L</i></sup> &ndash; 1. F&uuml;r keinen Wert von <i>L</i> ist <i>P</i> = 2 m&ouml;glich.
 
  
:Richtig sind somit die <u>Lösungsvorschläge 2, 3 und 4</u>.
 
  
:<b>4.</b>&nbsp;&nbsp;Auch bei der reziproken Anordnung muss die Periodenl&auml;nge <i>P</i> = 7 gelten, so dass der Vorschlag 1 (mit <i>P</i> = 15) ausscheidet. Der Vorschlag 3 ist nur eine um 2 Zeittakte verschobene Version der Ausgangsfolge von (15). Dagegen ist im zweiten Vorschlag die Inverse von .... 1 1 0 0 1 0 1 ... &ndash; also die Folge ... 1 0 1 0 0 1 1 ... &ndash; enthalten, wenn auch mit einem Phasenversatz.
+
[[File: EN_Sto_Z_2_6d.png|right|frame|PN generator with octal identifier&nbsp; $13$]]
 +
'''(4)'''&nbsp; In the adjacent table the emergence of the PN sequence at the reciprocal polynomial&nbsp; $G_{\rm R}(D)$&nbsp; is entered.&nbsp; It can be seen that the&nbsp; <u>proposed solution 2</u> applies:
 +
*Also for the reciprocal arrangement,&nbsp; the period length&nbsp; $P = 7$&nbsp; must hold,&nbsp; so that proposition 1&nbsp; $($with&nbsp; $P = 15)$&nbsp; is eliminated.  
 +
*Proposal 3 is just a version of the output sequence of&nbsp; $(15)$ shifted by two clocks.  
 +
*In contrast,&nbsp; in the (correct) second proposal,&nbsp; the inverse of ...&nbsp;$ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1$&nbsp;... &ndash; thus the sequence ...&nbsp;$ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1$&nbsp;... &ndash; are included,&nbsp; albeit with a phase shift.
  
[[File: P_ID2897__Sto_Z_2_6d.png|right|]]
 
:In der unteren Tabelle ist die Entstehung der PN&ndash;Folge beim reziproken Polynom <i>G</i><sub>R</sub>(<i>D</i>)  eingetragen. Die Tabelle bestätigt die Richtigkeit von <u>Lösungsvorschlag 2</u>.
 
<br><br><br>
 
  
 
{{ML-Fuß}}
 
{{ML-Fuß}}
Line 95: Line 104:
  
  
[[Category:Aufgaben zu Stochastische Signaltheorie|^2.5 Erzeugung diskreter Zufallsgrößen^]]
+
[[Category:Theory of Stochastic Signals: Exercises|^2.5 Generation of Discrete Random Variables^]]

Latest revision as of 19:19, 28 December 2021

PN generator with  $L = 3$

The adjacent sketch shows a PN generator of length  $L = 3$  with generator polynomial

$$G( D) = D^{\rm 3} + D^{\rm 2} + \rm 1$$

and thus the octal identifier  $(g_3 \ g_2 \ g_1 \ g_0)$ = $(1 \ 1 \ 0 \ 1)_{\rm bin} = (15)_{\rm oct}$.

The corresponding reciprocal polynomial

$$G_{\rm R}(D) = D^{\rm 3}\cdot ( D^{\rm -3} + D^{\rm -2} + 1) = D^{\rm 3} + D^{\rm 1} + \rm 1$$

has the octal identifier  $(1 \ 0 \ 1 \ 1)_{\rm bin} = (13)_{\rm oct}$.

  • At start time,  let the three memory cells be preallocated with the binary values  $1$,  $0$  and  $1$ .
  • Both arrangements generate an  "M-sequence".




Hints:


Questions

1

How long is the period length of the configuration  $(15)$?

$P \ = \ $

2

Determine the output sequence  $〈z_ν\rangle$  for the time points  $1$, ... , $P$.  What are the first  $15$  binary values of the output sequence?
Hint: From left to right,  label the cells with  $S_1$,  $S_2$  and  $S_3$.  Output the value  $z_ν$  that is currently  (at time  $\nu$)  entered into the memory cell  $S_1$.

$1\ 0 \ 0 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 0 \ 0$ . . .
$1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 $ . . .
$1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1$ . . .
$0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $. . .

3

Which of the following statements are true for each M-sequence?

The number of  "zeros"  and  "ones"  is equal.
In each period there is one more  "one"  than  "zeros".
The maximum number of consecutive  "ones"  is  $L$.
The sequence  $1 \ 0 \ 1 \ 0 \ 1 \ 0 $ ...   is not possible.

4

Now consider the reciprocal order  $(13)$.  What are the first  $15$  binary values of the output sequence with the same initial assignment here?

$0 \ 0 \ 0 \ 1 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 $ . . .
$0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1 \ 1 \ 0 \ 1 \ 0 $ . . .
$0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ 1 \ 0 $ . . .


Solution

PN generator with octal identifier  $15$

(1)  It is an M-sequence with  $L= 3$.  It follows that $P= 2^L - 1 \hspace{0.15cm}\underline{= 7}$.


(2)  We denote the cells from left to right by  $S_1$,  $S_2$  and  $S_3$.  Then holds:

  • $S_2(\nu) = S_1(\nu - 1)$,
  • $S_3(\nu) = S_2(\nu - 1)$,
  • $S_1(\nu) = S_2(\nu - 1) \ {\rm mod } \ S_3(\nu - 1)$.


The result is entered in the first row of the above table  (marked in red):

  • At the clock time  $\nu = 7$  results in the same memory usage as at the time  $\nu = 0$.
  • From this follows  $ {P = 7}$  and the sequence is from  $\nu = 1$  corresponding to  solution 3:
$$\langle z_\nu \rangle = 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \text{...}$$
  • In contrast,  proposal 1 describes the M sequence of the PN generator with length  $L=4$  and identifier  $(31)$   ⇒   period length is  $P= 15$.
  • In proposal 2,  the period length  $P= 4$  is too short.
  • Finally,  the last proposal would have the desired period length  $P= 7$,  but from the modulo 2 addition of  $S_2= 0$  and  $S_3= 1$  $($for  $\nu = 0)$  it necessarily follows at the next time  $(\nu = 1)$:   $S_1= 1$.   This property is not exhibited by sequence 4.


(3)  Correct are solutions 2, 3, and 4:

  • The maximum number of consecutive  "ones"  is  $L$  (namely if there is a  "one"  in all  $L$  memory cells).
  • On the other hand,  it is not possible that all memory cells are filled with  "zeros".  Therefore,  there is always one more  "one"  than  "zeros".
  • The period length of the last sequence is  $P = 2$.  On the other hand,  for an M-sequence  $P= 2^L - 1.$  For no value of  $L$:    $P = 2$  is possible.


PN generator with octal identifier  $13$

(4)  In the adjacent table the emergence of the PN sequence at the reciprocal polynomial  $G_{\rm R}(D)$  is entered.  It can be seen that the  proposed solution 2 applies:

  • Also for the reciprocal arrangement,  the period length  $P = 7$  must hold,  so that proposition 1  $($with  $P = 15)$  is eliminated.
  • Proposal 3 is just a version of the output sequence of  $(15)$ shifted by two clocks.
  • In contrast,  in the (correct) second proposal,  the inverse of ... $ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1$ ... – thus the sequence ... $ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1$ ... – are included,  albeit with a phase shift.