用数学方法调整节点位置

用数学方法调整节点位置

好久不见了,我又开始研究 circuitikz 了。我正在尝试制作一个简单的框图,这是我的代码。

\begin{tikzpicture}[auto, node distance=3cm,>=latex']
\node [input] at (0,0) (input) {R(s)} node[above] {$R(s)$} ; 
\node [sum, right of=input] (sum) {};
\node[block, right of=input] (k) {$k$};
\node[block, right of=k] (comp) {$C(s)$};
\node[block, right of=comp] (plant) {$\hat{G(s)}$};
\node [output, right of=plant] (output) {};
\node [above of=plant] (dist) {$D(s)$};
\draw[->] (input) -- (sum);
\draw[->] (sum) -- (k);
\draw[->] (k) -- (comp);
\draw[->] (comp) -- (plant);
\draw[->] (plant) -- (output) node[above] {$\hat{Y(s)}$};
\draw[->] (plant) -| ++(2,-1) -| (sum) node[pos=.9, left] {$-$};
\draw[->] (dist) -- (plant);
\end{tikzpicture}

我更具体地看着这一行

\node [above of=plant] (dist) {$D(s)$};

我不记得以前是怎么做的,但我可以用数学模式来调整定位。可能是这样的

node at (plant) ++$(0,1)$ (dist) {$D(s)$};

我不记得具体该怎么做了,我也不知道该用什么关键词来搜索我的问题。所以,我很感激任何帮助。

最好的马修

相关内容