TikZ 다이어그램의 라벨 거리 및 기타 문제

TikZ 다이어그램의 라벨 거리 및 기타 문제

계산된 다음 수치에는 tikz세 가지 불완전성이 포함됩니다.

  1. 수학 연산자 더하기 "+" 및 빼기 "-"는 해당 합계 노드의 레이블로 정의됩니다. 표지판이 원과 화살표에서 너무 멀리 떨어져 그려져 있습니다. label distance=<value>결과에 별 차이 없이 명령어를 사용해 보았습니다 . 라벨과 해당 노드의 거리를 변경하는 방법을 아는 사람이 있나요?
  2. 오른쪽의 합계 노드( sum3mwe에서와 같이 참조)는 옵션으로 배치됩니다 below = 18mm of branch2. 이는 원하는 결과를 제공하는 하드코딩된 값입니다. 노드를 노드 아래에 배치 branch2하고 노드와 동일한 높이에 배치하는 보다 일반적인 솔루션을 찾고 있습니다 c. tikz명령 을 통해 이것이 가능합니까 intersections? 아니면 이 문제를 해결할 수 있는 다른 해결책이 있습니까?
  3. 일부 화살표는 명령과 결합됩니다 path. 경로에 모서리 화살표( -|또는 ) 를 포함할 수도 있나요 ?|-

최소한의 작업 예

\documentclass{standalone}
\usepackage{xcolor}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}

\usepackage{tikz}
\usetikzlibrary{positioning,circuits.ee.IEC}

\usepackage{bm}

\begin{document}

\begin{tikzpicture}[%
,auto
,>=latex'
,block/.style={text height=1.5ex,text depth=.25ex,draw, fill=anti-flashwhite, rectangle, minimum height=10mm, minimum width=10mm}
,bigblock/.style={text height=1.5ex,text depth=.25ex,draw, fill=anti-flashwhite, rectangle, minimum height=10mm, minimum width=30mm}
,sum/.style={draw, fill=anti-flashwhite, circle,inner sep=1mm, node distance=20mm}
,input/.style={coordinate}
,output/.style={coordinate}
,branch/.style={circle,inner sep=0pt,minimum size=1mm,fill=black,draw=black}
,frame/.style={dashed,thick,blue}
]
\draw
    % forward path
    node [input]                (input1)                                                        {}
    node [sum]                  (sum1)          [right = 15mm of input1]                        {}
    node [branch]               (branch1)       [right = 10mm of sum1,label ={above:$u(t)$}]    {}
    node                        (helpnode)      [right = 15mm of branch1]                       {}
    node [bigblock]             (strecke)       [right = 15mm of helpnode]                      {Strecke}
    node [branch]               (branch2)       [right = 30mm of strecke]                       {}
    node [output]               (output1)       [right = 15mm of branch2]                       {}

    % observer
    node [block]                (h)             [below = of strecke]                            {$\bm{h}$}
    node [block]                (int)           [below = of h]                                  {$\int$}
    node [sum]                  (sum2)          [left = 10mm of int,label={above left,:\tiny{$+$}},
                                                label={below left:\tiny{$+$}},
                                                label={below right:\tiny{$+$}}]                 {}
    node [block]                (b)             [left = of sum2]                                {$\bm{b}$}
    node [block]                (a)             [below = of int]                                {$\bm{A}$}
    node [branch]               (branch3)       [right = of int, label={above:$\hat{x}(t)$}]    {}
    node [block]                (c)             [right = of branch3]                            {$\bm{c}^T$}

    node [sum]                  (sum3)          [below = 18mm of branch2,
                                                label={above left:\tiny{$+$}},
                                                label={below left:\tiny{$-$}}]                  {}
    node [branch]               (branch4)       [below = 18mm of sum3]                          {}
    node [output]               (output2)       [right = 15mm of branch4]                       {}

    node [block]                (r)             [below = 25mm of b, dashed]                     {$\bm{r}^T$}
;

\path
(input1)    edge[->]    node {$w(t)$}           (sum1)
(sum1)      edge[->]                            (branch1)
(branch1)   edge[->]                            (strecke)
(strecke)   edge[->]                            (branch2)
(branch2)   edge[->]    node {$y(t)$}           (output1);

\draw[->]   (branch1)   |-                      (b);

\path
(b)         edge[->]                            (sum2)
(sum2)      edge[->] node {$\dot{\hat{x}}(t)$}  (int)
(int)       edge                                (branch3)
(branch3)   edge[->]                            (c)
(c)         edge                                (branch4)
(branch4)   edge[->]    node {$\hat{y}(t)$}     (output2)
;

\path
(branch2)   edge[->]                            (sum3)
(sum3)      edge[->]                            (h);

\draw[->]   (h)         -|                      (sum2);
\draw[->]   (branch3)   |-                      (a);
\draw[->]   (a)         -|                      (sum2);

\draw[->]   (branch4)   --                      (sum3);

\draw[->,dashed]    (branch3)       |-          (r);
\draw[->,dashed]    (r)             -|          (sum1);


% dashed frame
\draw [frame] ([yshift=28mm,xshift=-20mm]b) rectangle ([yshift=-48mm,xshift=3mm]sum3)   node[below left] {Beobachter}  ;

\end{tikzpicture}

\end{document}

결과

여기에 이미지 설명을 입력하세요

답변1

질문 1과 관련하여 첫 번째 에 [label distance=6pt] or 를 추가하면 상당한 차이가 나타납니다.[label distance=-6pt]\draw

그러나 이는 라벨 u(t)및 에도 영향을 미칩니다 \hat x(t).

관련 정보