@c -----------------------------------------------------------------------------
@c File     : bode.de.texi
@c License  : GNU General Public License (GPL)
@c Language : German
@c Original : bode.texi revision 28.11.2007
@c Date     : 08.11.2010
@c Revision : 11.05.2011
@c 
@c This file is part of Maxima -- GPL CAS based on DOE-MACSYMA
@c -----------------------------------------------------------------------------

@menu
* Functions and Variables for bode::
@end menu

@c -----------------------------------------------------------------------------
@node Functions and Variables for bode,  , bode, bode
@section Functions and Variables for bode
@c -----------------------------------------------------------------------------

@c -----------------------------------------------------------------------------
@anchor{bode_gain}
@deffn {Function} bode_gain (@var{H}, @var{range}, @dots{} @var{plot_opts} @dots{})

Function to draw Bode gain plots. To use this function write first
@code{load("bode")}. See also @mrefdot{bode_phase}

Examples:

Examples (1 through 7 from
@ifnottex
@url{http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/BodeHow.html},
@end ifnottex
@tex
\texttt{http://www.swarthmore.edu/\-NatSci/\-echeeve1/\-Ref/\-Bode/\-BodeHow.html},
@end tex
8 from Ron Crummett):

@example
(%i1) load("bode")$
(%i2) H1 (s) := 100 * (1 + s) / ((s + 10) * (s + 100))$
(%i3) bode_gain (H1 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain1, 7cm}
@end ifnotinfo

@example
(%i4) H2 (s) := 1 / (1 + s/omega0)$
(%i5) bode_gain (H2 (s), [w, 1/1000, 1000]), omega0 = 10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain2, 7cm}
@end ifnotinfo

@example
@group
(%i6) H3 (s) := 1 / (1 + s/omega0)^2$
(%i7) bode_gain (H3 (s), [w, 1/1000, 1000]), omega0 = 10$
@end group
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain3, 7cm}
@end ifnotinfo

@example
@group
(%i8) H4 (s) := 1 + s/omega0$
(%i9) bode_gain (H4 (s), [w, 1/1000, 1000]), omega0 = 10$
@end group
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain4, 7cm}
@end ifnotinfo

@example
(%i10) H5 (s) := 1/s$
(%i11) bode_gain (H5 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain5, 7cm}
@end ifnotinfo

@example
@group
(%i12) H6 (s) := 1/((s/omega0)^2 + 2 * zeta * (s/omega0) + 1)$
(%i13) bode_gain (H6 (s), [w, 1/1000, 1000]), 
                          omega0 = 10, zeta = 1/10$
@end group
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain6, 7cm}
@end ifnotinfo

@example
(%i14) H7 (s) := (s/omega0)^2 + 2 * zeta * (s/omega0) + 1$
(%i15) bode_gain (H7 (s), [w, 1/1000, 1000]),
                          omega0 = 10, zeta = 1/10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain7, 7cm}
@end ifnotinfo

@example
(%i16) H8 (s) := 0.5 / (0.0001 * s^3 + 0.002 * s^2 + 0.01 * s)$
(%i17) bode_gain (H8 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodegain8, 7cm}
@end ifnotinfo
@end deffn

@c -----------------------------------------------------------------------------
@anchor{bode_phase}
@deffn {Function} bode_phase (@var{H}, @var{range}, @dots{} @var{plot_opts} @dots{})

Function to draw Bode phase plots. To use this function write first 
@code{load("bode")}. See also @mrefdot{bode_gain}

Examples:

Examples (1 through 7 from
@ifnottex
@url{http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/BodeHow.html},
@end ifnottex
@tex
\texttt{http://www.swarthmore.edu/\-NatSci/\-echeeve1/\-Ref/\-Bode/\-BodeHow.html},
@end tex
8 from Ron Crummett):

@example
(%i1) load("bode")$
(%i2) H1 (s) := 100 * (1 + s) / ((s + 10) * (s + 100))$
(%i3) bode_phase (H1 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase1, 7cm}
@end ifnotinfo

@example
(%i4) H2 (s) := 1 / (1 + s/omega0)$
(%i5) bode_phase (H2 (s), [w, 1/1000, 1000]), omega0 = 10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase2, 7cm}
@end ifnotinfo

@example
(%i6) H3 (s) := 1 / (1 + s/omega0)^2$
(%i7) bode_phase (H3 (s), [w, 1/1000, 1000]), omega0 = 10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase3, 7cm}
@end ifnotinfo

@example
@group
(%i8) H4 (s) := 1 + s/omega0$
(%i9) bode_phase (H4 (s), [w, 1/1000, 1000]), omega0 = 10$
@end group
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase4, 7cm}
@end ifnotinfo

@example
(%i10) H5 (s) := 1/s$
(%i11) bode_phase (H5 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase5, 7cm}
@end ifnotinfo

@example
(%i12) H6 (s) := 1/((s/omega0)^2 + 2 * zeta * (s/omega0) + 1)$
(%i13) bode_phase (H6 (s), [w, 1/1000, 1000]), 
                   omega0 = 10, zeta = 1/10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase6, 7cm}
@end ifnotinfo

@example
(%i14) H7 (s) := (s/omega0)^2 + 2 * zeta * (s/omega0) + 1$
(%i15) bode_phase (H7 (s), [w, 1/1000, 1000]), 
                   omega0 = 10, zeta = 1/10$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase7, 7cm}
@end ifnotinfo

@example
(%i16) H8 (s) := 0.5 / (0.0001 * s^3 + 0.002 * s^2 + 0.01 * s)$
(%i17) bode_phase (H8 (s), [w, 1/1000, 1000])$
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase8, 7cm}
@end ifnotinfo

@c THIS EXAMPLE IS IDENTICAL TO THE ABOVE EXAMPLE
@c (%i18) block ([bode_phase_unwrap : false],
@c              bode_phase (H8 (s), [w, 1/1000, 1000]));

@c TODO: BODE_PHASE_WRAP IS NICHT DOKUMENTIERT
@example
(%i18) block ([bode_phase_unwrap : true], 
              bode_phase (H8 (s), [w, 1/1000, 1000]));
@end example
@ifnotinfo
@image{@value{figuresfolder}/bodephase9, 7cm}
@end ifnotinfo
@end deffn

@c --- End of file bode.de.texi ------------------------------------------------

