Applets:Spektrum: Unterschied zwischen den Versionen

Aus LNTwww
Wechseln zu:Navigation, Suche
K (Tasnad verschob die Seite Spektrum nach Spektrum)
 
(148 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{FirstPage}}
 
{{Header|
 
Untermenü=
 
|Vorherige Seite=
 
|Nächste Seite=
 
}}
 
 
 
==Zeitfunktion und zugehörige Spektralfunktion==
 
==Zeitfunktion und zugehörige Spektralfunktion==
<html>
 
<head>
 
    <meta charset="utf-8" />
 
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.99.6/jsxgraphcore.js"></script>
 
    <!-- <script type="text/javascript" src="https://www.lntwww.de/MathJax/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,local/mwMathJaxConfig"></script> -->
 
    <!-- <script type="text/javascript" src="https://cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"></script> -->
 
    <style>
 
        .button {
 
            background-color: black;
 
            border: none;
 
            color: white;
 
            font-family: arial;
 
            padding: 8px 20px;
 
            text-align: center;
 
            text-decoration: none;
 
            display: inline-block;
 
            font-size: 16px;
 
            border-radius: 15px;
 
        }
 
        .button:active {
 
            background-color: #939393;
 
        }
 
        table {
 
            border-collapse: separate; 
 
            border-spacing: 20px 0;
 
        }
 
    </style>
 
</head>
 
 
 
 
<body onload="drawNow()">
 
<!-- Resetbutton, Checkbox, Regler und Plots -->
 
<p>
 
    <input type="checkbox" id="gridbox" onclick="showgrid();" checked> <label for="gridbox">Gitterlinien Zeigen</label>
 
    <button class="button" onclick="drawNow();">Reset</button>
 
</p>
 
<div id="cnfBoxHtml" class="jxgbox" style="width:600px; height:100px; float:top; margin:-10px 20px 100px 0px;"></div>
 
<div id="pltBoxHtml" class="jxgbox" style="width:600px; height:600px; border:1px solid black; margin:-10px 20px 100px 0px;"></div>
 
 
<!-- Ausgabefelder -->
 
<table>
 
    <tr>
 
        <td>$x(t)$=    <span id="x(t)"></span>    </td>
 
        <td>$x(t+ T_0)$=<span id="x(t+T_0)"></span> </td>
 
        <td>$x(t+2T_0)$=<span id="x(t+2T_0)"></span></td>
 
    </tr>
 
    <tr>
 
        <td>$x_{\text{max}}$=<span id="x_max"></span></td>
 
        <td>$T_0$=          <span id="T_0"></span>  </td>
 
    </tr>
 
</table>
 
 
 
