I'm using the tikz
package in LaTeX to construct a feedback loop for a control system as a part of a paper on control systems. The problem I'm running into is that I would like to place symbols under the arrows between the blocks in addition to the symbols which are currently above the arrows. For example I would like to place a symbol for $phi$
below the arrow, under the $tau$
symbol. I have no idea how to achieve this since I'm fairly new to LaTeX and tikz
. Any help would be appreciated.
I've embedded all of my code below, as well as a snapshot of how the feedbackloop currently looks with the code.
\documentclass[class=minimal,border=15pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\tikzstyle{block} = [draw, fill=gray!3, rectangle, minimum height=3em, minimum width=6em]
\tikzstyle{sum} = [draw, fill=gray!3, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
\node [input, name=input] {};
\node [sum, right of=input] (sum) {};
\node [block, right of=sum] (controller) {Regulator};
\node [block, right of=controller, node distance=3cm] (motor) {G$_{motor}$};
\node [block, right of=motor, pin={[pinstyle]above:Störningar},
node distance=3cm] (system) {Dynamik$_{\varphi}$};
\draw [->] (controller) -- node[name=u] {$u$} (motor);
\node [output, right of=system] (output) {};
\node [block, below of=motor] (msystem) {Mätsystem};
\draw [draw,->] (input) -- node {$\varphi_{ref}$} (sum);
\draw [->] (sum) -- node {$e$} (controller);
\draw [->] (motor) -- node {$\tau$} (system);
\draw [->] (system) -- node [name=y] {$\varphi$}(output);
\draw [->] (y) |- (msystem);
\draw [->] (msystem) -| node[pos=0.99] {$-$} node [near end] {$\varphi_m$} (sum);
\end{tikzpicture}
\end{document}
Best Answer
You can use multiple
label
keys in the options for a node:In your case, you need an additional precaution since you declared
auto
globally, so you need to useauto=false
for the node that will have multiple labels:Notice also that I replaced the old
\tikzstyle
for the newer\tikzset
syntax.