|
| 1 | +\input{prefix} |
| 2 | + |
| 3 | +% ============================================================================= |
| 4 | +% ============================================================================= |
| 5 | +\begin{document} |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +% overlap-add convolution |
| 11 | +\pgfdeclarelayer{background} |
| 12 | +\pgfsetlayers{background,main} |
| 13 | + |
| 14 | +\begin{tikzpicture}[auto, node distance=25mm] |
| 15 | + |
| 16 | + % input segments |
| 17 | + \node[block, minimum height=1em, minimum width=25mm] (x0){$x_0[k]$}; |
| 18 | + \node[block, right of=x0, minimum height=1em, minimum width=25mm] (x1){$x_1[k]$}; |
| 19 | + \node[block, right of=x1, minimum height=1em, minimum width=25mm] (x2){$x_2[k]$}; |
| 20 | + \node[block, right of=x2, minimum height=1em, minimum width=25mm] (x3){$x_3[k]$}; |
| 21 | + \node[right of=x3, xshift=-5mm] {$\dots$}; |
| 22 | + |
| 23 | + \node[block, right of=x0, minimum height=1em, minimum width=15mm, xshift=10cm] (h){$h[k]$}; |
| 24 | + \node[left of=h, xshift=15mm] {$*$}; |
| 25 | + |
| 26 | + % convolved segments |
| 27 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](y0) at ($(x0.west) - (0, 1.5)$) {$y_0[k] = x_0[k] * h[k]$}; |
| 28 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](y1) at ($(x1.west) - (0, 2.75)$) {$y_1[k] = x_1[k] * h[k]$}; |
| 29 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](y2) at ($(x2.west) - (0, 4)$) {$y_2[k] = x_2[k] * h[k]$}; |
| 30 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](y3) at ($(x3.west) - (0, 5.25)$) {$y_3[k] = x_3[k] * h[k]$}; |
| 31 | + % output |
| 32 | + \node[block, minimum height=1em, minimum width=100mm, anchor=west](y) at ($(x0.west) - (0, 7)$) {$y[k]$}; |
| 33 | + \node[right of=y, xshift=35mm] {$\dots$}; |
| 34 | + |
| 35 | + % segment borders |
| 36 | + \begin{pgfonlayer}{background} |
| 37 | + \draw[dashed] (x1.west) -- ($(x1.west) - (0, 7)$); |
| 38 | + \draw[dashed] (x2.west) -- ($(x2.west) - (0, 7)$); |
| 39 | + \draw[dashed] (x3.west) -- ($(x3.west) - (0, 7)$); |
| 40 | + \draw[dashed] (x3.east) -- ($(x3.east) - (0, 7)$); |
| 41 | + |
| 42 | + \draw[dashed] (y0.east) -- ($(y0.east) - (0, 1.25)$); |
| 43 | + \draw[dashed] (y1.east) -- ($(y1.east) - (0, 1.25)$); |
| 44 | + \draw[dashed] (y2.east) -- ($(y2.east) - (0, 1.25)$); |
| 45 | + \end{pgfonlayer} |
| 46 | + |
| 47 | + % sums |
| 48 | + \node at ($(y0.east) - (7mm, 6mm)$) {\bf $+$}; |
| 49 | + \node at ($(y1.east) - (7mm, 6mm)$) {\bf $+$}; |
| 50 | + \node at ($(y2.east) - (7mm, 6mm)$) {\bf $+$}; |
| 51 | + |
| 52 | + % sizes |
| 53 | + \draw ($(x0.north west) + (0,.1) $) -- ($(x0.north west) + (0,.4) $); |
| 54 | + \draw ($(x0.north east) + (0,.1) $) -- ($(x0.north east) + (0,.4) $); |
| 55 | + \draw[<->] ($(x0.north west) + (0,.3) $) -- ($(x0.north east) + (0,.3) $) node[midway]{$P$}; |
| 56 | + |
| 57 | + \draw ($(h.north west) + (0,.1) $) -- ($(h.north west) + (0,.4) $); |
| 58 | + \draw ($(h.north east) + (0,.1) $) -- ($(h.north east) + (0,.4) $); |
| 59 | + \draw[<->] ($(h.north west) + (0,.3) $) -- ($(h.north east) + (0,.3) $) node[midway]{$N$}; |
| 60 | + |
| 61 | + \draw ($(y0.north west) + (0,.1) $) -- ($(y0.north west) + (0,.4) $); |
| 62 | + \draw ($(y0.north east) + (0,.1) $) -- ($(y0.north east) + (0,.4) $); |
| 63 | + \draw[<->] ($(y0.north west) + (0,.3) $) -- ($(y0.north east) + (0,.3) $) node[midway]{$P + N - 1$}; |
| 64 | + |
| 65 | +\end{tikzpicture} |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +% overlap-save convolution |
| 70 | +\pgfdeclarelayer{background} |
| 71 | +\pgfsetlayers{background,main} |
| 72 | + |
| 73 | +\begin{tikzpicture}[auto, node distance=25mm] |
| 74 | + |
| 75 | + % input |
| 76 | + \node[block, minimum height=1em, minimum width=100mm](x) {$x[k]$}; |
| 77 | + \node[block, minimum height=5mm, minimum width=15mm, anchor=east](x00) at (x.west) {$0 {\color{gray!20} [}$}; |
| 78 | + \node[right of=x, xshift=35mm] {$\dots$}; |
| 79 | + |
| 80 | + % input segments |
| 81 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](x0) at ($(x00.west) - (0, 1.5)$) {$x_0[k]$}; |
| 82 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west, xshift=-15mm](x1) at ($(x0.east) - (0, 1.5)$) {$x_1[k]$}; |
| 83 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west, xshift=-15mm](x2) at ($(x1.east) - (0, 1.5)$) {$x_2[k]$}; |
| 84 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west, xshift=-15mm](x3) at ($(x2.east) - (0, 1.5)$) {$x_3[k]$}; |
| 85 | + |
| 86 | + % convolved segments |
| 87 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](yc0) at ($(x0.west) - (0, 0.6)$) {$\qquad \qquad x_0[k] \circledast h_N[k]$}; |
| 88 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](yc1) at ($(x1.west) - (0, 0.6)$) {$\qquad \qquad x_1[k] \circledast h_N[k]$}; |
| 89 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](yc2) at ($(x2.west) - (0, 0.6)$) {$\qquad \qquad x_2[k] \circledast h_N[k]$}; |
| 90 | + \node[block, minimum height=1em, minimum width=40mm, anchor=west](yc3) at ($(x3.west) - (0, 0.6)$) {$\qquad \qquad x_3[k] \circledast h_N[k]$}; |
| 91 | + |
| 92 | + \draw[draw=gray!100, opacity=0.5] (yc0.north west) -- ($(yc0.south west) + (1.5, 0)$); |
| 93 | + \draw[draw=gray!100, opacity=0.5] (yc0.south west) -- ($(yc0.north west) + (1.5, 0)$); |
| 94 | + \draw[draw=gray!100, opacity=0.5] ($(yc0.north west) + (1.5, 0)$) -- ($(yc0.south west) + (1.5, 0)$); |
| 95 | + |
| 96 | + \draw[draw=gray!100, opacity=0.5] (yc1.north west) -- ($(yc1.south west) + (1.5, 0)$); |
| 97 | + \draw[draw=gray!100, opacity=0.5] (yc1.south west) -- ($(yc1.north west) + (1.5, 0)$); |
| 98 | + \draw[draw=gray!100, opacity=0.5] ($(yc1.north west) + (1.5, 0)$) -- ($(yc1.south west) + (1.5, 0)$); |
| 99 | + |
| 100 | + \draw[draw=gray!100, opacity=0.5] (yc2.north west) -- ($(yc2.south west) + (1.5, 0)$); |
| 101 | + \draw[draw=gray!100, opacity=0.5] (yc2.south west) -- ($(yc2.north west) + (1.5, 0)$); |
| 102 | + \draw[draw=gray!100, opacity=0.5] ($(yc2.north west) + (1.5, 0)$) -- ($(yc2.south west) + (1.5, 0)$); |
| 103 | + |
| 104 | + \draw[draw=gray!100, opacity=0.5] (yc3.north west) -- ($(yc3.south west) + (1.5, 0)$); |
| 105 | + \draw[draw=gray!100, opacity=0.5] (yc3.south west) -- ($(yc3.north west) + (1.5, 0)$); |
| 106 | + \draw[draw=gray!100, opacity=0.5] ($(yc3.north west) + (1.5, 0)$) -- ($(yc3.south west) + (1.5, 0)$); |
| 107 | + |
| 108 | + |
| 109 | + % output segments |
| 110 | + \node[block, minimum height=1em, minimum width=25mm, anchor=west](y0) at ($(x.west) - (0, 8)$) {$y_0[k]$}; |
| 111 | + \node[block, right of=y0, minimum height=1em, minimum width=25mm] (y1){$y_1[k]$}; |
| 112 | + \node[block, right of=y1, minimum height=1em, minimum width=25mm] (y2){$y_2[k]$}; |
| 113 | + \node[block, right of=y2, minimum height=1em, minimum width=25mm] (y3){$y_3[k]$}; |
| 114 | + \node[right of=y3, xshift=-5mm] {$\dots$}; |
| 115 | + |
| 116 | + % segment borders |
| 117 | + \begin{pgfonlayer}{background} |
| 118 | + \draw[dashed] (x.south west) -- (y0.north west); |
| 119 | + \draw[dashed] (x0.south east) -- (y1.north west); |
| 120 | + \draw[dashed] (x1.south east) -- (y2.north west); |
| 121 | + \draw[dashed] (x2.south east) -- (y3.north west); |
| 122 | + \draw[dashed] (x3.south east) -- (y3.north east); |
| 123 | + \end{pgfonlayer} |
| 124 | + |
| 125 | + % sizes |
| 126 | + \draw ($(x0.north west) + (0,.1) $) -- ($(x0.north west) + (0,.4) $); |
| 127 | + \draw ($(x0.north east) + (0,.1) $) -- ($(x0.north east) + (0,.4) $); |
| 128 | + \draw[<->] ($(x0.north west) + (0,.3) $) -- ($(x0.north east) + (0,.3) $) node[midway]{$P$}; |
| 129 | + |
| 130 | + \draw ($(yc0.south west) + (0,-.1) $) -- ($(yc0.south west) + (0,-.4) $); |
| 131 | + \draw[<->] ($(yc0.south west) + (0,-.3) $) -- ($(yc0.south west) + (1.5,-.3) $) node[midway, below]{$N-1$}; |
| 132 | + |
| 133 | + |
| 134 | +\end{tikzpicture} |
| 135 | + |
| 136 | + |
| 137 | +% model for round-off error |
| 138 | +\begin{tikzpicture}[auto, node distance=2cm] |
| 139 | + \node [input, name=input] {}; |
| 140 | + \node [sum,right of=input, xshift=1cm] (mul){$\times$}; |
| 141 | + \node [sum,right of=mul, xshift=1cm] (sum){$+$}; |
| 142 | + \node [input, below of=sum,yshift=1cm] (error) {}; |
| 143 | + \node [input, above of=mul,yshift=-1cm] (coeff) {}; |
| 144 | + \node [output, right of=sum,xshift=0cm] (output) {}; |
| 145 | + |
| 146 | + \draw [-latex] (input) node[left]{$x_Q[k]$} -- (mul); |
| 147 | + \draw [-latex] (mul) -- (sum); |
| 148 | + \draw [-latex] (sum) -- (output) node[right]{$y_Q[k]$}; |
| 149 | + \draw [-latex] (error) node[below]{$e[k]$} -- (sum); |
| 150 | + \draw [-latex] (coeff) node[above]{$a_Q$} -- (mul); |
| 151 | + |
| 152 | + \draw [dashed] (.5,-1.6) rectangle (5.5,0.7); |
| 153 | + |
| 154 | +\end{tikzpicture} |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | +\end{document} |
0 commit comments