From b03522adcd508f1c15878565e881bb8b8e37ec13 Mon Sep 17 00:00:00 2001
From: Philipp Le <philipp-le-prviat@freenet.de>
Date: Sat, 30 May 2020 01:24:13 +0200
Subject: WIP: Exercise 4

---
 exercise04/exercise04.tex | 126 ++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 116 insertions(+), 10 deletions(-)

(limited to 'exercise04/exercise04.tex')

diff --git a/exercise04/exercise04.tex b/exercise04/exercise04.tex
index 27551d4..44dea36 100644
--- a/exercise04/exercise04.tex
+++ b/exercise04/exercise04.tex
@@ -15,7 +15,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{question}[subtitle={Sampling Periodic Signals}]
 	\begin{equation*}
-		u(t) = \SI{2}{V} \cos\left(2\pi \SI{2}{MHz} t + \SI{60}{\degree}\right)
+		u(t) = \SI{2}{V} \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)$.
 	
@@ -54,15 +54,121 @@
 \end{solution}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%\begin{question}[subtitle={Sampling Non-Periodic Signals}]
-%	\begin{tasks}
-%	\end{tasks}
-%\end{question}
-%
-%\begin{solution}
-%	\begin{tasks}
-%	\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.5 & 1 & 0 & 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}]
-- 
cgit v1.1

