1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
# bodeplot package
# Matthew Bertucci 2022/07/14 for v1.1.1
#include:tikz
#include:pdftexcmds
#include:ifplatform
#include:pgfplots
#keyvals:\usepackage/bodeplot#c
pgf
declutter
rad
Hz
#endkeyvals
\BodeZPK{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\BodeZPK[%<obj1/typ1/{opt1},...%>]{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\BodeTF{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\BodeTF[%<obj1/typ1/{opt1},...%>]{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\begin{BodePlot}{%<min-freq%>}{%<max-freq%>}
\begin{BodePlot}[%<obj1/{opt1},...%>]{%<min-freq%>}{%<max-freq%>}
\end{BodePlot}
\addBodeZPKPlots{%<plot-type%>}{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addBodeZPKPlots[%<approx1/{opt1}%>]{%<plot-type%>}{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addBodeTFPlot{%<plot-type%>}{%<num/{coeffs},den/{coeffs},d/{delay}%>}
\addBodeTFPlot[%<plot-options%>]{%<plot-type%>}{%<num/{coeffs},den/{coeffs},d/{delay}%>}
\addBodeComponentPlot{plot-command}
\addBodeComponentPlot[plot-options]{plot-command}
\MagK{real-part}{imaginary-part}
\MagKAsymp{real-part}{imaginary-part}
\MagKLin{real-part}{imaginary-part}
\PhK{real-part}{imaginary-part}
\PhKAsymp{real-part}{imaginary-part}
\PhKLin{real-part}{imaginary-part}
\MagDel{real-part}{imaginary-part}
\PhDel{real-part}{imaginary-part}
\MagPole{real-part}{imaginary-part}
\MagPoleLin{real-part}{imaginary-part}
\MagPoleAsymp{real-part}{imaginary-part}
\PhPole{real-part}{imaginary-part}
\PhPoleLin{real-part}{imaginary-part}
\PhPoleAsymp{real-part}{imaginary-part}
\MagZero{real-part}{imaginary-part}
\MagZeroLin{real-part}{imaginary-part}
\MagZeroAsymp{real-part}{imaginary-part}
\PhZero{real-part}{imaginary-part}
\PhZeroLin{real-part}{imaginary-part}
\PhZeroAsymp{real-part}{imaginary-part}
\MagCSPoles{zeta}{omega-n}
\MagCSPolesLin{zeta}{omega-n}
\MagCSPolesAsymp{zeta}{omega-n}
\PhCSPoles{zeta}{omega-n}
\PhCSPolesLin{zeta}{omega-n}
\PhCSPolesAsymp{zeta}{omega-n}
\MagCSZeros{zeta}{omega-n}
\MagCSZerosLin{zeta}{omega-n}
\MagCSZerosAsymp{zeta}{omega-n}
\PhCSZeros{zeta}{omega-n}
\PhCSZerosLin{zeta}{omega-n}
\PhCSZerosAsymp{zeta}{omega-n}
\MagCSPolesPeak{zeta}{omega-n}
\MagCSPolesPeak[draw-options]{zeta}{omega-n}
\MagCSZerosPeak{zeta}{omega-n}
\MagCSZerosPeak[draw-options]{zeta}{omega-n}
\MagSOPoles{a1}{a0}
\MagSOPolesLin{a1}{a0}
\MagSOPolesAsymp{a1}{a0}
\PhSOPoles{a1}{a0}
\PhSOPolesLin{a1}{a0}
\PhSOPolesAsymp{a1}{a0}
\MagSOZeros{a1}{a0}
\MagSOZerosLin{a1}{a0}
\MagSOZerosAsymp{a1}{a0}
\PhSOZeros{a1}{a0}
\PhSOZerosLin{a1}{a0}
\PhSOZerosAsymp{a1}{a0}
\MagSOPolesPeak{a1}{a0}
\MagSOPolesPeak[draw-options]{a1}{a0}
\MagSOZerosPeak{a1}{a0}
\MagSOZerosPeak[draw-options]{a1}{a0}
\NyquistZPK{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NyquistZPK[%<plot/{opt},axes/{opt}%>]{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NyquistTF{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NyquistTF[%<plot/{opt},axes/{opt}%>]{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\begin{NyquistPlot}{%<min-freq%>}{%<max-freq%>}
\begin{NyquistPlot}[%<obj1/{opt1},...%>]{%<min-freq%>}{%<max-freq%>}
\end{NyquistPlot}
\addNyquistZPKPlot{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addNyquistZPKPlot[%<plot-options%>]{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addNyquistTFPlot{%<num/{coeffs},den/{coeffs},d/{delay}%>}
\addNyquistTFPlot[%<plot-options%>]{%<num/{coeffs},den/{coeffs},d/{delay}%>}
\NicholsZPK{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NicholsZPK[%<plot/{opt},axes/{opt}%>]{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NicholsTF{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\NicholsTF[%<plot/{opt},axes/{opt}%>]{%<num/{coeffs},den/{coeffs},d/{delay}%>}{%<min-freq%>}{%<max-freq%>}
\begin{NicholsChart}{%<min-freq%>}{%<max-freq%>}
\begin{NicholsChart}[%<obj1/{opt1},...%>]{%<min-freq%>}{%<max-freq%>}
\end{NicholsChart}
\addNicholsZPKChart{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addNicholsZPKChart[%<plot-options%>]{%<z/{zeros},p/{poles},k/{gain},d/{delay}%>}
\addNicholsTFChart{%<num/{coeffs},den/{coeffs},d/{delay}%>}
\addNicholsTFChart[%<plot-options%>]{%<num/{coeffs},den/{coeffs},d/{delay}%>}
|