<script type="text/javascript">
 
    function drawNow() {
 
        // Grundeinstellungen der beiden Applets
 
        JXG.Options.text.useMathJax = true;
 
        cnfBox = JXG.JSXGraph.initBoard('cnfBoxHtml', {
 
            showCopyright: false, showNavigation: false, axis: false,
 
            grid: false, zoom: { enabled: false }, pan: { enabled: false },
 
            boundingbox: [-1, 2.2, 12.4, -2.2]
 
        });
 
        pltBox = JXG.JSXGraph.initBoard('pltBoxHtml', {
 
            showCopyright: false, axis: false,
 
            zoom: { factorX: 1.1, factorY: 1.1, wheel: true, needshift: true, eps: 0.1 },
 
            grid: false, boundingbox: [-0.5, 2.2, 12.4, -2.2]
 
        });
 
        cnfBox.addChild(pltBox);
 
        // Einstellungen der Achsen
 
        xaxis = pltBox.create('axis', [[0, 0], [1, 0]], {
 
            name: '$\\dfrac{t}{T}$',
 
            withLabel: true, label: { position: 'rt', offset: [-25, -10] }
 
        });
 
        yaxis = pltBox.create('axis', [[0, 0], [0, 1]], {
 
            name: '$x(t)$',
 
            withLabel: true, label: { position: 'rt', offset: [10, -5] }
 
        });
 
        // Erstellen der Schieberegler
 
        a = cnfBox.create('slider', [ [-0.7, 1.5], [3, 1.5], [0, 0.5, 1] ], {
 
            suffixlabel: '$A_1=$',
 
            unitLabel: 'V', snapWidth: 0.01
 
            }),
 
        b = cnfBox.create('slider', [ [-0.7, 0.5], [3, 0.5], [0, 1, 10] ], {
 
            suffixlabel: '$f_1=$',
 
            unitLabel: 'kHz', snapWidth: 0.1
 
        }),
 
        c = cnfBox.create('slider', [ [-0.7, -0.5], [3, -0.5], [-180, 0, 180] ], {
 
            suffixlabel: '$\\phi_1=$',
 
            unitLabel: 'Grad', snapWidth: 5
 
        }),
 
        d = cnfBox.create('slider', [ [6, 1.5], [9.7, 1.5], [0, 0.5, 1] ], {
 
            suffixlabel: '$A_2=$',
 
            unitLabel: 'V', snapWidth: 0.01
 
        }),
 
        e = cnfBox.create('slider', [ [6, 0.5], [9.7, 0.5], [0, 2, 10] ], {
 
            suffixlabel: '$f_2=$',
 
            unitLabel: 'kHz', snapWidth: 0.1
 
        }),
 
        g = cnfBox.create('slider', [ [6, -0.5], [9.7, -0.5], [-180, 90, 180] ], {
 
            suffixlabel: '$\\phi_2=$',
 
            unitLabel: 'Grad', snapWidth: 5
 
        }),
 
        t = cnfBox.create('slider', [ [-0.7, -1.5], [3, -1.5], [0, 0, 10] ], {
 
            suffixlabel: '$t=$',
 
            unitLabel: 's', snapWidth: 0.2
 
        }),
 
        // Definition der Funktion
 
        signaldarstellung = pltBox.create('functiongraph', [function(x) {
 
            return (a.Value() * Math.cos(2 * Math.PI * b.Value() * x - 2 * Math.PI * c.Value() / 360) + d.Value() * Math.cos(2 * Math.PI * e.Value() * x - 2 * Math.PI * g.Value() / 360))
 
        }], {
 
            strokeColor: "red"
 
        });
 
        // Definition des Punktes p_T0, des Hilfspunktes p_T0h und der Geraden l_T0 für Periodendauer T_0
 
        p_T0 = pltBox.create('point', [
 
            function() {
 
                return (Math.round(getT0() * 100) / 100);
 
            },
 
            function() {
 
                return a.Value() * Math.cos(2 * Math.PI * b.Value() * (Math.round(getT0() * 100) / 100) - 2 * Math.PI * c.Value() / 360) +
 
                    d.Value() * Math.cos(2 * Math.PI * e.Value() * (Math.round(getT0() * 100) / 100) - 2 * Math.PI * g.Value() / 360);
 
            }],
 
            { color: "blue", fixed: true, label: false, size: 1, name: '' }
 
        );
 
        p_T0h = pltBox.create('point',
 
            [function() { return (Math.round(getT0() * 100) / 100); }, 2],
 
            { visible: false, color: "blue", fixed: true, label: false, size: 1, name: '' }
 
        );
 
        l_T0 = pltBox.create('line', [p_T0, p_T0h])
 
        // Bestimmung des Wertes T_0 mit der Funktion von Siebenwirth
 
        setInterval(function() {
 
            document.getElementById("T_0").innerHTML = Math.round(getT0() * 100) / 100;
 
          }, 50);
 
        function isInt(n) {
 
            return n % 1 === 0;
 
        }
 
        function getT0() {
 
            var A, B, C, Q;
 
            if (b.Value() < e.Value()) {
 
                A = b.Value();
 
                B = e.Value();
 
            } else {
 
                B = b.Value();
 
                A = e.Value();
 
            }
 
            // console.log('Berechne T0 mit A=' + A, 'B=' + B);
 
            for (var x = 1; x <= 100; x++) {
 
                C = A / x;
 
                Q = B / C;
 
                // console.log(x + '. Durchgang: C = ' + C, 'Q = ' + Q);
 
                if (isInt(Q)) {
 
                    // console.log('Q ist eine Ganzzahl!!! T0 ist damit ', 1 / C);
 
                    return 1 / C;
 
                }
 
                if (x === 10) {
 
                    return 10;
 
                }
 
                if ((1 / C) > 10)
 
                    return 10
 
            }
 
        }
 
        // Ausgabe des Wertes x(t)
 
        setInterval(function() {
 
            document.getElementById("x(t)").innerHTML = Math.round((a.Value() * Math.cos(2 * Math.PI * b.Value() * t.Value() - 2 * Math.PI * c.Value() / 360) + d.Value() * Math.cos(2 * Math.PI * e.Value() * t.Value() - 2 * Math.PI * g.Value() /
 
                360)) * 1000) / 1000;
 
        }, 50);
 
        // Ausgabe des Wertes x(t+T_0)
 
        setInterval(function() {
 
            document.getElementById("x(t+T_0)").innerHTML = Math.round((a.Value() * Math.cos(2 * Math.PI * b.Value() * (t.Value() + Math.round(getT0() * 1000) / 1000) - c.Value()) + d.Value() * Math.cos(2 * Math.PI * e.Value() * (t.Value() +
 
                Math.round(getT0() * 1000) / 1000) - g.Value())) * 1000) / 1000;
 
        }, 50);
 
        // Ausgabe des Wertes x(t+2T_0)
 
        setInterval(function() {
 
            document.getElementById("x(t+2T_0)").innerHTML = Math.round((a.Value() * Math.cos(2 * Math.PI * b.Value() * (t.Value() + 2 * Math.round(getT0() * 1000) / 1000) - c.Value()) + d.Value() * Math.cos(2 * Math.PI * e.Value() * (t.Value() +
 
                2 * Math.round(getT0() * 1000) / 1000) - g.Value())) * 1000) / 1000;
 
        }, 50);
 
        // Ausgabe des Wertes x_max
 
        setInterval(function() {
 
            var x = new Array(50000);
 
            for (var i = 0; i < 50001; i++) {
 
                x[i] = Math.round((a.Value() * Math.cos(2 * Math.PI * b.Value() * (i / 1000) - 2 * Math.PI * c.Value() / 360) + d.Value() * Math.cos(2 * Math.PI * e.Value() * (i / 1000) - 2 * Math.PI * g.Value() / 360)) * 1000) / 1000;
 
            }
 
            document.getElementById("x_max").innerHTML = Math.max.apply(Math, x);
 
        }, 50);
 
    };
 
    // Definition der Funktion zum An- und Ausschalten des Koordinatengitters
 
    function showgrid() {
 
        if (gridbox.checked) {
 
            xaxis = pltBox.create('axis', [ [0, 0], [1, 0] ], {});
 
            yaxis = pltBox.create('axis', [ [0, 0], [0, 1] ], {});
 
        } else {
 
            xaxis.removeTicks(xaxis.defaultTicks);
 
            yaxis.removeTicks(yaxis.defaultTicks);
 
        }
 
        pltBox.fullUpdate();
 
    };
 
