[Tex/LaTex] How to place a symbol under an arrow in Latex when using tikz package

symbolstikz-pgf

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.

enter image description here

\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:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[mynode/.style={draw,circle,minimum size=2cm}]
\node[mynode,label=left:$a$,label=right:$b$,label=60:$c$,label=220:$d$] {};
\end{tikzpicture}

\end{document}

enter image description here

In your case, you need an additional precaution since you declared auto globally, so you need to use auto=false for the node that will have multiple labels:

\documentclass[class=minimal,border=15pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,arrows}

\tikzset{
block/.style = {draw, fill=gray!3, rectangle, minimum height=3em, minimum width=6em},
sum/.style = {draw, fill=gray!3, circle, node distance=1cm},
input/.style = {coordinate},
output/.style = {coordinate},
pinstyle/.style={pin edge={to-,thin,black}}
}

\begin{document}

\begin{tikzpicture}[node distance=1cm,>=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,auto] {$u$} (motor);
 \node [output, right=of system] (output) {};
 \node [block, below  = of motor] (msystem) {Mätsystem};
 \draw [draw,->] (input) -- node[auto] {$\varphi_{ref}$} (sum);
 \draw [->] (sum) -- node[auto] {$e$} (controller);
 \draw [->] (motor) -- node[auto=false,label=below:$\varphi$,label=above:$\tau$] {}  (system);
 \draw [->] (system) -- node [auto,name=y] {$\varphi$}(output);
 \draw [->] (y) |- (msystem);
 \draw [->] (msystem) -| node[auto,pos=0.99] {$-$}  node [auto,near end] {$\varphi_m$} (sum);
\end{tikzpicture}

\end{document} 

enter image description here

Notice also that I replaced the old \tikzstyle for the newer \tikzset syntax.