I am using the dsp library, http://www.texample.net/tikz/examples/fir-filter/, to create a blockdiagram. Now I got 2 problems.
- I defined two labels, r and d_i however they are not visible on the screenshot because I believe the standalone package cuts down to the current shape (does not see the labels?).
- Is anyone capable of changing the plus symbol in the library. I namely want a plus symbol like in matlab or can give a different solution such that I can create e.g.
- -----O----- +| | |_____
code:
\documentclass{standalone}
\usepackage{graphics}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{dsp,chains}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=newest}
\pgfplotsset{plot coordinates/math parser=false}
\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
\newcommand{\z}{\mathpzc{z}}
\begin{document}
\begin{tikzpicture}
\matrix[row sep=2.5mm, column sep=5mm] {
&
&
&
&
&
&
&
&
\node[dspnodeopen,dsp/label=above] (m08) {$d_i$}; &
&
&
\\
%--------------------------------------------------------------------
\\
%--------------------------------------------------------------------
\node[dspnodeopen,dsp/label=left] (m10) {$r$}; &
\node[coordinate] (m11) {}; &
\node[dspadder] (m12) {}; &
\node[coordinate,dsp/label=above] (m13) {$e$}; &
\node[dspsquare] (m14) {$K$}; &
\node[coordinate] (m15) {$u$}; &
\node[dspsquare] (m16) {$T_u$}; &
\node[coordinate] (m17) {}; &
\node[dspadder] (m18) {}; &
\node[coordinate] (m19) {}; &
\node[dspsquare] (m1A) {$G$}; &
\node[coordinate] (m1X) {}; \\
%--------------------------------------------------------------------
\\
%--------------------------------------------------------------------
&
&
\node[coordinate,dsp/label=left] (m22) {$t$}; &
&
&
&
&
&
&
&
\node[dspsquare] (m2A) {$T_y$}; &
\node[coordinate] (m2X) {}; \\
%--------------------------------------------------------------------
\\
};
% Draw connections
\begin{scope}[start chain]
\chainin (m10);
\chainin (m12) [join=by dspconn];
\chainin (m14) [join=by dspconn];
\chainin (m16) [join=by dspconn];
\chainin (m18) [join=by dspconn];
\chainin (m1A) [join=by dspconn];
\chainin (m1X) [join=by dspline];
\chainin (m2X) [join=by dspline];
\chainin (m2A) [join=by dspconn];
\chainin (m22) [join=by dspline];
\chainin (m12) [join=by dspconn];
\end{scope}
\draw[dspconn] (m08) -- (m18);
\end{tikzpicture}
\end{document}
Best Answer
Here's one possible solution:
You can use the
border
key specifying appropriate lengths to be added to the top and to the left.I defined a new shape
dspvoidshapeadder
suppressing the plus sign from the originaldspshapeadder
; using this new shape I defined a new stylevdspadder
using the newly defined shape and adding the+
and-
labels.The code: