% Example for an interconnection of signal flow diagrams.
%
% Author: Dr. Karlheinz Ochs, Ruhr-University of Bochum, Germany
% Version: 0.1
% Date: 2007/01/05
\documentclass{article}
\usepackage{signalflowdiagram}

\begin{document}

% An FIR filter
\begin{signalflow}[node distance=9mm]{Finite impulse response filter of order $n$}%
   % building blocks
   \tikzgrid{
      \node[input]      (in)  {$x(t)$}     &
      \node[node]       (n0)  {}           &
      \node[delay]      (d1)  {$T$}        &
      \node[node]       (n1)  {}           &
      \node[delay]      (d2)  {$T$}        &
      \node[node]       (n2)  {}           &
      \node[coordinate] (c1)  {}           &
      \node[coordinate] (c3)  {}           &
      \node[delay]      (dn)  {$T$}        &
      \\ &
      \node[multiplier] (m0)  {$\alpha_0$} & &
      \node[multiplier] (m1)  {$\alpha_1$} & &
      \node[multiplier] (m2)  {$\alpha_2$} & & & &
      \node[multiplier] (mn)  {$\alpha_n$}
      \\ & & &
      \node[adder]      (a1)  {}           & &
      \node[adder]      (a2)  {}           &
      \node[coordinate] (c2)  {}           &
      \node[coordinate] (c4)  {}           & &
      \node[adder]      (an)  {}           &
      \node[output]     (out) {$y(t)$}
   }
   % signal paths
   \path[r>] (in) -- (n0);
   \path[r>] (n0) -- (d1);
   \path[r>] (d1) -- (n1);
   \path[r>] (n1) -- (d2);
   \path[r>] (d2) -- (n2);
   \path[r>] (n2) -- (c1); % continuation
   \path[r.] (c1) -- (c3); % continuation
   \path[r>] (c3) -- (dn); % continuation
   \path[r>] (n0) -- (m0);
   \path[r>] (n1) -- (m1);
   \path[r>] (n2) -- (m2);
   \path[r>] (dn) -| (mn);
   \path[r>] (m0) |- (a1);
   \path[r>] (m1) -- (a1);
   \path[r>] (m2) -- (a2);
   \path[r>] (mn) -- (an);
   \path[r>] (a1) -- (a2);
   \path[r>] (a2) -- (c2); % continuation
   \path[r.] (c2) -- (c4); % continuation
   \path[r>] (c4) -- (an); % continuation
   \path[r>] (an) -- (out);
\end{signalflow}

\end{document}
