Verzeichnis graphics/pgf/contrib/bodeplot
bodeplot
LaTeX package to plot Bode, Nichols, and Nyquist diagrams. Inspired by the bodegraph
package.
Author: Rushikesh Kamalapurkar (rlkamalapurkar@gmail.com)
License: LPPL-1.3c
Limitations
- Before version 1.2, in
pgf
mode, the package settrig format plots
torad
globally. Version 1.2 onwards, this option is passed to eachaddplot
command individually so it does not affect non-bodeplot
plots. To roll back to pre-v1.2 behavior, load the package with\usepackage[pgf]{bodeplot}[=2024-02-06]
. - TF commands are wrapped between -180 and 180 degrees in
pgf
mode. - Version 1.0.8 and newer store
gnuplot
temporary files in the working directory. Use class optiondeclutter
to restore pre-v1.0.8 behavior. Optiondeclutter
can cause errors if used with atikzexternalize
prefix.
Compilation instructions
1) latex bodeplot.ins
to generate bodeplot.sty
2) To compile documentation (needs gnuplot
on system PATH):
pdflatex --shell-escape bodeplot.dtx makeindex -s gind.ist bodeplot.idx makeindex -s gglo.ist -o bodeplot.gls bodeplot.glo pdflatex --shell-escape bodeplot.dtx pdflatex --shell-escape bodeplot.dtx
Added functionality over bodegraph
- New
\BodeZPK
and\BodeTF
commands to generate Bode plots of any transfer function given either poles, zeros, gain, and delay, or numerator and denominator coefficients and delay - All plots are fully customizable using
pgf
options (see package documentation for a full list of commands, environments, and options) - Support for unstable poles and zeros.
- Support for complex poles and zeros.
- Support for general stable and unstable second order transfer functions.
- Support for both
gnuplot
(default) andpgfplots
(package optionpgf
). - Support for
rad/s
(default) andHz
(package optionHz
orpgf
keyfrequency unit=Hz
for per-plot change) frequency units. - Support for
deg
(default) andrad
(package optionrad
orpgf
keyphase unit=rad
for per-plot change) phase units. - Support for linear and asymptotic approximation of magnitude and phase plots of any transfer function given poles, zeros, and gain.
Basic Bode/Nyquist/Nichols commands
See package documentation for a full list of commands, environments, and options.
- Given Zeros, Poles, Gain, and Delay (asymptotic and linear approximation available for systems without delay):
BodeZPK % (OR NicholsZPKsamples=1000 OR NyquistZPKsamples=1000) {% z/{0,{-0.1,-0.5},{-0.1,0.5}}, % zeros at s = 0, s = -0.1 - 0.5j, and s = -0.1 + 0.5j p/{{-0.5,-10},{-0.5,10}}, % poles at s = -0.5 - 10j, and s = -0.5 + 10j k/10, % gain d/0.01, % delay } {0.01} % frequency range start {100} % frequency range end- Given Numerator and denominator coefficients and delay (does not support approximation):
BodeTF % (OR NicholsTFsamples=1000 OR NyquistTFsamples=1000) {% num/{10,2,2.6,0}, % numerator coefficients den/{1,1,100.25}, % denominator coefficients d/0.01, % delay } {0.001} % frequency range start {100} % frequency range end
## Basic pole-zero map commands *See package documentation for a full list of options.* - Given Zeros and Poles (gain and delay are ignored):
PoleZeroMapZPK {% z/{0,{-0.1,-0.5},{-0.1,0.5}}, % zeros at s = 0, s = -0.1 - 0.5j, and s = -0.1 + 0.5j p/{{-0.5,-10},{-0.5,10}}, % poles at s = -0.5 - 10j, and s = -0.5 + 10j k/10, % gain d/0.01, % delay }
Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (827.2k).
bodeplot – Draw Bode, Nyquist and Nichols plots with gnuplot or pgfplots
This is a LaTeX package to plot Bode, Nichols, and Nyquist diagrams. It provides added functionality over the similar bodegraph package:
- New \BodeZPK and \BodeTF commands to generate Bode plots of any transfer function given either poles, zeros, gain, and delay, or numerator and denominator coefficients and delay
- Support for unstable poles and zeros.
- Support for complex poles and zeros.
- Support for general stable and unstable second order transfer functions.
- Support for both Gnuplot (default) and pgfplots (package option pgf).
- Support for linear and asymptotic approximation of magnitude and phase plots of any transfer function given poles, zeros, and gain.
Paket | bodeplot |
Fehlermeldungen | https://github.com/rlkamalapurkar/bodeplot/issues |
Repository | https://github.com/rlkamalapurkar/bodeplot |
Version | 2.1 2025-09-30 |
Lizenzen | The LaTeX Project Public License 1.3c |
Copyright | 2021–2025 Rushikesh Kamalapurkar |
Betreuer | Rushikesh Kamalapurkar |
Enthalten in | TeX Live als bodeplot MiKTeX als bodeplot |
Themen | Ingenieurwissenschaft Grafik-Plots PGF/TikZ |
Siehe auch | bodegraph |
