summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/bodeplot/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/bodeplot/README.md')
-rw-r--r--graphics/pgf/contrib/bodeplot/README.md69
1 files changed, 36 insertions, 33 deletions
diff --git a/graphics/pgf/contrib/bodeplot/README.md b/graphics/pgf/contrib/bodeplot/README.md
index 70ed10b0ee..90284d2e2f 100644
--- a/graphics/pgf/contrib/bodeplot/README.md
+++ b/graphics/pgf/contrib/bodeplot/README.md
@@ -1,11 +1,17 @@
# bodeplot
LaTeX package to plot Bode, Nichols, and Nyquist diagrams.
-
Inspired by the `bodegraph` package.
-*Version 1.0.8 and newer store `gnuplot` temporary files in the working directory. Use class option `declutter` to restore pre-v1.0.8 behavior. Option `declutter` can cause errors if used with a `tikzexternalize` prefix.*
+Author: Rushikesh Kamalapurkar ([rlkamalapurkar@gmail.com](mailto:rlkamalapurkar@gmail.com))
+
+License: [LPPL-1.3c](https://github.com/rlkamalapurkar/bodeplot/blob/main/LICENSE)
-Compilation instructions:
+## Limitations
+ 1. If `bable` is used with the French language option, it needs to be loaded before `bodeplot` is loaded. Also, the `french` option to `babel` has to be passed locally, not via class options.
+ 2. TF commands are wrapped between -180 and 180 degrees in `pgf` mode.
+ 3. Version 1.0.8 and newer store `gnuplot` temporary files in the working directory. Use class option `declutter` to restore pre-v1.0.8 behavior. Option `declutter` can cause errors if used with a `tikzexternalize` prefix.
+
+## Compilation instructions
1) `latex bodeplot.ins` to generate `bodeplot.sty`
2) To compile documentation (needs `gnuplot` on system PATH):
```
@@ -15,8 +21,9 @@ makeindex -s gglo.ist -o bodeplot.gls bodeplot.glo
pdflatex bodeplot.dtx --shell-escape
pdflatex bodeplot.dtx --shell-escape
```
-Added functionality:
+## 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.
@@ -25,33 +32,29 @@ Added functionality:
- Support for `deg` (default) and `rad` (package option `rad` or `pgf` key `phase 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.
-Main Bode/Nyquist/Nichols commands:
-Given Zeros, Poles, Gain, and Delay (Bode plots support asymptotic and linear approximation for systems without delays):
- - `\BodeZPK[object1/type1/{options1},object2/type2/{options2},...]{z/{zeros},p/{poles},k/gain,d/delay}{min-frequency}{max-frequency}`
- - `\NicholsZPK[plot/{options},axes/{options}]{z/{zeros},p/{poles},k/gain,d/delay}{min-frequency}{max-frequency}`
- - `\NyquistZPK[plot/{options},axes/{options}]{z/{zeros},p/{poles},k/gain,d/delay}{min-frequency}{max-frequency}`
-
-Given Numerator and denominator coefficients and delay (does not support approximation yet):
- - `\BodeTF[object1/type1/{options1},object2/type2/{options2},...]{num/{coeff},den/{coeff},d/delay}{min-frequency}{max-frequency}`
- - `\NicholsTF[plot/{options},axes/{options}]{num/{coeff},den/{coeff},d/delay}`
- - `\NyquistTF[plot/{options},axes/{options}]{num/{coeff},den/{coeff},d/delay}`
-
-Other new environments and associated commands:
- - `BodePlot` environment
- - `\addBodeZPKPlots[{approximation1/{plot-options1}},{approximation2/{plot-options2}},...]{plot-type (phase or magnitude)}{z/{zeros},p/{poles},k/gain,d/delay}`
- - `\addBodeTFPlot[plot-options]{plot-type (phase or magnitude)}{num/{coeff},den/{coeff},d/delay}`
- - `\addBodeComponentPlot[plot-options]{basic_component_plot_command}`
- - Basic component plot commands: ***(append `Lin` to get linear approximation and `Asymp` to get asymptotic approximation)*** ***(change `Pole` to `Zero` to get inverse plots)*** ***(change `Mag` to `Ph` to get phase plots)***
- - `\MagK{a}` - Pure gain, G(s) = a.
- - `\MagPole{a}{b}` - Single pole at s = a+bi, G(s) = 1/(s - a-bi).
- - `\MagCSPoles{z}{w}` - Cannonical Second order system, G(s) = 1/(s^2 + 2zws + w^2).
- - `\MagSOPoles{a}{b}` - Second Order system, G(s) = 1/(s^2 + as + b).
- - `\MagDel{T}` - Pure delay, G(s) = exp(-Ts) (does not admit asymptotic approximation).
- - `NicholsChart` environment
- - `\addNicholsZPKChart[plot-options]{z/{zeros},p/{poles},k/gain,d/delay}`
- - `\addNicholsTFChart[plot-options]{num/{coeff},den/{coeff},d/delay}`
- - `NyquistPlot` environment
- - `\addNyquistZPKPlot[plot-options]{z/{zeros},p/{poles},k/gain,d/delay}`
- - `\addNyquistTFPlot[plot-options]{num/{coeff},den/{coeff},d/delay}`
+## 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 \NicholsZPK[samples=1000] OR NyquistZPK[samples=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
+```
-Limitation: TF commands are wrapped between 0 and 360 degrees in `pgf` mode.
+ - Given Numerator and denominator coefficients and delay (does not support approximation):
+```
+\BodeTF % (OR \NicholsTF[samples=1000] OR NyquistTF[samples=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
+```