diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-12 21:43:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-12 21:43:05 +0000 |
commit | eaf52ad9494969897c5a6481f41b1b6374b40b70 (patch) | |
tree | bbfb4650fc02ca0acc8a727b986196ab06e884c0 /Master/texmf-dist/doc | |
parent | 2b479325adfbaa083a213791b7961e9cd8db241a (diff) |
bodeplot (12jan24)
git-svn-id: svn://tug.org/texlive/trunk@69397 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/bodeplot/README.md | 69 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf | bin | 1056779 -> 1085542 bytes |
2 files changed, 36 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/bodeplot/README.md b/Master/texmf-dist/doc/latex/bodeplot/README.md index 70ed10b0ee5..90284d2e2f7 100644 --- a/Master/texmf-dist/doc/latex/bodeplot/README.md +++ b/Master/texmf-dist/doc/latex/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 +``` diff --git a/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf b/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf Binary files differindex beef350836c..bc4da652f2a 100644 --- a/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf +++ b/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf |