aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/figures/tikz/tapped-delay-line.tex
blob: ac4b0a70a1f1eefd8dc44d13daf6457247f92f4d (plain)
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
% vim: set ts=2 sw=2 noet:
\begin{tikzpicture}[
		dot/.style = {
			circle,
			fill = black, draw = black,
			minimum size = 1.5mm,
			outer sep = 0, inner sep = 0,
		},
		block/.style = {
			rectangle, draw, thick,
			black, fill = white,
			minimum height = 8mm, minimum width = 8mm,
		},
		prod/.style = {
			circle, draw, thick,
			black, fill = white,
			minimum size = 6mm,
			inner sep = 0, outer sep = 0,
		},
		sum/.style = {
			circle, draw, thick,
			black, fill = white,
			minimum size = 6mm,
			inner sep = 0, outer sep = 0,
		},
	]

	\matrix[column sep = 5mm, row sep = 3mm] {
		\node[block] (B0) {\(z^{-1}\)}; & \node[dot] (D0) {}; &
		\node[block] (B1) {\(z^{-1}\)}; & \node[dot] (D1) {}; &
		\node[block] (B2) {\(z^{-1}\)}; & \node[dot] (D2) {}; & \node (dots) {\ldots}; & 
		\node[block] (Bk) {\(z^{-1}\)}; &
		\\
		& \node[prod] (P0) {\(\times\)}; &
		& \node[prod] (P1) {\(\times\)}; &
		& \node[prod] (P2) {\(\times\)}; & &
		& \node[prod] (Pk) {\(\times\)}; &
		\\[6mm]
		& & & & & & & & \node[sum] (S) {\(+\)}; \\
	};

	\begin{scope}[thick, -latex]
		% delayed line
		\draw[latex-] (B0.west) -- ++(-5mm,0) node[left] {\(s(n)\)};
		\draw (B0.east) -- (D0) -- (B1.west);
		\draw (B1.east) -- (D1) -- (B2.west);
		\draw (B2.east) -- (D2) -- (dots) -- (Bk.west);

		% taps
		\draw (D0) -- (P0);
		\draw (P0) |- (S);

		\draw (D1) -- (P1);
		\draw (P1.south) |- ($(S) + (150:10mm)$) -- (S);

		\draw (D2) -- (P2);
		\draw (P2.south) |- ($(S) + (120:10mm)$) -- (S);

		\draw (Bk) -| (Pk);
		\draw (Pk) -- (S);

		% product weights
		\draw[latex-] (P0.west) -- ++(-4mm,0) node[left] {\(h_1(m)\)};
		\draw[latex-] (P1.west) -- ++(-4mm,0) node[left] {\(h_2(m)\)};
		\draw[latex-] (P2.west) -- ++(-4mm,0) node[left] {\(h_3(m)\)};
		\draw[latex-] (Pk.west) -- ++(-4mm,0) node[left] {\(h_l(m)\)};

		% result
		\draw (S.south) |- ++(1cm,-3mm) node[right] {\(r(m)\)};
	\end{scope}

\end{tikzpicture}