1 @c -----------------------------------------------------------------------------
3 @c License : GNU General Public License (GPL)
5 @c Original : bode.texi revision 28.11.2007
7 @c Revision : 11.05.2011
9 @c This file is part of Maxima -- GPL CAS based on DOE-MACSYMA
10 @c -----------------------------------------------------------------------------
13 * Functions and Variables for bode::
16 @c -----------------------------------------------------------------------------
17 @node Functions and Variables for bode, , bode, bode
18 @section Functions and Variables for bode
19 @c -----------------------------------------------------------------------------
21 @c -----------------------------------------------------------------------------
23 @deffn {Function} bode_gain (@var{H}, @var{range}, @dots{} @var{plot_opts} @dots{})
25 Function to draw Bode gain plots. To use this function write first
26 @code{load("bode")}. See also @mrefdot{bode_phase}
30 Examples (1 through 7 from
32 @url{http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/BodeHow.html},
35 \texttt{http://www.swarthmore.edu/\-NatSci/\-echeeve1/\-Ref/\-Bode/\-BodeHow.html},
41 (%i2) H1 (s) := 100 * (1 + s) / ((s + 10) * (s + 100))$
42 (%i3) bode_gain (H1 (s), [w, 1/1000, 1000])$
45 @image{@value{figuresfolder}/bodegain1, 7cm}
49 (%i4) H2 (s) := 1 / (1 + s/omega0)$
50 (%i5) bode_gain (H2 (s), [w, 1/1000, 1000]), omega0 = 10$
53 @image{@value{figuresfolder}/bodegain2, 7cm}
58 (%i6) H3 (s) := 1 / (1 + s/omega0)^2$
59 (%i7) bode_gain (H3 (s), [w, 1/1000, 1000]), omega0 = 10$
63 @image{@value{figuresfolder}/bodegain3, 7cm}
68 (%i8) H4 (s) := 1 + s/omega0$
69 (%i9) bode_gain (H4 (s), [w, 1/1000, 1000]), omega0 = 10$
73 @image{@value{figuresfolder}/bodegain4, 7cm}
78 (%i11) bode_gain (H5 (s), [w, 1/1000, 1000])$
81 @image{@value{figuresfolder}/bodegain5, 7cm}
86 (%i12) H6 (s) := 1/((s/omega0)^2 + 2 * zeta * (s/omega0) + 1)$
87 (%i13) bode_gain (H6 (s), [w, 1/1000, 1000]),
88 omega0 = 10, zeta = 1/10$
92 @image{@value{figuresfolder}/bodegain6, 7cm}
96 (%i14) H7 (s) := (s/omega0)^2 + 2 * zeta * (s/omega0) + 1$
97 (%i15) bode_gain (H7 (s), [w, 1/1000, 1000]),
98 omega0 = 10, zeta = 1/10$
101 @image{@value{figuresfolder}/bodegain7, 7cm}
105 (%i16) H8 (s) := 0.5 / (0.0001 * s^3 + 0.002 * s^2 + 0.01 * s)$
106 (%i17) bode_gain (H8 (s), [w, 1/1000, 1000])$
109 @image{@value{figuresfolder}/bodegain8, 7cm}
113 @c -----------------------------------------------------------------------------
115 @deffn {Function} bode_phase (@var{H}, @var{range}, @dots{} @var{plot_opts} @dots{})
117 Function to draw Bode phase plots. To use this function write first
118 @code{load("bode")}. See also @mrefdot{bode_gain}
122 Examples (1 through 7 from
124 @url{http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/BodeHow.html},
127 \texttt{http://www.swarthmore.edu/\-NatSci/\-echeeve1/\-Ref/\-Bode/\-BodeHow.html},
129 8 from Ron Crummett):
133 (%i2) H1 (s) := 100 * (1 + s) / ((s + 10) * (s + 100))$
134 (%i3) bode_phase (H1 (s), [w, 1/1000, 1000])$
137 @image{@value{figuresfolder}/bodephase1, 7cm}
141 (%i4) H2 (s) := 1 / (1 + s/omega0)$
142 (%i5) bode_phase (H2 (s), [w, 1/1000, 1000]), omega0 = 10$
145 @image{@value{figuresfolder}/bodephase2, 7cm}
149 (%i6) H3 (s) := 1 / (1 + s/omega0)^2$
150 (%i7) bode_phase (H3 (s), [w, 1/1000, 1000]), omega0 = 10$
153 @image{@value{figuresfolder}/bodephase3, 7cm}
158 (%i8) H4 (s) := 1 + s/omega0$
159 (%i9) bode_phase (H4 (s), [w, 1/1000, 1000]), omega0 = 10$
163 @image{@value{figuresfolder}/bodephase4, 7cm}
167 (%i10) H5 (s) := 1/s$
168 (%i11) bode_phase (H5 (s), [w, 1/1000, 1000])$
171 @image{@value{figuresfolder}/bodephase5, 7cm}
175 (%i12) H6 (s) := 1/((s/omega0)^2 + 2 * zeta * (s/omega0) + 1)$
176 (%i13) bode_phase (H6 (s), [w, 1/1000, 1000]),
177 omega0 = 10, zeta = 1/10$
180 @image{@value{figuresfolder}/bodephase6, 7cm}
184 (%i14) H7 (s) := (s/omega0)^2 + 2 * zeta * (s/omega0) + 1$
185 (%i15) bode_phase (H7 (s), [w, 1/1000, 1000]),
186 omega0 = 10, zeta = 1/10$
189 @image{@value{figuresfolder}/bodephase7, 7cm}
193 (%i16) H8 (s) := 0.5 / (0.0001 * s^3 + 0.002 * s^2 + 0.01 * s)$
194 (%i17) bode_phase (H8 (s), [w, 1/1000, 1000])$
197 @image{@value{figuresfolder}/bodephase8, 7cm}
200 @c THIS EXAMPLE IS IDENTICAL TO THE ABOVE EXAMPLE
201 @c (%i18) block ([bode_phase_unwrap : false],
202 @c bode_phase (H8 (s), [w, 1/1000, 1000]));
204 @c TODO: BODE_PHASE_WRAP IS NICHT DOKUMENTIERT
206 (%i18) block ([bode_phase_unwrap : true],
207 bode_phase (H8 (s), [w, 1/1000, 1000]));
210 @image{@value{figuresfolder}/bodephase9, 7cm}
214 @c --- End of file bode.de.texi ------------------------------------------------