Wie kann ich den Startpunkt des Pfeils ausrichten?

Wie kann ich den Startpunkt des Pfeils ausrichten?

Ich versuche, den Startpunkt des Pfeils auszurichten, der den Ausgang Ymit dem Block namens Integrator verbindet. Ich möchte, dass der Pfeil in der Mitte des Pfeils beginnt, der aus dem NBlock herausführt (genau unter dem Buchstaben Y). Wie kann ich das erreichen?

Bildbeschreibung hier eingeben

Ich möchte, dass es wie in diesem Diagramm aussieht:

Bildbeschreibung hier eingeben

Wie der Pfeil, der direkt unter dem Buchstaben beginnt yund zum Maßblock führt.

Hier ist der Code, den ich geschrieben habe (es ist eine Testdatei, ignorieren Sie also alle griechischen Buchstaben):

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

Antwort1

Sie und verwenden

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

wobei (y|-output)der Punkt mit der x-Koordinate von yund der y-Koordinate von ist output.

Dies ist der vollständige Code mit mehreren Änderungen, die nicht zum Thema gehören (kein \tikzstyle, verwenden positioning, ersetzen arrowsdurch arrows.metausw.).

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

Bildbeschreibung hier eingeben

Antwort2

Bei Verwendung zusätzlicher TikZ-Bibliotheken chainsund quoteswird die Koordinate beim Buchstaben „Y“ mit dem Knotennamen bestimmt:

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

Bildbeschreibung hier eingeben

verwandte Informationen