</script>
 
</body>
 
</html>
 
  
 +
{{LntAppletLink|spektrum}}
  
 
==Theoretischer Hintergrund==
 
==Theoretischer Hintergrund==
Zeile 289: Zeile 84:
 
*Der asymptotische Abfall von $X(f)$ verläuft in diesem Sonderfall mit $1/f^3$.
 
*Der asymptotische Abfall von $X(f)$ verläuft in diesem Sonderfall mit $1/f^3$.
  
{{Display}}
+
 
 +
{{LntAppletLink|spektrum}}

Aktuelle Version vom 27. September 2017, 15:02 Uhr

Zeitfunktion und zugehörige Spektralfunktion

Applet in neuem Tab öffnen

Theoretischer Hintergrund

  • Der Zusammenhang zwischen Zeitfunktion $x(t)$ und dem Spektrum $X(f)$ ist durch die Fouriertransformation (FT) $$X(f)=\int_{-\infty}^{+\infty}x(t)\cdot e^{-j2\pi f t}\hspace{0.15cm} {\rm d}t$$ und deren Inversen (IFT) $$x(t)=\int_{-\infty}^{+\infty}X(f)\cdot e^{j2\pi f t} \hspace{0.15cm} {\rm d}f$$ gegeben.
  • In allen Beispielen verwenden wir reelle und gerade Funktionen. Somit gilt:

$$X(f)=\int_{-\infty}^{+\infty}x(t)\cdot \cos(2\pi ft) \hspace{0.15cm} {\rm d}t$$ und $$x(t)=\int_{-\infty}^{+\infty}X(f)\cdot \cos(2\pi ft) \hspace{0.15cm} {\rm d}f.$$

  • $x(t)$ und $X(f)$ haben unterschiedliche Einheiten, z. B. $x(t)$ in V, $X(f)$ in V/Hz.
  • Alle Zeiten sind auf eine Normierungszeit $T$ und alle Frequenzen auf $1/T \Rightarrow$ das Spektrum $X(f)$ muss noch mit $T$ multipliziert werden.
  • Der Zusammenhang zwischen Impulse und deren Spektren und der ähnlich aufgebauten Animation „Tiefpass“ basiert auf dem Vertauschungssatz.

Gaußimpuls

  • Die Zeitfunktion mit der Höhe $K$ und der (äquivalenten) Dauer $\Delta t$ lautet:

$$x(t)=K\cdot e^{-\pi\cdot(t/\Delta t)^2}.$$

  • Die äquivalente Zeitdauer $\Delta t$ ergibt sich aus dem flächengleichen Rechteck.
  • Der Wert bei t=$\Delta t/2$ ist um den Faktor 0.456 kleiner als der Wert bei $t=0$.
  • Für die Spektralfunktion erhält man gemäß der Fouriertransformation:

$$X(f)=K\cdot \Delta t \cdot e^{-\pi(f\cdot \Delta t)^2} .$$

  • Je kleiner die äquivalente Zeitdauer $\Delta t$ ist, um so breiter und niedriger ist das Spektrum (Reziprozitätsgesetz von Bandbreite und Impulsdauer).
  • Sowohl $x(t)$ als auch $X(f)$ sind zu keinem $ f$- bzw. $t$-Wert exakt gleich Null.
  • Praktisch ist der Gaußimpuls in Zeit und Frequenz begrenzt. Zum Beispiel ist $x(t)$ bereits bei $t=1.5 \Delta \cdot t$ auf $1\% $ des Maximums abgefallen.

Rechteckimpuls

  • Die Zeitfunktion mit der Höhe $K$ und der (äquivalenten) Dauer $\Delta t$ lautet:

$$x(t) = \left\{ \begin{array}{l} \hspace{0.25cm}K \\ K /2 \\ \hspace{0.25cm} 0 \\ \end{array} \right.\quad \quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}c} {\left| \hspace{0.05cm} t\hspace{0.05cm} \right| < T/2,} \\ {\left| \hspace{0.05cm}t\hspace{0.05cm} \right| = T/2,} \\ {\left|\hspace{0.05cm} t \hspace{0.05cm} \right| > T/2.} \\ \end{array}$$

  • Der $\pm \Delta t/2$ - Wert liegt mittig zwischen links- und rechtsseitigem Grenzwert.
  • Für die Spektralfunktion erhält man entsprechend den Gesetzmäßigkeiten der Fouriertransformation (1. Fourierintegral):

$$X(f)=K\cdot \Delta t \cdot si(\pi\cdot \Delta t \cdot f) \quad \text{mit} \ si(x)=\frac{sin(x)}{x}.$$

  • Der Spektralwert bei $f=0$ ist gleich der Rechteckfläche der Zeitfunktion.
  • Die Spektralfunktion besitzt Nullstellen in äquidistanten Abständen $1/\Delta t$.
  • Das Integral über der Spektralfunktion $X(f)$ ist gleich dem Signalwert zum Zeitpunkt $t=0$, also der Impulsamplitude $K$.

Dreieckimpuls

  • Die Zeitfunktion mit der Höhe $K$ und der (äquivalenten) Dauer $\Delta t$ lautet:

$$x(t) = \left\{ \begin{array}{l} \hspace{0.25cm}K\cdot \Big(1-\frac{|t|}{\Delta t}\Big) \\ \hspace{0.25cm} 0 \\ \end{array} \right.\quad \quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}c} {\left| \hspace{0.05cm} t\hspace{0.05cm} \right| < \Delta t,} \\ {\left| \hspace{0.05cm}t\hspace{0.05cm} \right| \ge \Delta t.} \\ \end{array}$$

  • Die absolute Zeitdauer ist $2 \cdot \Delta t$, d.h. doppelt so groß als die des Rechtecks.
  • Für die Spektralfunktion erhält man gemäß der Fouriertransformation:

$$X(f)=K\cdot \Delta f \cdot si^2(\pi\cdot \Delta t \cdot f) \quad \text{mit} \ si(x)=\frac{sin(x)}{x}.$$

  • Obige Zeitfunktion ist gleich der Faltung zweier Rechteckimpulse, jeweils mit Breite $\Delta t \Rightarrow X(f)$ beinhaltet anstelle der $si$-Funktion die $si^2$-Funktion.
  • $X(f)$ weist somit ebenfalls Nullstellen im äquidistanten Abständen $1/\Delta f$ auf.
  • Der asymptotische Abfall von $X(f)$ erfolgt hier mit $1/f^2$, während zum Vergleich der Rechteckimpuls mit $1/f$ abfällt.

Trapezimpuls

Die Zeitfunktion mit der Höhe $K$ und den Zeitparametern $t_1$ und $t_2$ lautet:

$$x(t) = \left\{ \begin{array}{l} \hspace{0.25cm}K \\ K\cdot \frac{t_2-|t|}{t_2-t_1} \\ \hspace{0.25cm} 0 \\ \end{array} \right.\quad \quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}c} {\left| \hspace{0.05cm} t\hspace{0.05cm} \right| \le t_1,} \\ {t_1\le \left| \hspace{0.05cm}t\hspace{0.05cm} \right| \le t_2,} \\ {\left|\hspace{0.05cm} t \hspace{0.05cm} \right| \ge t_2.} \\ \end{array}$$

  • Für die äquivalente Zeitdauer (flächengleiches Rechteck) gilt: $\Delta t = t_1+t_2$.
  • Der Rolloff-Faktor (im Zeitbereich) kennzeichnet die Flankensteilheit:

$$r=\frac{t_2-t_1}{t_2+t_1}.$$

  • Sonderfall $r=0$: Rechteckimpuls. Sonderfall $r=1$: Dreieckimpuls.
  • Für die Spektralfunktion erhält man gemäß der Fouriertransformation:

$$X(f)=K\cdot \Delta t \cdot si(\pi\cdot \Delta t \cdot f)\cdot si(\pi \cdot r \cdot \Delta t \cdot f) \quad \text{mit} \ si(x)=\frac{sin(x)}{x}.$$

  • Der asymptotische Abfall von $X(f)$ liegt zwischen $1/f$ (für Rechteck, $r=0$) und $1/f^2$ (für Dreieck, $r=1$).

Cosinus-Rolloff-Impuls

Die Zeitfunktion mit der Höhe $K$ und den Zeitparametern $t_1$ und $t_2$ lautet:

$$x(t) = \left\{ \begin{array}{l} \hspace{0.25cm}K \\ K\cdot \cos^2\Big(\frac{|t|-t_1}{t_2-t_1}\cdot \frac{\pi}{2}\Big) \\ \hspace{0.25cm} 0 \\ \end{array} \right.\quad \quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}c} {\left| \hspace{0.05cm} t\hspace{0.05cm} \right| \le t_1,} \\ {t_1\le \left| \hspace{0.05cm}t\hspace{0.05cm} \right| \le t_2,} \\ {\left|\hspace{0.05cm} t \hspace{0.05cm} \right| \ge t_2.} \\ \end{array}$$

  • Für die äquivalente Zeitdauer (flächengleiches Rechteck) gilt: $\Delta t = t_1+t_2$.
  • Der Rolloff-Faktor (im Zeitbereich) kennzeichnet die Flankensteilheit:

$$r=\frac{t_2-t_1}{t_2+t_1}.$$

  • Sonderfall $r=0$: Rechteckimpuls. Sonderfall $r=1$: Cosinus$^2$-Impuls.
  • Für die Spektralfunktion erhält man gemäß der Fouriertransformation:

$$X(f)=K\cdot \Delta t \cdot \frac{\cos(\pi \cdot r\cdot \Delta t \cdot f)}{1-(2\cdot r\cdot \Delta t \cdot f)^2} \cdot si(\pi \cdot \Delta t \cdot f).$$

  • Je größer der Rolloff-Faktor $r$ ist, desto schneller nimmt $X(f)$ asymptotisch mit $f$ ab.

Cosinus-Quadrat-Impuls

  • Dies ist ein Sonderfall des Cosinus-Rolloff-Impuls und ergibt sich für $r=1 \ (t_1=0, t_2= \Delta t)$:

$$x(t) = \left\{ \begin{array}{l} \hspace{0.25cm}K\cdot \cos^2\Big(\frac{|t|\cdot \pi}{2\cdot \Delta t}\Big) \\ \hspace{0.25cm} 0 \\ \end{array} \right.\quad \quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}c} {\left| \hspace{0.05cm} t\hspace{0.05cm} \right| < \Delta t,} \\ {\left| \hspace{0.05cm}t\hspace{0.05cm} \right| \ge \Delta t.} \\ \end{array}$$

  • Für die Spektralfunktion erhält man gemäß der Fouriertransformation:

$$X(f)=K\cdot \Delta f \cdot \frac{\pi}{4}\cdot [si(\pi(\Delta t\cdot f +0.5))+si(\pi(\Delta t\cdot f -0.5))]\cdot si(\pi \cdot \Delta t \cdot f).$$

  • Wegen der letzten $si$-Funktion ist $X(f)=0$ für alle Vielfachen von $F=1/\Delta t$. Die äquidistanten Nulldurchgänge des Cos-Rolloff-Impulses bleiben erhalten.
  • Aufgrund des Klammerausdrucks weist $X(f)$ nun weitere Nulldurchgänge bei $f=\pm1.5 F$, $\pm2.5 F$, $\pm3.5 F$, ... auf.
  • Für die Frequenz $f=\pm F/2$ erhält man die Spektralwerte $K\cdot \Delta t/2$.
  • Der asymptotische Abfall von $X(f)$ verläuft in diesem Sonderfall mit $1/f^3$.


Applet in neuem Tab öffnen