Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Difference between revisions of "Applets:Complementary Gaussian Error Functions"

From LNTwww
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LntAppletLink|qfunction_en}}
+
{{LntAppletLinkEnDe|qfunction_en|qfunction}}
    ''Hinweis:''   Das Applet ist für den '''CHROME'''–Browser optimiert. Bei anderen Browsern kommt es teilweise zu Darstellungsproblemen.
 
  
  
Line 12: Line 11:
 
==Theoretical Background==
 
==Theoretical Background==
 
<br>
 
<br>
In the study of digital transmission systems, it is often necessary to determine the probability that a (mean-free) Gaussian distributed random variable&nbsp; x&nbsp; with variance&nbsp; σ^2&nbsp; exceeds a given value&nbsp; x_0.&nbsp; For this probability holds:  
+
In the study of digital transmission systems, it is often necessary to determine the probability that a (zero mean) Gaussian distributed random variable&nbsp; x&nbsp; with variance&nbsp; σ^2&nbsp; exceeds a given value&nbsp; x_0.&nbsp; For this probability holds:  
 
:{\rm Pr}(x > x_0)={\rm Q}(\frac{x_0}{\sigma}) = 1/2 \cdot {\rm erfc}(\frac{x_0}{\sqrt{2} \cdot \sigma}).
 
:{\rm Pr}(x > x_0)={\rm Q}(\frac{x_0}{\sigma}) = 1/2 \cdot {\rm erfc}(\frac{x_0}{\sqrt{2} \cdot \sigma}).
  
Line 31: Line 30:
 
===The function 1/2 \cdot {\rm erfc}(x )===
 
===The function 1/2 \cdot {\rm erfc}(x )===
  
On the other hand, in almost all program libraries, you can find the&nbsp; '''Complementary Gaussian Error Function''':
+
On the other hand, in almost all program libraries, you can find the&nbsp; '''complementary Gaussian error function''':
 
:{\rm erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{ +\infty}\hspace{-0.2cm}{\rm e}^{-u^{2}}\,{\rm d} u ,
 
:{\rm erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{ +\infty}\hspace{-0.2cm}{\rm e}^{-u^{2}}\,{\rm d} u ,
 
which is related to&nbsp; {\rm Q}(x)&nbsp; as follows: &nbsp; {\rm Q}(x)=1/2\cdot {\rm erfc}(x/{\sqrt{2}}).  
 
which is related to&nbsp; {\rm Q}(x)&nbsp; as follows: &nbsp; {\rm Q}(x)=1/2\cdot {\rm erfc}(x/{\sqrt{2}}).  
Line 43: Line 42:
 
===When which function offers advantages?===
 
===When which function offers advantages?===
  
{{GraueBox|TEXT=   
+
{{GreyBox|TEXT=   
\text{Example 1:}&nbsp; We consider binary baseband transmission. Here, the bit error probability&nbsp; p_{\rm B} = {\rm Q}({s_0}/{\sigma_d}), where the useful signal can take the values&nbsp; \pm s_0&nbsp; and the noise root mean square value&nbsp; \sigma_d&nbsp;.
+
\text{Example 1:}&nbsp; We consider binary baseband transmission. Here, the bit error probability&nbsp; p_{\rm B} = {\rm Q}({s_0}/{\sigma_d}), where the useful signal can take the values&nbsp; \pm s_0&nbsp; and the noise root-mean-square value&nbsp; \sigma_d&nbsp;.
  
 
It is assumed that tables are available listing the argument of the two Gaussian error functions at distance&nbsp; 0.1.&nbsp;  With&nbsp; s_0/\sigma_d = 4&nbsp; one obtains for the bit error probability according to the function&nbsp; {\rm Q}(x ):
 
It is assumed that tables are available listing the argument of the two Gaussian error functions at distance&nbsp; 0.1.&nbsp;  With&nbsp; s_0/\sigma_d = 4&nbsp; one obtains for the bit error probability according to the function&nbsp; {\rm Q}(x ):
Line 51: Line 50:
 
:p_{\rm B} = {1}/{2} \cdot {\rm erfc} ( {4}/{\sqrt{2} })= {1}/{2} \cdot {\rm erfc} ( 2.828)\approx {1}/{2} \cdot {\rm erfc} ( 2.8)= 0.375 \cdot 10^{-4}\hspace{0.05cm}.
 
:p_{\rm B} = {1}/{2} \cdot {\rm erfc} ( {4}/{\sqrt{2} })= {1}/{2} \cdot {\rm erfc} ( 2.828)\approx {1}/{2} \cdot {\rm erfc} ( 2.8)= 0.375 \cdot 10^{-4}\hspace{0.05cm}.
 
*The first value is more correct.&nbsp; In the second method of calculation, one must round or &ndash; even better &ndash; interpolate, which is very difficult due to the strong nonlinearity of this function.<br>
 
*The first value is more correct.&nbsp; In the second method of calculation, one must round or &ndash; even better &ndash; interpolate, which is very difficult due to the strong nonlinearity of this function.<br>
*Accordingly, with the given numerical values, {\rm Q}(x )&nbsp; is more suitable.&nbsp; However, outside of exercise examples&nbsp; s_0/\sigma_d&nbsp; will usually have a &bdquo;curvilinear&rdquo; value.&nbsp; In this case, of course,&nbsp; {\rm Q}(x)&nbsp; offers no advantage over&nbsp; 1/2 \cdot{\rm erfc}(x). }}
+
*Accordingly, with the given numerical values, {\rm Q}(x )&nbsp; is more suitable.&nbsp; However, outside of exercise examples&nbsp; s_0/\sigma_d&nbsp; will usually have a "curvilinear" value.&nbsp; In this case, of course,&nbsp; {\rm Q}(x)&nbsp; offers no advantage over&nbsp; 1/2 \cdot{\rm erfc}(x). }}
  
  
{{GraueBox|TEXT=   
+
{{GreyBox|TEXT=   
 
\text{Example 2:}&nbsp;  
 
\text{Example 2:}&nbsp;  
 
With the energy per bit&nbsp; (E_{\rm B})&nbsp; and the noise power density&nbsp; (N_0)&nbsp; the bit error probability of ''Binary Phase Shift Keying''&nbsp; (BPSK) is:
 
With the energy per bit&nbsp; (E_{\rm B})&nbsp; and the noise power density&nbsp; (N_0)&nbsp; the bit error probability of ''Binary Phase Shift Keying''&nbsp; (BPSK) is:
 
:p_{\rm B} = {\rm Q} \left ( \sqrt{ {2 E_{\rm B} }/{N_0} }\right ) = {1}/{2} \cdot { \rm erfc} \left ( \sqrt{ {E_{\rm B} }/{N_0} }\right ) \hspace{0.05cm}.
 
:p_{\rm B} = {\rm Q} \left ( \sqrt{ {2 E_{\rm B} }/{N_0} }\right ) = {1}/{2} \cdot { \rm erfc} \left ( \sqrt{ {E_{\rm B} }/{N_0} }\right ) \hspace{0.05cm}.
For the numerical values&nbsp; E_{\rm B} = 16 \rm mWs&nbsp; and&nbsp; $N_0 = 16 \rm mW/Hz$&nbsp; we obtain:
+
For the numerical values&nbsp; E_{\rm B} = 16 \rm mWs&nbsp; and&nbsp; $N_0 = 1 \rm mW/Hz$&nbsp; we obtain:
 
:p_{\rm B} = {\rm Q} \left (4 \cdot \sqrt{ 2} \right ) = {1}/{2} \cdot {\rm erfc} \left ( 4\right ) \hspace{0.05cm}.
 
:p_{\rm B} = {\rm Q} \left (4 \cdot \sqrt{ 2} \right ) = {1}/{2} \cdot {\rm erfc} \left ( 4\right ) \hspace{0.05cm}.
*The first way leads to the result&nbsp; p_{\rm B} = {\rm Q} (5.657) \approx {\rm Q} (5.7) = 0.6 \cdot 10^{-8}\hspace{0.01cm}, while &nbsp; 1/2 \cdot{\rm erfc}(x)&nbsp; here the more correct value&nbsp; p_{\rm B} \approx 0.771 \cdot 10^{-8}&nbsp; yields.  
+
*The first way leads to the result&nbsp; p_{\rm B} = {\rm Q} (5.657) \approx {\rm Q} (5.7) = 0.6 \cdot 10^{-8}\hspace{0.01cm}, while &nbsp; 1/2 \cdot{\rm erfc}(x)&nbsp; yields the more correct value&nbsp; p_{\rm B} \approx 0.771 \cdot 10^{-8}&nbsp; here.  
 
*As in the first example, however, you can see: &nbsp; The functions&nbsp; {\rm Q}(x)&nbsp; and&nbsp; 1/2 \cdot{\rm erfc}(x)&nbsp; are basically equally well suited.  
 
*As in the first example, however, you can see: &nbsp; The functions&nbsp; {\rm Q}(x)&nbsp; and&nbsp; 1/2 \cdot{\rm erfc}(x)&nbsp; are basically equally well suited.  
 
*Advantages or disadvantages of one or the other function arise only for concrete numerical values.}}
 
*Advantages or disadvantages of one or the other function arise only for concrete numerical values.}}
Line 71: Line 70:
  
  
{{BlaueBox|TEXT=   
+
{{BlueBox|TEXT=   
'''(1)''' &nbsp; Ermitteln Sie die Werte der Funktion&nbsp; {\rm Q}(x)&nbsp; für&nbsp; x=1,&nbsp; x=2,&nbsp; x=4&nbsp; und&nbsp; x=6.&nbsp; Interpretieren Sie die Grafiken bei linearer und logarithmischer Ordinate.}}  
+
'''(1)''' &nbsp; Find the values of the function&nbsp; {\rm Q}(x)&nbsp; for&nbsp; x=1,&nbsp; x=2,&nbsp; x=4&nbsp; and&nbsp; x=6.&nbsp; Interpret the graphs for linear and logarithmic ordinates.}}  
  
*Das Applet liefert die Werte&nbsp; {\rm Q}(1)=1.5866 \cdot 10^{-1},&nbsp; {\rm Q}(2)=2.275 \cdot 10^{-2},&nbsp; {\rm Q}(4)=3.1671 \cdot 10^{-5}&nbsp; und&nbsp; {\rm Q}(6)=9.8659 \cdot 10^{-10}.
+
*The applet returns the values&nbsp; {\rm Q}(1)=1.5866 \cdot 10^{-1},&nbsp; {\rm Q}(2)=2. 275 \cdot 10^{-2},&nbsp; {\rm Q}(4)=3.1671 \cdot 10^{-5}&nbsp; and&nbsp; {\rm Q}(6)=9.8659 \cdot 10^{-10}.
*Interessanter ist die Darstellung mit logarithmischer Ordinate.&nbsp; Bei linearer Ordinate sind die Werte für&nbsp; x>3&nbsp; nicht von der Nulllinie zu unterscheiden.
+
*With linear ordinate, the values for&nbsp; x>3&nbsp; are indistinguishable from the zero line.&nbsp; More interesting is the plot with logarithmic ordinate.  
  
  
{{BlaueBox|TEXT=   
+
{{BlueBox|TEXT=   
'''(2)''' &nbsp; Bewerten Sie die beiden Schranken&nbsp; ${\rm UB}(x )=\text{Upper Bound }\big [{\rm Q}(x ) \big ]$&nbsp; und&nbsp; ${\rm LB}(x )=\text{Lower Bound }\big [{\rm Q}(x ) \big ]$&nbsp; für die&nbsp; {\rm Q}&ndash;Funktion.}}  
+
'''(2)''' &nbsp; Evaluate the two bounds&nbsp; {\rm UB}(x )=\text{Upper Bound }\big [{\rm Q}(x ) \big ]&nbsp; and&nbsp; {\rm LB}(x )=\text{Lower Bound }\big [{\rm Q}(x ) \big ]&nbsp; for the&nbsp; {\rm Q}&nbsp; function. }}  
  
*Für&nbsp; x\ge 2&nbsp; liegt die obere Schranke nur geringfügig oberhalb von&nbsp; {\rm Q}(x)&nbsp; und die untere Schranke nur geringfügig unterhalb von&nbsp; {\rm Q}(x).&nbsp;  
+
*For&nbsp; x \ge 2&nbsp; the upper bound is only slightly above&nbsp; {\rm Q}(x)&nbsp; and the lower bound is only slightly below&nbsp; {\rm Q}(x).&nbsp;  
*Zum Beispiel:&nbsp; {\rm Q}(x=4)=3.1671 \cdot 10^{-5} &nbsp; &rArr; &nbsp; {\rm LB}(x=4)=3.1366 \cdot 10^{-5}, &nbsp; {\rm UB}(x=4)=3.3458 \cdot 10^{-5}.
+
*For example:&nbsp; {\rm Q}(x=4)=3.1671 \cdot 10^{-5} &nbsp; &rArr; &nbsp; {\rm LB}(x=4)=3.1366 \cdot 10^{-5}, &nbsp; {\rm UB}(x=4)=3.3458 \cdot 10^{-5}.
*Die &bdquo;Upper Bound&rdquo; hat eine größere Bedeutung zur Beurteilung eines Nachrichtensystems als &bdquo;LB&rdquo;, da dies einer &bdquo;Worst Case&rdquo;&ndash;Betrachtung entspricht.
+
*The upper bound has greater significance for assessing a communications system than "LB",&nbsp; since this corresponds to a "worst case" consideration.
  
  
{{BlaueBox|TEXT=   
+
{{BlueBox|TEXT=   
'''(3)''' &nbsp; Versuchen Sie, mit der App den Funktionswert&nbsp; {\rm Q}(x=2 \cdot \sqrt{2} \approx 2.828)&nbsp; trotz der Quantisierung des Eingabeparameters möglichst exakt zu bestimmen. }}
+
'''(3)''' &nbsp; Try to use the app to determine&nbsp; {\rm Q}(x=2 \cdot \sqrt{2} \approx 2.828)&nbsp; as accurately as possible despite the quantization of the input parameter. }}
*Das Programm liefert für&nbsp; x=2.8&nbsp; das zu große Ergebnis&nbsp; 2.5551 \cdot 10^{-3}&nbsp; und für&nbsp; x=2.85&nbsp; das Ergebnis&nbsp; 2.186 \cdot 10^{-3}.&nbsp; Der exakte Wert liegt dazwischen.
+
*The program returns for&nbsp; x=2.8&nbsp; the too large result&nbsp; 2.5551 \cdot 10^{-3}&nbsp; and for&nbsp; x=2.85&nbsp; the result&nbsp; 2.186 \cdot 10^{-3}.&nbsp; The exact value lies in between.
*Es gilt aber auch:&nbsp; {\rm Q}(x=2 \cdot \sqrt{2})=0.5 \cdot {\rm erfc}(x=2).&nbsp; Damit erhält man den exakten Wert&nbsp; {\rm Q}(x=2 \cdot \sqrt{2})=2.3389 \cdot 10^{-3}.
+
*But it also holds:&nbsp; {\rm Q}(x=2 \cdot \sqrt{2})=0.5 \cdot {\rm erfc}(x=2).&nbsp; This gives the exact value&nbsp; {\rm Q}(x=2 \cdot \sqrt{2})=2.3389 \cdot 10^{-3}.
  
  
{{BlaueBox|TEXT=   
+
{{BlueBox|TEXT=   
'''(4)''' &nbsp; Ermitteln Sie die Werte der Funktion&nbsp; 0.5 \cdot {\rm erfc}(x)&nbsp; für&nbsp; x=1,&nbsp; x=2,&nbsp; x=3&nbsp; und&nbsp; x=4.&nbsp; Interpretieren Sie die die exakten Ergebnisse und die Schranken.}}  
+
'''(4)''' &nbsp; Find the values of the function&nbsp; 0.5 \cdot {\rm erfc}(x)&nbsp; for&nbsp; x=1,&nbsp; x=2,&nbsp; x=3&nbsp; and&nbsp; x=4.&nbsp; Interpret the exact results and the bounds.}}  
  
*Das Applet liefert:&nbsp; 0.5 \cdot {\rm erfc}(1)=7.865 \cdot 10^{-2},&nbsp; 0.5 \cdot {\rm erfc}(2)=2.3389 \cdot 10^{-3},&nbsp; 0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5}&nbsp; und&nbsp; 0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.
+
*The applet returns:&nbsp; 0.5 \cdot {\rm erfc}(1)=7.865 \cdot 10^{-2},&nbsp; 0.5 \cdot {\rm erfc}(2)=2. 3389 \cdot 10^{-3},&nbsp; 0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5}&nbsp; and&nbsp; 0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.
*Alle obigen Aussagen zur&nbsp; {\rm Q}&ndash;Funktion bezüglich geeigneter Darstellungsart sowie oberer und unterer Schranke gelten auch für die Funktion&nbsp; 0.5 \cdot {\rm erfc}(x).
+
*All the above statements about&nbsp; ${\rm Q}(x)$&nbsp; with respect to suitable representation type and upper and lower bounds also apply to the function&nbsp; 0.5 \cdot {\rm erfc}(x).  
  
  
{{BlaueBox|TEXT=   
+
{{BlueBox|TEXT=   
'''(5)''' &nbsp; Die Ergbnisse von&nbsp; '''(4)'''&nbsp; sollen nun für den Fall einer logarithmischen Abszisse umgerechnet werden.&nbsp; Die Umrechnung erfolgt entsprechend&nbsp; \rho\big[{\rm dB}\big ] = 20 \cdot \lg(x). }}
+
'''(5)''' &nbsp; The results of&nbsp; '''(4)'''&nbsp; are now to be converted for the case of a logarithmic abscissa.&nbsp; The conversion is done according to&nbsp; \rho\big[{\rm dB}\big ] = 20 \cdot \lg(x). }}
  
* Der lineare Abszissenwert&nbsp; x=1&nbsp; führt zum logarithmischen Abszissenwert&nbsp; \rho=0\ \rm dB &nbsp; &rArr; &nbsp; 0.5 \cdot {\rm erfc}(\rho=0\ {\rm dB})={0.5 \cdot \rm erfc}(x=1)=7.865 \cdot 10^{-2}.
+
* The linear abscissa value&nbsp; x=1&nbsp; leads to the logarithmic abscissa value&nbsp; \rho=0\ \rm dB &nbsp; &rArr; &nbsp; 0. 5 \cdot {\rm erfc}(\rho=0\ {\rm dB})={0.5 \cdot \rm erfc}(x=1)=7.865 \cdot 10^{-2}.
*Entsprechend gilt auch&nbsp; 0.5 \cdot {\rm erfc}(\rho=6.021\ {\rm dB}) =0.5 \cdot {\rm erfc}(x=2)=2.3389 \cdot 10^{-3}, &nbsp; &nbsp; 0.5 \cdot {\rm erfc}(\rho=9.542\ {\rm dB})= 0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5},&nbsp; &nbsp;  
+
*Similarly&nbsp; 0.5 \cdot {\rm erfc}(\rho=6.021\ {\rm dB}) =0.5 \cdot {\rm erfc}(x=2)=2. 3389 \cdot 10^{-3}, &nbsp; &nbsp; 0.5 \cdot {\rm erfc}(\rho=9.542\ {\rm dB})=0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5},&nbsp; &nbsp;  
 
