화살표의 시작점을 어떻게 정렬합니까?

화살표의 시작점을 어떻게 정렬합니까?

Y적분기라는 블록에 출력을 연결하는 화살표의 시작점을 정렬하려고 합니다 . 화살표가 블록 밖으로 나가는 화살표 중앙 N(정확히 문자 Y 아래)에서 시작되기를 원합니다. 어떻게 해야 합니까?

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

나는 이것이 다음 다이어그램과 같기를 원합니다.

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

y문자 바로 아래에서 시작하여 측정 블록으로 이동하는 화살표와 같습니다 .

다음은 제가 작성한 코드입니다(테스트 파일이므로 모든 그리스 문자를 무시하세요).

\documentclass{article}

\usepackage[LGR]{fontenc} % specific font
\usepackage[utf8]{inputenc} % κωδικοποίηση γραμμάτων για να εμφανίζονται κατανοητά ελληνικά γράμματα
\usepackage[greek]{babel} % πακέτο των ελληνικών γραμμάτων

\usepackage{tikz} % πακέτο για control systems diagram
\usetikzlibrary{shapes,arrows} % πακέτο απαραίτητο για control systems block diagrams
\usepackage{verbatim} 

\tikzset{
%   pinstyle/.style={pin edge={to-,thin,black}}, % you have another one below
   gain/.style = {
     regular polygon, regular polygon sides=3,
     draw, fill=white, text width=1em,
     inner sep=0mm, outer sep=0mm,
     shape border rotate=-90
   },
 }

\begin{document}
% \textlatin --> Χρησιμοποιείται για να εισάγουμε κείμενο με λατινικούς χαρακτήρες στα σημεία που επιθυμούμε.
\textlatin{This is a test file created by Teo Protoulis. What about continuing the document? Where does the paragraph change?}
\section{Εισαγωγή}
Για να δούμε αν αναγνωρίζει και τα ελληνικά γράμματα! Α, πάρα πολύ ωραία! Μπορούμε να γραουμε και στα ελληνικά.
\section{Πρώτο Μέρος}
Στο πρώτο μέρος θα γράψουμε κάποιες συνήθεις διαφορικές εξισώσεις έτσι για να εξασκηθούμε πάνω στο \textlatin{LaTex}:

\[\ddot{y}+a_1\dot{y}+a_2y=b_0u\]

Αυτή είναι η διαφορική εξίσωση που περιγράφει το σύστημα μας. Στη συνέχεια παρατίθεται ο \textlatin{PID} ελεγκτής που χρησιμοποιήθηκε προκειμένου να επιτύχουμε \textlatin{reference tracking}:

\[C(s) = K_p+K_d\frac{Ns}{s+N}+K_i\frac{1}{s}\]

Παρατηρούμε ότι το μονοπάτι της παραγώγου σχεδιάστηκε χρησιμοποιώντας την παρακάτω λογική:

\bigskip % intentionally leave empty line
\bigskip

\begin{center}
\tikzstyle{block} = [draw, rectangle, 
    minimum height=3em, minimum width=6em]
\tikzstyle{sum} = [draw, 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=e] {};
    \node [block,name=derivative gain,right of=e] {\latintext{Derivative Gain}};
    \node [input,name=input,right of=derivative gain,node distance=1.5cm] {};
    \node [sum,right of=input] (sum) {};
    \node [block,right of=sum,node distance=3cm, name=static gain] (static gain) {N};
    \node [block, below of=static gain, name=integrator] (integrator) {\latintext{Integrator}};
    \node [output,right of=static gain,node distance=3cm] (output) {};

    \draw [->] (e) -- node {$e$} (derivative gain);
    \draw [->] (derivative gain) |- node[pos=0.89] {$+$} node [near end] {} (sum); 
    \draw [->] (static gain) -- node [name=y] {$Y$} (output); 
    \draw [->] (sum) -- node [name=error] {$error$} (static gain);
    \draw [->] (output) |- (integrator);    
    \draw [->] (integrator) -| node[pos=0.95] {$-$} 
        node [near end] {} (sum);

    \end{tikzpicture}
\end{center}
\end{document}

답변1

당신과 사용

\draw [->]  (y|-output) |- (integrator);

(y|-output)x 좌표가 y이고 y 좌표가 인 점은 어디에 있습니까 output?

\tikzstyle이것은 주제에서 벗어난 몇 가지 변경 사항(no , use positioning, replacement arrowsby arrows.meta등) 이 포함된 전체 코드입니다.

\documentclass{article}
\usepackage[greek]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows.meta,positioning}
\begin{document}
\begin{center}
\tikzset{block/.style={draw, rectangle, 
    minimum height=3em, minimum width=6em},
sum/.style={draw, circle, node distance=1cm},
input/.style={coordinate},
output/.style={coordinate},
pinstyle/.style={pin edge={to-,thin,black}},}

\begin{tikzpicture}[auto, node distance=1.2cm,>=Latex]
    \node [input,name=e] {};
    \node [block,name=derivative gain,right=of e] {\latintext{Derivative Gain}};
    \node [sum,right=2cm of derivative gain] (sum) {};
    \node [block,right=of sum,node distance=3cm, name=static gain] (static gain) {N};
    \node [block, below=of static gain, name=integrator] (integrator) {\latintext{Integrator}};
    \node [output,right=of static gain,node distance=3cm] (output) {};

    \draw [->] (e) -- node {$e$} (derivative gain);
    \draw [->] (derivative gain) |- node[pos=0.89] {$+$} node [near end] {} (sum); 
    \draw [->] (static gain) -- node [name=y] {$Y$} (output); 
    \draw [->]  (y|-output) |- (integrator);
    \draw [->] (sum) -- node [name=error] {\latintext{error}} (static gain);
    \draw [->] (integrator) -| node[pos=0.95] {$-$} 
        node [near end] {} (sum);
\end{tikzpicture}
\end{center}
\end{document}

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

답변2

chains추가 TikZ 라이브러리 및 를 사용하면 quotes문자 Y"의 좌표가 노드 이름으로 결정됩니다.

\documentclass{article}
\usepackage[greek]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                chains,
                positioning,
                quotes}

\begin{document}
    \begin{center}
\begin{tikzpicture}[auto, 
 node distance = 6mm and 12mm,
   start chain = going right,
    arr/.style = {-Latex},
  block/.style = {draw, minimum height=3em, minimum width=6em},
    sum/.style = {circle, draw, node contents={}},    
                        ]
    \begin{scope}[nodes={on chain, join=by arr}]
\coordinate (in);
\node (n1)  [block] {\latintext{Derivative Gain}};
\node (n2)  [sum];
\node (n3)  [block] {$N$};
\coordinate (out);
   \end{scope}
\node (n4) [block, below=of n3] {\latintext{Integrator}};
%
\path   (in) to ["$e$"]                 (n1)
        (n1) to [pos=0.85,"$+$"]        (n2)
        (n2) to ["\latintext{error}"]   (n3)
        (n3) to ["$Y$"{name=y}]         (out);  
\draw[arr] (n3.north) ++ (0,1) node[above] {\latintext{Integrator}} -- (n3);
\draw[arr] (y)  |- (n4);
\draw[arr] (n4) -| (n2) node[pos=0.95] {$-$};
\end{tikzpicture}
    \end{center}
\end{document}

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

관련 정보