From f5a2fb752b3760fb4fba815cabf246fbcfb1c892 Mon Sep 17 00:00:00 2001 From: Philipp Le Date: Wed, 20 May 2020 01:57:21 +0200 Subject: WIP: Chapter 4 --- chapter02/content_ch02.tex | 2 +- chapter04/content_ch04.tex | 231 ++++++++++++++++++++++++++++++++++++++++++++- common/settings.tex | 6 +- 3 files changed, 232 insertions(+), 7 deletions(-) diff --git a/chapter02/content_ch02.tex b/chapter02/content_ch02.tex index 8d28f89..95f97e6 100644 --- a/chapter02/content_ch02.tex +++ b/chapter02/content_ch02.tex @@ -1026,7 +1026,7 @@ The constants can be moved in front of the integrals. \begin{excursus}{Convolution} The convolution is defined to: \begin{equation} - f(t) * g(t) = \left(f * g\right) (t) = \int_{\tau = -\infty}^{\infty} f(\tau) g(t - \tau) \, \mathrm{d} \tau = \int_{\tau = -\infty}^{\infty} f(t - \tau) g(\tau) \, \mathrm{d} \tau + f(t) * g(t) = \left(f * g\right) (t) = \int\limits_{\tau = -\infty}^{\infty} f(\tau) g(t - \tau) \, \mathrm{d} \tau = \int\limits_{\tau = -\infty}^{\infty} f(t - \tau) g(\tau) \, \mathrm{d} \tau \label{eq:ch02:def_convolution} \end{equation} \end{excursus} diff --git a/chapter04/content_ch04.tex b/chapter04/content_ch04.tex index 3511a64..6e678d8 100644 --- a/chapter04/content_ch04.tex +++ b/chapter04/content_ch04.tex @@ -6,17 +6,238 @@ \subsection{Ideal Sampling} -% TODO +\begin{figure}[H] + \centering + \begin{tikzpicture} + \begin{axis}[ + height={0.25\textheight}, + width=0.6\linewidth, + scale only axis, + xlabel={$t$ or $n$, respectively}, + ylabel={$x$}, + %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=0, + %xmax=7, + %ymin=0, + %ymax=3, + %xtick={0, 1, ..., 6}, + %ytick={0, 0.5, ..., 2.5} + ] + \addplot[smooth, blue, dashed] coordinates {(0, 1.1) (1, 1.8) (2, 2.1) (3, 1.0) (4, 0.8) (5, 1.7) (6, 2.4)}; + \addplot[red, thick] coordinates {(0, 0) (0, 1.1)}; + \addplot[red, thick] coordinates {(1, 0) (1, 1.8)}; + \addplot[red, thick] coordinates {(2, 0) (2, 2.1)}; + \addplot[red, thick] coordinates {(3, 0) (3, 1.0)}; + \addplot[red, thick] coordinates {(4, 0) (4, 0.8)}; + \addplot[red, thick] coordinates {(5, 0) (5, 1.7)}; + \addplot[red, thick] coordinates {(6, 0) (6, 2.4)}; + \addplot[only marks, red, thick, mark=o] coordinates {(0, 1.1) (1, 1.8) (2, 2.1) (3, 1.0) (4, 0.8) (5, 1.7) (6, 2.4)}; + \end{axis} + \end{tikzpicture} + \caption{Sampling of a time-continuous signal} + \label{fig:ch04:sampling_of_signal} +\end{figure} + +Sampling: +\begin{itemize} + \item Sampling is converting a time-continuous signal $\underline{x}(t)$ to a time-discrete signal $\underline{x}[n]$. + \item Samples are periodically taken out of the original signal. +\end{itemize} + +Nomenclature: +\begin{itemize} + \item The original time-continuous signal is $\underline{x}(t)$. The continuous time variable $t \in \mathbb{R}$ is a continuous real number. + \item The sampled signal is $\underline{x}[n]$. The discrete time variable $n \in \mathbb{Z}$ is a (discrete) integer number. + \item Round parenthesis is used for time-continuous signals. Square parenthesis is used for time-discrete signals. +\end{itemize} + +Sampling parameters: +\begin{itemize} + \item The time instances, at which the samples are taken out, are equidistant. + \item The period between the samples is the \index{sampling period} \textbf{sampling period} $T_S$. + \item The inverse of the sampling period is the \index{sampling rate} \textbf{sampling rate} $f_S$. + \begin{equation} + f_S = \frac{1}{T_S} + \end{equation} +\end{itemize} + +Ideal sampling: +\begin{itemize} + \item The samples are truly equidistant. The sampling period $T_S$ is constant and is \underline{not} subject to fluctuations. + \item The sample is the value of the original signal $\underline{x}(t)$ at \underline{exactly} the time instance where has been taken. +\end{itemize} +Some corollaries can be deducted from these two points: +\begin{itemize} + \item The sampled signal at the discrete time $n$ is the value of the original signal at time $t = n T_S$: $\underline{x}[n] = \underline{x}\left(n T_S\right)$ + \item The sampled signal consists of a chain of indefinitely narrow pulses. + \begin{itemize} + \item The pulses are equidistant with $T_S$. + \item The pulses have the value of $\underline{x}\left(n T_S\right)$ as their amplitudes. + \end{itemize} +\end{itemize} + +\begin{proof}{} + We know already indefinitely narrow pulses. They are Dirac delta functions $\delta\left(t - n T_S\right)$. + + Taking out \underline{exactly one} sample out of $\underline{x}(t)$ is a convolution of $\underline{x}(t)$ with $\delta(t)$. + \begin{equation} + \begin{split} + \underline{x}[n] &= \underline{x}(t) * \delta(t) \\ + &= \int\limits_{-\infty}^{\infty} \underline{x}(t) \cdot \delta\left(n T_S - t\right) \, \mathrm{d} t \\ + & \text{$\delta(t)$ is symmetric} \\ + &= \int\limits_{-\infty}^{\infty} \underline{x}(t) \cdot \delta\left(t - n T_S\right) \, \mathrm{d} t \\ + &= \underline{x}\left(n T_S\right) + \end{split} + \label{eq:ch04:one_sample} + \end{equation} + + \begin{figure}[H] + \centering + \begin{tikzpicture} + \begin{axis}[ + height={0.25\textheight}, + width=0.6\linewidth, + scale only axis, + xlabel={$t$ or $n$, respectively}, + ylabel={$x$}, + %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=0, + %xmax=7, + %ymin=0, + %ymax=3, + %xtick={0, 1, ..., 6}, + %ytick={0, 0.5, ..., 2.5} + ] + \addplot[smooth, blue, dashed] coordinates {(0, 1.1) (1, 1.8) (2, 2.1) (3, 1.0) (4, 0.8) (5, 1.7) (6, 2.4)}; + \addplot[red, thick] coordinates {(2, 0) (2, 2.1)}; + \addplot[only marks, red, thick, mark=o] coordinates {(2, 2.1)}; + \end{axis} + \end{tikzpicture} + \caption{Taking out exactly one sample out of $\underline{x}(t)$} + \end{figure} +\end{proof} + +These Dirac pulses are repeated with a period of $T_S$ and form a \index{Dirac comb} \textbf{Dirac comb} $\Sha_{T_S}(t)$ -- also called \index{impulse train} \textbf{impulse train}. \begin{equation} - \begin{split} - \underline{x}[n] &= \int\limits_{-\infty}^{\infty} \underline{x}(t) \cdot \delta\left(t - n T_S\right) \, \mathrm{d} t \\ - &= \underline{x}\left(n T_S\right) - \end{split} + \Sha_{T_S}(t) = \sum\limits_{n = -\infty}^{\infty} \delta\left(t - n T_S\right) +\end{equation} +\begin{figure}[H] + \centering + \begin{tikzpicture} + \begin{axis}[ + height={0.15\textheight}, + width=0.9\linewidth, + scale only axis, + xlabel={$t$}, + ylabel={$\Sha_{T_S}(t)$}, + %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=-5.5, + xmax=5.5, + ymin=0, + ymax=1.2, + xtick={-5, -4, ..., 5}, + xticklabels={$-5 T_S$, $-4 T_S$, $-3 T_S$, $-2 T_S$, $- T_S$, $0$, $T_S$, $2 T_S$, $3 T_S$, $4 T_S$, $5 T_S$}, + ytick={0}, + ] + \pgfplotsinvokeforeach{-5, -4, ..., 5}{ + \draw[-latex, blue, very thick] (axis cs:#1,0) -- (axis cs:#1,1); + %\addplot[blue, very thick] coordinates {(#1, 0) (#1, 1)}; + %\addplot[only marks, blue, thick, mark=triangle] coordinates {(#1, 1)}; + } + \end{axis} + \end{tikzpicture} + \caption{Dirac comb} +\end{figure} + +A \index{sampler} \textbf{sampler} is a system which +\begin{itemize} + \item applies the Dirac comb $\Sha_{T_S}(t)$ + \item to a time-continuous signal $\underline{x}(t)$ and + \item output a series of equidistant pulses $\underline{x}_S(t)$. +\end{itemize} +The chain of pulses can then be reinterpreted as a time-discrete signal $\underline{x}[n]$. + +\begin{figure}[H] + \centering + \begin{adjustbox}{scale=0.8} + \begin{tikzpicture} + \node[draw, block] (Sampler) {Ideal sampler}; + \node[draw, block, right=3cm of Sampler] (ReInterp) {Reinterpret as\\ time-discrete signal}; + + \draw[<-o] (Sampler.west) -- ++(-1.7cm, 0) node[above, align=center]{Time-continuous\\ signal $\underline{x}(t)$}; + \draw[->] (Sampler.east) -- (ReInterp.west) node[midway, above, align=center]{Series of pulses\\ $\underline{x}_S(t)$}; + \draw[<-] (Sampler.south) -- ++(0, -0.75cm) node[below, align=center]{Dirac comb\\ $\Sha_{T_S}(t)$}; + \draw[->] (ReInterp.east) -- ++(1.5cm, 0) node[above, align=center]{Time-discrete\\ signal $\underline{x}[n]$}; + + \draw[dashed] (ReInterp.north) -- ++(0, 2cm) node[below left, align=right]{Time-continuous\\ domain} node[below right, align=left]{Time-discrete\\ domain}; + \draw[dashed] (ReInterp.south) -- ++(0, -1cm); + \end{tikzpicture} + \end{adjustbox} + \caption{An abstract view on sampling} +\end{figure} + +The ideal sampler multiplies the time-continuous signal $\underline{x}(t)$ with the Dirac comb $\Sha_{T_S}(t)$ in order to obtain the sampled signal $\underline{x}_S(t)$. +\begin{equation} + \underline{x}_S(t) = \underline{x}(t) \cdot \Sha_{T_S}(t) = \sum\limits_{n = -\infty}^{\infty} \underline{x}\left(n T_S\right) \delta\left(t - n T_S\right) + \label{eq:ch04:ideal_sampling} \end{equation} +In Figure \ref{fig:ch04:sampling_of_signal}, the chain of pulses is red. + +\begin{fact} + The act of sampling is irreversible. +\end{fact} + +There is a way to obtain the sampled signal: +\begin{equation*} + \underline{x}_S(t) = \mathrm{Sampling} \left(\underline{x}(t)\right) +\end{equation*} +But there is no way back to reconstruct the original signal. $\mathrm{Sampling}^{-1} \left(\underline{x}_S(t)\right)$ does not exist. + +Sampling is always lossy. \subsection{Discrete-Time Fourier Transform} % TODO +Using \eqref{eq:ch04:ideal_sampling} and \eqref{eq:ch04:one_sample}, a expression depending on the time-discrete signal $\underline{x}[n]$ can be formulated: \begin{equation} \underline{x}_S(t) = \sum\limits_{n = -\infty}^{\infty} \underline{x}[n] \cdot \delta(t - n T_S) \end{equation} diff --git a/common/settings.tex b/common/settings.tex index e6523bd..b0cf29a 100644 --- a/common/settings.tex +++ b/common/settings.tex @@ -15,7 +15,7 @@ % Language and fonts \usepackage[UKenglish]{babel} \usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} +\usepackage[OT2,T1]{fontenc} \usepackage{lmodern} \usepackage{microtype} \usepackage{array} @@ -122,6 +122,10 @@ \addto\extrasngerman{\sisetup{range-phrase={ bis~}}} \addto\extrasenglish{\sisetup{range-phrase={ to~}}} +% Cyrillic +\DeclareSymbolFont{cyrletters}{OT2}{wncyr}{m}{n} +\DeclareMathSymbol{\Sha}{\mathalpha}{cyrletters}{"58} + % Custom symbols %\newcommand{\vect}[1]{\boldsymbol{\vec{\mathbf{#1}}}} \newcommand{\vect}[1]{\vec{\bm{#1}}} -- cgit v1.1