*0.5 \cdot {\rm erfc}(\rho=12.041\ {\rm dB})= 0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.  
 
*0.5 \cdot {\rm erfc}(\rho=12.041\ {\rm dB})= 0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.  
*Laut rechtem Diagramm:&nbsp; 0.5 \cdot {\rm erfc}(\rho=6\ {\rm dB}) =2.3883 \cdot 10^{-3}, &nbsp; &nbsp; 0.5 \cdot {\rm erfc}(\rho=9.5\ {\rm dB}) =1.2109 \cdot 10^{-5}, &nbsp; &nbsp; 0.5 \cdot {\rm erfc}(\rho=12\ {\rm dB}) =9.006 \cdot 10^{-9}.
+
*As per right diagram:&nbsp; 0.5 \cdot {\rm erfc}(\rho=6\ {\rm dB}) =2.3883 \cdot 10^{-3}, &nbsp; &nbsp; 0.5 \cdot {\rm erfc}(\rho=9. 5\ {\rm dB}) =1.2109 \cdot 10^{-5}, &nbsp; &nbsp; $0.5 \cdot {\rm erfc}(\rho=12\ {\rm dB}) =9.006 \cdot 10^{-9}$.
 +
 
 +
 
 +
{{BlueBox|TEXT=
 +
'''(6)''' &nbsp; Find&nbsp; {\rm Q}(\rho=0\ {\rm dB}),&nbsp; {\rm Q}(\rho=5\ {\rm dB})&nbsp; and&nbsp; {\rm Q}(\rho=10\ {\rm dB}),&nbsp; and establish the relationship between linear and logarithmic abscissa.}}
 +
*The program returns for logarithmic abscissa&nbsp; {\rm Q}(\rho=0\ {\rm dB})=1. 5866 \cdot 10^{-1},&nbsp; {\rm Q}(\rho=5\ {\rm dB})=3.7679 \cdot 10^{-2},&nbsp; {\rm Q}(\rho=10\ {\rm dB})=7.827 \cdot 10^{-4}.
 +
*The conversion is done according to the equation&nbsp; x=10^{\hspace{0.05cm}0.05\hspace{0.05cm} \cdot\hspace{0.05cm} \rho[{\rm dB}]}.&nbsp; For&nbsp; \rho=0\ {\rm dB}&nbsp; we get&nbsp; x=1 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=0\ {\rm dB})={\rm Q}(x=1) =1.5866 \cdot 10^{-1}.
 +
*For&nbsp; \rho=5\ {\rm dB}&nbsp; we get&nbsp; x=1.1778 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=5\ {\rm dB})={\rm Q}(x=1. 778) =3.7679 \cdot 10^{-2}.&nbsp; From the left diagram:&nbsp; {\rm Q}(x=1.8) =3.593 \cdot 10^{-2}.
 +
*For&nbsp; \rho=10\ {\rm dB}&nbsp; we get&nbsp; x=3.162 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=10\ {\rm dB})={\rm Q}(x=3. 162) =7.827 \cdot 10^{-4}.&nbsp; After "quantization":&nbsp; ${\rm Q}(x=3.15) =8.1635 \cdot 10^{-4}$.
  
  
{{BlaueBox|TEXT=
 
'''(6)''' &nbsp; Ermitteln Sie&nbsp; {\rm Q}(\rho=0\ {\rm dB}),&nbsp; {\rm Q}(\rho=5\ {\rm dB})&nbsp; und&nbsp; {\rm Q}(\rho=10\ {\rm dB}),&nbsp; und stellen Sie den Zusammenhang zwischen linearer und logarithmischer Abszisse her.}}
 
*Das Programm liefert für logarithmische Abszisse die Werte&nbsp; {\rm Q}(\rho=0\ {\rm dB})=1.5866 \cdot 10^{-1},&nbsp; {\rm Q}(\rho=5\ {\rm dB})=3.7679 \cdot 10^{-2},&nbsp; {\rm Q}(\rho=10\ {\rm dB})=7.827 \cdot 10^{-4}.
 
