Difference between revisions of "Applets:Sampling of Analog Signals and Signal Reconstruction"
(39 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{LntAppletLinkEnDe|sampling_en|sampling}} |
− | + | ||
== Applet Description== | == Applet Description== | ||
<br> | <br> | ||
− | The applet deals with the system components | + | The applet deals with the system components "sampling" and "signal reconstruction", two components that are of great importance for understanding the [[Modulation_Methods/Pulscodemodulation|"Puls code modulation"]] $({\rm PCM})$ for example. The upper graphic shows the model on which this applet is based. Below it are the samples $x(\nu \cdot T_{\rm A})$ of the time continuous signal $x(t)$. The (infinite) sum over all these samples is called the sampled signal $x_{\rm A}(t)$. |
[[File:EN_Abtastung_1.png|center|frame|Top: Underlying model for sampling and signal reconstruction<br>Bottom: Example for time discretization of the continuous–time signal $x(t)$]] | [[File:EN_Abtastung_1.png|center|frame|Top: Underlying model for sampling and signal reconstruction<br>Bottom: Example for time discretization of the continuous–time signal $x(t)$]] | ||
Line 12: | Line 12: | ||
− | The applet does not consider the PCM blocks | + | The applet does not consider the PCM blocks "Quantization"and "encoding/decoding". The digital transmission channel is assumed to be ideal. |
[[File:Abtastung_2_neu.png|right|frame|Receiver frequency response $H_{\rm E}(f)$]] | [[File:Abtastung_2_neu.png|right|frame|Receiver frequency response $H_{\rm E}(f)$]] | ||
Line 39: | Line 39: | ||
'''(4)''' From these the <u>signal–distortion–distance</u> $10 \cdot \lg \ (P_x/P_\varepsilon)$ can be calculated. | '''(4)''' From these the <u>signal–distortion–distance</u> $10 \cdot \lg \ (P_x/P_\varepsilon)$ can be calculated. | ||
− | '''(5)''' Does the spectral function $X(f)$ for positive frequencies consists of $I$ | + | '''(5)''' Does the spectral function $X(f)$ for positive frequencies consists of $I$ Dirac delta lines with the (possibly complex) weights $X_1$, ... , $X_I$,<br> so applies to the transmission power taking into account the mirror-image lines at the negative frequencies: |
:$$P_x = 2 \cdot \sum_{i=1}^I |X_k|^2.$$ | :$$P_x = 2 \cdot \sum_{i=1}^I |X_k|^2.$$ | ||
− | '''(6)''' Correspondingly, the following applies to the distortion power if the spectral function $E(f)$ in the range $f>0$ has $J$ | + | '''(6)''' Correspondingly, the following applies to the distortion power if the spectral function $E(f)$ in the range $f>0$ has $J$ Dirac delta lines with weights $E_1$, ... , $E_J$: |
:$$P_\varepsilon = 2 \cdot \sum_{j=1}^J |E_j|^2.$$ | :$$P_\varepsilon = 2 \cdot \sum_{j=1}^J |E_j|^2.$$ | ||
− | |||
==Theoretical Background== | ==Theoretical Background== | ||
Line 53: | Line 52: | ||
===Description of sampling in the time domain=== | ===Description of sampling in the time domain=== | ||
− | [[File:P_ID1120__Sig_T_5_1_S1_neu.png|center|frame| | + | [[File:P_ID1120__Sig_T_5_1_S1_neu.png|center|frame|For the time discretization of the continuous-time signal $x(t)$]] |
− | + | In the following, we use the following nomenclature to describe the sampling: | |
− | * | + | *let the continuous-time signal be $x(t)$. |
− | * | + | *Let the time-discretized signal sampled at equidistant intervals $T_{\rm A}$ be $x_{\rm A}(t)$. |
− | * | + | *Out of the sampling time points $\nu \cdot T_{\rm A}$ always holds $x_{\rm A}(t) \equiv 0$. |
− | * | + | *The run variable $\nu$ be an [[Signal_Representation/Calculating_with_Complex_Numbers#The_set_of_real_numbers|"integer"]]: $\nu \in \mathbb{Z} = \{\hspace{0.05cm} \text{...}\hspace{0.05cm} , –3, –2, –1, \hspace{0.2cm}0, +1, +2, +3, \text{...} \hspace{0.05cm}\} $. |
− | * | + | *In contrast, at the equidistant sampling times with the constant $K$, the result is: |
:$$x_{\rm A}(\nu \cdot T_{\rm A}) = K \cdot x(\nu \cdot T_{\rm A})\hspace{0.05cm}.$$ | :$$x_{\rm A}(\nu \cdot T_{\rm A}) = K \cdot x(\nu \cdot T_{\rm A})\hspace{0.05cm}.$$ | ||
− | + | The constant depends on the type of time discretization. For the above sketch $K = 1$ is valid. | |
<br><br> | <br><br> | ||
− | ===Description of sampling with Dirac pulse | + | ===Description of sampling with the Dirac delta pulse=== |
− | + | In the following, we assume a slightly different form of description. The following pages will show that these equations, which take some getting used to, do lead to useful results if they are applied consistently. | |
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | $\text{ | + | $\text{Definitions:}$ |
− | * | + | * By '''sampling''' we mean here the multiplication of the time-continuous signal $x(t)$ by a '''Dirac delta pulse''': |
:$$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.05cm}.$$ | :$$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.05cm}.$$ | ||
− | * | + | *The '''Dirac delta pulse (in the time domain)''' consists of infinitely many Dirac delta pulses, each equally spaced $T_{\rm A}$ and all with equal pulse weight $T_{\rm A}$: |
:$$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot | :$$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot | ||
Line 84: | Line 83: | ||
− | + | Based on this definition, the following properties result for the sampled signal: | |
:$$x_{\rm A}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot x(\nu \cdot T_{\rm A})\cdot | :$$x_{\rm A}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot x(\nu \cdot T_{\rm A})\cdot | ||
\delta (t- \nu \cdot T_{\rm A} | \delta (t- \nu \cdot T_{\rm A} | ||
)\hspace{0.05cm}.$$ | )\hspace{0.05cm}.$$ | ||
− | * | + | *The sampled signal at the considered time $(\nu \cdot T_{\rm A})$ ist gleich $T_{\rm A} \cdot x(\nu \cdot T_{\rm A}) · \delta (0)$. |
− | * | + | *Since $\delta (t)$ at time $t = 0$ is infinite, actually all signal values $x_{\rm A}(\nu \cdot T_{\rm A})$ are also infinite and also the factor $K$ introduced above. |
− | * | + | *Two samples $x_{\rm A}(\nu_1 \cdot T_{\rm A})$ and $x_{\rm A}(\nu_2 \cdot T_{\rm A})$ however, differ in the same proportion as the signal values $x(\nu_1 \cdot T_{\rm A})$ and $x(\nu_2 \cdot T_{\rm A})$. |
− | * | + | *The samples of $x(t)$ appear in the pulse weights of the Dirac delta functions: |
− | * | + | *The additional multiplication by $T_{\rm A}$ is necessary so that $x(t)$ and $x_{\rm A}(t)$ have the same unit. Note here that $\delta (t)$ itself has the unit "1/s". |
===Description of sampling in the frequency domain=== | ===Description of sampling in the frequency domain=== | ||
− | + | The spectrum of the sampled signal $x_{\rm A}(t)$ is obtained by applying the [[Signal_Representation/The_Convolution_Theorem_and_Operation#Convolution_in_the_frequency_domain|"Convolution Theorem".]] This states that multiplication in the time domain corresponds to convolution in the spectral domain: | |
:$$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.2cm}\circ\!\!-\!\!\!-\!\!\!-\!\!\bullet\, \hspace{0.2cm} | :$$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.2cm}\circ\!\!-\!\!\!-\!\!\!-\!\!\bullet\, \hspace{0.2cm} | ||
X_{\rm A}(f) = X(f) \star P_{\delta}(f)\hspace{0.05cm}.$$ | X_{\rm A}(f) = X(f) \star P_{\delta}(f)\hspace{0.05cm}.$$ | ||
− | + | If one develops the Dirac delta pulse $p_{\delta}(t)$ (in the time domain) into a [[Signal_Representation/Fourier_Series|"Fourier Series"]] and transforms it using the [[Signal_Representation/The_Fourier_Transform_Theorems#Shifting_Theorem|"Shifting Theorem"]] into the frequency domain, the following correspondence ⇒ [[Signal_Representation/Discrete-Time_Signal_Representation#Dirac_comb_in_time_and_frequency_domain|"proof"]] results with the distance $f_{\rm A} = 1/T_{\rm A}$ of two adjacent dirac delta lines in the frequency domain: | |
:$$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot | :$$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot | ||
Line 110: | Line 109: | ||
(f- \mu \cdot f_{\rm A} ).$$ | (f- \mu \cdot f_{\rm A} ).$$ | ||
− | [[File:P_ID1121__Sig_T_5_1_S3_NEU.png|right|frame| | + | [[File:P_ID1121__Sig_T_5_1_S3_NEU.png|right|frame|Dirac delta pulse in time and frequency domain with $T_{\rm A} = 50\ {\rm µs}$ und $f_{\rm A} = 1/T_{\rm A} = 20\ \text{kHz}$]] |
− | + | The result states: | |
− | * | + | *The Dirac delta pulse $p_{\delta}(t)$ in the time domain consists of infinitely many Dirac delta pulses, each at the same distance $T_{\rm A}$ and all with the same pulse weight $T_{\rm A}$. |
− | * | + | *The Fourier transform of $p_{\delta}(t)$ again gives a Dirac delta pulse, but now in the frequency domain ⇒ $P_{\delta}(f)$. |
− | * | + | *Also $P_{\delta}(f)$ consists of infinitely many Dirac delta pulses, now in the respective spacing $f_{\rm A} = 1/T_{\rm A}$ and all with pulse weight $1$. |
− | * | + | *The distances of the Dirac delta lines in time and frequency domain thus follow the [[Signal_Representation/The_Fourier_Transform_Theorems#Reciprocity_Theorem_of_time_duration_and_bandwidth|"Reciprocity Theorem"]]: $T_{\rm A} \cdot f_{\rm A} = 1 \hspace{0.05cm}.$ |
− | + | From this follows: From the spectrum $X(f)$ is obtained by convolution with the Dirac delta line shifted by $\mu \cdot f_{\rm A}$ : | |
:$$X(f) \star \delta | :$$X(f) \star \delta | ||
Line 125: | Line 124: | ||
)\hspace{0.05cm}.$$ | )\hspace{0.05cm}.$$ | ||
− | + | Applying this result to all Dirac delta lines of the Dirac delta pulse, we finally obtain: | |
:$$X_{\rm A}(f) = X(f) \star \sum_{\mu = - \infty }^{+\infty} \delta | :$$X_{\rm A}(f) = X(f) \star \sum_{\mu = - \infty }^{+\infty} \delta | ||
Line 133: | Line 132: | ||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | $\text{ | + | $\text{Conclusion:}$ Sampling the analog time signal $x(t)$ at equidistant intervals $T_{\rm A}$ results in the spectral domain in a '''periodic continuation''' of $X(f)$ with frequency spacing $f_{\rm A} = 1/T_{\rm A}$.}} |
− | [[File:P_ID1122__Sig_T_5_1_S4_neu.png|right|frame| | + | [[File:P_ID1122__Sig_T_5_1_S4_neu.png|right|frame|Spectrum of the sampled signal]] |
{{GraueBox|TEXT= | {{GraueBox|TEXT= | ||
− | $\text{ | + | $\text{Example 1:}$ |
− | + | The upper graph shows '''(schematic!)''' the spectrum $X(f)$ of an analog signal $x(t)$, which contains frequencies up to $5 \text{ kHz}$ . | |
− | + | Sampling the signal at the sampling rate $f_{\rm A}\,\text{ = 20 kHz}$, i.e., at the respective spacing $T_{\rm A}\, = {\rm 50 \, µs}$ yields the periodic spectrum $X_{\rm A}(f)$ sketched below. | |
− | * | + | *Since the Dirac delta functions are infinitely narrow, the sampled signal $x_{\rm A}(t)$ also contains arbitrary high frequency components. |
− | * | + | *Correspondingly, the spectral function $X_{\rm A}(f)$ of the sampled signal is extended to infinity.}} |
===Signal reconstruction=== | ===Signal reconstruction=== | ||
− | [[File: | + | [[File:EN_Sig_T_5_1_S2_v2.png|right|frame|Joint model of "signal sampling" and "signal reconstruction"]] |
− | + | Signal sampling is not an end in itself in a digital transmission system, but it must be reversed at some point For example, consider the following system: | |
− | * | + | *The analog signal $x(t)$ with bandwidth $B_{\rm NF}$ is sampled as described above. |
− | * | + | *At the output of an ideal transmission system, the also discrete-time signal $y_{\rm A}(t) = x_{\rm A}(t)$ is present. |
− | * | + | *The question now is how the block '''signal reconstruction''' has to be designed so that also $y(t) = x(t)$ holds. |
− | [[File:P_ID1124__Sig_T_5_1_S5b_neu.png|right|frame| | + | [[File:P_ID1124__Sig_T_5_1_S5b_neu.png|right|frame|Frequency domain representation of the "signal reconstruction"]] |
− | <br> | + | <br>The solution is simple if you look at the spectral functions: |
− | + | One obtains from $Y_{\rm A}(f)$ the spectrum $Y(f) = X(f)$ by a low-pass filter with the [[Linear_and_Time_Invariant_Systems/System_Description_in_Frequency_Domain#Frequency_response_. E2.80.93_Transfer_function|"Frequency response"]] $H_{\rm E}(f)$, which | |
− | * | + | *passes the low frequencies unaltered: |
− | :$$H_{\rm E}(f) = 1 \hspace{0.3cm}{\rm{ | + | :$$H_{\rm E}(f) = 1 \hspace{0.3cm}{\rm{for}} \hspace{0.3cm} |f| \le B_{\rm |
NF}\hspace{0.05cm},$$ | NF}\hspace{0.05cm},$$ | ||
− | * | + | *completely suppresses the high frequencies: |
− | :$$H_{\rm E}(f) = 0 \hspace{0.3cm}{\rm{ | + | :$$H_{\rm E}(f) = 0 \hspace{0.3cm}{\rm{for}} \hspace{0.3cm} |f| \ge f_{\rm A} - B_{\rm |
NF}\hspace{0.05cm}.$$ | NF}\hspace{0.05cm}.$$ | ||
− | + | Further, it can be seen from the accompanying graph: As long as the above two conditions are satisfied, $H_{\rm E}(f)$ can be arbitrarily shaped in the range from $B_{\rm NF}$ to $f_{\rm A}-B_{\rm NF}$ , | |
− | * | + | *for example linearly descending (dashed line) |
− | * | + | *or also rectangular. |
===The Sampling Theorem=== | ===The Sampling Theorem=== | ||
− | + | The complete reconstruction of the analog signal $y(t)$ from the sampled signal $y_{\rm A}(t) = x_{\rm A}(t)$ is only possible if the sampling rate $f_{\rm A}$ corresponding to the bandwidth $B_{\rm NF}$ of the message signal has been chosen correctly. | |
− | + | From the above graph, it can be seen that the following condition must be satisfied: $f_{\rm A} - B_{\rm NF} > B_{\rm NF} \hspace{0.3cm}\Rightarrow \hspace{0.3cm}f_{\rm A} > 2 \cdot B_{\rm NF}\hspace{0.05cm}.$ | |
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | $\text{ | + | $\text{Sampling theorem:}$ If an analog signal $x(t)$ has only spectral components in the range $\vert f \vert < B_{\rm NF}$, it can be completely reconstructed from its sampled signal $x_{\rm A}(t)$ only if the sampling rate is sufficiently large: |
:$$f_{\rm A} ≥ 2 \cdot B_{\rm NF}.$$ | :$$f_{\rm A} ≥ 2 \cdot B_{\rm NF}.$$ | ||
− | + | Accordingly, the following must apply to the distance between two samples: | |
:$$T_{\rm A} \le \frac{1}{ 2 \cdot B_{\rm NF} }\hspace{0.05cm}.$$}} | :$$T_{\rm A} \le \frac{1}{ 2 \cdot B_{\rm NF} }\hspace{0.05cm}.$$}} | ||
− | + | If the largest possible value ⇒ $T_{\rm A} = 1/(2B_{\rm NF})$ is used for sampling, | |
− | *so | + | *so, for signal reconstruction of the analog signal from its samples. |
− | * | + | *an ideal, rectangular low-pass filter with cut off frequency $f_{\rm G} = f_{\rm A}/2 = 1/(2T_{\rm A})$ must be used. |
{{GraueBox|TEXT= | {{GraueBox|TEXT= | ||
− | $\text{ | + | $\text{Example 2:}$ The graph shows above the spectrum $\pm\text{ 5 kHz}$ of an analog signal limited to $X(f)$ below the spectrum $X_{\rm A}(f)$ of the signal sampled at distance $T_{\rm A} =\,\text{ 100 µs}$ ⇒ $f_{\rm A}=\,\text{ 10 kHz}$. |
− | [[File:P_ID1125__Sig_T_5_1_S6_neu.png|right|frame| | + | [[File:P_ID1125__Sig_T_5_1_S6_neu.png|right|frame|Sampling theorem in the frequency domain]] |
− | + | Additionally drawn is the frequency response $H_{\rm E}(f)$ of the low-pass receiving filter for signal reconstruction, whose cutoff frequency must be exactly $f_{\rm G} = f_{\rm A}/2 = 5\,\text{ kHz}$ . | |
− | * | + | *With any other $f_{\rm G}$ value, there would be $Y(f) \neq X(f)$. |
− | * | + | *For $f_{\rm G} < 5\,\text{ kHz}$ the upper $X(f)$ portions are missing. |
− | * | + | * At $f_{\rm G} > 5\,\text{ kHz}$ there are unwanted spectral components in $Y(f)$ due to convolution products. |
− | + | If at the transmitter the sampling had been done with a sampling rate $f_{\rm A} < 10\,\text{ kHz}$ ⇒ $T_{\rm A} >100 \ {\rm µ s}$, the analog signal $y(t) = x(t)$ would not be reconstructible from the samples $y_{\rm A}(t)$ in any case. }} | |
<br clear=all> | <br clear=all> | ||
==Exercises== | ==Exercises== | ||
− | |||
− | |||
− | *First, select the number ( | + | *First, select the number $(1,\ 2, \text{...} \ )$ 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 $\pm 1$. Powers are normalized values, too. | |
− | |||
− | *All signal values are normalized to $\pm 1$ | ||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | '''(1)''' Source signal: $x(t) = A \cdot \cos (2\pi \cdot f_0 \cdot t -\varphi)$ with $f_0 = \text{4 kHz}$. Sampling with $f_{\rm A} = \text{10 kHz}$. Rectanglular low pass; cut | + | '''(1)''' Source signal: $x(t) = A \cdot \cos (2\pi \cdot f_0 \cdot t -\varphi)$ with $f_0 = \text{4 kHz}$. Sampling with $f_{\rm A} = \text{10 kHz}$. Rectanglular low-pass; cut off frequency: $f_{\rm G} = \text{5 kHz}$. <br> Interpret the shown graphics and evaluate the present signal reconstruction for all permitted parameter values of $A$ and $\varphi$. }} |
− | * The spectrum $X(f)$ consists of two | + | * The spectrum $X(f)$ consists of two Dirac functions at $\pm \text{4 kHz}$, each with impulse weight $0.5$. |
* By the periodic continuation $X_{\rm A}(f)$ has lines of equal height at $\pm \text{4 kHz}$, $\pm \text{6 kHz}$, $\pm \text{14 kHz}$, $\pm \text{16 kHz}$, $\pm \text{24 kHz}$, $\pm \text{26 kHz}$, etc. | * By the periodic continuation $X_{\rm A}(f)$ has lines of equal height at $\pm \text{4 kHz}$, $\pm \text{6 kHz}$, $\pm \text{14 kHz}$, $\pm \text{16 kHz}$, $\pm \text{24 kHz}$, $\pm \text{26 kHz}$, etc. | ||
− | * The | + | * The rectangular low-pass with the cut off frequency $f_{\rm G} = \text{5 kHz}$ removes all lines except the two at $\pm \text{4 kHz}$ ⇒ $Y(f) =X(f)$ ⇒ $y(t) =x(t)$ ⇒ $P_\varepsilon = 0$. |
− | * The signal reconstruction works perfectly | + | * The signal reconstruction works here perfectly $(P_\varepsilon = 0)$ for all amplitudes $A$ and any phases $\varphi$. |
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | '''(2)''' Continue with $A=1$, $f_0 = \text{4 kHz}$, $\varphi=0$, $f_{\rm A} = \text{10 kHz}$, $f_{\rm G} = \text{5 kHz}$. | + | '''(2)''' Continue with $A=1$, $f_0 = \text{4 kHz}$, $\varphi=0$, $f_{\rm A} = \text{10 kHz}$, $f_{\rm G} = \text{5 kHz}$. What is the influence of the rolloff–factors $r=0.2$, $r=0.5$ and $r=1$? <br> Specify the power values $P_x$ and $P_\varepsilon$ . For which $r$–values is $P_\varepsilon= 0$? Do these results also apply to other $A$ and $\varphi$? }} |
− | :* With $| | + | :* With $|X(f = \pm \text{4 kHz})|=0.5$ the signal power is $P_x = 2\cdot 0.5^2 = 0.5$. The distortion power $P_\varepsilon$ depends significantly on the rolloff–factor $r$ . |
− | :* $P_\varepsilon$ is zero for $r \le 0.2$. | + | :* $P_\varepsilon$ is zero for $r \le 0.2$. Then the $X_{\rm A}(f)$ line at $f_0 = \text{4 kHz}$ is not changed by the low-pass and the unwanted line at $\text{6 kHz}$ is fully suppressed. |
:* $r = 0.5$ : $Y(f = \text{4 kHz}) = 0.35$, $Y(f = \text{6 kHz}) = 0.15$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 15$ ⇒ $P_\varepsilon = 0.09$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=7.45\ \rm dB$. | :* $r = 0.5$ : $Y(f = \text{4 kHz}) = 0.35$, $Y(f = \text{6 kHz}) = 0.15$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 15$ ⇒ $P_\varepsilon = 0.09$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=7.45\ \rm dB$. | ||
:*$r = 1.0$ : $Y(f = \text{4 kHz}) = 0.3$, $Y(f = \text{6 kHz}) = 0.2$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 2$ ⇒ $P_\varepsilon = 0.16$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=4.95\ \rm dB$. | :*$r = 1.0$ : $Y(f = \text{4 kHz}) = 0.3$, $Y(f = \text{6 kHz}) = 0.2$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 2$ ⇒ $P_\varepsilon = 0.16$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=4.95\ \rm dB$. | ||
:* For all $r$ the distortion power $P_\varepsilon$ is independent of $\varphi$. The amplitude $A$ affects $P_x$ and $P_\varepsilon$ in the same way ⇒ the quotient is independent of $A$. | :* For all $r$ the distortion power $P_\varepsilon$ is independent of $\varphi$. The amplitude $A$ affects $P_x$ and $P_\varepsilon$ in the same way ⇒ the quotient is independent of $A$. | ||
+ | |||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | '''(3)''' | + | '''(3)''' Now apply $A=1$, $f_0 = \text{5 kHz}$, $\varphi=0$, $f_{\rm A} = \text{10 kHz}$, $f_{\rm G} = \text{5 kHz}$, $r=0$ $($rectangular low–pass$)$. Interpret the result of the signal reconstruction.}} |
+ | |||
+ | :* $X(f)$ consists of two Dirac delta lines at $\pm \text{5 kHz}$ $($weight $0.5)$. By periodic continuation $X_{\rm A}(f)$ has lines at $\pm \text{5 kHz}$, $\pm \text{15 kHz}$, $\pm \text{25 kHz}$, etc. | ||
+ | :* The rectanglular low-pass removes the lines at $\pm \text{15 kHz}$, $\pm \text{25 kHz}$. The lines at $\pm \text{5 kHz}$ are halved because of $H_{\rm E}(\pm f_{\rm G}) = H_{\rm E}(\pm \text{5 kHz}) = 0.5$. | ||
+ | :* ⇒ $\text{Weights of }X(f = \pm \text{5 kHz})$: $0.5$ # $\text{Weights of }X(f_{\rm A} = \pm \text{5 kHz})$: $1. 0$; # $\text{Weights of }Y(f = \pm \text{5 kHz})$: $0.5$ ⇒ $Y(f)=X(f)$. | ||
+ | :* So the signal reconstruction works perfectly here too $(P_\varepsilon = 0)$. The same is true for the phase $\varphi=180^\circ$ ⇒ $x(t) = -A \cdot \cos (2\pi \cdot f_0 \cdot t)$. | ||
− | |||
− | |||
− | |||
− | |||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
− | '''(4)''' | + | '''(4)''' The settings of $(3)$ continue to apply except for $\varphi=30^\circ$. Interpret the differences from the setting $(3)$ ⇒ $\varphi=0^\circ$.}} |
+ | |||
+ | :* Phase relations are lost. The sink signal $y(t)$ is cosine-shaped $(\varphi_y=0^\circ)$ with by the factor $\cos(\varphi_x)$ smaller amplitude than the source signal $x(t)$. | ||
+ | :* Justification in the frequency domain: In the periodic continuation of $X(f)$ ⇒ $X_{\rm A}(f)$ only the real parts are to be added. The imaginary parts cancel out. | ||
+ | :* The Dirac delta line of $X(f)$ at frequency $f_0$ ⇒ $X(f_0)$ is complex, $Y(f_0)$ is real, and $E(f_0)$ is imaginary ⇒ $\varepsilon(t)$ is minus–sinusoidal ⇒ $P_\varepsilon = 0. 125$. | ||
− | |||
− | |||
− | |||
− | ''' | + | {{BlueBox|TEXT= |
+ | '''(5)''' Illustrate again the result of $(4)$ compared to the settings $f_0 = \text{5 kHz}$, $\varphi=30^\circ$, $f_{\rm A} = \text{11 kHz}$, $f_{\rm G} = \text{5.5 kHz}$.}} | ||
+ | :* With this setting, the spectrum $X_{\rm A}(f)$ also has a positive imaginary part at $\text{5 kHz}$ and a negative imaginary part of the same magnitude at $\text{6 kHz}$. | ||
+ | :* The rectangular low-pass with cutoff frequency $\text{5.5 kHz}$ removes this second component. Thus, with the new setting $Y(f) =X(f)$ ⇒ $P_\varepsilon = 0$. | ||
+ | :* Any $f_0$ oscillation of arbitrary phase is error-free reconstructible from its samples if $f_{\rm A} = 2 \cdot f_{\rm 0} + \mu, \ f_{\rm G}= f_{\rm A}/2$ $($any small $\mu>0)$. | ||
+ | :* For <u>value–continuous</u> spectrum with $X(|f|> f_0) \equiv 0$ ⇒ $\big[$no diraclines at $\pm f_0 \big ]$ the sampling rate $f_{\rm A} = 2 \cdot f_{\rm 0}$ is sufficient in principle. | ||
{{BlaueBox|TEXT= | {{BlaueBox|TEXT= | ||
Line 257: | Line 260: | ||
:* Bei <u>wertkontinuierlichem</u> Spektrum mit $X(|f|> f_0) \equiv 0$ ⇒ $\big[$keine Diraclinien bei $\pm f_0 \big ]$ genügt grundsätzlich die Abtastrate $f_{\rm A} = 2 \cdot f_{\rm 0}$. | :* Bei <u>wertkontinuierlichem</u> Spektrum mit $X(|f|> f_0) \equiv 0$ ⇒ $\big[$keine Diraclinien bei $\pm f_0 \big ]$ genügt grundsätzlich die Abtastrate $f_{\rm A} = 2 \cdot f_{\rm 0}$. | ||
− | |||
− | |||
− | |||
− | |||
− | {{ | + | {{BlueBox|TEXT= |
− | '''( | + | '''(6)''' The settings of $(3)$ and $(4)$ continue to apply except for $\varphi=90^\circ$. Interpret the plots in the time and frequency domain.}} |
− | :* | + | :* The source signal is sampled exactly at its zero crossings ⇒ $x_{\rm A}(t) \equiv 0$ ⇒ $y(t) \equiv 0$ ⇒ $\varepsilon(t)=-x(t)$ ⇒ $P_\varepsilon = P_x$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=0\ \rm dB$. |
− | + | :* Description in the frequency domain: As in $(4)$ the imaginary parts of $X_{\rm A}(f)$ cancel out. Also the real parts of $X_{\rm A}(f)$ are zero because of the sinusoid. | |
− | :* | ||
− | |||
− | |||
− | |||
− | |||
− | {{ | + | {{BlueBox|TEXT= |
− | '''( | + | '''(7)''' Now consider the $\text {Source Signal 2}$. Let the other parameters be $f_{\rm A} = \text{5 kHz}$, $f_{\rm G} = \text{2.5 kHz}$, $r=0$. Interpret the results.}} |
− | + | :* The source signal has spectral components up to $\pm \text{2 kHz}$. The signal power is $P_x = 2 \cdot \big[0.1^2 + 0.25^2+0.15^2\big]= 0.19 $. | |
− | :* | + | :* With the sampling rate $f_{\rm A} = \text{5 kHz}$ and the receiver parameters $f_{\rm G} = \text{2.5 kHz}$ and $r=0$, the signal reconstruction works perfectly: $P_\varepsilon = 0$. |
− | :* | + | :* Likewise with the trapezoidal low–pass with $f_{\rm G} = \text{2.5 kHz}$, if for the rolloff factor holds: $r \le 0.2$. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | {{BlueBox|TEXT= | ||
+ | '''(8)''' What happens if the cutoff frequency $f_{\rm G} = \text{1.5 kHz}$ of the rectangular low–pass filter is too small? In particular, interpret the error signal $\varepsilon(t)=y(t)-x(t)$.}} | ||
+ | :* The error signal $\varepsilon(t)=-0.3 \cdot \cos(2\pi \cdot \text{2 kHz} \cdot t -60^\circ)=0. 3 \cdot \cos(2\pi \cdot \text{2 kHz} \cdot t +120^\circ)$ is equal to the (negated) signal component at $\text{2 kHz}$. | ||
+ | :* The distortion power is $P_\varepsilon=2 \cdot 0.15^2= 0.045$ and the signal–to–distortion ratio $10 \cdot \lg \ (P_x/P_\varepsilon)=10 \cdot \lg \ (0.19/0.045)= 6.26\ \rm dB$. | ||
+ | {{BlueBox|TEXT= | ||
+ | '''(9)''' What happens if the cutoff frequency $f_{\rm G} = \text{3.5 kHz}$ of the rectangular low–pass filter is too large? In particular, interpret the error signal $\varepsilon(t)=y(t)-x(t)$.}} | ||
+ | :* The error signal $\varepsilon(t)=0.3 \cdot \cos(2\pi \cdot \text{3 kHz} \cdot t +60^\circ)$ is now equal to the $\text{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 $\text{2 kHz}$ to $\text{3 kHz}$ and also the phase relationship. | ||
+ | :* The amplitude of this $\text{3 kHz}$ error signal is equal to the amplitude of the $\text{2 kHz}$ portion of $x(t)$. Again $P_\varepsilon= 0.045$, $10 \cdot \lg \ (P_x/P_\varepsilon)= 6.26\ \rm dB$. | ||
− | |||
− | |||
− | |||
− | |||
− | | + | {{BlueBox|TEXT= |
+ | '''(10)''' Finally, we consider the $\text {source signal 4}$ $($portions until $\pm \text{4 kHz})$, as well as $f_{\rm A} = \text{5 kHz}$, $f_{\rm G} = \text{2. 5 kHz}$, $0 \le r\le 1$. Interpretation of results.}} | ||
+ | :* Up to $r=0.2$ the signal reconstruction works perfectly $(P_\varepsilon = 0)$. If one increases $r$, then $P_\varepsilon$ increases continuously and $10 \cdot \lg \ (P_x/P_\varepsilon)$ decreases. | ||
+ | :* With $r=1$ the signal frequencies $\text{0.5 kHz}$, ..., $\text{4 kHz}$ are attenuated, the more the higher the frequency is, for example $H_{\rm E}(f=\text{4 kHz}) = 0.6$. | ||
+ | :* Similarly, $Y(f)$ also includes components at frequencies $\text{6 kHz}$, $\text{7 kHz}$, $\text{8 kHz}$, $\text{9 kHz}$ and $\text{9.5 kHz}$ due to periodic continuation. | ||
+ | :* At the sampling times $t\hspace{0.05cm}' = n \cdot T_{\rm A}$, the signals $x(t\hspace{0.05cm}')$ and $y(t\hspace{0.05cm}')$ agree exactly ⇒ $\varepsilon(t\hspace{0.05cm}') = 0$. In between, not ⇒ small distortion power $P_\varepsilon = 0.008$. | ||
− | + | ||
− | |||
− | + | ==Applet Manual== | |
− | '''( | + | [[File:Exercise_Abtast_v2.png|right|600px|frame|Screenshot]] |
+ | '''(A)''' Selection of one of the four given source signals, <br> Adjustment of amplitudes, frequencies and phases. | ||
− | '''( | + | '''(B)''' Output of all set parameters of the source signal: |
+ | |||
+ | '''(C)''' Sampling & signal reconstruction parameters: | ||
+ | ::*Sampling frequency $f_{\rm A}$, | ||
+ | ::*Limit frequency of the receiving filter $f_{\rm G}$, | ||
+ | ::*Rolloff factor of the receiving filter $r$, | ||
+ | :::⇒ Trapezoidal–corner frequencies: $f_{1,\ 2} = f_{\rm G}\cdot (1\mp r)$ | ||
− | '''( | + | '''(D)''' Numerical result output: |
− | + | ::*Signal power $P_{x}$ | |
− | '''( | + | ::*Distortion power $P_{\varepsilon}$ |
− | + | ::*Signal to distortion ratio $10 \cdot \lg \ P_{x}/P_{\varepsilon}$ | |
− | | + | |
− | + | '''(E)''' Graphical output range for time domain: | |
− | '''( | + | ::*Source signal $x(t)$ ⇒ blue, |
− | + | ::*Sampled signal $x_{\rm A}(t)$ ⇒ blue, | |
− | '''( | + | ::*Reconstructed signal $y(t)$ ⇒ green, |
+ | ::*Differential signal $\varepsilon(t)=y(t) - x(t)$ ⇒ purple | ||
+ | |||
+ | '''(F)''' Graphical output area for frequency domain: | ||
+ | ::*$X(f)$ ⇒ blue, | ||
+ | ::*$X_{\rm A}(f)$ ⇒ blue, | ||
+ | ::*$Y(f)$ ⇒ green, | ||
+ | ::*$E(f)=Y(f) - X(f)$ ⇒ purple | ||
+ | |||
+ | '''(G)''' Exercise selection | ||
− | '''( | + | '''(H)''' Questions and solutions |
− | |||
− | |||
− | |||
− | |||
<br clear=all> | <br clear=all> | ||
==About the Authors== | ==About the Authors== | ||
− | + | This interactive calculation tool was designed and implemented at the [https://www.ei.tum.de/en/lnt/home/ Institute for Communications Engineering] at the [https://www.tum.de/en Technical University of Munich]. | |
− | * | + | *The first version was created in 2008 by [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Slim_Lamine_.28Studienarbeit_EI_2006.29|Slim Lamine]] 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]]). |
− | |||
+ | *Last revision and English version 2020/2021 by [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]] in the context of a working student activity. | ||
− | |||
− | + | The conversion of this applet to HTML 5 was financially supported by [https://www.ei.tum.de/studium/studienzuschuesse/ Studienzuschüsse] ("study grants") of the TUM Faculty EI. We thank. | |
+ | |||
==Once again: Open Applet in new Tab== | ==Once again: Open Applet in new Tab== | ||
− | + | {{LntAppletLinkEnDe|sampling_en|sampling}} | |
− | {{ |
Latest revision as of 18:10, 26 April 2023
Open Applet in new Tab Deutsche Version Öffnen
Contents
Applet Description
The applet deals with the system components "sampling" and "signal reconstruction", two components that are of great importance for understanding the "Puls code modulation" $({\rm PCM})$ for example. The upper graphic shows the model on which this applet is based. Below it are the samples $x(\nu \cdot T_{\rm A})$ of the time continuous signal $x(t)$. The (infinite) sum over all these samples is called the sampled signal $x_{\rm A}(t)$.
- At the transmitter, the time discrete (sampled) signal $x_{\rm A}(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 $f_{\rm A}= 1/T_{\rm A}$. The lower graphic shows the sampling distance $T_{\rm A}$ .
- In the receiver, the discrete-time received signal $y_{\rm A}(t)$ is used to generate the continuous-time sink signal $y(t)$ ⇒ signal reconstruction or D/A conversion corresponding to the receiver frequency response $H_{\rm E}(f)$.
The applet does not consider the PCM blocks "Quantization"and "encoding/decoding". The digital transmission channel is assumed to be ideal.
The following consequences result from this:
- In the program simplifying $y_{\rm A}(t) = x_{\rm A}(t)$ is set.
- With suitable system parameters, the error signal $\varepsilon(t) = y(t)-x(t)\equiv 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)\ \bullet\!\!-\!\!\!-\!\!\!-\!\!\circ\,\ x(t)$, $X_{\rm A}(f)\ \bullet\!\!-\!\!\!-\!\!\!-\!\!\circ\,\ x_{\rm A}(t)$, $Y(f)\ \bullet\!\!-\!\!\!-\!\!\!-\!\!\circ\,\ y(t)$, $E(f)\ \bullet\!\!-\!\!\!-\!\!\!-\!\!\circ\,\ \varepsilon(t).$
Parameters for the receiver frequency response $H_{\rm E}(f)$ are the cut–off frequency and the rolloff factor (see lower graph):
- $$f_{\rm G} = \frac{f_2 +f_1}{2},\hspace{1cm}r = \frac{f_2 -f_1}{f_2 +f_1}.$$
Notes:
(1) All signal values are normalized to $\pm 1$.
(2) The power calculation is done by integration over the respective period duration $T_0$:
- $$P_x = \frac{1}{T_0} \cdot \int_0^{T_0} x^2(t)\ {\rm d}t,\hspace{0.8cm}P_\varepsilon = \frac{1}{T_0} \cdot \int_0^{T_0} \varepsilon^2(t).$$
(3) The signal power $P_x$ and the distortion power $P_\varepsilon$ are also output in normalized form, which implicitly assumes the reference resistance $R = 1\, \rm \Omega$ ;
(4) From these the signal–distortion–distance $10 \cdot \lg \ (P_x/P_\varepsilon)$ can be calculated.
(5) Does the spectral function $X(f)$ for positive frequencies consists of $I$ Dirac delta lines with the (possibly complex) weights $X_1$, ... , $X_I$,
so applies to the transmission power taking into account the mirror-image lines at the negative frequencies:
- $$P_x = 2 \cdot \sum_{i=1}^I |X_k|^2.$$
(6) Correspondingly, the following applies to the distortion power if the spectral function $E(f)$ in the range $f>0$ has $J$ Dirac delta lines with weights $E_1$, ... , $E_J$:
- $$P_\varepsilon = 2 \cdot \sum_{j=1}^J |E_j|^2.$$
Theoretical Background
Description of sampling in the time domain
In the following, we use the following nomenclature to describe the sampling:
- let the continuous-time signal be $x(t)$.
- Let the time-discretized signal sampled at equidistant intervals $T_{\rm A}$ be $x_{\rm A}(t)$.
- Out of the sampling time points $\nu \cdot T_{\rm A}$ always holds $x_{\rm A}(t) \equiv 0$.
- The run variable $\nu$ be an "integer": $\nu \in \mathbb{Z} = \{\hspace{0.05cm} \text{...}\hspace{0.05cm} , –3, –2, –1, \hspace{0.2cm}0, +1, +2, +3, \text{...} \hspace{0.05cm}\} $.
- In contrast, at the equidistant sampling times with the constant $K$, the result is:
- $$x_{\rm A}(\nu \cdot T_{\rm A}) = K \cdot x(\nu \cdot T_{\rm A})\hspace{0.05cm}.$$
The constant depends on the type of time discretization. For the above sketch $K = 1$ is valid.
Description of sampling with the Dirac delta pulse
In the following, we assume a slightly different form of description. The following pages will show that these equations, which take some getting used to, do lead to useful results if they are applied consistently.
$\text{Definitions:}$
- By sampling we mean here the multiplication of the time-continuous signal $x(t)$ by a Dirac delta pulse:
- $$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.05cm}.$$
- The Dirac delta pulse (in the time domain) consists of infinitely many Dirac delta pulses, each equally spaced $T_{\rm A}$ and all with equal pulse weight $T_{\rm A}$:
- $$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot \delta(t- \nu \cdot T_{\rm A} )\hspace{0.05cm}.$$
Based on this definition, the following properties result for the sampled signal:
- $$x_{\rm A}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot x(\nu \cdot T_{\rm A})\cdot \delta (t- \nu \cdot T_{\rm A} )\hspace{0.05cm}.$$
- The sampled signal at the considered time $(\nu \cdot T_{\rm A})$ ist gleich $T_{\rm A} \cdot x(\nu \cdot T_{\rm A}) · \delta (0)$.
- Since $\delta (t)$ at time $t = 0$ is infinite, actually all signal values $x_{\rm A}(\nu \cdot T_{\rm A})$ are also infinite and also the factor $K$ introduced above.
- Two samples $x_{\rm A}(\nu_1 \cdot T_{\rm A})$ and $x_{\rm A}(\nu_2 \cdot T_{\rm A})$ however, differ in the same proportion as the signal values $x(\nu_1 \cdot T_{\rm A})$ and $x(\nu_2 \cdot T_{\rm A})$.
- The samples of $x(t)$ appear in the pulse weights of the Dirac delta functions:
- The additional multiplication by $T_{\rm A}$ is necessary so that $x(t)$ and $x_{\rm A}(t)$ have the same unit. Note here that $\delta (t)$ itself has the unit "1/s".
Description of sampling in the frequency domain
The spectrum of the sampled signal $x_{\rm A}(t)$ is obtained by applying the "Convolution Theorem". This states that multiplication in the time domain corresponds to convolution in the spectral domain:
- $$x_{\rm A}(t) = x(t) \cdot p_{\delta}(t)\hspace{0.2cm}\circ\!\!-\!\!\!-\!\!\!-\!\!\bullet\, \hspace{0.2cm} X_{\rm A}(f) = X(f) \star P_{\delta}(f)\hspace{0.05cm}.$$
If one develops the Dirac delta pulse $p_{\delta}(t)$ (in the time domain) into a "Fourier Series" and transforms it using the "Shifting Theorem" into the frequency domain, the following correspondence ⇒ "proof" results with the distance $f_{\rm A} = 1/T_{\rm A}$ of two adjacent dirac delta lines in the frequency domain:
- $$p_{\delta}(t) = \sum_{\nu = - \infty }^{+\infty} T_{\rm A} \cdot \delta(t- \nu \cdot T_{\rm A} )\hspace{0.2cm}\circ\!\!-\!\!\!-\!\!\!-\!\!\bullet\, \hspace{0.2cm} P_{\delta}(f) = \sum_{\mu = - \infty }^{+\infty} \delta (f- \mu \cdot f_{\rm A} ).$$
The result states:
- The Dirac delta pulse $p_{\delta}(t)$ in the time domain consists of infinitely many Dirac delta pulses, each at the same distance $T_{\rm A}$ and all with the same pulse weight $T_{\rm A}$.
- The Fourier transform of $p_{\delta}(t)$ again gives a Dirac delta pulse, but now in the frequency domain ⇒ $P_{\delta}(f)$.
- Also $P_{\delta}(f)$ consists of infinitely many Dirac delta pulses, now in the respective spacing $f_{\rm A} = 1/T_{\rm A}$ and all with pulse weight $1$.
- The distances of the Dirac delta lines in time and frequency domain thus follow the "Reciprocity Theorem": $T_{\rm A} \cdot f_{\rm A} = 1 \hspace{0.05cm}.$
From this follows: From the spectrum $X(f)$ is obtained by convolution with the Dirac delta line shifted by $\mu \cdot f_{\rm A}$ :
- $$X(f) \star \delta (f- \mu \cdot f_{\rm A} )= X (f- \mu \cdot f_{\rm A} )\hspace{0.05cm}.$$
Applying this result to all Dirac delta lines of the Dirac delta pulse, we finally obtain:
- $$X_{\rm A}(f) = X(f) \star \sum_{\mu = - \infty }^{+\infty} \delta (f- \mu \cdot f_{\rm A} ) = \sum_{\mu = - \infty }^{+\infty} X (f- \mu \cdot f_{\rm A} )\hspace{0.05cm}.$$
$\text{Conclusion:}$ Sampling the analog time signal $x(t)$ at equidistant intervals $T_{\rm A}$ results in the spectral domain in a periodic continuation of $X(f)$ with frequency spacing $f_{\rm A} = 1/T_{\rm A}$.
$\text{Example 1:}$ The upper graph shows (schematic!) the spectrum $X(f)$ of an analog signal $x(t)$, which contains frequencies up to $5 \text{ kHz}$ .
Sampling the signal at the sampling rate $f_{\rm A}\,\text{ = 20 kHz}$, i.e., at the respective spacing $T_{\rm A}\, = {\rm 50 \, µs}$ yields the periodic spectrum $X_{\rm A}(f)$ sketched below.
- Since the Dirac delta functions are infinitely narrow, the sampled signal $x_{\rm A}(t)$ also contains arbitrary high frequency components.
- Correspondingly, the spectral function $X_{\rm A}(f)$ of the sampled signal is extended to infinity.
Signal reconstruction
Signal sampling is not an end in itself in a digital transmission system, but it must be reversed at some point For example, consider the following system:
- The analog signal $x(t)$ with bandwidth $B_{\rm NF}$ is sampled as described above.
- At the output of an ideal transmission system, the also discrete-time signal $y_{\rm A}(t) = x_{\rm A}(t)$ is present.
- The question now is how the block signal reconstruction has to be designed so that also $y(t) = x(t)$ holds.
The solution is simple if you look at the spectral functions:
One obtains from $Y_{\rm A}(f)$ the spectrum $Y(f) = X(f)$ by a low-pass filter with the "Frequency response" $H_{\rm E}(f)$, which
- passes the low frequencies unaltered:
- $$H_{\rm E}(f) = 1 \hspace{0.3cm}{\rm{for}} \hspace{0.3cm} |f| \le B_{\rm NF}\hspace{0.05cm},$$
- completely suppresses the high frequencies:
- $$H_{\rm E}(f) = 0 \hspace{0.3cm}{\rm{for}} \hspace{0.3cm} |f| \ge f_{\rm A} - B_{\rm NF}\hspace{0.05cm}.$$
Further, it can be seen from the accompanying graph: As long as the above two conditions are satisfied, $H_{\rm E}(f)$ can be arbitrarily shaped in the range from $B_{\rm NF}$ to $f_{\rm A}-B_{\rm NF}$ ,
- for example linearly descending (dashed line)
- or also rectangular.
The Sampling Theorem
The complete reconstruction of the analog signal $y(t)$ from the sampled signal $y_{\rm A}(t) = x_{\rm A}(t)$ is only possible if the sampling rate $f_{\rm A}$ corresponding to the bandwidth $B_{\rm NF}$ of the message signal has been chosen correctly.
From the above graph, it can be seen that the following condition must be satisfied: $f_{\rm A} - B_{\rm NF} > B_{\rm NF} \hspace{0.3cm}\Rightarrow \hspace{0.3cm}f_{\rm A} > 2 \cdot B_{\rm NF}\hspace{0.05cm}.$
$\text{Sampling theorem:}$ If an analog signal $x(t)$ has only spectral components in the range $\vert f \vert < B_{\rm NF}$, it can be completely reconstructed from its sampled signal $x_{\rm A}(t)$ only if the sampling rate is sufficiently large:
- $$f_{\rm A} ≥ 2 \cdot B_{\rm NF}.$$
Accordingly, the following must apply to the distance between two samples:
- $$T_{\rm A} \le \frac{1}{ 2 \cdot B_{\rm NF} }\hspace{0.05cm}.$$
If the largest possible value ⇒ $T_{\rm A} = 1/(2B_{\rm NF})$ is used for sampling,
- so, for signal reconstruction of the analog signal from its samples.
- an ideal, rectangular low-pass filter with cut off frequency $f_{\rm G} = f_{\rm A}/2 = 1/(2T_{\rm A})$ must be used.
$\text{Example 2:}$ The graph shows above the spectrum $\pm\text{ 5 kHz}$ of an analog signal limited to $X(f)$ below the spectrum $X_{\rm A}(f)$ of the signal sampled at distance $T_{\rm A} =\,\text{ 100 µs}$ ⇒ $f_{\rm A}=\,\text{ 10 kHz}$.
Additionally drawn is the frequency response $H_{\rm E}(f)$ of the low-pass receiving filter for signal reconstruction, whose cutoff frequency must be exactly $f_{\rm G} = f_{\rm A}/2 = 5\,\text{ kHz}$ .
- With any other $f_{\rm G}$ value, there would be $Y(f) \neq X(f)$.
- For $f_{\rm G} < 5\,\text{ kHz}$ the upper $X(f)$ portions are missing.
- At $f_{\rm G} > 5\,\text{ kHz}$ there are unwanted spectral components in $Y(f)$ due to convolution products.
If at the transmitter the sampling had been done with a sampling rate $f_{\rm A} < 10\,\text{ kHz}$ ⇒ $T_{\rm A} >100 \ {\rm µ s}$, the analog signal $y(t) = x(t)$ would not be reconstructible from the samples $y_{\rm A}(t)$ in any case.
Exercises
- First, select the number $(1,\ 2, \text{...} \ )$ 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 $\pm 1$. Powers are normalized values, too.
(1) Source signal: $x(t) = A \cdot \cos (2\pi \cdot f_0 \cdot t -\varphi)$ with $f_0 = \text{4 kHz}$. Sampling with $f_{\rm A} = \text{10 kHz}$. Rectanglular low-pass; cut off frequency: $f_{\rm G} = \text{5 kHz}$.
Interpret the shown graphics and evaluate the present signal reconstruction for all permitted parameter values of $A$ and $\varphi$.
- The spectrum $X(f)$ consists of two Dirac functions at $\pm \text{4 kHz}$, each with impulse weight $0.5$.
- By the periodic continuation $X_{\rm A}(f)$ has lines of equal height at $\pm \text{4 kHz}$, $\pm \text{6 kHz}$, $\pm \text{14 kHz}$, $\pm \text{16 kHz}$, $\pm \text{24 kHz}$, $\pm \text{26 kHz}$, etc.
- The rectangular low-pass with the cut off frequency $f_{\rm G} = \text{5 kHz}$ removes all lines except the two at $\pm \text{4 kHz}$ ⇒ $Y(f) =X(f)$ ⇒ $y(t) =x(t)$ ⇒ $P_\varepsilon = 0$.
- The signal reconstruction works here perfectly $(P_\varepsilon = 0)$ for all amplitudes $A$ and any phases $\varphi$.
(2) Continue with $A=1$, $f_0 = \text{4 kHz}$, $\varphi=0$, $f_{\rm A} = \text{10 kHz}$, $f_{\rm G} = \text{5 kHz}$. What is the influence of the rolloff–factors $r=0.2$, $r=0.5$ and $r=1$?
Specify the power values $P_x$ and $P_\varepsilon$ . For which $r$–values is $P_\varepsilon= 0$? Do these results also apply to other $A$ and $\varphi$?
- With $|X(f = \pm \text{4 kHz})|=0.5$ the signal power is $P_x = 2\cdot 0.5^2 = 0.5$. The distortion power $P_\varepsilon$ depends significantly on the rolloff–factor $r$ .
- $P_\varepsilon$ is zero for $r \le 0.2$. Then the $X_{\rm A}(f)$ line at $f_0 = \text{4 kHz}$ is not changed by the low-pass and the unwanted line at $\text{6 kHz}$ is fully suppressed.
- $r = 0.5$ : $Y(f = \text{4 kHz}) = 0.35$, $Y(f = \text{6 kHz}) = 0.15$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 15$ ⇒ $P_\varepsilon = 0.09$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=7.45\ \rm dB$.
- $r = 1.0$ : $Y(f = \text{4 kHz}) = 0.3$, $Y(f = \text{6 kHz}) = 0.2$ ⇒ $|E(f = \text{4 kHz})| = |E(f = \text{6 kHz})|= 0. 2$ ⇒ $P_\varepsilon = 0.16$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=4.95\ \rm dB$.
- For all $r$ the distortion power $P_\varepsilon$ is independent of $\varphi$. The amplitude $A$ affects $P_x$ and $P_\varepsilon$ in the same way ⇒ the quotient is independent of $A$.
(3) Now apply $A=1$, $f_0 = \text{5 kHz}$, $\varphi=0$, $f_{\rm A} = \text{10 kHz}$, $f_{\rm G} = \text{5 kHz}$, $r=0$ $($rectangular low–pass$)$. Interpret the result of the signal reconstruction.
- $X(f)$ consists of two Dirac delta lines at $\pm \text{5 kHz}$ $($weight $0.5)$. By periodic continuation $X_{\rm A}(f)$ has lines at $\pm \text{5 kHz}$, $\pm \text{15 kHz}$, $\pm \text{25 kHz}$, etc.
- The rectanglular low-pass removes the lines at $\pm \text{15 kHz}$, $\pm \text{25 kHz}$. The lines at $\pm \text{5 kHz}$ are halved because of $H_{\rm E}(\pm f_{\rm G}) = H_{\rm E}(\pm \text{5 kHz}) = 0.5$.
- ⇒ $\text{Weights of }X(f = \pm \text{5 kHz})$: $0.5$ # $\text{Weights of }X(f_{\rm A} = \pm \text{5 kHz})$: $1. 0$; # $\text{Weights of }Y(f = \pm \text{5 kHz})$: $0.5$ ⇒ $Y(f)=X(f)$.
- So the signal reconstruction works perfectly here too $(P_\varepsilon = 0)$. The same is true for the phase $\varphi=180^\circ$ ⇒ $x(t) = -A \cdot \cos (2\pi \cdot f_0 \cdot t)$.
(4) The settings of $(3)$ continue to apply except for $\varphi=30^\circ$. Interpret the differences from the setting $(3)$ ⇒ $\varphi=0^\circ$.
- Phase relations are lost. The sink signal $y(t)$ is cosine-shaped $(\varphi_y=0^\circ)$ with by the factor $\cos(\varphi_x)$ smaller amplitude than the source signal $x(t)$.
- Justification in the frequency domain: In the periodic continuation of $X(f)$ ⇒ $X_{\rm A}(f)$ only the real parts are to be added. The imaginary parts cancel out.
- The Dirac delta line of $X(f)$ at frequency $f_0$ ⇒ $X(f_0)$ is complex, $Y(f_0)$ is real, and $E(f_0)$ is imaginary ⇒ $\varepsilon(t)$ is minus–sinusoidal ⇒ $P_\varepsilon = 0. 125$.
(5) Illustrate again the result of $(4)$ compared to the settings $f_0 = \text{5 kHz}$, $\varphi=30^\circ$, $f_{\rm A} = \text{11 kHz}$, $f_{\rm G} = \text{5.5 kHz}$.
- With this setting, the spectrum $X_{\rm A}(f)$ also has a positive imaginary part at $\text{5 kHz}$ and a negative imaginary part of the same magnitude at $\text{6 kHz}$.
- The rectangular low-pass with cutoff frequency $\text{5.5 kHz}$ removes this second component. Thus, with the new setting $Y(f) =X(f)$ ⇒ $P_\varepsilon = 0$.
- Any $f_0$ oscillation of arbitrary phase is error-free reconstructible from its samples if $f_{\rm A} = 2 \cdot f_{\rm 0} + \mu, \ f_{\rm G}= f_{\rm A}/2$ $($any small $\mu>0)$.
- For value–continuous spectrum with $X(|f|> f_0) \equiv 0$ ⇒ $\big[$no diraclines at $\pm f_0 \big ]$ the sampling rate $f_{\rm A} = 2 \cdot f_{\rm 0}$ is sufficient in principle.
(5) Verdeutlichen Sie sich nochmals das Ergebnis von (4) im Vergleich zu den Einstellungen $f_0 = \text{5 kHz}$, $\varphi=30^\circ$, $f_{\rm A} = \text{11 kHz}$, $f_{\rm G} = \text{5.5 kHz}$.
- Bei dieser Einstellung hat das $X_{\rm A}(f)$–Spektrum auch einen positiven Imaginärteil bei $\text{5 kHz}$ und einen negativen Imaginärteil gleicher Höhe bei $\text{6 kHz}$.
- Der Rechteck–Tiefpass mit der Grenzfrequenz $\text{5.5 kHz}$ entfernt diesen zweiten Anteil. Somit ist bei dieser Einstellung $Y(f) =X(f)$ ⇒ $P_\varepsilon = 0$.
- Jede $f_0$–Schwingung beliebiger Phase ist fehlerfrei aus seinen Abtastwerten rekonstruierbar, falls $f_{\rm A} = 2 \cdot f_{\rm 0} + \mu, \ f_{\rm G}= f_{\rm A}/2$ $($beliebig kleines $\mu>0)$.
- Bei wertkontinuierlichem Spektrum mit $X(|f|> f_0) \equiv 0$ ⇒ $\big[$keine Diraclinien bei $\pm f_0 \big ]$ genügt grundsätzlich die Abtastrate $f_{\rm A} = 2 \cdot f_{\rm 0}$.
(6) The settings of $(3)$ and $(4)$ continue to apply except for $\varphi=90^\circ$. Interpret the plots in the time and frequency domain.
- The source signal is sampled exactly at its zero crossings ⇒ $x_{\rm A}(t) \equiv 0$ ⇒ $y(t) \equiv 0$ ⇒ $\varepsilon(t)=-x(t)$ ⇒ $P_\varepsilon = P_x$ ⇒ $10 \cdot \lg \ (P_x/P_\varepsilon)=0\ \rm dB$.
- Description in the frequency domain: As in $(4)$ the imaginary parts of $X_{\rm A}(f)$ cancel out. Also the real parts of $X_{\rm A}(f)$ are zero because of the sinusoid.
(7) Now consider the $\text {Source Signal 2}$. Let the other parameters be $f_{\rm A} = \text{5 kHz}$, $f_{\rm G} = \text{2.5 kHz}$, $r=0$. Interpret the results.
- The source signal has spectral components up to $\pm \text{2 kHz}$. The signal power is $P_x = 2 \cdot \big[0.1^2 + 0.25^2+0.15^2\big]= 0.19 $.
- With the sampling rate $f_{\rm A} = \text{5 kHz}$ and the receiver parameters $f_{\rm G} = \text{2.5 kHz}$ and $r=0$, the signal reconstruction works perfectly: $P_\varepsilon = 0$.
- Likewise with the trapezoidal low–pass with $f_{\rm G} = \text{2.5 kHz}$, if for the rolloff factor holds: $r \le 0.2$.
(8) What happens if the cutoff frequency $f_{\rm G} = \text{1.5 kHz}$ of the rectangular low–pass filter is too small? In particular, interpret the error signal $\varepsilon(t)=y(t)-x(t)$.
- The error signal $\varepsilon(t)=-0.3 \cdot \cos(2\pi \cdot \text{2 kHz} \cdot t -60^\circ)=0. 3 \cdot \cos(2\pi \cdot \text{2 kHz} \cdot t +120^\circ)$ is equal to the (negated) signal component at $\text{2 kHz}$.
- The distortion power is $P_\varepsilon=2 \cdot 0.15^2= 0.045$ and the signal–to–distortion ratio $10 \cdot \lg \ (P_x/P_\varepsilon)=10 \cdot \lg \ (0.19/0.045)= 6.26\ \rm dB$.
(9) What happens if the cutoff frequency $f_{\rm G} = \text{3.5 kHz}$ of the rectangular low–pass filter is too large? In particular, interpret the error signal $\varepsilon(t)=y(t)-x(t)$.
- The error signal $\varepsilon(t)=0.3 \cdot \cos(2\pi \cdot \text{3 kHz} \cdot t +60^\circ)$ is now equal to the $\text{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 $\text{2 kHz}$ to $\text{3 kHz}$ and also the phase relationship.
- The amplitude of this $\text{3 kHz}$ error signal is equal to the amplitude of the $\text{2 kHz}$ portion of $x(t)$. Again $P_\varepsilon= 0.045$, $10 \cdot \lg \ (P_x/P_\varepsilon)= 6.26\ \rm dB$.
(10) Finally, we consider the $\text {source signal 4}$ $($portions until $\pm \text{4 kHz})$, as well as $f_{\rm A} = \text{5 kHz}$, $f_{\rm G} = \text{2. 5 kHz}$, $0 \le r\le 1$. Interpretation of results.
- Up to $r=0.2$ the signal reconstruction works perfectly $(P_\varepsilon = 0)$. If one increases $r$, then $P_\varepsilon$ increases continuously and $10 \cdot \lg \ (P_x/P_\varepsilon)$ decreases.
- With $r=1$ the signal frequencies $\text{0.5 kHz}$, ..., $\text{4 kHz}$ are attenuated, the more the higher the frequency is, for example $H_{\rm E}(f=\text{4 kHz}) = 0.6$.
- Similarly, $Y(f)$ also includes components at frequencies $\text{6 kHz}$, $\text{7 kHz}$, $\text{8 kHz}$, $\text{9 kHz}$ and $\text{9.5 kHz}$ due to periodic continuation.
- At the sampling times $t\hspace{0.05cm}' = n \cdot T_{\rm A}$, the signals $x(t\hspace{0.05cm}')$ and $y(t\hspace{0.05cm}')$ agree exactly ⇒ $\varepsilon(t\hspace{0.05cm}') = 0$. In between, not ⇒ small distortion power $P_\varepsilon = 0.008$.
Applet Manual
(A) Selection of one of the four given source signals,
Adjustment of amplitudes, frequencies and phases.
(B) Output of all set parameters of the source signal:
(C) Sampling & signal reconstruction parameters:
- Sampling frequency $f_{\rm A}$,
- Limit frequency of the receiving filter $f_{\rm G}$,
- Rolloff factor of the receiving filter $r$,
- ⇒ Trapezoidal–corner frequencies: $f_{1,\ 2} = f_{\rm G}\cdot (1\mp r)$
(D) Numerical result output:
- Signal power $P_{x}$
- Distortion power $P_{\varepsilon}$
- Signal to distortion ratio $10 \cdot \lg \ P_{x}/P_{\varepsilon}$
(E) Graphical output range for time domain:
- Source signal $x(t)$ ⇒ blue,
- Sampled signal $x_{\rm A}(t)$ ⇒ blue,
- Reconstructed signal $y(t)$ ⇒ green,
- Differential signal $\varepsilon(t)=y(t) - x(t)$ ⇒ purple
(F) Graphical output area for frequency domain:
- $X(f)$ ⇒ blue,
- $X_{\rm A}(f)$ ⇒ blue,
- $Y(f)$ ⇒ green,
- $E(f)=Y(f) - X(f)$ ⇒ purple
(G) Exercise selection
(H) Questions and solutions
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.
The conversion of this applet to HTML 5 was financially supported by Studienzuschüsse ("study grants") of the TUM Faculty EI. We thank.