-
Notifications
You must be signed in to change notification settings - Fork 4
/
test_sig_sys_macros.tex
140 lines (140 loc) · 4.98 KB
/
test_sig_sys_macros.tex
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
% test if all equation/graphics stuff is properly working:
\begin{align}
\label{eq:im}
\im^2=-1 \myDFT\quad\ztransf\quad\DTFT
\end{align}
%
%
%
\begin{center}
\begin{tikzpicture}[scale=0.8]
\def \xmin {-4}
\def \xmax {4.2}
\def \ymin {-1}
\def \ymax {1.5}
\draw[->] (\xmin-0.1 ,0) -- (\xmax+0.1,0) node[below]{$t$};
\draw[->] (0,\ymin-0.1) -- (0,\ymax+0.1) node[left]{$x(t)$};
\foreach \x in {\xmin,...,3}{\draw (\x,0.05) -- (\x,-0.05);}
\draw (0.05,-1) -- (-0.05,-1);
\draw (0.05,1) -- (-0.05,1) node[left]{\small $1$};
\draw(2,0) node[below]{\small $2$};
\begin{scope}
\draw[C0, ultra thick, domain=-2:2,variable=\t,samples=100,smooth] plot(\t,{ cos (4*pi*\t r)});
\draw[C0, ultra thick] (-4,0) -- (-2,0);
\draw[C0, ultra thick] (2,0) -- (4,0);
\draw[C0, dashed, thin] (2,0) -- (2,1);
\draw[C0, dashed, thin] (-2,0) -- (-2,1);
\end{scope}
\end{tikzpicture}
\end{center}
%
%
%
\begin{center}
\begin{tikzpicture}[scale=1.5]
\def \tic {0.05}
\def \pabs{0} % largest radius for poles to determine roc-> here a FIR
\def \rocmax{1.6} % sketch of outer roc domain
%
% basic diagram features:
\filldraw[even odd rule,C2!50] (0,0) circle(\pabs) decorate
[decoration={snake, segment length=15pt, amplitude=1pt}]
{(0,-3pt) circle(\rocmax)}; % sketch the roc domain
%
\draw[help lines, C7!50, step=0.25cm] (-\rocmax,-\rocmax) grid (\rocmax,\rocmax);
%
\draw[C3, thick] (0,0) circle(1); % unit circle, i.e. DTFT domain
\draw[C7, thin] (0,0) circle(1.4142); % unit circle, i.e. DTFT domain
\draw[C7, thin] (0,0) circle(0.7071); % unit circle, i.e. DTFT domain
%
\draw (1+2*\tic,-2*\tic) node{$1$}; % indicate that this is the unit circle
\draw (0.5,-2*\tic) node{$\nicefrac{1}{2}$};
\draw[->] (-1.75,0)--(1.75,0) node[right]{$\Re\{z\}$}; % axis label
\draw[->] (0,-1.75)--(0,1.75) node[above]{$\Im\{z\}$}; % axis label
%
\draw (1.2*0.86602540378*\rocmax,1.2*0.5*\rocmax) node[C2!75]{KB}; % indicate the roc
%
% the z-transfer function specific stuff:
\draw (0.75,1.25) node[black]{$g=1$}; % indicate gain factor
%
% draw the poles / zeros and if desired ticks:
\draw[C0, ultra thick] (0,0) node{\Huge $\times$};
\draw[C0] (-4*\tic,4*\tic) node{10};
\draw[C0, ultra thick] (0,+1) node{\Huge $\circ$};
\draw[C0, ultra thick] (0,-1) node{\Huge $\circ$};
\draw[C0, ultra thick] (+1,+1) node{\Huge $\circ$};
\draw[C0, ultra thick] (-1,-1) node{\Huge $\circ$};
\draw[C0, ultra thick] (-1,+1) node{\Huge $\circ$};
\draw[C0, ultra thick] (+1,-1) node{\Huge $\circ$};
\draw[C0, ultra thick] (+1/2,+1/2) node{\Huge $\circ$};
\draw[C0, ultra thick] (-1/2,-1/2) node{\Huge $\circ$};
\draw[C0, ultra thick] (-1/2,+1/2) node{\Huge $\circ$};
\draw[C0, ultra thick] (+1/2,-1/2) node{\Huge $\circ$};
\end{tikzpicture}
\end{center}
%
%
%
\begin{figure*}
\centering
\begin{subfigure}{\textwidth}
\centering
\begin{tikzpicture}[scale=1]
\def\tic{0.1};
\def\Om{360/8}
\draw[help lines, C7!25, step=1cm] (0,-1) grid (7,1);
\draw[->] (-1.5,0) -- (9,0) node[right]{$k$};
\draw[->] (0,-1) -- (0,2) node[left]{$x[k]=\cos(\frac{2\pi}{8}k)$};
\foreach \x in {-1,0,...,8}{\draw (\x,+\tic) -- (\x,-\tic) node[left]{$\x$};};
\foreach \y in {-1,1}{\draw (\tic,\y) -- (-\tic,\y) node[left]{$\y$};};
\foreach \k in {-1,0,...,8}{\draw[stem2] plot coordinates{(\k,{cos(\Om*\k)})};};
\foreach \k in {-1,8}{\draw[stem2, C3] plot coordinates{(\k,{cos(\Om*\k)})};};
\end{tikzpicture}
\caption{$N=8\in\mathbb{Z}$, daher periodisch in 8 Signalwerten / 8 Folgengliedern,
Periode in blau.}
\label{fig:cos8}
\end{subfigure}
%
\begin{subfigure}{\textwidth}
\centering
\begin{tikzpicture}[scale=1]
\def\tic{0.1};
\def\Om{360/8.5}
\draw[->] (-1.5,0) -- (9,0) node[right]{$k$};
\draw[->] (0,-1) -- (0,2) node[left]{$x[k]=\cos(\frac{2\pi}{8.5}k)$};
\foreach \x in {-1,0,...,8}{\draw (\x,+\tic) -- (\x,-\tic) node[left]{$\x$};};
\foreach \y in {-1,1}{\draw (\tic,\y) -- (-\tic,\y) node[left]{$\y$};};
\foreach \k in {-1,0,...,8}{\draw[stem2,C1] plot coordinates{(\k,{cos(\Om*\k)})};};
\end{tikzpicture}
\caption{$N=8.5\notin\mathbb{Z}$, daher \textbf{nicht} periodisch in $N$.
Aber periodisch in $2 N = 17$.}
\label{fig:cos8.5}
\end{subfigure}
%
%
%
\begin{subfigure}{\textwidth}
\centering
\begin{tikzpicture}[scale=1]
\def\tic{0.1};
\def\Om{360/9}
\draw[help lines, C7!25, step=1cm] (0,-1) grid (8,1);
\draw[->] (-1.5,0) -- (9,0) node[right]{$k$};
\draw[->] (0,-1) -- (0,2) node[left]{$x[k]=\cos(\frac{2\pi}{9}k)$};
\foreach \x in {-1,0,...,9}{\draw (\x,+\tic) -- (\x,-\tic) node[left]{$\x$};};
\foreach \y in {-1,1}{\draw (\tic,\y) -- (-\tic,\y) node[left]{$\y$};};
\foreach \k in {-1,0,...,9}{\draw[stem2] plot coordinates{(\k,{cos(\Om*\k)})};};
\foreach \k in {-1,9}{\draw[stem2, C3] plot coordinates{(\k,{cos(\Om*\k)})};};
\end{tikzpicture}
\caption{$N=9\in\mathbb{Z}$, daher periodisch in 9 Werten, Periode in blau.}
\label{fig:cos9}
\end{subfigure}
\caption{Cosinusfolgen mit $\Omega_0=\frac{2\pi}{N}$ für $N=8,\,8.5,\,9$ über
\textit{Zeit}-Index $k$ als
sogenannter Stem-Plot (\textit{stem} [englisch] - Stiel, Halm, Stängel [deutsch]).}
\label{fig:Cosinusfolgen}
\end{figure*}
%
%
%
\eq{eq:im}, \fig{fig:Cosinusfolgen} vs. \fig{fig:cos9}