*Die Umrechnung erfolgt gemäß der Gleichung&nbsp; x=10^{\hspace{0.05cm}0.05\hspace{0.05cm} \cdot\hspace{0.05cm} \rho[{\rm dB}]}.&nbsp; Für&nbsp; \rho=0\ {\rm dB}&nbsp; ergibt sich&nbsp; x=1 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=0\ {\rm dB})={\rm Q}(x=1) =1.5866 \cdot 10^{-1}.
 
*Für&nbsp; \rho=5\ {\rm dB}&nbsp; ergibt sich&nbsp; x=1.1778 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=5\ {\rm dB})={\rm Q}(x=1.778) =3.7679 \cdot 10^{-2}.&nbsp; Aus dem linken Diagramm:&nbsp; {\rm Q}(x=1.8) =3.593 \cdot 10^{-2}.
 
*Für&nbsp; \rho=10\ {\rm dB}&nbsp; ergibt sich&nbsp; x=3.162 &nbsp; &rArr; &nbsp; {\rm Q}(\rho=10\ {\rm dB})={\rm Q}(x=3.162) =7.827 \cdot 10^{-4}.&nbsp; Nach &bdquo;Quantisierung&rdquo;:&nbsp; {\rm Q}(x=3.15) =8.1635 \cdot 10^{-4}.
 
  
  
Line 120: Line 121:
  
 
[[File:Qfunction bedienung.png|right|550px]]
 
[[File:Qfunction bedienung.png|right|550px]]
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Verwendete Gleichungen am Beispiel &nbsp;{\rm Q}(x)
+
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Equations used in the example &nbsp;{\rm Q}(x)
  
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Auswahloption für &nbsp;{\rm Q}(x)&nbsp; oder &nbsp;{\rm 0.5 \cdot erfc}(x)
+
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Selection option for &nbsp;{\rm Q}(x)&nbsp; or &nbsp;{\rm 0.5 \cdot erfc}(x)
  
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Schranken &nbsp;{\rm LB}&nbsp; und &nbsp;{\rm UB}&nbsp; werden gezeichnet
+
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Bounds &nbsp;{\rm LB}&nbsp; and &nbsp;{\rm UB}&nbsp; are drawn
  
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Auswahl, ob Abszisse linear &nbsp;\rm (lin)&nbsp; oder logarithmisch &nbsp;\rm (log)&nbsp;
+
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Selection whether abscissa is linear &nbsp;\rm (lin)&nbsp; or logarithmic &nbsp;\rm (log)&nbsp;
  
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Auswahl, ob Ordinate linear &nbsp;\rm (lin)&nbsp; oder logarithmisch &nbsp;\rm (log)&nbsp;
+
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Select whether ordinate is linear &nbsp;\rm (lin)&nbsp; or logarithmic &nbsp;\rm (log)&nbsp;
  
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Numerikausgabe am Beispiel &nbsp;{\rm Q}(x)&nbsp; bei linearer Abszisse
+
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Numerical output using the example &nbsp;{\rm Q}(x)&nbsp; with linear abscissa
  
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Slidereingabe des Abszissenwertes &nbsp;x&nbsp; für lineare Abszisse
+
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Slider input of abscissa value &nbsp;x&nbsp; for linear abscissa
  
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Slidereingabe des Abszissenwertes &nbsp;\rho \ \rm [dB]&nbsp; für logarithmische Abszisse
+
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Slider input of abscissa value &nbsp;\rho \ \rm [dB]&nbsp; for logarithmic abscissa
  
&nbsp; &nbsp; '''(I)''' &nbsp; &nbsp; Grafikausgabe der Funktion  &nbsp;{\rm Q}(x)&nbsp; &ndash; hier:&nbsp; lineare Abszisse
+
&nbsp; &nbsp; '''(I)''' &nbsp; &nbsp; Graphical output of function &nbsp;{\rm Q}(x)&nbsp; &ndash; here:&nbsp; linear abscissa
  
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Grafikausgabe der Funktion  &nbsp;{\rm 0.5 \cdot erfc}(x)&nbsp; &ndash; hier:&nbsp; lineare Abszisse
+
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Graph output of function &nbsp;{\rm 0.5 \cdot erfc}(x)&nbsp; &ndash; here:&nbsp; linear abscissa
  
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Variationsmöglichkeit für die graphischen Darstellungen
+
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Variation possibility for the graphical representations
  
\hspace{1.5cm}&bdquo;+&rdquo; (Vergrößern),  
+
\hspace{1.5cm}"+" (zoom in),  
  
\hspace{1.5cm} &bdquo;-&rdquo; (Verkleinern)
+
\hspace{1.5cm}"-" (zoom out)
  
\hspace{1.5cm} &bdquo;\rm o&rdquo; (Zurücksetzen)
+
\hspace{1.5cm} "\rm o" (Reset)
  
\hspace{1.5cm} &bdquo;\leftarrow&rdquo; (Verschieben nach links), usw.
+
\hspace{1.5cm} "\leftarrow" (Move left), etc.
 
<br clear=all>
 
<br clear=all>
 
==About the Authors==
 
