1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
|
% SPDX-License-Identifier: CC-BY-SA-4.0
%
% Copyright (c) 2020 Philipp Le
%
% Except where otherwise noted, this work is licensed under a
% Creative Commons Attribution-ShareAlike 4.0 License.
%
% Please find the full copy of the licence at:
% https://creativecommons.org/licenses/by-sa/4.0/legalcode
\phantomsection
\addcontentsline{toc}{section}{Exercise 4}
\section*{Exercise 4}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{question}[subtitle={Sampling Periodic Signals}]
\begin{equation*}
u(t) = \SI{2}{V} \cdot \cos\left(2\pi \cdot \SI{2}{MHz} \cdot t + \SI{60}{\degree}\right)
\end{equation*}
The signal is sampled with a sampling period of $T_S = \SI{125}{\nano\second}$. The first sample taken is $u(t = 0)$.
\begin{tasks}
\task
Plot the function from $t = 0$ to $t = \SI{1}{\micro\second}$!
\task
Calculate the samples $n = 0 \dots 8$!
\task
What is the DTFT of the signal?
Hints:
\begin{equation*}
\begin{split}
x[n] = e^{-j a n} &= \underline{X}_{2\pi}\left(e^{-j \phi}\right) = 2 \pi \sum\limits_{l = -\infty}^{\infty} \delta \left(\phi + a - 2\pi l\right) \\
\cos\left(b\right) &= \frac{1}{2} \left(e^{j b} + e^{-j b}\right)
\end{split}
\end{equation*}
\task
Can the DFT directly applied to the signal? If yes, determine the smallest $N$ and give the values of all $\underline{U}[k]$!
\task
What is the longest possible sampling period? What must be considered at this sampling period?
\task
Now, the sampling period is changed to $T_S = \SI{0.5}{\micro\second}$. There is no anti-aliasing filter. The reconstruction filter is an ideal low-pass filter with a cut-off frequency of $\SI{2.5}{MHz}$. Give the reconstructed output function in the time domain! Give an explanation in the frequency domain!
\end{tasks}
\end{question}
\begin{solution}
\begin{tasks}
\task
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
height={0.25\textheight},
width=0.8\linewidth,
scale only axis,
xlabel={$t$ in \si{\micro\second}},
ylabel={$u(t)$},
%grid style={line width=.6pt, color=lightgray},
%grid=both,
grid=none,
legend pos=outer north east,
axis y line=middle,
axis x line=middle,
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=north,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=east,
},
xmin=-0.1,
xmax=1.1,
ymin=-2.2,
ymax=2.2,
xtick={0,0.125,...,1},
%xticklabels={$- \omega_S$, $- \frac{\omega_S}{2}$, $0$, $\frac{\omega_S}{2}$, $\omega_S$},
%ytick={0},
]
\addplot[blue, dashed, smooth, domain=0:1, samples=50] plot(\x, {2*cos(deg(2*pi*2*\x)+60)});
%\addlegendentry{$u(t)$};
\pgfplotsinvokeforeach{0,0.125,...,1}{
\addplot[red] coordinates {(#1,0) (#1,{2*cos(deg(2*pi*2*#1)+60)})};
\addplot[red, only marks, mark=o] coordinates {(#1,{2*cos(deg(2*pi*2*#1)+60)})};
}
\end{axis}
\end{tikzpicture}
\end{figure}
\task
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|r|r|r|r|r|}
\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ & $7$ & $8$
\\
\hline
$t$ in \si{\micro\second} & $0.0$ & $0.125$ & $0.25$ & $0.375$ & $0.5$ & $0.625$ & $0.75$ & $0.875$ & $1.0$
\\
\hline
\hline
$u[n]$ in \si{V} & $1.0$ & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ \\
\hline
\end{tabular}
\end{table}
\task
$t = n T_S$ due to the sampling:
\begin{equation*}
\begin{split}
u[n] &= \SI{2}{V} \cdot \cos\left(2\pi \cdot \SI{2}{MHz} \cdot n T_S + \SI{60}{\degree}\right) \\
&= \SI{1}{V} \cdot \left( e^{j \left(2\pi \cdot \SI{2}{MHz} \cdot n T_S + \SI{60}{\degree}\right)} + e^{-j \left(2\pi \cdot \SI{2}{MHz} \cdot n T_S + \SI{60}{\degree}\right)} \right) \\
&= \SI{1}{V} \cdot \left( e^{j \SI{60}{\degree}} \cdot e^{j \cdot 2\pi \cdot \SI{2}{MHz} \cdot n T_S} + e^{-j \SI{60}{\degree}} \cdot e^{-j \cdot 2\pi \cdot \SI{2}{MHz} \cdot n T_S} \right)
\end{split}
\end{equation*}
The DTFT is:
\begin{equation*}
\begin{split}
\underline{U}_{2\pi}\left(e^{-j \phi}\right) &= \SI{2}{V} \cdot \pi \sum\limits_{l = -\infty}^{\infty} \left( e^{j \SI{60}{\degree}} \cdot \delta\left(\phi - \left(2\pi \cdot \SI{2}{MHz} \cdot T_S\right) - 2\pi l\right)\right. \\ &\qquad + \left.e^{-j \SI{60}{\degree}} \cdot \delta\left(\phi + \left(2\pi \cdot \SI{2}{MHz} \cdot T_S\right) - 2\pi l\right) \right)
\end{split}
\end{equation*}
\task
Yes, it is periodic with $T_0=\SI{500}{ns}$. This means:
\begin{equation*}
N = \frac{T_0}{T_S} = 4
\end{equation*}
The DFT over $N=4$ is:
\begin{equation*}
\begin{split}
\underline{X}[k] &= \sum\limits_{n=0}^{N-1} \underline{x}[n] \cdot e^{-j 2\pi \frac{k}{N} n}
\end{split}
\end{equation*}
\begin{equation*}
\begin{split}
\phi[k] &= 2 \pi \frac{k}{N} \\
\omega[k] &= \frac{\phi[k]}{T_S} \\
f[k] &= \frac{\omega[k]}{2 \pi} \\
\end{split}
\end{equation*}
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|}
\hline
$k$ & $0$ & $1$ & $2$ & $3$
\\
\hline
$k$ (alternate) & $0$ & $1$ & $-2$ & $-1$ \\
\hline
\hline
$\phi[k]$ & $0$ & $1.57 \approx \pi$ & $3.14 \approx 2 \pi \equiv -2\pi$ & $4.71 \approx 3 \pi \equiv -\pi$ \\
\hline
$\omega[k]$ & $\SI{0}{{\micro\second}^{-1}}$ & $\SI{12.57}{{\micro\second}^{-1}}$ & $\SI{25.13}{{\micro\second}^{-1}}$ & $\SI{37.7}{{\micro\second}^{-1}}$ \\
\hline
$f[k]$ & $\SI{0}{MHz}$ & $\SI{2}{MHz}$ & $\SI{4}{MHz} \equiv \SI{-4}{MHz}$ & $\SI{6}{MHz} \equiv \SI{-2}{MHz}$ \\
\hline
\hline
$\underline{U}[k]$ & $0$ & $(2+3.46j)$ & $0$ & $(2-3.46j)$ \\
\hline
$|\underline{U}[k]|$ & $0.0$ & $4.0$ & $0.0$ & $4.0$ \\
\hline
$\arg\left(\underline{U}[k]\right)$ & $\SI{3.14}{rad} \approx \SI{360}{\degree}$ & $\SI{1.05}{rad} \approx \SI{60}{\degree}$ & $\SI{3.14}{rad} \approx \SI{360}{\degree}$ & $\SI{-1.05}{rad} \approx \SI{-60}{\degree}$ \\
\hline
\end{tabular}
\end{table}
\task
\begin{itemize}
\item Minimum possible sampling frequency is \SI{4}{MHz}. Anything below, will violate the Shannon-Nyquist theorem and cause aliasing.
\item The longest possible sampling period is therefore \SI{250}{ns}.
\item At $T_S = \SI{250}{ns}$, the sampling phase must be considered, too.
\begin{itemize}
\item It must be shifted by $\SI{+60}{\degree}$, so that the maxima of $u(t)$ are sampled.
\item This retains the amplitude of \SI{2}{V}.
\item A timing error will effectively reduce the amplitude of the sampled signal in relation to the original signal.
\item At a timing error of $\Delta T_S = \SI{125}{ns}$, all samples will be zero, because the Dirac comb used for sampling is orthogonal to the original signal.
\end{itemize}
\end{itemize}
\task
The sampling period of \SI{500}{ns} violates the Shannon-Nyquist theorem and causes aliasing.
\begin{figure}[H]
\subfloat[Original signal $\underline{U}\left(j\omega\right)$] {
\centering
\begin{tikzpicture}
\begin{axis}[
height={0.15\textheight},
width=0.25\linewidth,
scale only axis,
xlabel={$\omega$},
ylabel={$|\underline{U}\left(j\omega\right)|$},
%grid style={line width=.6pt, color=lightgray},
%grid=both,
grid=none,
legend pos=north east,
axis y line=middle,
axis x line=middle,
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=north,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=east,
},
xmin=-1.5,
xmax=1.5,
ymin=0,
ymax=1.2,
xtick={-1, -0.5, 0, 0.5, 1},
xticklabels={$- \omega_S$, $- \frac{\omega_S}{2}$, $0$, $\frac{\omega_S}{2}$, $\omega_S$},
ytick={0},
%ytick={0, 1},
%yticklabels={0, $\SI{}$}
]
\draw[-latex, red, very thick] (axis cs:1,0) -- (axis cs:1,0.8); %node[left,align=right,anchor=north,rotate=90,yshift=-5mm]{$\arg\left(\underline{U}\left(j\omega_S\right)\right) = \SI{60}{\degree}$};
\draw[-latex, green, very thick] (axis cs:-1,0) -- (axis cs:-1,0.8); %node[left,align=right,anchor=north,rotate=90,yshift=-5mm]{$\arg\left(\underline{U}\left(-j\omega_S\right)\right) = \SI{-60}{\degree}$};
\end{axis}
\end{tikzpicture}
}
\hfill
\subfloat[Spectrum of the Dirac comb $\frac{2 \pi}{T} \Sha_{\frac{2 \pi}{T}}(\omega)$] {
\centering
\begin{tikzpicture}
\begin{axis}[
height={0.15\textheight},
width=0.27\linewidth,
scale only axis,
xlabel={$t$},
ylabel={$|\frac{2 \pi}{T} \Sha_{\frac{2 \pi}{T}}(\omega)|$},
%grid style={line width=.6pt, color=lightgray},
%grid=both,
grid=none,
legend pos=north east,
axis y line=middle,
axis x line=middle,
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=north,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=east,
},
xmin=-2.5,
xmax=2.5,
ymin=0,
ymax=1.2,
xtick={-2, ..., 2},
xticklabels={$-2 \omega_S$, $- \omega_S$, $0$, $\omega_S$, $2 \omega_S$},
ytick={0},
]
\pgfplotsinvokeforeach{-3, -2, ..., 3}{
\draw[-latex, blue, very thick] (axis cs:#1,0) -- (axis cs:#1,1);
}
\end{axis}
\end{tikzpicture}
}
\hfill
\subfloat[Sampled signal $\underline{U}_S\left(j\omega\right)$, showing aliasing] {
\centering
\begin{tikzpicture}
\begin{axis}[
height={0.15\textheight},
width=0.27\linewidth,
scale only axis,
xlabel={$\omega$},
ylabel={$|\underline{U}_S\left(j\omega\right)|$},
%grid style={line width=.6pt, color=lightgray},
%grid=both,
grid=none,
legend pos=north east,
axis y line=middle,
axis x line=middle,
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=north,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=east,
},
xmin=-2.5,
xmax=2.5,
ymin=0,
ymax=1.2,
xtick={-2, -1, -0.5, 0, 0.5, 1, 2},
xticklabels={$-2 \omega_S$, $- \omega_S$, $- \frac{\omega_S}{2}$, $0$, $\frac{\omega_S}{2}$, $\omega_S$, $2 \omega_S$},
ytick={0},
]
\pgfplotsinvokeforeach{-3, -2, ..., 3}{
\draw[-latex, blue, dashed, very thick] (axis cs:#1,0) -- (axis cs:#1,1);
\draw[-latex, green, very thick] (axis cs:{#1-0.01},0) -- (axis cs:{#1-0.01},0.8);
\draw[-latex, red, very thick] (axis cs:{#1+0.01},0) -- (axis cs:{#1+0.01},0.8);
}
\end{axis}
\end{tikzpicture}
}
\end{figure}
\begin{itemize}
\item The spectral components of $\SI{+2}{MHz}$ (with $e^{j \SI{60}{\degree}}$) and $\SI{-2}{MHz}$ (with $e^{j \SI{-60}{\degree}}$) superimpose at \SI{0}{Hz} (DC).
\item The resulting component at \SI{0}{Hz} is the addition if two complex numbers (see Part c) ):
\begin{equation*}
\underline{U}_S\left(j 0\right) = \SI{2}{V} \cdot \pi \underbrace{\left(e^{j \SI{60}{\degree}} + e^{j \SI{-60}{\degree}}\right)}_{= 1} \delta(\omega) = \SI{2}{V} \cdot \pi \cdot \delta(\omega)
\end{equation*}
\item Applying the reconstruction filter gives the spectrum of the reconstructed signal:
\begin{equation*}
\underline{U}_R\left(j \omega\right) = \SI{2}{V} \cdot \pi \cdot \delta(\omega)
\end{equation*}
\item The inverse DTFT is:
\begin{equation*}
u_R(t) = \SI{1.0}{V}
\end{equation*}
\item The reconstructed signal is a DC signal of \SI{1.0}{V}.
\end{itemize}
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
height={0.15\textheight},
width=0.8\linewidth,
scale only axis,
xlabel={$t$ in \si{\micro\second}},
ylabel={$u(t)$},
%grid style={line width=.6pt, color=lightgray},
%grid=both,
grid=none,
legend pos=outer north east,
axis y line=middle,
axis x line=middle,
every axis x label/.style={
at={(ticklabel* cs:1.05)},
anchor=north,
},
every axis y label/.style={
at={(ticklabel* cs:1.05)},
anchor=east,
},
xmin=-0.1,
xmax=1.1,
ymin=-2.2,
ymax=2.2,
xtick={0,0.125,...,1},
%xticklabels={$- \omega_S$, $- \frac{\omega_S}{2}$, $0$, $\frac{\omega_S}{2}$, $\omega_S$},
%ytick={0},
]
\addplot[blue, dashed, smooth, domain=0:1, samples=50] plot(\x, {2*cos(deg(2*pi*2*\x)+60)});
\addlegendentry{$u(t)$};
\addplot[olive] coordinates {(0,1) (0.5,1) (1,1)};
\addlegendentry{$u_R(t)$};
\pgfplotsinvokeforeach{0,0.5,1}{
\addplot[red] coordinates {(#1,0) (#1,{2*cos(deg(2*pi*2*#1)+60)})};
\addplot[red, only marks, mark=o] coordinates {(#1,{2*cos(deg(2*pi*2*#1)+60)})};
}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{tasks}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{question}[subtitle={Sampling Non-Periodic Signals}]
The signal $x[n]$ is given in the time domain.
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|r|r|r|r|}
\hline
$n$ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
\hline
\hline
$x[n]$ & 0.25 & 1 & -0.5 & 0.5 & -0.5 & -1 & -0.5 & -0.75 \\
\hline
\end{tabular}
\end{table}
\begin{tasks}
\task
The signal is windowed with $N = 4$ starting at $x[n = 0]$. A hamming window with $M = 2$ is applied. Calculate the values of $\underline{x}_W[n]$!
Hamming window:
\begin{equation*}
w[n] = \begin{cases}0.54 - 0.46 \cos\left(\frac{2 \pi n}{M}\right), &\quad 0 \leq n \leq M,\\ 0, &\quad \text{otherwise}.\end{cases}
\end{equation*}
\task
Calculate the discrete Fourier transform of the windowed signal!
\task
The signal has been sampled with $T_S = \SI{1}{ms}$. What frequency values do the $k$ represent?
\end{tasks}
\end{question}
\begin{solution}
\begin{tasks}
\task
At first the signal is truncated. Only the first $4$ samples are considered.
The window function is:
\begin{equation*}
w[n] = \begin{cases}0.54 - 0.46 \cos\left(\frac{2 \pi n}{M}\right), &\quad 0 \leq n \leq M,\\ 0, &\quad \text{otherwise}.\end{cases}
\end{equation*}
The signal is then multiplied with the window:
\begin{equation*}
x_w[n] = x[n] \cdot w[n]
\end{equation*}
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|}
\hline
$n$ & 0 & 1 & 2 & 3 \\
\hline
\hline
$w[n]$ & 0.08 & 1.0 & 0.08 & 0 \\
\hline
$x_w[n]$ & 0.02 & 1.0 & -0.04 & 0 \\
\hline
\end{tabular}
\end{table}
\task
The signal is periodically repeated.
The DFT is calculated over $N = 4$.
\begin{equation*}
\underline{X}_w[k] = \mathcal{F}_{\text{DFT}}\left\{\underline{x}[n]\right\} = \sum\limits_{n \in N} \underline{x}[n] \cdot e^{-j 2\pi \frac{k}{N} n}
\end{equation*}
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|}
\hline
$k$ & 0 & 1 & 2 & 3 \\
\hline
$k$ (alternate) & 0 & 1 & -2 & -1 \\
\hline
\hline
$\underline{X}_w[k]$ & $0.98$ & $(0.06-1j)$ & $-1.02$ & $(0.06+1j)$ \\
\hline
$|\underline{X}_w[k]|$ & $0.98$ & $1.00$ & $1.02$ & $1.00$ \\
\hline
$\arg\left(\underline{X}_w[k]\right)$ & $0$ & $-1.51 \approx -\pi$ & $3.14 \approx 2\pi$ & $1.51 \approx \pi$ \\
\hline
\end{tabular}
\end{table}
\task
\begin{equation*}
\begin{split}
\phi[k] &= 2 \pi \frac{k}{N} \\
\omega[k] &= \frac{\phi[k]}{T_S} \\
f[k] &= \frac{\omega[k]}{2 \pi} \\
\end{split}
\end{equation*}
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|}
\hline
$k$ & 0 & 1 & 2 & 3 \\
\hline
$k$ (alternate) & 0 & 1 & -2 & -1 \\
\hline
\hline
$\phi[k]$ & $0$ & $1.57 \approx \pi$ & $3.14 \approx 2 \pi \equiv -2\pi$ & $4.71 \approx 3 \pi \equiv -\pi$ \\
\hline
$\omega[k]$ & $\SI{0}{s^{-1}}$ & $\SI{1570.8}{s^{-1}}$ & $\SI{3141.6}{s^{-1}}$ & $\SI{4712.4}{s^{-1}}$ \\
\hline
\hline
$f[k]$ & $\SI{0}{Hz}$ & $\SI{250}{Hz}$ & $\SI{500}{Hz} \equiv \SI{-500}{Hz}$ & $\SI{750}{Hz} \equiv \SI{-250}{Hz}$ \\
\hline
\end{tabular}
\end{table}
\end{tasks}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{question}[subtitle={Quantization}]
The signal of Task 1b) is now quantized. The quantizer has $8$ discrete values. These values are equally distributed between \SI{-2}{V} and \SI{2}{V}. Prior to sampling, the original time-continuous signal passed through an ideal low-pass filter with a cut-off frequency of \SI{4}{MHz}.
\begin{tasks}
\task
Define a mapping from the value-continuous samples to the value-discrete samples!
\task
The value-discrete samples are now pulse-code modulated. How many bits are required?
\task
What is the resulting data (signal from Task 1b) )?
\task
Determine the quantization error for each value-discrete sample! How much is the signal-to-quantization-noise ratio?
\task
3 bits are a very poor resolution. How many bits are appropriate for the quantizer to obtain the best signal-to-noise ratio? Effects of the window filter are neglected. Assume that the signal has passed through a processing chain with a total gain of \SI{24}{dB}, noise figure of \SI{12}{dB} and bandwidth of \SI{4}{MHz} prior to quantization. The input of the quantizer has an impedance of \SI{50}{\ohm}. % 14 bits
\end{tasks}
\end{question}
\begin{solution}
\begin{tasks}
\task
\begin{itemize}
\item $\hat{U}_L = \SI{-2}{V}$
\item $\hat{U}_H = \SI{2}{V}$
\item $K = 8$
\end{itemize}
\begin{equation*}
\Delta \hat{U} = \frac{\hat{U}_H - \hat{U}_L}{K - 1} = \SI{0.57}{V}
\end{equation*}
The boundaries for the rounding quantizer are distributed $\pm \frac{1}{2} \Delta \hat{U}$ around each mean.
\begin{table}[H]
\begin{tabular}{|r|r|r|r|}
\hline
From & To & Maps to & PCM data \\
\hline
\hline
$-\infty$ & $\SI{-1.71}{V}$ & $\SI{-2.0}{V}$ & 0
\\
$\SI{-1.71}{V}$ & $\SI{-1.14}{V}$ & $\SI{-1.43}{V}$ & 1
\\
$\SI{-1.14}{V}$ & $\SI{-0.57}{V}$ & $\SI{-0.86}{V}$ & 2
\\
$\SI{-0.57}{V}$ & $\SI{-0.0}{V}$ & $\SI{-0.29}{V}$ & 3
\\
$\SI{0.0}{V}$ & $\SI{0.57}{V}$ & $\SI{0.29}{V}$ & 4
\\
$\SI{0.57}{V}$ & $\SI{1.14}{V}$ & $\SI{0.86}{V}$ & 5
\\
$\SI{1.14}{V}$ & $\SI{1.71}{V}$ & $\SI{1.43}{V}$ & 6
\\
$\SI{1.71}{V}$ & $\infty$ & $\SI{2.0}{V}$ & 7 \\
\hline
\end{tabular}
\end{table}
\task
\begin{equation*}
B \geq \log_2 \left(K\right) = 3
\end{equation*}
Minimum 3 bits.
\task
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|r|}
\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$
\\
\hline
\hline
$u[n]$ in \si{V} & $1.0$ & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ \\
\hline
Quantized values in \si{V} & $0.86$ & $-2.0$ & $-0.86$ & $2.0$ & $0.86$ \\
\hline
PCM data & $\left(101\right)_2$ & $\left(000\right)_2$ & $\left(010\right)_2$ & $\left(111\right)_2$ & $\left(101\right)_2$ \\
\hline
\hline
$n$ & $5$ & $6$ & $7$ & $8$ &
\\
\hline
\hline
$u[n]$ in \si{V} & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ & \\
\hline
Quantized values in \si{V} & $-2.0$ & $-0.86$ & $2.0$ & $0.86$ & \\
\hline
PCM data & $\left(000\right)_2$ & $\left(010\right)_2$ & $\left(111\right)_2$ & $\left(101\right)_2$ & \\
\hline
\end{tabular}
\end{table}
\task
\begin{table}[H]
\centering
\begin{tabular}{|l|r|r|r|r|r|}
\hline
$n$ & $0$ & $1$ & $2$ & $3$ & $4$
\\
\hline
\hline
$u[n]$ in \si{V} & $1.0$ & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ \\
\hline
Quantized values in \si{V} & $0.86$ & $-2.0$ & $-0.86$ & $2.0$ & $0.86$ \\
\hline
Quantization error in \si{V} & $0.14$ & $0.27$ & $0.14$ & $0.27$ & $0.14$ \\
\hline
\hline
$n$ & $5$ & $6$ & $7$ & $8$ &
\\
\hline
\hline
$u[n]$ in \si{V} & $-1.73$ & $-1.0$ & $1.73$ & $1.0$ & \\
\hline
Quantized values in \si{V} & $-2.0$ & $-0.86$ & $2.0$ & $0.86$ & \\
\hline
Quantization error in \si{V} & $0.27$ & $0.14$ & $0.27$ & $0.14$ & \\
\hline
\end{tabular}
\end{table}
The signal-to-quantization-noise ratio for the sine wave is:
\begin{equation*}
\mathrm{SQNR} = \SI{1.761}{dB} + B \cdot \SI{6.02}{dB} = \SI{19.82}{dB}
\end{equation*}
\task
\begin{itemize}
\item The RMS value of the signal is $U_{\mathrm{RMS}} = \frac{\SI{2}{V}}{\sqrt{2}} = \SI{1.41}{V}$
\item The signal power is $P_S = \frac{U_{\mathrm{RMS}}^2}{R} = \SI{39.8}{mW} \equiv L_{P,S} = \SI{16}{dBm}$
\item The thermal noise floor is $\SI{-174}{dBm/Hz}$
\item At $\SI{4}{MHz} \equiv \SI{66}{dBHz}$, the thermal noise power is $\SI{-174}{dBm/Hz} + \SI{66}{dBHz} = \SI{-108}{dBm}$
\item The gain and noise factor is applied to the thermal noise, resulting in a noise power of $L_{P,N} = \SI{-108}{dBm} + \SI{24}{dB} + \SI{12}{dB} = \SI{-70}{dBm}$
\item \textit{Note that the gain is not applied to the signal power, because it is already known/given at the quantizer input.}
\item The signal-to-noise ratio is $L_{\mathrm{SNR}} = L_{P,S} - L_{P,N} = \SI{16}{dBm} - \SI{-71}{dBm} = \SI{86}{dB}$
\item The signal-to-quantization-noise ratio should not be grater than the signal-to-noise ratio, because otherwise the thermal noise would dominate the quantization noise.
\begin{equation*}
L_{\mathrm{SQNR}} \stackrel{!}{=} L_{\mathrm{SNR}}
\end{equation*}
\item The number of bits must be at least
\begin{equation*}
B \geq \frac{L_{\mathrm{SQNR}} - \SI{1.761}{dB}}{\SI{6.02}{dB}} = 14
\end{equation*}
\end{itemize}
\end{tasks}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{question}[subtitle={Decibel}]
% \begin{tasks}
% \end{tasks}
%\end{question}
%
%\begin{solution}
% \begin{tasks}
% \end{tasks}
%\end{solution}
|