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

From LNTwww
m (Text replacement - "Category:Aufgaben zu Stochastische Signaltheorie" to "Category:Theory of Stochastic Signals: Exercises")
 
(9 intermediate revisions by 2 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|frame|PN-Generator mit  $L = 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}\cdot ( 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".  
  
  
Line 22: Line 22:
  
  
 
+
Hints:
''Hinweise:''
+
*The exercise belongs to the chapter  [[Theory_of_Stochastic_Signals/Generation_of_Discrete_Random_Variables|Generation of Discrete Random Variables]].
*Die Aufgabe gehört zum  Kapitel  [[Theory_of_Stochastic_Signals/Erzeugung_von_diskreten_Zufallsgrößen|Erzeugung von diskreten Zufallsgrößen]].
 
 
   
 
   
*Wir verweisen hier auch auf das Lernvideo  [[Erläuterung_der_PN–Generatoren_an_einem_Beispiel_(Lernvideo)|Erläuterung der PN-Generatoren an einem Beispiel]].
+
*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".
  
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Wie gro&szlig; ist die Periodenl&auml;nge der Konfiguration&nbsp; $(15)$?
+
{How long is the period length of the configuration&nbsp; $(15)$?
 
|type="{}"}
 
|type="{}"}
 
$P \ = \ $ { 7 }
 
