Processing math: 100%

Sampling of Analog Signals and Signal Reconstruction

From LNTwww
Revision as of 16:39, 28 May 2021 by Javier (talk | contribs) (Text replacement - "„" to """)

Open Applet in new Tab   Deutsche Version Öffnen

Applet Description


The applet deals with the system components  "sampling”  and  "signal reconstruction”, two components that are of great importance for understanding the  Pulscodemodulation  (PCM)  for example.   The upper graphic shows the model on which this applet is based.  Below it are the samples  x(νTA)  of the time continuous signal  x(t). The (infinite) sum over all these samples is called the sampled signal  xA(t).

Top:    Underlying model for sampling and signal reconstruction
Bottom:   Example for time discretization of the continuous–time signal  x(t)
  • At the transmitter, the time discrete (sampled) signal  xA(t)  is obtained from the continuous–time signal  x(t).  This process is called  sampling   or  A/D conversion.
  • The corresponding program parameter for the transmitter is the sampling rate  fA=1/TA.  The lower graphic shows the sampling distance  TA .
  • In the receiver, the discrete-time received signal  yA(t)  is used to generate the continuous-time sink signal  y(t)    ⇒   signal reconstruction  or  D/A conversion  corresponding to the receiver frequency response  HE(f).


The applet does not consider the PCM blocks  "Quantization”and  "encoding/decoding”.   The digital transmission channel is assumed to be ideal. 

Receiver frequency response  HE(f)

The following consequences result from this:

  • In the program simplifying  yA(t)=xA(t)  is set.
  • With suitable system parameters, the error signal   ε(t)=y(t)x(t)0  is therefore also possible.


The sampling theorem and the signal reconstruction can be better explained in the frequency domain.  Therefore all spectral functions are displayed in the program;

             X(f)  x(t)XA(f)  xA(t)Y(f)  y(t)E(f)  ε(t). 

Parameters for the receiver frequency response  HE(f)  are the cut–off frequency and the rolloff factor  (see lower graph):

fG=f2+f12,r=f2f1f2+f1.

Notes:

(1)   All signal values are normalized to  ±1.

(2)   The power calculation is done by integration over the respective period duration  T0:

Px=1T0T00x2(t) dt,Pε=1T0T00ε2(t).

(3)   The signal power  Px  and the distortion power  Pε  are also output in normalized form, which implicitly assumes the reference resistance  R=1Ω ;

(4)   From these the signal–distortion–distance  10lg (Px/Pε)  can be calculated.

(5)   Does the spectral function  X(f)  for positive frequencies consists of  I  Diraclines with the (possibly complex) weights  X1, ... , XI,
          so applies to the transmission power taking into account the mirror-image lines at the negative frequencies:

Px=2Ii=1|Xk|2.

(6)   Correspondingly, the following applies to the distortion power if the spectral function  E(f)  in the range  f>0  has  J  Diraclines with weights  E1, ... , EJ:

Pε=2Jj=1|Ej|2.

Theoretical Background

Description of sampling in the time domain

Zur Zeitdiskretisierung des zeitkontinuierlichen Signals  x(t)

Im Folgenden verwenden wir für die Beschreibung der Abtastung folgende Nomenklatur:

  • Das zeitkontinuierliche Signal sei  x(t).
  • Das in äquidistanten Abständen  TA  abgetastete zeitdiskretisierte Signal sei  xA(t).
  • Außerhalb der Abtastzeitpunkte  νTA  gilt stets  xA(t)0.
  • Die Laufvariable  ν  sei  ganzzahlig:     νZ={...,3,2,1,0,+1,+2,+3,...}.
  • Dagegen ergibt sich zu den äquidistanten Abtastzeitpunkten mit der Konstanten  K:
xA(νTA)=Kx(νTA).

Die Konstante hängt von der Art der Zeitdiskretisierung ab. Für die obige Skizze gilt  K=1.

Description of sampling with Dirac pulse (Ist das richtig?)

Im Folgenden gehen wir von einer geringfügig anderen Beschreibungsform aus.  Die folgenden Seiten werden zeigen, dass diese gewöhnungsbedürftigen Gleichungen durchaus zu sinnvollen Ergebnissen führen, wenn man sie konsequent anwendet.

Definitionen: 

  • Unter  Abtastung  verstehen wir hier die Multiplikation des zeitkontinuierlichen Signals  x(t)  mit einem  Diracpuls:
xA(t)=x(t)pδ(t).
  • Der  Diracpuls (im Zeitbereich)  besteht aus unendlich vielen Diracimpulsen, jeweils im gleichen Abstand  TA  und alle mit gleichem Impulsgewicht  TA:
pδ(t)=+ν=TAδ(tνTA).


Aufgrund dieser Definition ergeben sich für das abgetastete Signal folgende Eigenschaften:

xA(t)=+ν=TAx(νTA)δ(tνTA).
  • Das abgetastete Signal zum betrachteten Zeitpunkt  (νTA)  ist gleich  TAx(νTA)·δ(0).
  • Da  δ(t)  zur Zeit  t=0  unendlich ist, sind eigentlich alle Signalwerte  xA(νTA)  ebenfalls unendlich groß und auch der oben eingeführte Faktor  K.
  • Zwei Abtastwerte  xA(ν1TA)  und  xA(ν2TA)  unterscheiden sich jedoch im gleichen Verhältnis wie die Signalwerte  x(ν1TA)  und  x(ν2TA).
  • Die Abtastwerte von  x(t)  erscheinen in den Impulsgewichten der Diracfunktionen:
  • Die zusätzliche Multiplikation mit  TA  ist erforderlich, damit  x(t)  und  xA(t)  gleiche Einheit besitzen.  Beachten Sie hierbei, dass  δ(t)  selbst die Einheit „1/s” aufweist.


Description of sampling in the frequency domain

Zum Spektrum des abgetasteten Signals  xA(t)  kommt man durch Anwendung des  Faltungssatzes. Dieser besagt, dass der Multiplikation im Zeitbereich die Faltung im Spektralbereich entspricht:

xA(t)=x(t)pδ(t)XA(f)=X(f)Pδ(f).

Entwickelt man den  Diracpuls  pδ(t)   (im Zeitbereich)   in eine  Fourierreihe  und transformiert diese unter Anwendung des  Verschiebungssatzes  in den Frequenzbereich, so ergibt sich mit dem Abstand  fA=1/TA  zweier benachbarter Diraclinien im Frequenzbereich folgende Korrespondenz   ⇒   Beweis:

pδ(t)=+ν=TAδ(tνTA)Pδ(f)=+μ=δ(fμfA).
Diracpuls im Zeit- und Frequenzbereich mit  TA=50 µs  und  fA=1/TA=20 kHz

Das Ergebnis besagt:

  • Der Diracpuls  pδ(t)  im Zeitbereich besteht aus unendlich vielen Diracimpulsen, jeweils im gleichen Abstand  TA  und alle mit gleichem Impulsgewicht  TA.
  • Die Fouriertransformierte von  pδ(t)  ergibt wiederum einen Diracpuls, aber nun im Frequenzbereich   ⇒   Pδ(f).
  • Auch  Pδ(f)  besteht aus unendlich vielen Diracimpulsen, nun im jeweiligen Abstand  fA=1/TA  und alle mit dem Impulsgewicht  1.
  • Die Abstände der Diraclinien in Zeit– und Frequenzbereich folgen demnach dem  Reziprozitätsgesetz:   TAfA=1.


Daraus folgt:   Aus dem Spektrum  X(f)  wird durch Faltung mit der um  μfA  verschobenen Diraclinie:

X(f)δ(fμfA)=X(fμfA).

Wendet man dieses Ergebnis auf alle Diraclinien des Diracpulses an, so erhält man schließlich:

XA(f)=X(f)+μ=δ(fμfA)=+μ=X(fμfA).

Fazit:  Die Abtastung des analogen Zeitsignals  x(t)  in äquidistanten Abständen  TA  führt im Spektralbereich zu einer  periodischen Fortsetzung  von  X(f)  mit dem Frequenzabstand  fA=1/TA.


Spektrum des abgetasteten Signals

Beispiel 1:  Die obere Grafik zeigt  (schematisch!)  das Spektrum  X(f)  eines Analogsignals  x(t), das Frequenzen bis  5 kHz  beinhaltet.

Tastet man das Signal mit der Abtastrate  fA = 20 kHz, also im jeweiligen Abstand  TA=50µs  ab, so erhält man das unten skizzierte periodische Spektrum  XA(f).

  • Da die Diracfunktionen unendlich schmal sind, beinhaltet das abgetastete Signal  xA(t)  auch beliebig hochfrequente Anteile.
  • Dementsprechend ist die Spektralfunktion  XA(f)  des abgetasteten Signals bis ins Unendliche ausgedehnt.


Signal reconstruction

Gemeinsames Modell von "Signalabtastung” und "Signalrekonstruktion”

Die Signalabtastung ist bei einem digitalen Übertragungssystem kein Selbstzweck, sondern sie muss irgendwann wieder rückgängig gemacht werden.  Betrachten wir zum Beispiel das folgende System:

  • Das Analogsignal  x(t)  mit der Bandbreite  BNF  wird wie oben beschrieben abgetastet.
  • Am Ausgang eines idealen Übertragungssystems liegt das ebenfalls zeitdiskrete Signal  yA(t)=xA(t)  vor.
  • Die Frage ist nun, wie der Block   Signalrekonstruktion   zu gestalten ist, damit auch  y(t)=x(t)  gilt.
Frequenzbereichsdarstellung der "Signalrekonstruktion”


Die Lösung ist einfach, wenn man die Spektralfunktionen betrachtet:  

Man erhält aus  YA(f)  das Spektrum  Y(f)=X(f)  durch ein Tiefpass Filter mit dem  Frequenzgang  HE(f), der 

  • die tiefen Frequenzen unverfälscht durchlässt:
HE(f)=1f¨ur|f|BNF,
  • die hohen Frequenzen vollständig unterdrückt:
HE(f)=0f¨ur|f|fABNF.

Weiter ist aus der nebenstehenden Grafik zu erkennen:   Solange die beiden oben genannten Bedingungen erfüllt sind, kann  HE(f)  im Bereich von  BNF  bis  fABNF  beliebig geformt sein kann,

  • beispielsweise linear abfallend (gestrichelter Verlauf)
  • oder auch rechteckförmig,


The Sampling Theorem

Die vollständige Rekonstruktion des Analogsignals  y(t)  aus dem abgetasteten Signal  yA(t)=xA(t)  ist nur möglich, wenn die Abtastrate  fA  entsprechend der Bandbreite  BNF  des Nachrichtensignals richtig gewählt wurde.

Aus der obigen Grafik erkennt man, dass folgende Bedingung erfüllt sein muss:   fABNF>BNFfA>2BNF.

Abtasttheorem:  Besitzt ein Analogsignal  x(t)  nur Spektralanteile im Bereich  |f|<BNF, so kann dieses aus seinem abgetasteten Signal  xA(t)  nur dann vollständig rekonstruiert werden, wenn die Abtastrate hinreichend groß ist:

fA2BNF.

Für den Abstand zweier Abtastwerte muss demnach gelten:

TA12BNF.


Wird bei der Abtastung der größtmögliche Wert   ⇒   TA=1/(2BNF)  herangezogen,

  • so muss zur Signalrekonstruktion des Analogsignals aus seinen Abtastwerten
  • ein idealer, rechteckförmiger Tiefpass mit der Grenzfrequenz  fG=fA/2=1/(2TA)  verwendet werden.


Beispiel 2:  Die Grafik zeigt oben das auf  ± 5 kHz  begrenzte Spektrum  X(f)  eines Analogsignals, unten das Spektrum  XA(f)  des im Abstand  TA= 100 µs  abgetasteten Signals   ⇒   fA= 10 kHz.

Abtasttheorem im Frequenzbereich

Zusätzlich eingezeichnet ist der Frequenzgang  HE(f)  des tiefpassartigen Empfangsfilters zur Signalrekonstruktion, dessen Grenzfrequenz exakt  fG=fA/2=5 kHz  betragen muss.


  • Mit jedem anderen  fG–Wert ergäbe sich  Y(f)X(f).
  • Bei  fG<5 kHz  fehlen die oberen  X(f)–Anteile.
  • Bei  fG>5 kHz  kommt es aufgrund von Faltungsprodukten zu unerwünschten Spektralanteilen in  Y(f).


Wäre am Sender die Abtastung mit einer Abtastrate  fA<10  kHz  erfolgt   ⇒   TA>100 µs, so wäre das Analogsignal  y(t)=x(t)  aus den Abtastwerten  yA(t)  auf keinen Fall rekonstruierbar.


Exercises

  • First, select the number  (1, 2,... )  of the task to be processed.  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".
  • All signal values are to be understood as normalized to  ±1.  Powers are normalized values, too.


(1)  Source signal:  x(t)=Acos(2πf0tφ)  with  f0=4 kHz.   Sampling with  fA=10 kHz.  Rectanglular low-pass;  cut-off frequency:  fG=5 kHz.
            Interpret the shown graphics and evaluate the present signal reconstruction for all permitted parameter values of A  and φ.

  •  The spectrum  X(f)  consists of two Dirac functions at  ±4 kHz, each with impulse weight  0.5.
  •  By the periodic continuation  XA(f)  has lines of equal height at  ±4 kHz±6 kHz±14 kHz±16 kHz±24 kHz±26 kHz,  etc.
  •  The rectangular low-pass with the cut-off frequency  fG=5 kHz  removes all lines except the two at  ±4 kHz  ⇒  Y(f)=X(f)  ⇒  y(t)=x(t)  ⇒   Pε=0.
  •  The signal reconstruction works here perfectly  (Pε=0)  for all amplitudes A  and any phases φ.


(2)  Continue with  A=1f0=4 kHzφ=0fA=10 kHzfG=5 kHz.   What is the influence of the rolloff–factors  r=0.2r=0.5  and   r=1?
          Specify the power values  Px  and  Pε .   For which  r–values is  Pε=0?  Do these results also apply to other  A  and  φ?

  •  With  |X(f=±4 kHz)|=0.5  the signal power is  Px=20.52=0.5.  The distortion power  Pε  depends significantly on the rolloff–factor  r .
  •  Pε  is zero for  r0.2.  Then the  XA(f) line at  f0=4 kHz  is not changed by the low-pass and the unwanted  line at  6 kHz  is fully suppressed.
  •  r=0.5 :  Y(f=4 kHz)=0.35Y(f=6 kHz)=0.15  ⇒   |E(f=4 kHz)|=|E(f=6 kHz)|=0.15  ⇒  Pε=0.09  ⇒  10lg (Px/Pε)=7.45 dB.
  • r=1.0 :  Y(f=4 kHz)=0.3Y(f=6 kHz)=0.2  ⇒   |E(f=4 kHz)|=|E(f=6 kHz)|=0.2  ⇒  Pε=0.16  ⇒  10lg (Px/Pε)=4.95 dB.
  •  For all  r  the distortion power Pε  is independent of  φ.   The amplitude  A  affects  Px  and  Pε  in the same way   ⇒   the quotient is independent of  A.


(3)  Now apply  A=1f0=5 kHzφ=0fA=10 kHzfG=5 kHzr=0  (rectangular low–pass).   Interpret the result of the signal reconstruction.

  •   X(f)  consists of two Dirac lines at  ±5 kHz  (weight  0.5).  By periodic continuation  XA(f)  has lines at  ±5 kHz±15 kHz±25 kHz,  etc.
  •   The  rectanglular low-pass  removes the lines at  ±15 kHz±25 kHz.  The lines at  ±5 kHz  are halved because of  HE(±fG)=HE(±5 kHz)=0.5.
  •    ⇒   Weights of X(f=±5 kHz)0.5   #   Weights of X(fA=±5 kHz)1.0;     #   Weights of Y(f=±5 kHz)0.5   ⇒   Y(f)=X(f).
  •  So the signal reconstruction works perfectly here too  (Pε=0).  The same is true for the phase  φ=180   ⇒   x(t)=Acos(2πf0t).


(4)  The settings of  (3)  continue to apply except for  φ=30.  Interpret the differences from the setting  (3)   ⇒   φ=0.

  •  Phase relations are lost.  The sink signal  y(t)  is cosine-shaped  (φy=0)  with by the factor  cos(φx)  smaller amplitude than the source signal  x(t).
  •  Justification in the frequency domain:  In the periodic continuation of  X(f)  ⇒  XA(f)  only the real parts are to be added.  The imaginary parts cancel out.
  •  The Dirac line of  X(f)  at frequency  f0   ⇒   X(f0)  is complex,   Y(f0)  is real, and  E(f0)  is imaginary   ⇒   ε(t)  is minus–sinusoidal   ⇒   Pε=0.125.


(5)  Illustrate again the result of  (4)  compared to the settings  f0=5 kHzφ=30fA=11 kHzfG=5.5 kHz.

  •  With this setting, the spectrum  XA(f)  also has a positive imaginary part at  5 kHz  and a negative imaginary part of the same magnitude at  6 kHz.
  •  The rectangular low-pass with cutoff frequency  5.5 kHz  removes this second component.  Thus, with the new setting  Y(f)=X(f)   ⇒   Pε=0.
  •  Any f0 oscillation of arbitrary phase is error-free reconstructible from its samples if  fA=2f0+μ, fG=fA/2  (any small μ>0).
  •  For value–continuous spectrum with   X(|f|>f0)0  ⇒   [no diraclines at ±f0]  the sampling rate  fA=2f0  is sufficient in principle.

(5)  Verdeutlichen Sie sich nochmals das Ergebnis von  (4)  im Vergleich zu den Einstellungen  f0=5 kHzφ=30fA=11 kHzfG=5.5 kHz.

  •  Bei dieser Einstellung hat das  XA(f)–Spektrum auch einen positiven Imaginärteil bei  5 kHz  und einen negativen Imaginärteil gleicher Höhe bei  6 kHz.
  •  Der Rechteck–Tiefpass mit der Grenzfrequenz  5.5 kHz  entfernt diesen zweiten Anteil.  Somit ist bei dieser Einstellung  Y(f)=X(f)   ⇒   Pε=0.
  •  Jede  f0–Schwingung beliebiger Phase ist fehlerfrei aus seinen Abtastwerten rekonstruierbar, falls  fA=2f0+μ, fG=fA/2  (beliebig kleines μ>0).
  •  Bei wertkontinuierlichem Spektrum mit   X(|f|>f0)0  ⇒   [keine Diraclinien bei ±f0] genügt grundsätzlich die Abtastrate  fA=2f0.


(6)  The settings of  (3)  and  (4)  continue to apply except for  φ=90.  Interpret the plots in the time and frequency domain.

  •  The source signal is sampled exactly at its zero crossings   ⇒   xA(t)0   ⇒     y(t)0   ⇒   ε(t)=x(t)   ⇒   Pε=Px   ⇒   10lg (Px/Pε)=0 dB.
  •  Description in the frequency domain:   As in  (4)  the imaginary parts of  XA(f)  cancel out.  Also the real parts of  XA(f)  are zero because of the sinusoid.


(7)  Now consider the  Source Signal 2.  Let the other parameters be  fA=5 kHzfG=2.5 kHzr=0.  Interpret the results.

  •  The source signal has spectral components up to  ±2 kHz.  The signal power is Px=2[0.12+0.252+0.152]=0.19
  •  With the sampling rate  fA=5 kHz  and the receiver parameters  fG=2.5 kHz  and  r=0, the signal reconstruction works perfectly:  Pε=0.
  •  Likewise with the trapezoidal low–pass with  fG=2.5 kHz, if for the rolloff factor holds:  r0.2.


(8)  What happens if the cutoff frequency  fG=1.5 kHz  of the rectangular low–pass filter is too small?  In particular, interpret the error signal  ε(t)=y(t)x(t).

  •  The error signal  ε(t)=0.3cos(2π2 kHzt60)=0.3cos(2π2 kHzt+120)  is equal to the (negated) signal component at  2 kHz
  •  The distortion power is  Pε=20.152=0.045  and the signal–to–distortion ratio  10lg (Px/Pε)=10lg (0.19/0.045)=6.26 dB.


(9)  What happens if the cutoff frequency  fG=3.5 kHz  of the rectangular low–pass filter is too large?  In particular, interpret the error signal  ε(t)=y(t)x(t).

  •  The error signal  ε(t)=0.3cos(2π3 kHzt+60)  is now equal to the  3 kHz  portion of the sink signal  y(t)  not removed by the low-pass filter.
  •  Compared to the subtask  (8)  the frequency changes from  2 kHz  to  3 kHz  and also the phase relationship.
  •  The amplitude of this  3 kHz error signal is equal to the amplitude of the  2 kHz portion of  x(t).  Again  Pε=0.04510lg (Px/Pε)=6.26 dB.


(10)  Finally, we consider the  source signal 4  (portions until  ±4 kHz), as well as  fA=5 kHzfG=2. 5 kHz0r1.  Interpretation of results.

  •  Up to  r=0.2  the signal reconstruction works perfectly  (Pε=0).  If one increases  r, then  Pε  increases continuously and  10lg (Px/Pε)  decreases.
  •  With  r=1  the signal frequencies  0.5 kHz,  ...,  4 kHz  are attenuated, the more the higher the frequency is,  for example  HE(f=4 kHz)=0.6.
  •  Similarly,  Y(f)  also includes components at frequencies  6 kHz7 kHz8 kHz9 kHz  and  9.5 kHz due to periodic continuation.
  •  At the sampling times  t=nTA, the signals  x(t)  and  y(t)  agree exactly  ⇒   ε(t)=0.  In between, not  ⇒   small distortion power   Pε=0.008.



Applet Manual


Anleitung Auge.png

    (A)     Auswahl:   Codierung
                   (binär,  quaternär,  AMI–Code,  Duobinärcode)

    (B)     Auswahl:   Detektionsgrundimpuls
                    (nach Gauß–TP,  CRO–Nyquist,  nach Spalt–TP}

    (C)     Prametereingabe zu  (B)
                   (Grenzfrequenz,  Rolloff–Faktor,  Rechteckdauer)

    (D)     Steuerung der Augendiagrammdarstellung
                   (Start,  Pause/Weiter,  Einzelschritt,  Gesamt,  Reset)

    (E)     Geschwindigkeit der Augendiagrammdarstellung

    (F)     Darstellung:  Detektionsgrundimpuls  gd(t)

    (G)     Darstellung:  Detektionsnutzsignal  dS(tνT)

    (H)     Darstellung:  Augendiagramm im Bereich  ±T

    ( I )     Numerikausgabe:  önorm  (normierte Augenöffnung)

    (J)     Prametereingabe  10lg EB/N0  für  (K)

    (K)     Numerikausgabe:  σnorm  (normierter Rauscheffektivwert)

    (L)     Numerikausgabe:  pU  (ungünstigste Fehlerwahrscheinlichkeit)

    (M)     Bereich für die Versuchsdurchführung:   Aufgabenauswahl

    (N)     Bereich für die Versuchsdurchführung:   Aufgabenstellung

    (O)     Bereich für die Versuchsdurchführung:   Musterlösung einblenden

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 2008 by Slim Lamine  as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: Günter Söder).
  • Last revision and English version 2020/2021 by  Carolin Mirschina  in the context of a working student activity.  Translation using DEEPL.com.


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


Once again:  Open Applet in new Tab

Open Applet in new Tab   Deutsche Version Öffnen