==About the Authors==
Dieses interaktive Berechnungstool  wurde am&nbsp; [http://www.lnt.ei.tum.de/startseite Lehrstuhl für Nachrichtentechnik]&nbsp; der&nbsp; [https://www.tum.de/ Technischen Universität München]&nbsp; konzipiert und realisiert.  
+
<br>
*Die erste Version wurde 2007 von&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Thomas_Gro.C3.9Fer_.28Diplomarbeit_LB_2006.2C_danach_freie_Mitarbeit_bis_2010.29|Thomas Großer]]&nbsp; im Rahmen seiner Diplomarbeit mit &bdquo;FlashMX&ndash;Actionscript&rdquo; erstellt (Betreuer:&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Mitarbeiter_und_Dozenten#Prof._Dr.-Ing._habil._G.C3.BCnter_S.C3.B6der_.28am_LNT_seit_1974.29|Günter Söder]]).  
+
This interactive calculation tool was designed and implemented at the&nbsp; [https://www.ei.tum.de/en/lnt/home/ Institute for Communications Engineering]&nbsp; at the&nbsp; [https://www.tum.de/en Technical University of Munich].  
*2018/2019 wurde das Programm  von&nbsp; ''Marwen Ben Ammar''&nbsp;  und&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Xiaohan_Liu_.28Bachelorarbeit_2018.29|Xiaohan Liu]]&nbsp; (Bachelorarbeit, Betreuer:&nbsp; [[Biographies_and_Bibliographies/Beteiligte_der_Professur_Leitungsgebundene_%C3%9Cbertragungstechnik#Tasn.C3.A1d_Kernetzky.2C_M.Sc._.28bei_L.C3.9CT_seit_2014.29|Tasnád Kernetzky]] ) auf  &bdquo;HTML5&rdquo; umgesetzt und neu gestaltet.
+
*The first version was created in 2007 by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Thomas_Gro.C3.9Fer_.28Diplomarbeit_LB_2006.2C_danach_freie_Mitarbeit_bis_2010.29|Thomas Großer]]&nbsp; as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Mitarbeiter_und_Dozenten#Prof._Dr.-Ing._habil._G.C3.BCnter_S.C3.B6der_.28am_LNT_seit_1974.29|Günter Söder]]).  
 +
*In 2018 the program was redesigned by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Xiaohan_Liu_.28Bachelorarbeit_2018.29|Xiaohan Liu]]&nbsp; as part of her bachelor thesis&nbsp; (Supervisor: [[Biographies_and_Bibliographies/Beteiligte_der_Professur_Leitungsgebundene_%C3%9Cbertragungstechnik#Tasn.C3.A1d_Kernetzky.2C_M.Sc._.28bei_L.C3.9CT_seit_2014.29|Tasnád Kernetzky]] ) via "HTML5".
 +
*Last revision and English version 2021 by&nbsp; [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; in the context of a working student activity.&nbsp;
 +
 
  
 +
The conversion of this applet to HTML 5 was financially supported by&nbsp; [https://www.ei.tum.de/studium/studienzuschuesse/ "Studienzuschüsse"]&nbsp; (Faculty EI of the TU Munich).&nbsp; We thank.
  
Die Umsetzung dieses Applets auf HTML 5 wurde durch&nbsp; [https://www.ei.tum.de/studium/studienzuschuesse/ Studienzuschüsse]&nbsp; der Fakultät EI der TU München finanziell unterstützt. Wir bedanken uns.
 
  
  
 
==Once again: Open Applet in new Tab==
 
==Once again: Open Applet in new Tab==
 
<br>
 
<br>
{{LntAppletLink|qfunction_en}}
+
{{LntAppletLinkEnDe|qfunction_en|qfunction}}
&nbsp; &nbsp; ''Hinweis:'' &nbsp; Das Applet ist für '''CHROME'''&ndash;Browser optimiert. Bei anderen Browsern kommt es teilweise zu Darstellungsproblemen.
 

Latest revision as of 19:49, 16 April 2023

Open Applet in new Tab   Deutsche Version Öffnen


Applet Description


This applet allows the calculation and graphical representation of the (complementary) Gaussian error functions  {\rm Q}(x)  and  1/2\cdot {\rm erfc}(x), which are of great importance for error probability calculation.

  • Both the abscissa and the function value can be represented either linearly or logarithmically.
  • For both functions an upper bound  \rm (UB)  and a lower bound  \rm (LB)  are given.

Theoretical Background


In the study of digital transmission systems, it is often necessary to determine the probability that a (zero mean) Gaussian distributed random variable  x  with variance  σ^2  exceeds a given value  x_0.  For this probability holds:

{\rm Pr}(x > x_0)={\rm Q}(\frac{x_0}{\sigma}) = 1/2 \cdot {\rm erfc}(\frac{x_0}{\sqrt{2} \cdot \sigma}).

The function {\rm Q}(x )

The function  {\rm Q}(x)  is called the  complementary Gaussian error integral.  The following calculation rule applies:

{\rm Q}(x ) = \frac{1}{\sqrt{2\pi}}\int_{x}^{ +\infty}\hspace{-0.2cm}{\rm e}^{-u^{2}/\hspace{0.05cm} 2}\,{\rm d} u .
  • This integral cannot be solved analytically and must be taken from tables if one does not have this applet available.
  • Specially for larger  x  values  (i.e., for small error probabilities), the bounds given below provide a useful estimate for  {\rm Q}(x), which can also be calculated without tables.
  • An upper bound  \rm (UB)  of this function is:
{\rm Q}_{\rm UB}(x )=\text{Upper Bound }\big [{\rm Q}(x ) \big ] = \frac{ 1}{\sqrt{2\pi}\cdot x}\cdot {\rm e}^{- x^{2}/\hspace{0.05cm}2} > {\rm Q}(x).
  • Correspondingly, for the lower bound  \rm (LB):
{\rm Q}_{\rm LB}(x )=\text{Lower Bound }\big [{\rm Q}(x ) \big ] =\frac{1-1/x^2}{\sqrt{2\pi}\cdot x}\cdot {\rm e}^{-x^ 2/\hspace{0.05cm}2} ={\rm Q}_{\rm UB}(x ) \cdot (1-1/x^2)< {\rm Q}(x).

However, in many program libraries, the function  {\rm Q}(x )  cannot be found.

The function 1/2 \cdot {\rm erfc}(x )

On the other hand, in almost all program libraries, you can find the  complementary Gaussian error function:

{\rm erfc}(x) = \frac{2}{\sqrt{\pi}}\int_{x}^{ +\infty}\hspace{-0.2cm}{\rm e}^{-u^{2}}\,{\rm d} u ,

which is related to  {\rm Q}(x)  as follows:   {\rm Q}(x)=1/2\cdot {\rm erfc}(x/{\sqrt{2}}).

  • Since in almost all applications this function is used with the factor  1/2, in this applet exactly this function was realized:
1/2 \cdot{\rm erfc}(x) = \frac{1}{\sqrt{\pi}}\int_{x}^{ +\infty}\hspace{-0.2cm}{\rm e}^{-u^{2}}\,{\rm d} u .
  • Once again, an upper and lower bound can be specified for this function:
\text{Upper Bound }\big [1/2 \cdot{\rm erfc}(x) \big ] = \frac{ 1}{\sqrt{\pi}\cdot 2x}\cdot {\rm e}^{- x^{2}} ,
\text{Lower Bound }\big [1/2 \cdot{\rm erfc}(x) \big ] = \frac{ {1-1/(2x^2)}}{\sqrt{\pi}\cdot 2x}\cdot {\rm e}^{- x^{2}} .

When which function offers advantages?

\text{Example 1:}  We consider binary baseband transmission. Here, the bit error probability  p_{\rm B} = {\rm Q}({s_0}/{\sigma_d}), where the useful signal can take the values  \pm s_0  and the noise root-mean-square value  \sigma_d .

It is assumed that tables are available listing the argument of the two Gaussian error functions at distance  0.1.  With  s_0/\sigma_d = 4  one obtains for the bit error probability according to the function  {\rm Q}(x ):

p_{\rm B} = {\rm Q} (4) \approx 0.317 \cdot 10^{-4}\hspace{0.05cm}.

According to the second equation, we get:

p_{\rm B} = {1}/{2} \cdot {\rm erfc} ( {4}/{\sqrt{2} })= {1}/{2} \cdot {\rm erfc} ( 2.828)\approx {1}/{2} \cdot {\rm erfc} ( 2.8)= 0.375 \cdot 10^{-4}\hspace{0.05cm}.
  • The first value is more correct.  In the second method of calculation, one must round or – even better – interpolate, which is very difficult due to the strong nonlinearity of this function.
  • Accordingly, with the given numerical values, {\rm Q}(x )  is more suitable.  However, outside of exercise examples  s_0/\sigma_d  will usually have a "curvilinear" value.  In this case, of course,  {\rm Q}(x)  offers no advantage over  1/2 \cdot{\rm erfc}(x).


\text{Example 2:}  With the energy per bit  (E_{\rm B})  and the noise power density  (N_0)  the bit error probability of Binary Phase Shift Keying  (BPSK) is:

p_{\rm B} = {\rm Q} \left ( \sqrt{ {2 E_{\rm B} }/{N_0} }\right ) = {1}/{2} \cdot { \rm erfc} \left ( \sqrt{ {E_{\rm B} }/{N_0} }\right ) \hspace{0.05cm}.

For the numerical values  E_{\rm B} = 16 \rm mWs  and  N_0 = 1 \rm mW/Hz  we obtain:

p_{\rm B} = {\rm Q} \left (4 \cdot \sqrt{ 2} \right ) = {1}/{2} \cdot {\rm erfc} \left ( 4\right ) \hspace{0.05cm}.
  • The first way leads to the result  p_{\rm B} = {\rm Q} (5.657) \approx {\rm Q} (5.7) = 0.6 \cdot 10^{-8}\hspace{0.01cm}, while   1/2 \cdot{\rm erfc}(x)  yields the more correct value  p_{\rm B} \approx 0.771 \cdot 10^{-8}  here.
  • As in the first example, however, you can see:   The functions  {\rm Q}(x)  and  1/2 \cdot{\rm erfc}(x)  are basically equally well suited.
  • Advantages or disadvantages of one or the other function arise only for concrete numerical values.


Exercises

  • First select the number  (1, 2, \text{...})  of the exercise.  The number  0  corresponds to a "Reset":  Same setting as at program start.
  • A task description is displayed.  The parameter values ​​are adjusted.  Solution after pressing "Show solution".


(1)   Find the values of the function  {\rm Q}(x)  for  x=1x=2x=4  and  x=6.  Interpret the graphs for linear and logarithmic ordinates.

  • The applet returns the values  {\rm Q}(1)=1.5866 \cdot 10^{-1}{\rm Q}(2)=2. 275 \cdot 10^{-2}{\rm Q}(4)=3.1671 \cdot 10^{-5}  and  {\rm Q}(6)=9.8659 \cdot 10^{-10}.
  • With linear ordinate, the values for  x>3  are indistinguishable from the zero line.  More interesting is the plot with logarithmic ordinate.


(2)   Evaluate the two bounds  {\rm UB}(x )=\text{Upper Bound }\big [{\rm Q}(x ) \big ]  and  {\rm LB}(x )=\text{Lower Bound }\big [{\rm Q}(x ) \big ]  for the  {\rm Q}  function.

  • For  x \ge 2  the upper bound is only slightly above  {\rm Q}(x)  and the lower bound is only slightly below  {\rm Q}(x)
  • For example:  {\rm Q}(x=4)=3.1671 \cdot 10^{-5}   ⇒   {\rm LB}(x=4)=3.1366 \cdot 10^{-5},   {\rm UB}(x=4)=3.3458 \cdot 10^{-5}.
  • The upper bound has greater significance for assessing a communications system than "LB",  since this corresponds to a "worst case" consideration.


(3)   Try to use the app to determine  {\rm Q}(x=2 \cdot \sqrt{2} \approx 2.828)  as accurately as possible despite the quantization of the input parameter.

  • The program returns for  x=2.8  the too large result  2.5551 \cdot 10^{-3}  and for  x=2.85  the result  2.186 \cdot 10^{-3}.  The exact value lies in between.
  • But it also holds:  {\rm Q}(x=2 \cdot \sqrt{2})=0.5 \cdot {\rm erfc}(x=2).  This gives the exact value  {\rm Q}(x=2 \cdot \sqrt{2})=2.3389 \cdot 10^{-3}.


(4)   Find the values of the function  0.5 \cdot {\rm erfc}(x)  for  x=1x=2x=3  and  x=4.  Interpret the exact results and the bounds.

  • The applet returns:  0.5 \cdot {\rm erfc}(1)=7.865 \cdot 10^{-2}0.5 \cdot {\rm erfc}(2)=2. 3389 \cdot 10^{-3}0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5}  and  0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.
  • All the above statements about  {\rm Q}(x)  with respect to suitable representation type and upper and lower bounds also apply to the function  0.5 \cdot {\rm erfc}(x).


(5)   The results of  (4)  are now to be converted for the case of a logarithmic abscissa.  The conversion is done according to  \rho\big[{\rm dB}\big ] = 20 \cdot \lg(x).

  • The linear abscissa value  x=1  leads to the logarithmic abscissa value  \rho=0\ \rm dB   ⇒   0. 5 \cdot {\rm erfc}(\rho=0\ {\rm dB})={0.5 \cdot \rm erfc}(x=1)=7.865 \cdot 10^{-2}.
  • Similarly  0.5 \cdot {\rm erfc}(\rho=6.021\ {\rm dB}) =0.5 \cdot {\rm erfc}(x=2)=2. 3389 \cdot 10^{-3},     0.5 \cdot {\rm erfc}(\rho=9.542\ {\rm dB})=0.5 \cdot {\rm erfc}(3)=1.1045 \cdot 10^{-5},   
  • 0.5 \cdot {\rm erfc}(\rho=12.041\ {\rm dB})= 0.5 \cdot {\rm erfc}(4)=7.7086 \cdot 10^{-9}.
  • As per right diagram:  0.5 \cdot {\rm erfc}(\rho=6\ {\rm dB}) =2.3883 \cdot 10^{-3},     0.5 \cdot {\rm erfc}(\rho=9. 5\ {\rm dB}) =1.2109 \cdot 10^{-5},     0.5 \cdot {\rm erfc}(\rho=12\ {\rm dB}) =9.006 \cdot 10^{-9}.


(6)   Find  {\rm Q}(\rho=0\ {\rm dB}){\rm Q}(\rho=5\ {\rm dB})  and  {\rm Q}(\rho=10\ {\rm dB}),  and establish the relationship between linear and logarithmic abscissa.

  • The program returns for logarithmic abscissa  {\rm Q}(\rho=0\ {\rm dB})=1. 5866 \cdot 10^{-1}{\rm Q}(\rho=5\ {\rm dB})=3.7679 \cdot 10^{-2}{\rm Q}(\rho=10\ {\rm dB})=7.827 \cdot 10^{-4}.
  • The conversion is done according to the equation  x=10^{\hspace{0.05cm}0.05\hspace{0.05cm} \cdot\hspace{0.05cm} \rho[{\rm dB}]}.  For  \rho=0\ {\rm dB}  we get  x=1   ⇒   {\rm Q}(\rho=0\ {\rm dB})={\rm Q}(x=1) =1.5866 \cdot 10^{-1}.
  • For  \rho=5\ {\rm dB}  we get  x=1.1778   ⇒   {\rm Q}(\rho=5\ {\rm dB})={\rm Q}(x=1. 778) =3.7679 \cdot 10^{-2}.  From the left diagram:  {\rm Q}(x=1.8) =3.593 \cdot 10^{-2}.
  • For  \rho=10\ {\rm dB}  we get  x=3.162   ⇒   {\rm Q}(\rho=10\ {\rm dB})={\rm Q}(x=3. 162) =7.827 \cdot 10^{-4}.  After "quantization":  {\rm Q}(x=3.15) =8.1635 \cdot 10^{-4}.



Applet Manual


Qfunction bedienung.png

    (A)     Equations used in the example  {\rm Q}(x)

    (B)     Selection option for  {\rm Q}(x)  or  {\rm 0.5 \cdot erfc}(x)

    (C)     Bounds  {\rm LB}  and  {\rm UB}  are drawn

    (D)     Selection whether abscissa is linear  \rm (lin)  or logarithmic  \rm (log) 

    (E)     Select whether ordinate is linear  \rm (lin)  or logarithmic  \rm (log) 

    (F)     Numerical output using the example  {\rm Q}(x)  with linear abscissa

    (G)     Slider input of abscissa value  x  for linear abscissa

    (H)     Slider input of abscissa value  \rho \ \rm [dB]  for logarithmic abscissa

    (I)     Graphical output of function  {\rm Q}(x)  – here:  linear abscissa

    (J)     Graph output of function  {\rm 0.5 \cdot erfc}(x)  – here:  linear abscissa

    (K)     Variation possibility for the graphical representations

\hspace{1.5cm}"+" (zoom in),

\hspace{1.5cm}"-" (zoom out)

\hspace{1.5cm} "\rm o" (Reset)

\hspace{1.5cm} "\leftarrow" (Move left), etc.

About the Authors


This interactive calculation tool was designed and implemented at the  Institute for Communications Engineering  at the  Technical University of Munich.

  • The first version was created in 2007 by  Thomas Großer  as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: Günter Söder).
  • In 2018 the program was redesigned by  Xiaohan Liu  as part of her bachelor thesis  (Supervisor: Tasnád Kernetzky ) via "HTML5".
  • Last revision and English version 2021 by  Carolin Mirschina  in the context of a working student activity. 


The conversion of this applet to HTML 5 was financially supported by  "Studienzuschüsse"  (Faculty EI of the TU Munich).  We thank.


Once again: Open Applet in new Tab


Open Applet in new Tab   Deutsche Version Öffnen