4

The argument curve plotted by Bodegraph package gives the accurate plot. However, i am interested in drawing the approximate argument plot, same as the one you would get by drawing with hand on a graph paper, i.e., with fixed 45 degrees decrease per decade per pole.

The Asymptotic Argument curve only draws horizontal asymptotes (to my understanding) and differs from the approximate plot. The Asymtotic Amplitude plot gives the same approximate amplitude plot one would get by drawing with hand.

My question is that is there a way to plot the approximate argument curve using Bodegraph package?

A MWE showing the output of Bodegraph's Argument and Asymptotic Argument curve is shown. Furthermore, in the picture, the required approximate argument plot is also shown but is there a way to achieve that plot using some command of Bodegraph package.

\documentclass[border=5pt]{standalone}
\usepackage{bodegraph}
\begin{document}
\begin{tikzpicture} [>=latex',gnuplot def/.append style={prefix={}},
        semilog lines/.style={gray},
        semilog lines 2/.style={gray,dotted}]
\begin{scope}[xscale=8/4,yscale=4/90]
\OrdBode{45}
\semilog{0}{4}{-90}{0}
\BodeGraph[red,thick,samples=250]{0:4}{\POArgAsymp{1}{0.01}}
\BodeGraph[blue,thick,samples=250]{0:4}{\POArg{1}{0.01}}
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

1
  • Sorry to revive an old question, but I am interested in this too, @rpapa, is there any way to incorporate something like this in bodegraph? The asymptotic phase plots in the Interactive Demos section on this page, for example?
    – Rushi
    Aug 23 at 16:02
0

I added these more accurate asymptotic argument plots to the bodegraph package under the linear option. I do not know how to submit updated versions of packages to CTAN, but the updated package is on GitHub. Just make sure you use \BodeGraph[samples=300] (or more than 300 samples, depending on the slope of your argument plot) whenever there is a Asymp component in the plot.

Edit (10/25/21): I wrote a new package, called bodeplot, with a lot of added functionality. With that package, similar to the bode(zpk(...)) and bode(tf(...)) commands in MATLAB, you can now plot Bode (or Nyquist or Nichols) plots by directly entering the transfer function coefficients (\BodeTF) or lists of poles and zeros, delay, and gain (\BodeZPK). See https://github.com/rlkamalapurkar/bodeplot

3
  • Maybe I'm mistaken but, by looking at your code, I have the feeling that you will always end up with a slope around the pole/zero. If this is the case, I think the approach is then a bit wrong. Indeed, this slope should be optional since this is a really specific use case as the asymptotic bode diagram is almost always defined as Papanicola coded it.
    – KersouMan
    Oct 12 at 7:34
  • Yes, the modifications produce the "required approximate graph" the OP was asking about. The approximate phase graph will always have a slope around the pole/zero. Whether that is called the "asymptotic Bode diagram" seems to be a matter of opinion. Nise's and Dorf and Bishop's books, and other sources such as the Swarthmore college define it the way I coded it, Ogata's book does not. I will see what I can do to add an option in there to turn off the linear approximation.
    – Rushi
    Oct 15 at 20:39
  • 1
    @KersouMan, the package has been updated to restore the original behavior for asymptotic plots. When loaded using the option linear, asymptotic plot commands generate the linear approximation asked for by the OP.
    – Rushi
    Oct 17 at 5:32

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.