1

I am working on 2nd order systems with overthrow. How to draw the following arrows as I have poorly put in this example using Paint?

\begin{center}
\begin{tikzpicture}
\begin{axis}
[
axis line style={shorten >=-10pt, shorten <=-10pt},
axis y line=center,
axis x line=middle,
no markers,
ytick={1.6 ,1.85},
yticklabels={$s(\infty)$, Consigne},
xtick={1.631},
xticklabels={$t_m$},
  xlabel style={
            anchor=west,
            at={(ticklabel* cs:1.0)},
            xshift=10pt
},
        ylabel style={
            anchor=south,
            at={(ticklabel* cs:1.0)},
            yshift=10pt
        },
xlabel=$t$,ylabel=$s(t)$,
]
\addplot+[blue, thick, domain=0:20, samples=250] {1.6-1.6*sin(x/0.01745+90)*2.718^(-0.25*x)};
\addplot+[dashed] coordinates{(0,1.6) (20,1.6)};
\addplot+[dashed] coordinates{(0,1.85) (20,1.85)};
\addplot+[dashed] coordinates{(1.631,0) (1.631,1.6)};
\end{axis}
\end{tikzpicture}
\end{center}
  • You can have a look at tex.stackexchange.com/questions/46176/… and it's overshoot by the way. – percusse Dec 10 '17 at 20:02
  • Actually, it's supposed to be "dépassement": the course is in French. So the actual name in English is the least of my concerns. Thanks for pointing this out to me anyway! – Majd Freigi Dec 11 '17 at 6:43
2

Disclaimer: This code does not compute the location of the maximum. All I did was to draw the arrows and their annotation.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
axis line style={shorten >=-10pt, shorten <=-10pt},
axis y line=center,
axis x line=middle,
no markers,
ytick={1.6 ,1.85},
yticklabels={$s(\infty)$, Consigne},
xtick={1.631},
xticklabels={$t_m$},
  xlabel style={
            anchor=west,
            at={(ticklabel* cs:1.0)},
            xshift=10pt
},
        ylabel style={
            anchor=south,
            at={(ticklabel* cs:1.0)},
            yshift=10pt
        },
xlabel=$t$,ylabel=$s(t)$,
]
\addplot+[blue, thick, domain=0:20, samples=250] {1.6-1.6*sin(x/0.01745+90)*2.718^(-0.25*x)};
\addplot+[dashed] coordinates{(0,1.6) (20,1.6)};
\addplot+[dashed] coordinates{(0,1.85) (20,1.85)};
\addplot+[dashed] coordinates{(1.631,0) (1.631,1.6)};
\draw[<->] (axis cs:2.92,1.6) -- (axis cs:2.92,2.34);
\node at (axis cs:6.5,2.2) {Overthrow};
\draw[<->] (axis cs:12,1.6) -- (axis cs:12,1.85);
\node at (axis cs:14.5,1.725) {Precision};
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

I also made no effort in making the arrows prettier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.