$P \ = \ $ { 7 }
  
  
{Ermitteln Sie die Ausgangsfolge&nbsp; $〈z_ν\rangle$&nbsp; f&uuml;r die Zeitpunkte&nbsp; $1$, ... , $P$.&nbsp; Wie lauten die ersten&nbsp; $15$&nbsp; Bin&auml;rwerte der Ausgangsfolge? <br>''Hinweis:'' &nbsp;Bezeichnen Sie die Zellen von links nach rechts mit&nbsp; $S_1$,&nbsp; $S_2$&nbsp; und&nbsp; $S_3$.&nbsp; Ausgegeben wird der Wert&nbsp; $z_ν$, der zur Zeit&nbsp; $\nu$&nbsp; in die Speicherzelle&nbsp; $S_1$&nbsp; 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&nbsp; $L$.
+
+ The maximum number of consecutive&nbsp; "ones"&nbsp; is&nbsp; $L$.
+ Die Folge&nbsp; $1 \ 0 \ 1 \ 0 \ 1 \ 0 $ ... &nbsp; ist nicht m&ouml;glich.
+
+ The sequence&nbsp; $1 \ 0 \ 1 \ 0 \ 1 \ 0 $ ... &nbsp; is not possible.
  
  
{Betrachten Sie nun die reziproke Anordnung&nbsp; $(13)$.&nbsp; Wie lauten hier die ersten&nbsp; $15$&nbsp; 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|frame|PN&ndash;Generator mit Oktalkennung $15$]]
+
[[File:EN_Sto_Z_2_6b.png|right|frame|PN generator with octal identifier&nbsp; $15$]]
'''(1)'''&nbsp; Es handelt sich um eine M-Sequenz mit&nbsp; $L= 3$.&nbsp; Daraus folgt $P= 2^L - 1 \hspace{0.15cm}\underline{= 7}$.
+
'''(1)'''&nbsp; It is an M-sequence with&nbsp; $L= 3$.&nbsp; It follows that $P= 2^L - 1 \hspace{0.15cm}\underline{= 7}$.
  
  
'''(2)'''&nbsp; Wir bezeichnen die Zellen von links nach rechts mit&nbsp; $S_1$,&nbsp; $S_2$&nbsp; und&nbsp; $S_3$.&nbsp; Dann gilt:
+
'''(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:
  
 
* $S_2(\nu) = S_1(\nu - 1)$,
 
* $S_2(\nu) = S_1(\nu - 1)$,
Line 75: Line 74:
  
  
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):
*Zum Taktzeitpunkt&nbsp; $\nu = 7$&nbsp; ergibt sich die gleiche Speicherbelegung wie zum Zeitpunkt&nbsp; $\nu = 0$.  
+
*At the clock time&nbsp; $\nu = 7$&nbsp; results in the same memory usage as at the time&nbsp; $\nu = 0$.  
*Daraus folgt&nbsp; $ {P = 7}$&nbsp; und die Folge lautet ab&nbsp; $\nu = 1$&nbsp; entsprechend dem <u>Lösungsvorschlag 3</u> :
+
*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 \ 0 \ 1 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \ \text{...}$$  
+
:$$\langle z_\nu \rangle = 1 \ 1 \ 0 \ 0 \ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1 \ 1 \text{...}$$  
 
   
 
   
*Dagegen beschreibt Vorschlag 1 die M-Sequenz des PN-Generators mit L&auml;nge&nbsp; $L=4$&nbsp; und Kennung&nbsp; $(31)$ &nbsp; &rArr; &nbsp; Periodenl&auml;nge ist&nbsp; $P= 15$.  
+
*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$.  
*Beim Vorschlag 2 ist die Periodenl&auml;ng&nbsp; $P= 4$&nbsp; zu kurz.
+
*In proposal 2,&nbsp; the period length&nbsp; $P= 4$&nbsp; is too short.
  
*Der letzte Vorschlag schließlich hätte zwar die gew&uuml;nschte Periodenl&auml;nge&nbsp; $P= 7$, aber aus der Modulo-2-Addition von&nbsp; $S_2= 0$&nbsp; und&nbsp; $S_3= 1$&nbsp; $($f&uuml;r&nbsp; $\nu = 0)$&nbsp; folgt zum n&auml;chsten Zeitpunkt&nbsp; $(\nu = 1)$&nbsp; zwingend: &nbsp; $S_1= 1$.&nbsp; Diese Eigenschaft zeigt die Folge 4 nicht.
+
*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.
  
  
  
'''(3)'''&nbsp; Richtig sind die <u>Lösungsvorschläge 2, 3 und 4</u>:
+
'''(3)'''&nbsp; Correct are <u>solutions 2, 3, and 4</u>:
*Die maximale Anzahl aufeinander folgender Einsen ist&nbsp; $L$&nbsp; (n&auml;mlich dann, wenn in allen&nbsp; $L$&nbsp; Speicherzellen eine Eins steht).  
+
*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).  
*Es ist dagegen nicht m&ouml;glich, dass alle Speicherzellen mit Nullen belegt sind.&nbsp; Deshalb gibt es stets eine Eins mehr als Nullen.
+
*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".
*Die Periodenl&auml;nge der letzten Folge betr&auml;gt&nbsp; $P = 2$.&nbsp; Bei einer M-Sequenz gilt dagegen&nbsp; $P= 2^L - 1.$&nbsp; F&uuml;r keinen Wert von&nbsp; $L$&nbsp; ist&nbsp; $P = 2$&nbsp; m&ouml;glich.
+
*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.
  
  
  
[[File: P_ID2897__Sto_Z_2_6d.png|right|frame|PN&ndash;Generator mit Oktalkennung&nbsp; $13$]]
+
[[File: EN_Sto_Z_2_6d.png|right|frame|PN generator with octal identifier&nbsp; $13$]]
'''(4)'''&nbsp; In nebenstehender Tabelle ist die Entstehung der PN&ndash;Folge beim reziproken Polynom&nbsp; $G_{\rm R}(D)$&nbsp; eingetragen.
+
'''(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:
Man erkennt, dass der  <u>Lösungsvorschlag 2</u> zutrifft:
+
*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.  
*Auch bei der reziproken Anordnung muss die Periodenl&auml;nge&nbsp; $P = 7$&nbsp; gelten, so dass der Vorschlag 1&nbsp; $($mit&nbsp; $P = 15)$&nbsp; ausscheidet.  
+
*Proposal 3 is just a version of the output sequence of&nbsp; $(15)$ shifted by two clocks.  
*Der Vorschlag 3 ist nur eine um zwei Zeittakte verschobene Version der Ausgangsfolge von&nbsp; $(15)$.  
+
*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.
*Dagegen ist im (richtigen) zweiten Vorschlag die Inverse von ...&nbsp;$ 1 \ 1 \ 0 \ 0 \ 1 \ 0 \ 1$&nbsp;... &ndash; also die Folge ...&nbsp;$ 1 \ 0 \ 1 \ 0 \ 0 \ 1 \ 1$&nbsp;... &ndash; enthalten, wenn auch mit einem Phasenversatz.
 
  
  
Line 106: Line 104:
  
  
[[Category:Theory of Stochastic Signals: Exercises|^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.