Mercurial > hg > octave-avbm
changeset 7988:21904fe299c8
Remove the control, finance and quaternion toolboxes
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 27 Jul 2008 01:42:06 +0200 |
parents | 4a423a042971 |
children | 23c248d415b5 |
files | doc/ChangeLog doc/interpreter/Makefile.in doc/interpreter/control.txi doc/interpreter/finance.txi doc/interpreter/octave.texi doc/interpreter/quaternion.txi scripts/ChangeLog scripts/Makefile.in scripts/configure.in scripts/control/MakeControlOct scripts/control/Makefile.in scripts/control/OCSTreport scripts/control/base/DEMOcontrol.m scripts/control/base/Makefile.in scripts/control/base/__bodquist__.m scripts/control/base/__freqresp__.m scripts/control/base/__stepimp__.m scripts/control/base/analdemo.m scripts/control/base/are.m scripts/control/base/bddemo.m scripts/control/base/bode.m scripts/control/base/bode_bounds.m scripts/control/base/controldemo.m scripts/control/base/ctrb.m scripts/control/base/damp.m scripts/control/base/dare.m scripts/control/base/dcgain.m scripts/control/base/dgram.m scripts/control/base/dkalman.m scripts/control/base/dlqe.m scripts/control/base/dlqr.m scripts/control/base/dlyap.m scripts/control/base/dre.m scripts/control/base/frdemo.m scripts/control/base/freqchkw.m scripts/control/base/gram.m scripts/control/base/impulse.m scripts/control/base/lqe.m scripts/control/base/lqg.m scripts/control/base/lqr.m scripts/control/base/lsim.m scripts/control/base/ltifr.m scripts/control/base/lyap.m scripts/control/base/nichols.m scripts/control/base/nyquist.m scripts/control/base/obsv.m scripts/control/base/place.m scripts/control/base/pzmap.m scripts/control/base/rldemo.m scripts/control/base/rlocus.m scripts/control/base/step.m scripts/control/base/tzero.m scripts/control/base/tzero2.m scripts/control/csrefcard.lt scripts/control/hinf/Makefile.in scripts/control/hinf/dgkfdemo.m scripts/control/hinf/dhinfdemo.m scripts/control/hinf/h2norm.m scripts/control/hinf/h2syn.m scripts/control/hinf/hinf_ctr.m scripts/control/hinf/hinfdemo.m scripts/control/hinf/hinfnorm.m scripts/control/hinf/hinfsyn.m scripts/control/hinf/hinfsyn_chk.m scripts/control/hinf/hinfsyn_ric.m scripts/control/hinf/is_dgkf.m scripts/control/hinf/wgt1o.m scripts/control/install-ocst scripts/control/obsolete/Makefile.in scripts/control/obsolete/dezero.m scripts/control/obsolete/dlqg.m scripts/control/obsolete/minfo.m scripts/control/obsolete/packsys.m scripts/control/obsolete/qzval.m scripts/control/obsolete/rotg.m scripts/control/obsolete/series.m scripts/control/obsolete/swapcols.m scripts/control/obsolete/swaprows.m scripts/control/obsolete/syschnames.m scripts/control/obsolete/unpacksys.m scripts/control/system/Makefile.in scripts/control/system/__abcddims__.m scripts/control/system/__syschnamesl__.m scripts/control/system/__sysconcat__.m scripts/control/system/__syscont_disc__.m scripts/control/system/__sysdefioname__.m scripts/control/system/__sysdefstname__.m scripts/control/system/__sysgroupn__.m scripts/control/system/__tf2sysl__.m scripts/control/system/__tfl__.m scripts/control/system/__zp2ssg2__.m scripts/control/system/abcddim.m scripts/control/system/buildssic.m scripts/control/system/c2d.m scripts/control/system/cellidx.m scripts/control/system/d2c.m scripts/control/system/dmr2d.m scripts/control/system/fir2sys.m scripts/control/system/is_abcd.m scripts/control/system/is_controllable.m scripts/control/system/is_detectable.m scripts/control/system/is_digital.m scripts/control/system/is_observable.m scripts/control/system/is_sample.m scripts/control/system/is_signal_list.m scripts/control/system/is_siso.m scripts/control/system/is_stabilizable.m scripts/control/system/is_stable.m scripts/control/system/jet707.m scripts/control/system/listidx.m scripts/control/system/moddemo.m scripts/control/system/ord2.m scripts/control/system/packedform.m scripts/control/system/parallel.m scripts/control/system/ss.m scripts/control/system/ss2sys.m scripts/control/system/ss2tf.m scripts/control/system/ss2zp.m scripts/control/system/starp.m scripts/control/system/sys2fir.m scripts/control/system/sys2ss.m scripts/control/system/sys2tf.m scripts/control/system/sys2zp.m scripts/control/system/sysadd.m scripts/control/system/sysappend.m scripts/control/system/syschtsam.m scripts/control/system/sysconnect.m scripts/control/system/syscont.m scripts/control/system/sysdimensions.m scripts/control/system/sysdisc.m scripts/control/system/sysdup.m scripts/control/system/sysgetsignals.m scripts/control/system/sysgettsam.m scripts/control/system/sysgettype.m scripts/control/system/sysgroup.m scripts/control/system/sysidx.m scripts/control/system/sysmin.m scripts/control/system/sysmult.m scripts/control/system/sysout.m scripts/control/system/sysprune.m scripts/control/system/sysreorder.m scripts/control/system/sysrepdemo.m scripts/control/system/sysscale.m scripts/control/system/syssetsignals.m scripts/control/system/syssub.m scripts/control/system/sysupdate.m scripts/control/system/tf.m scripts/control/system/tf2ss.m scripts/control/system/tf2sys.m scripts/control/system/tf2zp.m scripts/control/system/tfout.m scripts/control/system/ugain.m scripts/control/system/zp.m scripts/control/system/zp2ss.m scripts/control/system/zp2sys.m scripts/control/system/zp2tf.m scripts/control/system/zpout.m scripts/control/util/Makefile.in scripts/control/util/__outlist__.m scripts/control/util/__zgpbal__.m scripts/control/util/axis2dlim.m scripts/control/util/prompt.m scripts/control/util/run_cmd.m scripts/control/util/sortcom.m scripts/control/util/strappend.m scripts/control/util/swap.m scripts/control/util/zgfmul.m scripts/control/util/zgfslv.m scripts/control/util/zginit.m scripts/control/util/zgreduce.m scripts/control/util/zgrownorm.m scripts/control/util/zgscal.m scripts/control/util/zgsgiv.m scripts/control/util/zgshsr.m scripts/finance/Makefile.in scripts/finance/fv.m scripts/finance/fvl.m scripts/finance/irr.m scripts/finance/nper.m scripts/finance/npv.m scripts/finance/pmt.m scripts/finance/pv.m scripts/finance/pvl.m scripts/finance/rate.m scripts/finance/vol.m scripts/quaternion/Makefile.in scripts/quaternion/demoquat.m scripts/quaternion/qconj.m scripts/quaternion/qcoordinate_plot.m scripts/quaternion/qderiv.m scripts/quaternion/qderivmat.m scripts/quaternion/qinv.m scripts/quaternion/qmult.m scripts/quaternion/qtrans.m scripts/quaternion/qtransv.m scripts/quaternion/qtransvmat.m scripts/quaternion/quaternion.m scripts/quaternion/quaternion.ps |
diffstat | 198 files changed, 21 insertions(+), 33857 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2008-07-29 David Bateman <dbateman@free.fr> + + * control.txi, finance.txi, quaternion.txi: Delete. + * octave.texi: Remove all references to the above. + * Makefile.in: ditto. + 2008-07-28 David Bateman <dbateman@free.fr> * interpreter/arith.txi: Document reallog, realpow and realsqrt.
--- a/doc/interpreter/Makefile.in +++ b/doc/interpreter/Makefile.in @@ -94,13 +94,13 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT) SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi \ - container.txi control.txi cp-idx.txi data.txi \ + container.txi cp-idx.txi data.txi \ debug.txi diffeq.txi dynamic.txi emacs.txi errors.txi eval.txi \ - expr.txi finance.txi fn-idx.txi func.txi geometry.txi gpl.txi \ + expr.txi fn-idx.txi func.txi geometry.txi gpl.txi \ grammar.txi image.txi install.txi interp.txi \ intro.txi io.txi linalg.txi matrix.txi nonlin.txi numbers.txi \ op-idx.txi optim.txi package.txi plot.txi poly.txi preface.txi \ - quad.txi quaternion.txi set.txi signal.txi sparse.txi stats.txi \ + quad.txi set.txi signal.txi sparse.txi stats.txi \ stmt.txi strings.txi system.txi testfun.txi tips.txi var.txi \ vr-idx.txi
deleted file mode 100644 --- a/doc/interpreter/control.txi +++ /dev/null @@ -1,503 +0,0 @@ -@c Copyright (C) 1996, 1997, 2007 John W. Eaton -@c -@c This file is part of Octave. -@c -@c Octave is free software; you can redistribute it and/or modify it -@c under the terms of the GNU General Public License as published by the -@c Free Software Foundation; either version 3 of the License, or (at -@c your option) any later version. -@c -@c Octave is distributed in the hope that it will be useful, but WITHOUT -@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -@c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -@c for more details. -@c -@c You should have received a copy of the GNU General Public License -@c along with Octave; see the file COPYING. If not, see -@c <http://www.gnu.org/licenses/>. - -@node Control Theory -@chapter Control Theory - -The Octave Control Systems Toolbox (@acronym{OCST}) was initially developed -by Dr.@: A. Scottedward Hodel -@email{a.s.hodel@@eng.auburn.edu} with the assistance -of his students -@itemize @bullet -@item R. Bruce Tenison @email{btenison@@dibbs.net}, -@item David C. Clem, -@item John E. Ingram @email{John.Ingram@@sea.siemans.com}, and -@item Kristi McGowan. -@end itemize -This development was supported in part by @acronym{NASA}'s Marshall Space Flight -Center as part of an in-house @acronym{CACSD} environment. Additional important -contributions were made by Dr. Kai Mueller @email{mueller@@ifr.ing.tu-bs.de} -and Jose Daniel Munoz Frias (@code{place.m}). - -An on-line menu-driven tutorial is available via @code{DEMOcontrol}; -beginning @acronym{OCST} users should start with this program. - -@DOCSTRING(DEMOcontrol) - -@menu -* sysstruct:: -* sysinterface:: -* sysdisp:: -* blockdiag:: -* numerical:: -* sysprop:: -* systime:: -* sysfreq:: -* cacsd:: -* misc:: -@end menu - -@node sysstruct -@section System Data Structure - -@menu -* sysstructvars:: -* sysstructtf:: -* sysstructzp:: -* sysstructss:: -@end menu - -The @acronym{OCST} stores all dynamic systems in -a single data structure format that can represent continuous systems, -discrete-systems, and mixed (hybrid) systems in state-space form, and -can also represent purely continuous/discrete systems in either -transfer function or pole-zero form. In order to -provide more flexibility in treatment of discrete/hybrid systems, the -@acronym{OCST} also keeps a record of which system outputs are sampled. - -Octave structures are accessed with a syntax much like that used -by the C programming language. For consistency in -use of the data structure used in the @acronym{OCST}, it is recommended that -the system structure access m-files be used (@pxref{sysinterface}). -Some elements of the data structure are absent depending on the internal -system representation(s) used. More than one system representation -can be used for @acronym{SISO} systems; the @acronym{OCST} m-files ensure that all representations -used are consistent with one another. - -@DOCSTRING(sysrepdemo) - -@node sysstructvars -@subsection Variables common to all @acronym{OCST} system formats - -The data structure elements (and variable types) common to all system -representations are listed below; examples of the initialization -and use of the system data structures are given in subsequent sections and -in the online demo @code{DEMOcontrol}. -@table @var -@item n -@itemx nz -The respective number of continuous and discrete states -in the system (scalar) - -@item inname -@itemx outname -list of name(s) of the system input, output signal(s). (list of strings) - -@item sys -System status vector. (vector) - -This vector indicates both what representation was used to initialize -the system data structure (called the primary system type) and which -other representations are currently up-to-date with the primary system -type (@pxref{structaccess}). - -The value of the first element of the vector indicates the primary -system type. - -@table @asis -@item 0 -for tf form (initialized with @code{tf2sys} or @code{fir2sys}) - -@item 1 -for zp form (initialized with @code{zp2sys}) - -@item 2 -for ss form (initialized with @code{ss2sys}) -@end table - -The next three elements are boolean flags that indicate whether tf, zp, -or ss, respectively, are ``up to date" (whether it is safe to use the -variables associated with these representations). These flags are -changed when calls are made to the @code{sysupdate} command. - -@item tsam - Discrete time sampling period (nonnegative scalar). - @var{tsam} is set to 0 for continuous time systems. - -@item yd - Discrete-time output list (vector) - - indicates which outputs are discrete time (i.e., - produced by D/A converters) and which are continuous time. - yd(ii) = 0 if output ii is continuous, = 1 if discrete. -@end table - -The remaining variables of the system data structure are only present -if the corresponding entry of the @code{sys} vector is true (=1). - -@node sysstructtf -@subsection @code{tf} format variables - -@table @var -@item num - numerator coefficients (vector) - -@item den - denominator coefficients (vector) - -@end table - -@node sysstructzp -@subsection @code{zp} format variables - -@table @var -@item zer - system zeros (vector) - -@item pol - system poles (vector) - -@item k - leading coefficient (scalar) - -@end table - -@node sysstructss -@subsection @code{ss} format variables - -@table @var -@item a -@itemx b -@itemx c -@itemx d -The usual state-space matrices. If a system has both - continuous and discrete states, they are sorted so that - continuous states come first, then discrete states - -@strong{Note} some functions (e.g., @code{bode}, @code{hinfsyn}) -will not accept systems with both discrete and continuous states/outputs - -@item stname -names of system states (list of strings) - -@end table - -@node sysinterface -@section System Construction and Interface Functions - -Construction and manipulations of the @acronym{OCST} system data structure -(@pxref{sysstruct}) requires attention to many details in order -to ensure that data structure contents remain consistent. Users -are strongly encouraged to use the system interface functions -in this section. Functions for the formatted display in of system -data structures are given in @ref{sysdisp}. - -@menu -* fir2sys:: -* ss2sys:: -* tf2sys:: -* zp2sys:: -* structaccess:: -@end menu - -@node fir2sys -@subsection Finite impulse response system interface functions - -@DOCSTRING(fir2sys) - -@DOCSTRING(sys2fir) - -@node ss2sys -@subsection State space system interface functions - -@DOCSTRING(ss) - -@DOCSTRING(ss2sys) - -@DOCSTRING(sys2ss) - -@node tf2sys -@subsection Transfer function system interface functions - -@DOCSTRING(tf) - -@DOCSTRING(tf2sys) - -@DOCSTRING(sys2tf) - -@node zp2sys -@subsection Zero-pole system interface functions - -@DOCSTRING(zp) - -@DOCSTRING(zp2sys) - -@DOCSTRING(sys2zp) - -@node structaccess -@subsection Data structure access functions - -@DOCSTRING(syschnames) - -@DOCSTRING(syschtsam) - -@DOCSTRING(sysdimensions) - -@DOCSTRING(sysgetsignals) - -@DOCSTRING(sysgettype) - -@DOCSTRING(syssetsignals) - -@DOCSTRING(sysupdate) - -@DOCSTRING(minfo) - -@DOCSTRING(sysgettsam) - -@node sysdisp -@section System display functions - -@DOCSTRING(sysout) - -@DOCSTRING(tfout) - -@DOCSTRING(zpout) - -@node blockdiag -@section Block Diagram Manipulations - -@xref{systime}. - -Unless otherwise noted, all parameters (input,output) are -system data structures. - -@DOCSTRING(bddemo) - -@DOCSTRING(buildssic) - -@DOCSTRING(jet707) - -@DOCSTRING(ord2) - -@DOCSTRING(sysadd) - -@DOCSTRING(sysappend) - -@DOCSTRING(sysconnect) - -@DOCSTRING(syscont) - -@DOCSTRING(sysdisc) - -@DOCSTRING(sysdup) - -@DOCSTRING(sysgroup) - -@DOCSTRING(sysmult) - -@DOCSTRING(sysprune) - -@DOCSTRING(sysreorder) - -@DOCSTRING(sysscale) - -@DOCSTRING(syssub) - -@DOCSTRING(ugain) - -@DOCSTRING(wgt1o) - -@DOCSTRING(parallel) - -@DOCSTRING(sysmin) - -@node numerical -@section Numerical Functions - -@DOCSTRING(are) - -@DOCSTRING(dare) - -@DOCSTRING(dre) - -@DOCSTRING(dgram) - -@DOCSTRING(dlyap) - -@DOCSTRING(gram) - -@DOCSTRING(lyap) - -@DOCSTRING(qzval) - -@DOCSTRING(zgfmul) - -@DOCSTRING(zgfslv) - -@DOCSTRING(zginit) - -@DOCSTRING(zgreduce) - -@DOCSTRING(zgrownorm) - -@DOCSTRING(zgscal) - -@DOCSTRING(zgsgiv) - -@DOCSTRING(zgshsr) - -@strong{References} -@table @strong -@item ZGEP - Hodel, @cite{Computation of Zeros with Balancing}, 1992, Linear Algebra - and its Applications -@item @strong{Generalized CG} - Golub and Van Loan, @cite{Matrix Computations, 2nd ed} 1989. -@end table - -@node sysprop -@section System Analysis-Properties - -@DOCSTRING(analdemo) - -@DOCSTRING(abcddim) - -@DOCSTRING(ctrb) - -@DOCSTRING(h2norm) - -@DOCSTRING(hinfnorm) - -@DOCSTRING(obsv) - -@DOCSTRING(pzmap) - -@DOCSTRING(is_abcd) - -@DOCSTRING(is_controllable) - -@DOCSTRING(is_detectable) - -@DOCSTRING(is_dgkf) - -@DOCSTRING(is_digital) - -@DOCSTRING(is_observable) - -@DOCSTRING(is_sample) - -@DOCSTRING(is_siso) - -@DOCSTRING(is_stabilizable) - -@DOCSTRING(is_signal_list) - -@DOCSTRING(is_stable) - -@node systime -@section System Analysis-Time Domain - -@DOCSTRING(c2d) - -@DOCSTRING(d2c) - -@DOCSTRING(dmr2d) - -@DOCSTRING(damp) - -@DOCSTRING(dcgain) - -@DOCSTRING(impulse) - -@DOCSTRING(step) - -@node sysfreq -@section System Analysis-Frequency Domain - -@strong{Demonstration/tutorial script} -@DOCSTRING(frdemo) - -@DOCSTRING(bode) - -@DOCSTRING(bode_bounds) - -@DOCSTRING(freqchkw) - -@DOCSTRING(ltifr) - -@DOCSTRING(nyquist) - -@DOCSTRING(nichols) - -@DOCSTRING(tzero) - -@DOCSTRING(tzero2) - -@node cacsd -@section Controller Design - -@DOCSTRING(dgkfdemo) - -@DOCSTRING(hinfdemo) - -@DOCSTRING(dlqe) - -@DOCSTRING(dlqr) - -@DOCSTRING(dkalman) - -@DOCSTRING(h2syn) - -@DOCSTRING(hinf_ctr) - -@DOCSTRING(hinfsyn) - -@DOCSTRING(hinfsyn_chk) - -@DOCSTRING(hinfsyn_ric) - -@DOCSTRING(lqe) - -@DOCSTRING(lqg) - -@DOCSTRING(lqr) - -@DOCSTRING(lsim) - -@DOCSTRING(place) - -@node misc -@section Miscellaneous Functions (Not yet properly filed/documented) - -@DOCSTRING(axis2dlim) - -@DOCSTRING(moddemo) - -@DOCSTRING(prompt) - -@DOCSTRING(rldemo) - -@DOCSTRING(rlocus) - -@DOCSTRING(sortcom) - -@DOCSTRING(ss2tf) - -@DOCSTRING(ss2zp) - -@DOCSTRING(starp) - -@DOCSTRING(tf2ss) - -@DOCSTRING(tf2zp) - -@DOCSTRING(zp2ss) - -@DOCSTRING(zp2tf) -
deleted file mode 100644 --- a/doc/interpreter/finance.txi +++ /dev/null @@ -1,43 +0,0 @@ -@c Copyright (C) 1996, 1997, 2007 John W. Eaton -@c -@c This file is part of Octave. -@c -@c Octave is free software; you can redistribute it and/or modify it -@c under the terms of the GNU General Public License as published by the -@c Free Software Foundation; either version 3 of the License, or (at -@c your option) any later version. -@c -@c Octave is distributed in the hope that it will be useful, but WITHOUT -@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -@c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -@c for more details. -@c -@c You should have received a copy of the GNU General Public License -@c along with Octave; see the file COPYING. If not, see -@c <http://www.gnu.org/licenses/>. - -@node Financial Functions -@chapter Financial Functions -@cindex financial functions -@cindex money -@cindex compounding, value of - -@DOCSTRING(fv) - -@DOCSTRING(fvl) - -@DOCSTRING(irr) - -@DOCSTRING(nper) - -@DOCSTRING(npv) - -@DOCSTRING(pmt) - -@DOCSTRING(pv) - -@DOCSTRING(pvl) - -@DOCSTRING(rate) - -@DOCSTRING(vol)
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -170,16 +170,13 @@ * Differential Equations:: * Optimization:: * Statistics:: -* Financial Functions:: * Sets:: * Polynomial Manipulations:: * Interpolation:: * Geometry:: -* Control Theory:: * Signal Processing:: * Image Processing:: * Audio Processing:: -* Quaternions:: * System Utilities:: * Packages:: * Dynamically Linked Functions:: @@ -481,34 +478,6 @@ * Convex Hull:: * Interpolation on Scattered Data:: -Control Theory - -* sysstruct:: -* sysinterface:: -* sysdisp:: -* blockdiag:: -* numerical:: -* sysprop:: -* systime:: -* sysfreq:: -* cacsd:: -* misc:: - -System Data Structure - -* sysstructvars:: -* sysstructtf:: -* sysstructzp:: -* sysstructss:: - -System Construction and Interface Functions - -* fir2sys:: -* ss2sys:: -* tf2sys:: -* zp2sys:: -* structaccess:: - Image Processing * Loading and Saving Images:: @@ -623,16 +592,13 @@ @include diffeq.texi @include optim.texi @include stats.texi -@include finance.texi @include set.texi @include poly.texi @include interp.texi @include geometry.texi -@include control.texi @include signal.texi @include image.texi @include audio.texi -@include quaternion.texi @include system.texi @include package.texi
deleted file mode 100644 --- a/doc/interpreter/quaternion.txi +++ /dev/null @@ -1,48 +0,0 @@ -@c Copyright (C) 1996, 1997, 2000, 2002, 2007 John W. Eaton -@c -@c This file is part of Octave. -@c -@c Octave is free software; you can redistribute it and/or modify it -@c under the terms of the GNU General Public License as published by the -@c Free Software Foundation; either version 3 of the License, or (at -@c your option) any later version. -@c -@c Octave is distributed in the hope that it will be useful, but WITHOUT -@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -@c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -@c for more details. -@c -@c You should have received a copy of the GNU General Public License -@c along with Octave; see the file COPYING. If not, see -@c <http://www.gnu.org/licenses/>. - -@node Quaternions -@chapter Quaternions - -Quaternions are hypercomplex numbers used to represent spatial -rotations in three dimensions. This set of routines provides a useful -basis for working with quaternions in Octave. A tutorial is in the -Octave source, scripts/quaternion/quaternion.ps. - -These functions were written by A. S. Hodel, Associate Professor, -Auburn University. - -@DOCSTRING(quaternion) - -@DOCSTRING(qconj) - -@DOCSTRING(qderiv) - -@DOCSTRING(qderivmat) - -@DOCSTRING(qinv) - -@DOCSTRING(qmult) - -@DOCSTRING(qtrans) - -@DOCSTRING(qtransv) - -@DOCSTRING(qtransvmat) - -@DOCSTRING(qcoordinate_plot)
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,10 @@ +2008-07-29 David Bateman <dbateman@free.fr> + + * control, finance, quaternion: Remove directories and all of the + files they contain. + * Makefile.in: Remove all references to the above directories. + * configure.in: ditto. + 2008-07-28 Ben Abbott <bpabbott@mac.com> * plot/hold.m: Clarify help text.
--- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -42,9 +42,9 @@ configure.in configure mkinstalldirs mkdoc mkpkgadd gethelp.cc \ skip-autoheader move-if-change) DOCSTRINGS -SUBDIRS = audio control deprecated elfun finance general geometry image io \ +SUBDIRS = audio deprecated elfun general geometry image io \ linear-algebra miscellaneous optimization path pkg plot polynomial \ - quaternion set signal sparse specfun special-matrix startup \ + set signal sparse specfun special-matrix startup \ statistics strings testfun time DISTSUBDIRS = $(SUBDIRS)
--- a/scripts/configure.in +++ b/scripts/configure.in @@ -28,14 +28,11 @@ AC_PROG_INSTALL -AC_CONFIG_FILES([Makefile audio/Makefile control/Makefile \ - control/base/Makefile control/hinf/Makefile \ - control/obsolete/Makefile control/system/Makefile \ - control/util/Makefile deprecated/Makefile elfun/Makefile \ - finance/Makefile general/Makefile geometry/Makefile image/Makefile \ +AC_CONFIG_FILES([Makefile audio/Makefile deprecated/Makefile elfun/Makefile \ + general/Makefile geometry/Makefile image/Makefile \ io/Makefile linear-algebra/Makefile miscellaneous/Makefile \ optimization/Makefile path/Makefile pkg/Makefile plot/Makefile \ - polynomial/Makefile quaternion/Makefile set/Makefile \ + polynomial/Makefile set/Makefile \ signal/Makefile sparse/Makefile specfun/Makefile \ special-matrix/Makefile startup/Makefile statistics/Makefile \ statistics/base/Makefile statistics/distributions/Makefile \
deleted file mode 100644 --- a/scripts/control/MakeControlOct +++ /dev/null @@ -1,94 +0,0 @@ -%.oct : %.cc $(OCT_LIBS) ocst.h - @echo "making $@ from $<" - mkoctfile $< -locst -lm - -%.o : %.cc ocst.h - @echo "making $@ from $<" - mkoctfile $< - rm -f $*.oct - -OCT_FILES = abcddim.oct \ - fir2sys.oct \ - ss2sys.oct \ - tf2sys.oct \ - zp2sys.oct \ - #sysout.oct \ - zgsgiv.oct - -OCST_LIB = get_complex_vector.o \ - get_matrix.o \ - get_real_scalar.o \ - get_string_matrix.o \ - get_string.o \ - get_vect.o \ - pack.o \ - sysdefioname.o \ - sysdefstname.o - -OCT_LIBS= - -all: $(OCT_LIBS) $(OCT_FILES) - @echo "" - octave - -libocst.so: $(OCST_LIB) - gcc -fPIC -shared -R/opt/octave/lib -o libocst.so.1 $(OCST_LIB) - cp libocst.so.1 /opt/octave/lib - rm -f /opt/octave/lib/libocst.so - ln -s /opt/octave/lib/libocst.so.1 /opt/octave/lib/libocst.so - rm -f ./libocst.so - ln -s ./libocst.so.1 ./libocst.so - -ABCDDIM_DEP= abcddim.cc \ - zero_matrix.o -abcddim.oct: $(ABCDDIM_DEP) ocst.h - mkoctfile $(ABCDDIM_DEP) - -FIR2SYS_DEP= fir2sys.cc \ - get_real_scalar.o \ - get_string.o \ - get_vector.o \ - pack.o -fir2sys.oct: $(FIR2SYS_DEP) ocst.h - mkoctfile $(FIR2SYS_DEP) - -SS2SYS_DEP= ss2sys.cc \ - $(ABCDDIM_DEP) \ - add_name.o \ - get_matrix.o \ - get_real_scalar.o \ - get_string_matrix.o \ - get_vector.o \ - pack.o \ - sysdefioname.o \ - sysdefstname.o -ss2sys.oct: $(SS2SYS_DEP) ocst.h - mkoctfile $(SS2SYS_DEP) - -SYSOUT_DEP= sysout.cc -sysout.oct: $(SYSOUT_DEP) ocst.h - mkoctfile $(SYSOUT_DEP) - -TF2SYS_DEP= tf2sys.cc \ - get_real_scalar.o \ - get_string.o \ - get_vector.o \ - pack.o -tf2sys.oct: $(TF2SYS_DEP) ocst.h - mkoctfile $(TF2SYS_DEP) - -ZGSGIV_DEP=zgsgiv.cc -zgsgiv.oct: $(ZGSGIV_DEP) ocst.h - mkoctfile $(ZGSGIV_DEP) - -ZP2SYS_DEP= zp2sys.cc \ - get_complex_vector.o \ - get_real_scalar.o \ - get_string.o \ - pack.o -zp2sys.oct: $(ZP2SYS_DEP) ocst.h - mkoctfile $(ZP2SYS_DEP) - -clean: - rm -f *.o *.oct *.a *.so *.so.1 -
deleted file mode 100644 --- a/scripts/control/Makefile.in +++ /dev/null @@ -1,70 +0,0 @@ -# Makefile for octave's scripts/control directory -# -# Copyright (C) 1994, 1995, 1996, 1997, 2000, 2005, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../.. - -script_sub_dir = control - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SUBDIRS = base hinf obsolete system util - -DISTSUBDIRS = $(SUBDIRS) - -DISTFILES = $(srcdir)/Makefile.in - -all: -.PHONY: all - -$(SUBDIRS): - $(MAKE) -C $@ all -.PHONY: $(SUBDIRS) - -install install-strip uninstall clean mostlyclean distclean maintainer-clean:: - @$(subdir-for-command) -.PHONY: install install-strip uninstall -.PHONY: clean mostlyclean distclean maintainer-clean - -tags TAGS: - $(subdir-for-command) - -distclean:: - rm -f Makefile - -maintainer-clean:: - rm -f tags TAGS Makefile - -dist: - ln $(DISTFILES) ../../`cat ../../.fname`/scripts/control - for dir in $(DISTSUBDIRS); do mkdir ../../`cat ../../.fname`/scripts/control/$$dir; $(MAKE) -C $$dir $@; done -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) - @$(subdir-for-command) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/OCSTreport +++ /dev/null @@ -1,318 +0,0 @@ - -############################################################################### -# # -# report # -# # -# Lout setup file for technical reports. # -# # -# Jeffrey H. Kingston # -# 12 September 1994 # -# # -############################################################################### - - -############################################################################### -# # -# @SysInclude commands for standard packages. # -# # -############################################################################### - - @SysInclude { fontdefs } # font definitions - @SysInclude { langdefs } # language definitions - @SysInclude { dl } # DocumentLayout package - @SysInclude { reportf } # ReportLayout extension - @SysInclude { tab } # @Tab table formatter -# @SysInclude { eq } # @Eq equation formatter -# @SysInclude { fig } # @Fig advanced graphics -# @SysInclude { graph } # @Graph graph drawing -# @SysInclude { cprint } # @CPrint C and C++ programs -# @SysInclude { pas } # @Pas Pascal programs - - -############################################################################### -# # -# @Include command for reading personal definitions from current directory. # -# # -############################################################################### - - @Include { mydefs } - - -############################################################################### -# # -# The @DocumentLayout @Use clause - overall document format options. # -# # -############################################################################### - -@Use { @DocumentLayout - # @InitialFont { Times Base 12p } # initial font - # @InitialBreak { adjust 1.20fx hyphen } # initial break - # @InitialSpace { lout } # initial space style - # @InitialLanguage { English } # initial language - # @InitialColour { black } # initial colour - # @OptimizePages { No } # optimize page breaks? - # @HeadingFont { Bold } # font for @Heading - # @ParaGap { 1.30vx } # gap between paragraphs - # @ParaIndent { 2.00f } # first-line indent for @PP - # @DisplayGap { 1.00v } # gap above, below displays - # @DisplayIndent { 2.00f } # @IndentedDisplay indent - # @DefaultIndent { 0.5rt } # @Display indent - # @DisplayNumStyle { (num) } # style of display numbers - # @WideIndent { 4.00f } # @WideTaggedList indent - # @VeryWideIndent { 8.00f } # @VeryWideTaggedList indent - # @ListGap { 1.00v } # gap between list items - # @ListIndent { 0c } # indent of list items - # @ListRightIndent { 0c } # right indent of list items - # @ListLabelWidth { 2.00f } # width allowed for list tags - @PageType { A4 } # page type (width, height) - # @PageType { Letter } # page type (width, height) - # @PageWidth { } # page width if type Other - # @PageHeight { } # page height if type Other - # @PageOrientation { Portrait } # Portrait, Landscape, etc. - # @PageBackground { } # background of each page - # @TopMargin { 2.50c } # top margin of all pages - # @FootMargin { 2.50c } # bottom margin of all pages - # @OddLeftMargin { 2.50c } # left margin of odd pages - # @OddRightMargin { 2.50c } # right margin of odd pages - # @EvenLeftMargin { 2.50c } # left margin of even pages - # @EvenRightMargin { 2.50c } # right margin of even pages - # @PageBoxType { None } # None Box CurveBox ShadowBox - # @PageBoxMargin { 1.00c } # page box margin - # @PageBoxLineWidth { } # page box line thickness - # @PageBoxPaint { none } # page box paint - # @PageBoxShadow { 0.60c } # shadow margin if ShadowBox - # @ColumnNumber { 1 } # number of columns (1 to 10) - # @ColumnGap { 1.00c } # column gap - # @FigureLocation { PageTop } # default figure location - # @TableLocation { PageTop } # default table location - # @FigureWord { figure } # "Figure" word else anything - # @TableWord { table } # "Table" word else anything - # @FigureNumbers { Arabic } # method of numbering figures - # @TableNumbers { Arabic } # method of numbering tables - # @FigureCaptionPos { Below } # Above or Below - # @TableCaptionPos { Below } # Above or Below - # @CaptionFont { } # figure, table caption font - # @CaptionBreak { } # figure, table caption break - # @MakeFigureContents { No } # list of figures at start - # @MakeTableContents { No } # list of tables at start - # @MakeContents { No } # make contents? Yes or No - # @ContentsGap { 0.20v } # extra gap above minor entry - # @ContentsGapAbove { 0.80v } # extra gap above major entry - # @ContentsGapBelow { 0.00v } # extra gap below major entry - # @ContentsLeader { .. } # leader symbol in contents - # @ContentsLeaderGap { 4s } # gap between leaders - # @ContentsRightWidth { 3f } # page numbers column width - # @MakeReferences { Yes } # make references? Yes or No - # @RefCiteStyle { [cite] } # citation style - # @RefCiteLabels { @RefNum } # citation items - # @RefNumbers { Arabic } # reference numbers - # @RefListFormat { Labels } # NoLabels, Labels, etc. - # @RefListLabels { [@RefNum] } # ref list label format - # @RefListTitle { references } # title of reference list - # @ChapRefListTitle { references } # title of chapter ref list - # @RefListIndent { 0c } # indent to left of labels - # @RefListRightIndent { 0c } # indent to right of items - # @RefListGap { 1.00v } # gap between ref list items - # @RefListFont { } # font used in reference list - # @RefListBreak { } # break style of ref list - # @RefListLabelWidth { 2.00f } # Labels column width - # @RefListSortKey { @Tag } # sorting key - # @MakeIndex { No } # make index? Yes or No - # @IndexFont { } # index entries font - # @IndexBreak { outdent 1.2fx } # index entries break - # @IndexColumnNumber { 2 } # index columns (1 to 10) - # @IndexColumnGap { 1.00c } # index column gap - # @MakeIndexA { No } # make index A? Yes or No - # @IndexAFont { } # index A entries font - # @IndexABreak { outdent 1.2fx } # index A entries break - # @IndexAColumnNumber { 2 } # index A columns (1 to 10) - # @IndexAColumnGap { 1.00c } # index A column gap - # @MakeIndexB { No } # make index B? Yes or No - # @IndexBFont { } # index B entries font - # @IndexBBreak { outdent 1.2fx } # index B entries break - # @IndexBColumnNumber { 2 } # index B columns (1 to 10) - # @IndexBColumnGap { 1.00c } # index B column gap - # @IndexFont { } # index entries font - # @IndexBreak { outdent 1.2fx } # index entries break - # @IndexColumnNumber { 2 } # index columns (1 to 10) - # @IndexColumnGap { 1.00c } # index column gap - # @TopGap { 0.75c } # gap between figures - # @MidGap { 0.75c } # gap above/below body text - # @FootNoteNumbers { Arabic } # footnote numbers - # @FootNoteThrough { No } # numbered through chapter? - # @FootNoteLocation { ColFoot } # where the footnote appears - # @FootNoteFont { 0.80f } # font for footnotes - # @FootNoteBreak { 1.20fx } # break for footnotes - # @FootLen { 2.00c } # length of footnote line - # @FootAboveGap { 1.00v } # gap above footnote line - # @FootGap { 0.20c } # gap between footnotes - # @EndNoteNumbers { Arabic } # endnote numbers - # @EndNoteFont { 0.80f } # font of endnotes - # @EndNoteBreak { 1.20fx } # break for endnotes - # @EndNoteGap { 0.20c } # gap between endnotes - # @TheoremThrough { No } # numbered through whole doc? - # @TheoremNumbers { Arabic } # theorem etc. numbers - # @DefinitionWord { definition } # "Definition" word, etc. - # @LemmaWord { lemma } # "Lemma" word, etc. - # @TheoremWord { theorem } # "Theorem" word, etc. - # @PropositionWord { proposition } # "Proposition" word, etc. - # @CorollaryWord { corollary } # "Corollary" word, etc. - # @ExampleWord { example } # "Example" word, etc. - # @ClaimWord { claim } # "Claim" word, etc. - # @ProofWord { proof } # "Proof" word, etc. - # @MarginNoteFont { 0.80f } # font of margin notes - # @MarginNoteBreak { ragged 1.10fx } # break style of margin notes - # @MarginNoteHGap { 0.5c } # horizontal gap to notes - # @MarginNoteVGap { 1.00v } # min vertical gap between - # @MarginNoteWidth { 1.50c } # width of margin notes - # @PageHeaders { Simple } # None Simple Titles NoTitles - # @PageNumbers { Arabic } # page numbers - # @FirstPageNumber { 1 } # number of first page - # @IntroPageNumbers { Roman } # intro page numbers - # @IntroFirstPageNumber{ 1 } # number of first intro page - - # @OddTop { @Centre{- @PageNum -} } # Simple page headers - # @OddFoot { @Null } - # @EvenTop { @Centre{- @PageNum -} } - # @EvenFoot { @Null } - # @StartOddTop { @Null } - # @StartOddFoot { @Null } - # @StartEvenTop { @Null } - # @StartEvenFoot { @Null } - # @IntroOddTop { @Null } - # @IntroOddFoot { @Null } - # @IntroEvenTop { @Null } - # @IntroEvenFoot { @Null } - # @IntroStartOddTop { @Null } - # @IntroStartOddFoot { @Null } - # @IntroStartEvenTop { @Null } - # @IntroStartEvenFoot { @Null } - - # Titles, NoTitles headers - # @RunningOddTop { @I {@MinorNum @DotSep @MinorTitle} @Right @B @PageNum } - # @RunningOddFoot { @Null } - # @RunningEvenTop { @B @PageNum @Right @I {@MajorNum @DotSep @MajorTitle} } - # @RunningEvenFoot { @Null } - # @RunningStartOddTop { @Null } - # @RunningStartOddFoot { @Centre { Bold 0.8f } @Font @PageNum } - # @RunningStartEvenTop { @Null } - # @RunningStartEvenFoot { @Centre { Bold 0.8f } @Font @PageNum } - # @RunningIntroOddTop { @Null } - # @RunningIntroOddFoot { @Right @PageNum } - # @RunningIntroEvenTop { @Null } - # @RunningIntroEvenFoot { @PageNum } - # @RunningIntroStartOddTop { @Null } - # @RunningIntroStartOddFoot { @Null } - # @RunningIntroStartEvenTop { @Null } - # @RunningIntroStartEvenFoot { @Null } -} - - -############################################################################### -# # -# The @ReportLayout @Use clause - options specific to technical reports. # -# # -############################################################################### - -@Use { @ReportLayout - # @CoverSheet { Yes } # make cover sheet - # @DateLine { No } # Yes, No, or a date - # @ReferencesBeforeAppendices { No } # pos of ref list - # @AbstractWord { abstract } # "Abstract" word etc. - # @ContentsWord { contents } # "Contents" word etc. - # @AppendixWord { appendix } # "Appendix" word etc. - # @IndexWord { index } # "Index" word etc. - # @IndexAWord { index } # "Index" word in index A - # @IndexBWord { index } # "Index" word in index B - # @SectionNumbers { Arabic } # section numbers - # @SubSectionNumbers { Arabic } # subsection numbers - # @SubSubSectionNumbers { Arabic } # sub-subsection numbers - # @AppendixNumbers { UCAlpha } # appendix numbers - # @SubAppendixNumbers { Arabic } # subappendix numbers - # @SubSubAppendixNumbers { Arabic } # sub-subappendix numbers - # @AbstractHeadingFont { Bold } # abstract heading font - # @AbstractHeadingBreak { ragged 1.2fx nohyphen } # abstract heading break - # @AbstractHeadingFormat { title } # abstract heading format - # @ContentsHeadingFont { Bold } # contents heading font - # @ContentsHeadingBreak { ragged 1.2fx nohyphen } # contents heading break - # @ContentsHeadingFormat { title } # contents heading format - # @SectionHeadingFont { Bold } # section heading font - # @SectionHeadingBreak { ragged 1.2fx nohyphen } # section heading break - # @SectionHeadingFormat { number @DotSep title } # section heading format - # @SubSectionHeadingFont { Bold } # subsection heading font - # @SubSectionHeadingBreak { ragged 1.2fx nohyphen } # subsection heading break - # @SubSectionHeadingFormat { number @DotSep title } # subsection heading format - # @SubSubSectionHeadingFont { Slope } # sub-subsection heading font - # @SubSubSectionHeadingBreak { ragged 1.2fx nohyphen } # sub-subsection heading break - # @SubSubSectionHeadingFormat { number @DotSep title } # sub-subsection heading format - # @AppendixHeadingFont { Bold } # appendix heading font - # @AppendixHeadingBreak { ragged 1.2fx nohyphen } # appendix heading break - # @AppendixHeadingFormat { number @DotSep title } # appendix heading format - # @SubAppendixHeadingFont { Bold } # subappendix heading font - # @SubAppendixHeadingBreak { ragged 1.2fx nohyphen } # subappendix heading break - # @SubAppendixHeadingFormat { number @DotSep title } # subappendix heading format - # @SubSubAppendixHeadingFont { Slope } # sub-subapp. heading font - # @SubSubAppendixHeadingBreak { ragged 1.2fx nohyphen } # sub-subappendix heading break - # @SubSubAppendixHeadingFormat{ number @DotSep title } # sub-subappendix heading format - # @ReferencesHeadingFont { Bold } # references heading font - # @ReferencesHeadingBreak { ragged 1.2fx nohyphen } # references heading break - # @ReferencesHeadingFormat { title } # references heading format - # @IndexHeadingFont { Bold } # index heading font - # @IndexHeadingBreak { ragged 1.2fx nohyphen } # index heading break - # @IndexHeadingFormat { title } # index heading format - # @IndexAHeadingFont { Bold } # index A heading font - # @IndexAHeadingBreak { ragged 1.2fx nohyphen } # index A heading break - # @IndexAHeadingFormat { title } # index A heading format - # @IndexBHeadingFont { Bold } # index B heading font - # @IndexBHeadingBreak { ragged 1.2fx nohyphen } # index B heading break - # @IndexBHeadingFormat { title } # index B heading format - # @SectionGap { 2.00v } # gap between sections - # @SubSectionGap { 1.50v } # gap between subsections - # @SubSubSectionGap { 1.50v } # gap between sub-subsections - # @AppendixGap { 2.00v } # gap between appendices - # @SubAppendixGap { 1.50v } # gap between subappendices - # @SubSubAppendixGap { 1.50v } # gap between sub-subapps - # @SectionInContents { Yes } # list sections in contents - # @SubSectionInContents { Yes } # list subsections - # @SubSubSectionInContents { No } # list sub-subsections - # @AppendixInContents { Yes } # list appendices - # @SubAppendixInContents { Yes } # list subappendices - # @SubSubAppendixInContents { No } # list sub-subappendices - # @ReferencesInContents { Yes } # list references - # @IndexInContents { Yes } # list index in contents - # @IndexAInContents { Yes } # list index A - # @IndexBInContents { Yes } # list index B - # @SectionNumInTheorems { No } # section numbers in theorems - # @SubSectionNumInTheorems { No } # subsection numbers in theorems - # @SubSubSectionNumInTheorems { No } # sub-subsection numbers in theorems - # @AppendixNumInTheorems { No } # appendix numbers in theorems - # @SubAppendixNumInTheorems { No } # subappendix numbers in theorems - # @SubSubAppendixNumInTheorems{ No } # sub-subappendix nums. in theorems - # @SectionNumInDisplays { Yes } # section numbers in displays - # @SubSectionNumInDisplays { No } # subsection numbers in displays - # @SubSubSectionNumInDisplays { No } # sub-subsection numbers in displays - # @AppendixNumInDisplays { Yes } # appendix numbers in displays - # @SubAppendixNumInDisplays { No } # subappendix numbers in displays - # @SubSubAppendixNumInDisplays{ No } # sub-subappendix nums in displays - # @SectionNumInFigures { Yes } # section number in figures - # @SubSectionNumInFigures { No } # subsection number in figures - # @SubSubSectionNumInFigures { No } # subsubsection number in figures - # @AppendixNumInFigures { Yes } # appendix number in figures - # @SubAppendixNumInFigures { No } # subappendix number in figures - # @SubSubAppendixNumInFigures { No } # sub-subappendix number in figures - # @SectionNumInTables { Yes } # section number in tables - # @SubSectionNumInTables { No } # subsection number in tables - # @SubSubSectionNumInTables { No } # subsubsection number in tables - # @AppendixNumInTables { Yes } # appendix number in tables - # @SubAppendixNumInTables { No } # subappendix number in tables - # @SubSubAppendixNumInTables { No } # sub-subappendix number in tables -} - - -############################################################################### -# # -# @Database (and @SysDatabase) clauses go here. # -# # -############################################################################### - -@SysDatabase @RefStyle { refstyle } # reference printing styles
deleted file mode 100644 --- a/scripts/control/base/DEMOcontrol.m +++ /dev/null @@ -1,80 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} DEMOcontrol -## Octave Control Systems Toolbox demo/tutorial program. The demo -## allows the user to select among several categories of @acronym{OCST} function: -## @example -## @group -## octave:1> DEMOcontrol -## Octave Controls System Toolbox Demo -## -## [ 1] System representation -## [ 2] Block diagram manipulations -## [ 3] Frequency response functions -## [ 4] State space analysis functions -## [ 5] Root locus functions -## [ 6] LQG/H2/Hinfinity functions -## [ 7] End -## @end group -## @end example -## Command examples are interactively run for users to observe the use -## of @acronym{OCST} functions. -## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m, -## moddmeo.m, rldemo.m} -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 - -function DEMOcontrol () - - while (1) - - clc (); - - k = 0; - - while (k > 8 || k < 1), - k = menu ("Octave Controls System Toolbox Demo", - "System representation", - "Block diagram manipulations", - "Frequency response functions", - "State space analysis functions", - "System model manipulations", - "Root locus functions", - "LQG/H2/Hinfinity functions", - "End"); - endwhile - - switch (k) - case (1) sysrepdemo (); - case (2) bddemo (); - case (3) frdemo (); - case (4) analdemo (); - case (5) moddemo (); - case (6) rldemo (); - case (7) dgkfdemo (); - case (8) return; - endswitch - - endwhile - -endfunction
deleted file mode 100644 --- a/scripts/control/base/Makefile.in +++ /dev/null @@ -1,89 +0,0 @@ -# Makefile for octave's scripts/control/base directory -# -# Copyright (C) 2000, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../../.. - -script_sub_dir = control/base - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = DEMOcontrol.m __bodquist__.m __freqresp__.m \ - __stepimp__.m analdemo.m are.m bddemo.m bode.m bode_bounds.m \ - controldemo.m ctrb.m damp.m dare.m dcgain.m dgram.m dkalman.m \ - dlqe.m dlqr.m dlyap.m dre.m frdemo.m freqchkw.m gram.m \ - impulse.m lqe.m lqg.m lqr.m lsim.m ltifr.m lyap.m nichols.m \ - nyquist.m obsv.m place.m pzmap.m rldemo.m rlocus.m step.m \ - tzero.m tzero2.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir) -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/base/__bodquist__.m +++ /dev/null @@ -1,171 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{f}, @var{w}, @var{rsys}] =} __bodquist__ (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx}) -## Used internally by @command{bode}, @command{nyquist}; compute system frequency response. -## -## @strong{Inputs} -## @table @var -## @item sys -## input system structure -## @item w -## range of frequencies; empty if user wants default -## @item out_idx -## @itemx in_idx -## names or indices of output/input signal names; empty if user wants all -## @item rname -## name of routine that called __bodquist__ ("bode", "nyquist", or "nichols") -## @end table -## @strong{Outputs} -## @table @var -## @item w -## list of frequencies -## @item f -## frequency response of sys; @math{f(ii) = f(omega(ii))} -## @item rsys -## system with selected inputs and outputs -## @end table -## -## @code{bode}, @code{nichols}, and @code{nyquist} share the same -## introduction, so the common parts are -## in __bodquist__. It contains the part that finds the number of arguments, -## determines whether or not the system is @acronym{SISO}, and computes the frequency -## response. Only the way the response is plotted is different between the -## these functions. -## @end deftypefn - -function [f, w, rsys] = __bodquist__ (sys, w, outputs, inputs, rname) - - ## check number of input arguments given - if (nargin != 5) - print_usage (); - endif - - ## check each argument to see if it's in the correct form - if (! isstruct (sys)) - error ("sys must be a system data structure"); - endif - - ## let __freqresp__ determine w if it's not already given - USEW = freqchkw (w); - - ## get initial dimensions (revised below if sysprune is called) - [nn, nz, mm, pp] = sysdimensions (sys); - - ## check for an output vector and to see whether it`s correct - if (! isempty (outputs)) - if (isempty (inputs)) - inputs = 1:mm; # use all inputs - warning ("%s: outputs specified but not inputs", rname); - elseif (is_signal_list (inputs) || ischar (inputs)) - inputs = sysidx (sys, "in", inputs); - endif - if (is_signal_list (outputs) || ischar (outputs)) - outputs = sysidx (sys, "out", outputs); - endif - sys = sysprune (sys, outputs, inputs); - [nn, nz, mm, pp] = sysdimensions (sys); - endif - - ## for speed in computation, convert local copy of - ## SISO state space systems to zero-pole form - if (is_siso (sys) && strcmp (sysgettype (sys), "ss")) - [zer, pol, k, tsam, inname, outname] = sys2zp (sys); - sys = zp (zer, pol, k, tsam, inname, outname); - endif - - ## get system frequency response - [f, w] = __freqresp__ (sys, USEW, w); - - phase = arg(f)*180.0/pi; - - if (! USEW) - ## smooth plots - pcnt = 5; # max number of refinement steps - dphase = 5; # desired max change in phase - dmag = 0.2; # desired max change in magnitude - while (pcnt) - pd = abs (diff (phase)); # phase variation - pdbig = find (pd > dphase); - - ## relative variation - lp = length (f); - lp1 = lp-1; - - fd = abs (diff (f)); - fm = max (abs ([f(1:lp1); f(2:lp)])); - fdbig = find (fd > fm/10); - - bigpts = union (fdbig, pdbig); - - if (isempty (bigpts)) - pcnt = 0; - else - pcnt = pcnt - 1; - wnew = []; - crossover_points = find (phase(1:lp1).*phase(2:lp) < 0); - pd(crossover_points) = abs (359.99+dphase - pd(crossover_points)); - np_pts = max (3, ceil(pd/dphase)+2); # phase points - nm_pts = max (3, ceil(log(fd./fm)/log(dmag))+2); # magnitude points - npts = min (5, max(np_pts, nm_pts)); - - w1 = log10 (w(1:lp1)); - w2 = log10 (w(2:lp)); - for ii = bigpts - if (npts(ii)) - wtmp = logspace (w1(ii), w2(ii), npts(ii)); - wseg(ii,1:(npts(ii)-2)) = wtmp(2:(npts(ii)-1)); - endif - endfor - wnew = vec(wseg)'; # make a row vector - wnew = wnew(find (wnew != 0)); - wnew = sort (wnew); - wnew = create_set (wnew); - if (isempty (wnew)) # all small crossovers - pcnt = 0; - else - ## get new freq resp points, combine with old, and sort. - [fnew, wnew] = __freqresp__ (sys, 1, wnew); - w = [w, wnew]; - f = [f, fnew]; - [w, idx] = sort (w); - f = f (idx); - phase = arg(f)*180.0/pi; - endif - endif - endwhile - endif - - ## ensure unique frequency values - [w, idx] = sort (w); - f = f(idx); - - w_diff = diff (w); - w_dup = find (w_diff == 0); - w_idx = complement (w_dup, 1:length(w)); - w = w(w_idx); - f = f(w_idx); - - ## set rsys to pruned system - rsys = sys; - -endfunction
deleted file mode 100644 --- a/scripts/control/base/__freqresp__.m +++ /dev/null @@ -1,129 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __freqresp__ (@var{sys}, @var{USEW}, @var{w}) -## Frequency response function - used internally by @command{bode}, @command{nyquist}. -## minimal argument checking; ``do not attempt to do this at home''. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## @item USEW -## returned by @code{freqchkw} -## @item optional -## must be present if @var{USEW} is true (nonzero) -## @end table -## @strong{Outputs} -## @table @var -## @item @var{out} -## vector of finite @math{G(j*w)} entries (or @math{||G(j*w)||} for @acronym{MIMO}) -## @item w -## vector of corresponding frequencies -## @end table -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 11, 1994 - -function [ff, w] = __freqresp__ (sys, USEW, w); - - ## SYS_INTERNAL accesses members of system data structure - - ## Check Args - if (nargin < 2 || nargin > 4) - print_usage (); - elseif (USEW && nargin < 3) - error ("USEW = 1 but w was not passed."); - elseif (USEW && isempty (w)) - warning ("USEW = 1 but w is empty; setting USEW=0"); - USEW = 0; - endif - - DIGITAL = is_digital (sys); - - ## compute default w if needed - if (! USEW) - if (is_siso (sys)) - sys = sysupdate (sys, "zp"); - [zer, pol] = sys2zp (sys); - else - zer = tzero (sys); - pol = eig (sys2ss (sys)); - endif - - ## get default frequency range - [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, sysgettsam (sys)); - w = logspace (wmin, wmax, 50); - else - w = reshape (w, 1, length (w)); # make sure it's a row vector - endif - - ## now get complex values of s or z - if (DIGITAL) - jw = exp (i*w*sysgettsam(sys)); - else - jw = i*w; - endif - - [nn, nz, mm, pp] = sysdimensions (sys); - - ## now compute the frequency response - divide by zero yields a warning - if (strcmp (sysgettype (sys), "zp")) - ## zero-pole form (preferred) - [zer, pol, sysk] = sys2zp (sys); - ff = ones (size (jw)); - l1 = min (length(zer)*(1-isempty(zer)), length(pol)*(1-isempty(pol))); - for ii = 1:l1 - ff = ff .* (jw - zer(ii)) ./ (jw - pol(ii)); - endfor - - ## require proper transfer function, so now just get poles. - for ii = (l1+1):length(pol) - ff = ff ./ (jw - pol(ii)); - endfor - ff = ff*sysk; - elseif (strcmp (sysgettype (sys), "tf")) - ## transfer function form - [num, den] = sys2tf (sys); - ff = polyval (num, jw) ./ polyval (den, jw); - elseif (mm==pp) - ## The system is square; do state-space form bode plot - [sysa, sysb, sysc, sysd, tsam, sysn, sysnz] = sys2ss (sys); - n = sysn + sysnz; - for ii = 1:length(jw); - ff(ii) = det (sysc*((jw(ii).*eye(n)-sysa)\sysb)+sysd); - endfor - else - ## Must be state space... bode - [sysa, sysb, sysc, sysd, tsam, sysn, sysnz] = sys2ss (sys); - n = sysn + sysnz; - for ii = 1:length(jw); - ff(ii) = norm (sysc*((jw(ii)*eye(n)-sysa)\sysb)+sysd); - endfor - endif - - w = reshape (w, 1, length (w)); - ff = reshape (ff, 1, length (ff)); - -endfunction -
deleted file mode 100644 --- a/scripts/control/base/__stepimp__.m +++ /dev/null @@ -1,276 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{y}, @var{t}] =} __stepimp__ (@var{sitype}, @var{sys} [, @var{inp}, @var{tstop}, @var{n}]) -## Impulse or step response for a linear system. -## The system can be discrete or multivariable (or both). -## This m-file contains the ``common code'' of step and impulse. -## -## Produces a plot or the response data for system @var{sys}. -## -## Limited argument checking; ``do not attempt to do this at home''. -## Used internally in @command{impulse}, @command{step}. Use @command{step} -## or @command{impulse} instead. -## @seealso{step, impulse} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: October 2, 1997 -## based on lsim.m of Scottedward Hodel - -function [y, t] = __stepimp__ (sitype, sys, inp, tstop, n) - - if (sitype == 1) - IMPULSE = 0; - elseif (sitype == 2) - IMPULSE = 1; - else - error ("__stepimp__: invalid sitype argument"); - endif - sys = sysupdate (sys, "ss"); - - USE_DEF = 0; # default tstop and n if we have to give up - N_MIN = 50; # minimum number of points - N_MAX = 2000; # maximum number of points - T_DEF = 10.0; # default simulation time - - ## collect useful information about the system - [ncstates, ndstates, NIN, NOUT] = sysdimensions (sys); - TSAMPLE = sysgettsam (sys); - - if (nargin < 3) - inp = 1; - elseif (inp < 1 || inp > NIN) - error ("__stepimp__: argument inp out of range"); - endif - - DIGITAL = is_digital (sys); - if (DIGITAL) - NSTATES = ndstates; - if (isa (TSAMPLE, "single") && TSAMPLE < eps ("single") || - !isa (TSAMPLE, "single") && TSAMPLE < eps) - error ("__stepimp__: sampling time of discrete system too small") - endif - else - NSTATES = ncstates; - endif - if (NSTATES < 1) - error ("__stepimp__: pure gain block (n_states < 1), step response is trivial"); - endif - if (nargin < 5) - ## we have to compute the time when the system reaches steady state - ## and the step size - ev = eig (sys2ss (sys)); - if (DIGITAL) - ## perform bilinear transformation on poles in z - for i = 1:NSTATES - pole = ev(i); - if (abs(pole + 1) < 1.0e-10) - ev(i) = 0; - else - ev(i) = 2 / TSAMPLE * (pole - 1) / (pole + 1); - endif - endfor - endif - ## remove poles near zero from eigenvalue array ev - nk = NSTATES; - for i = 1:NSTATES - if (abs (real (ev(i))) < 1.0e-10) - ev(i) = 0; - nk = nk - 1; - endif - endfor - if (nk == 0) - USE_DEF = 1; - ## printf("##STEPIMP-DEBUG: using defaults.\n"); - else - ev = ev(find (ev)); - x = max (abs (ev)); - t_step = 0.2 * pi / x; - x = min (abs (real (ev))); - t_sim = 5.0 / x; - ## round up - yy = 10^(ceil (log10 (t_sim)) - 1); - t_sim = yy * ceil (t_sim / yy); - ## printf("##STEPIMP-DEBUG: nk=%d t_step=%f t_sim=%f\n", - ## nk, t_step, t_sim); - endif - endif - - if (DIGITAL) - ## ---- sampled system - if (nargin == 5) - n = round (n); - if (n < 2) - error ("__stepimp__: n must not be less than 2.") - endif - else - if (nargin == 4) - ## n is unknown - elseif (nargin >= 1) - ## tstop and n are unknown - if (USE_DEF) - tstop = (N_MIN - 1) * TSAMPLE; - else - tstop = t_sim; - endif - endif - n = floor (tstop / TSAMPLE) + 1; - if (n < 2) - n = 2; - endif - if (n > N_MAX) - n = N_MAX; - printf ("Hint: number of samples limited to %d by default.\n", \ - N_MAX); - printf (" ==> increase \"n\" parameter for longer simulations.\n"); - endif - endif - tstop = (n - 1) * TSAMPLE; - t_step = TSAMPLE; - else - ## ---- continuous system - if (nargin == 5) - n = round (n); - if (n < 2) - error("step: n must not be less than 2.") - endif - t_step = tstop / (n - 1); - else - if (nargin == 4) - ## only n in unknown - if (USE_DEF) - n = N_MIN; - t_step = tstop / (n - 1); - else - n = floor (tstop / t_step) + 1; - endif - else - ## tstop and n are unknown - if (USE_DEF) - tstop = T_DEF; - n = N_MIN; - t_step = tstop / (n - 1); - else - tstop = t_sim; - n = floor (tstop / t_step) + 1; - endif - endif - if (n < N_MIN) - n = N_MIN; - t_step = tstop / (n - 1); - endif - if (n > N_MAX) - tstop = (n - 1) * t_step; - t_step = tstop / (N_MAX - 1); - n = N_MAX; - endif - endif - tstop = (n - 1) * t_step; - [jnk,B] = sys2ss (sys); - B = B(:,inp); - sys = c2d (sys, t_step); - endif - ## printf("##STEPIMP-DEBUG: t_step=%f n=%d tstop=%f\n", t_step, n, tstop); - - F = sys.a; - G = sys.b(:,inp); - C = sys.c; - D = sys.d(:,inp); - y = zeros (NOUT, n); - t = linspace (0, tstop, n); - - if (IMPULSE) - if (! DIGITAL && D'*D > 0) - error ("impulse: D matrix is nonzero, impulse response infinite.") - endif - if (DIGITAL) - y(:,1) = D / t_step; - x = G / t_step; - else - x = B; - y(:,1) = C * x; - x = F * x; - endif - for i = 2:n - y(:,i) = C * x; - x = F * x; - endfor - if (DIGITAL) - y *= t_step; - endif - else - x = zeros (NSTATES, 1); - for i = 1:n - y(:,i) = C * x + D; - x = F * x + G; - endfor - endif - - if (nargout == 0) - if (IMPULSE) - gm = zeros (NOUT, 1); - tt = "impulse"; - else - ssys = ss (F, G, C, D, t_step); - gm = dcgain (ssys); - tt = "step"; - endif - ncols = floor (sqrt (NOUT)); - nrows = ceil (NOUT / ncols); - for i = 1:NOUT - if (nrows > 1 || ncols > 1) - subplot (nrows, ncols, i); - endif - if (DIGITAL) - [ts, ys] = stairs (t, y(i,:)); - ts = ts(1:2*n-2)'; - ys = ys(1:2*n-2)'; - if (length (gm) > 0) - yy = [ys; gm(i)*ones(size(ts))]; - else - yy = ys; - endif - plot (ts, yy); - grid ("on"); - xlabel ("time [s]"); - ylabel ("y(t)"); - else - if (length (gm) > 0) - yy = [y(i,:); gm(i)*ones(size(t))]; - else - yy = y(i,:); - endif - plot (t, yy); - grid ("on"); - xlabel ("time [s]"); - ylabel ("y(t)"); - endif - title (sprintf ("%s: | %s -> %s", tt, - sysgetsignals (sys, "in", inp, 1), - sysgetsignals (sys, "out", i, 1))); - endfor - y = []; - t = []; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/analdemo.m +++ /dev/null @@ -1,244 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} analdemo () -## Octave Controls toolbox demo: State Space analysis demo -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## Updated by John Ingram December 1996 - -function analdemo () - - while (1) - clc - k=0; - while(k > 8 || k < 1) - k = menu("Octave State Space Analysis Demo", ... - "System gramians (gram, dgram)", ... - "System zeros (tzero)", ... - "Continuous => Discrete and Discrete => Continuous conversions (c2d,d2c)", ... - "Algebraic Riccati Equation (are, dare)", ... - "Balanced realizations (balreal, dbalreal)", ... - "Open loop truncations via Hankel singular values (balreal, dbalreal)", ... - "SISO pole placement", ... - "Return to main demo menu"); - endwhile - if (k == 1) - clc - help dgram - prompt - - clc - disp("System Gramians: (see Moore, IEEE T-AC, 1981) \n"); - disp("Example #1, consider the discrete time state space system:\n"); - a=[1, 5, -8.4; 1.2, -3, 5; 1, 7, 9] - b=[1, 5; 2, 6; -4.4, 5] - c=[1, -1.5, 2; 6, -9.8, 1] - d=0 - prompt - disp("\nThe discrete controllability gramian is computed as follows:"); - cmd = "gramian = dgram(a, b);"; - run_cmd; - disp("Results:\n"); - gramian = dgram(a,b) - disp("Variable Description:\n"); - disp("gramian => discrete controllability gramian"); - disp("a, b => a and b matrices of discrete time system\n"); - disp("A dual approach may be used to compute the observability gramian."); - prompt - clc - - help gram - prompt - clc - - disp("Example #2, consider the continuous state space system:\n"); - a=[1, 3, -10.2; 3.7, -2, 9; 1, 3, 7] - b=[1, 12; 6, 2; -3.8, 7] - c=[1, -1.1, 7; 3, -9.8, 2] - d=0 - prompt - disp("\nThe continuous controllability gramian is computed as follows:"); - cmd = "gramian = gram(a, b);"; - run_cmd; - disp("Results:\n"); - gramian = gram(a,b) - disp("Variable Description:\n"); - disp("gramian => continuous controllability gramian"); - disp("a, b => a and b matrices of continuous time system\n"); - disp("A dual approach may be used to compute the observability gramian."); - prompt - clc - - - elseif (k == 2) - clc - help tzero - prompt - - disp("System zeros (tzero) example\n"); - disp("Example #1, consider the state space system:\n"); - a=[0, 1, 0; -10, -2, 0; -10, 0, -8] - b=[0; 1; 9] - c=[-10, 0, -4] - d=1 - prompt - disp("\nTo compute the zeros of this system, enter the following command:\n"); - cmd = "zer = tzero(a,b,c,d);"; - run_cmd; - disp("Results:\n"); - zer = tzero(a,b,c,d) - disp("Variable Description:\n"); - disp("zer => zeros of state space system"); - disp("a, b, c, d => state space system used as input argument"); - prompt - clc - - disp("Example #2, consider the state space system from example 1 again:"); - cmd = "sys = ss(a,b,c,d);"; - disp(cmd); - eval(cmd); - sysout(sys); - disp("\nThe zeros of this system can also be calculated directly from the"); - disp("system variable:"); - cmd = "zer = tzero(sys);"; - run_cmd; - disp("Results:\n") - zer = tzero(sys) - disp("Variable Description:\n"); - disp("zer => zeros of state space system"); - disp("sys => state space system used as input argument"); - prompt - clc - - elseif (k == 3) - clc - help c2d - prompt - - clc - disp("Continuous => Discrete and Discrete => Continuous conversions (c2d,d2c)"); - disp("\nExample #1, consider the following continuous state space system"); - cmd = "sys_cont = ss([-11, 6; -15, 8], [1; 2], [2, -1], 0);"; - eval(cmd); - disp(cmd); - disp("Examine the poles and zeros of the continuous system:"); - sysout(sys_cont,"all"); - disp("\nTo convert this to a discrete system, a sampling time is needed:"); - cmd = "Tsam = 0.5;"; - run_cmd; - disp("\nNow convert to a discrete system with the command:"); - cmd = "sys_disc = c2d(sys_cont,Tsam);"; - run_cmd; - disp("Examine the poles and zeros of the discrete system:"); - sysout(sys_disc,"all"); - prompt - clc - - disp("\nNow we will convert the discrete system back to a continuous system"); - disp("using the d2c command:"); - help d2c - prompt - cmd = "new_sys_cont = d2c(sys_disc);"; - run_cmd; - disp("\nExamine the poles and zeros of the discrete system:"); - sysout(new_sys_cont,"all"); - prompt - - elseif (k == 4) - clc - help are - prompt - clc - - disp("Algebraic Riccati Equation (are, dare)"); - - disp("\nExample #1, consider the continuous state space system:\n"); - a=[1, 3, -10.2; 3.7, -2, 9; 1, 3, 7] - b=[1, 12; 6, 2; -3.8, 7] - c=[1, -1.1, 7; 3, -9.8, 2] - d=0 - prompt - disp("\nThe solution to the continuous algebraic riccati equation"); - disp("is computed as follows:"); - cmd = "x_cont = are(a, b, c);"; - run_cmd; - disp("Results:\n") - x_cont = are(a,b,c) - disp("Variable Description:\n") - disp("x_cont => solution to the continuous algebraic riccati equation"); - disp("a, b, c => a, b, and c matrices of continuous time system\n"); - prompt - - clc - help dare - prompt - clc - - disp("Example #2, consider the discrete time state space system:\n"); - a=[1, 5, -8.4; 1.2, -3, 5; 1, 7, 9] - b=[1, 5; 2, 6; -4.4, 5] - c=[1, -1.5, 2; 6, -9.8, 1] - d=0 - r=eye(columns(b)) - prompt - disp("\nThe solution to the continuous algebraic riccati equation"); - disp("is computed as follows:"); - cmd = "x_disc = dare(a, b, c, r);"; - run_cmd; - disp("Results:\n") - x_disc = dare(a,b,c,r) - disp("Variable Description:\n"); - disp("x_disc => solution to the discrete algebraic riccati equation"); - disp("a, b, c => a, b and c matrices of discrete time system\n"); - prompt - clc - - elseif (k == 5) - disp("--- Balanced realization: not yet implemented") - elseif (k == 6) - disp("--- Open loop balanced truncation: not yet implemented") - elseif (k == 7) - disp("SISO pole placement example:") - cmd = "sys=tf(1, [1, -2, 1]);"; - run_cmd - disp("System in zero-pole form is:") - cmd = "sysout(sys,\"zp\");"; - run_cmd - disp("and in state space form:") - cmd = "sysout(sys,\"ss\");"; - run_cmd - disp("Desired poles at -1, -1"); - cmd = "K=place(sys, [-1, -1])"; - run_cmd - disp("Check results:") - cmd = "[A,B] = sys2ss(sys);"; - run_cmd - cmd = "poles=eig(A-B*K)"; - run_cmd - prompt - elseif (k == 8) - return - endif - endwhile -endfunction -
deleted file mode 100644 --- a/scripts/control/base/are.m +++ /dev/null @@ -1,122 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{x} =} are (@var{a}, @var{b}, @var{c}, @var{opt}) -## Solve the Algebraic Riccati Equation -## @iftex -## @tex -## $$ -## A^TX + XA - XBX + C = 0 -## $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a' * x + x * a - x * b * x + c = 0 -## @end example -## @end ifinfo -## -## @strong{Inputs} -## @noindent -## for identically dimensioned square matrices -## @table @var -## @item a -## @var{n} by @var{n} matrix; -## @item b -## @var{n} by @var{n} matrix or @var{n} by @var{m} matrix; in the latter case -## @var{b} is replaced by @math{b:=b*b'}; -## @item c -## @var{n} by @var{n} matrix or @var{p} by @var{m} matrix; in the latter case -## @var{c} is replaced by @math{c:=c'*c}; -## @item opt -## (optional argument; default = @code{"B"}): -## String option passed to @code{balance} prior to ordered Schur decomposition. -## @end table -## -## @strong{Output} -## @table @var -## @item x -## solution of the @acronym{ARE}. -## @end table -## -## @strong{Method} -## Laub's Schur method (@acronym{IEEE} Transactions on -## Automatic Control, 1979) is applied to the appropriate Hamiltonian -## matrix. -## @seealso{balance, dare} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 - -function x = are (a, b, c, opt) - - if (nargin == 3 || nargin == 4) - if (nargin == 4) - if (! (ischar (opt) - && (strcmp (opt, "N") || strcmp (opt, "P") - || strcmp (opt, "S") || strcmp (opt, "B") - || strcmp (opt, "n") || strcmp (opt, "p") - || strcmp (opt, "s") || strcmp (opt, "b")))) - warning ("are: opt has an invalid value; setting to B"); - opt = "B"; - endif - else - opt = "B"; - endif - if ((n = issquare(a)) == 0) - error ("are: a is not square"); - endif - - if (is_controllable(a,b) == 0) - warning ("are: a, b are not controllable"); - endif - if ((m = issquare (b)) == 0) - b = b * b'; - m = rows (b); - endif - if (is_observable (a, c) == 0) - warning ("are: a,c are not observable"); - endif - if ((p = issquare (c)) == 0) - c = c' * c; - p = rows (c); - endif - if (n != m || n != p) - error ("are: a, b, c not conformably dimensioned."); - endif - -## Should check for controllability/observability here -## use Boley-Golub (Syst. Contr. Letters, 1984) method, not the -## -## n-1 -## rank ([ B A*B ... A^ *B]) method - - [d, h] = balance ([a, -b; -c, -a'], opt); - [u, s] = schur (h, "A"); - u = d * u; - n1 = n + 1; - n2 = 2 * n; - x = u (n1:n2, 1:n) / u (1:n, 1:n); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/bddemo.m +++ /dev/null @@ -1,613 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} bddemo (@var{inputs}) -## Octave Controls toolbox demo: Block Diagram Manipulations demo. -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## Modified by A S Hodel Summer-Fall 1996 - -function bddemo () - - sav_page = page_screen_output (); - page_screen_output (1); - - while (1) - clc - k=0; - while(k > 14 || k < 1) - k = menu("Octave Block Diagram Manipulations Demo", ... - "sysadd/syssub: F(s) = G(s) +/- H(s)", ... - "sysappend: add new inputs/outputs", ... - "syssetsignals: change names of inputs, outputs, and/or states", ... - "sysconnect: connect specified system inputs/outputs", ... - "syscont/sysdisc: extract the continuous (discrete) part of a system", ... - "sysdup: duplicate specified inputs/outputs", ... - "sysgroup: group two systems into a single system,", ... - "sysmult: F(s) = G(s)*H(s) (series connection)", ... - "sysprune: keep only specified inputs/outputs", ... - "sysscale: scale inputs/outputs by specified gain matrices", ... - "parallel: parallel connection of two systems", ... - "buildssic: the combination of all", ... - "Design examples:", ... - "Return to main demo menu"); - endwhile - if (k == 1) - clc - disp("sysadd: add two systems together") - disp("syssub: subtract F = G - H") - prompt - help sysadd - prompt - help syssub - prompt - disp("Example #1, \n") - cmd = "sys1 = tf([1 -1],[1 2 1]);"; - run_cmd - cmd = "sys2 = tf([1 -1],[1 2 3]);"; - run_cmd - disp("sys1=") - sysout(sys1); - prompt - disp("sys2=") - sysout(sys2); - cmd = "sys_sum1 = sysadd(sys1,sys1);"; - run_cmd - disp("This example adds sys1 to itself.") - cmd = "sysout(sys_sum1)"; - run_cmd - disp("Notice that the numerator is twice what it used to be.") - prompt - disp("Example 2:") - cmd = "sys_sub1 = syssub(sys1,sys2);"; - run_cmd - disp("Notice that sysadd (actually sysgroup, called by sysadd) lets you") - disp("know that your two systems had identical names for their states,") - disp("inputs and outputs. The warning message is perfectly harmless,") - disp("and is provided for user information only.") - disp("sys_sub1=") - sysout(sys_sub1) - disp("Notice that, since the two transfer functions had different") - disp("denominators, syssub converted the primary system type to ") - disp("state space. This is the typical behavior unless the") - disp("the two systems are both SISO, they both have the same poles,") - disp("and at least one of them has tf for its primary system type."); - prompt - elseif (k == 2) - disp("sysappend: add new inputs and/or outputs to a system") - help sysappend - prompt - disp("Consider a double-integrator system:") - sys = tf(1, [1, 0, 0]); - sys=sysupdate(sys,"ss"); - sysout(sys,"ss"); - disp("We add a velocity disturbance input as follows:") - cmd = "sys1=sysappend(sys,[1;0]);"; - run_cmd - sysout(sys1,"ss"); - disp("Names of inputs can be included as follows:") - cmd = "sys1=sysappend(sys,[1;0], [],[],[],\"Disturb\");"; - run_cmd - disp("Notice that empty matrices can be listed for the D matrix if") - disp("all entries are zeros.") - disp(" ") - disp("sys1 is thus:") - sysout(sys1); - prompt - elseif (k == 3) - disp("syssetsignals:") - help syssetsignals - disp("Example system"); - a = rand(3,3); - b = rand(3,2); - c = rand(2,3); - sys = ss(a,b,c); - sysout(sys); - prompt - disp("Change state names to larry, moe, and curly as follows:") - cmd = 'sys = syssetsignals(sys,"st",{"larry","moe" , "curly"});'; - run_cmd - disp("Indicate that output 2 is discrete-time:") - cmd = 'sys = syssetsignals(sys,"yd",1,2);'; - run_cmd - disp("Change output 2 name to \"Vir\""); - cmd = "sys = syssetsignals(sys,\"out\",\"Vir\",2);"; - run_cmd - disp("Resulting system is:") - sysout(sys); - prompt - elseif (k == 4) - help sysconnect - prompt - disp("********* N O T E *********") - disp("sysconnect is demonstrated fully in the design examples (option 13)"); - prompt - elseif (k == 5) - disp("syscont and sysdisc: ") - disp("Example block diagram 1:") - disp(" ------------------ ---------------------"); - disp(" u_in ->| Discrete system |--->| Continuous system | ---> y_out"); - disp(" ------------------ ---------------------"); - sys1 = tf([1, 2],[1, 2, 1], 1,"u_in","y_disc"); - sys2 = tf([1, 0],[1, -3, -2],0,"c_in","y_out"); - sys = sysmult(sys2,sys1); - disp("Consider the hybrid system") - sysout(sys); - prompt - help syscont - disp("The continuous part of the system can be extracted with syscont") - cmd = "[csys,Acd,Ccd] = syscont(sys);"; - run_cmd - disp("The resulting csys is") - sysout(csys); - disp("Notice that B is 0; there is no purely continuous path from the") - disp("input to the output"); - prompt - help sysdisc - disp("The discrete part of the system can be extracted with sysdisc") - cmd = "[dsys,Adc,Cdc] = sysdisc(sys)"; - run_cmd - disp("The resulting dsys is") - sysout(dsys); - disp("sysdisc returns dsys=empty since sys has no discrete outputs."); - prompt - disp("Example block diagram 2:") - sys1 = tf([1, 2],[1, 2, 1], 1,"u_in","y_disc"); - sys2 = tf([1, 0],[1, -3, -2],0,"c_in","y_out"); - disp(" ---------------------") - disp(" u_in -->o-->| Discrete system | --------> y_disc") - disp(" ^ --------------------- |") - disp(" | | "); - disp(" -----------------------------|---") - disp(" | |") - disp(" ------------------------------ |") - disp(" | |") - disp(" v --------------------- |") - disp(" c_in -->o-->| continuous system | --------> y_out") - disp(" ---------------------") - disp("repeat the above example with sys=") - sys = sysgroup(sys1, sys2); - sysout(sys) - prompt - sys = sysconnect(sys,[1, 2],[2, 1]); - sysout(sys); - cmd = "[csys,Acd,Bcd] = syscont(sys);"; - run_cmd - cmd = "[dsys,Acd,Bcd] = sysdisc(sys);"; - run_cmd - disp("csys is now") - sysout(csys) - disp("dsys is now") - sysout(dsys); - prompt - elseif (k == 6) - help sysdup - prompt - disp("********* N O T E *********") - disp("sysdup is fully demonstrated in the design examples (option 13)") - prompt - elseif (k == 7) - help sysgroup - disp(" ") - prompt - disp("Example: combine two SISO systems together:") - cmd = "sys_a=tf([1, 2],[3, 4]);"; - run_cmd - cmd = "sys_b=tf([5, 6],[7, 8],1);"; - run_cmd - cmd = "sys_g=sysgroup(sys_a,sys_b);"; - run_cmd - disp("Notice that sysgroup warns you when you join a purely continuous") - disp("system to a purely discrete system. sysgroup also warns when") - disp("you join two systems that have common state, input, or output names.") - cmd = "sysout(sys_g)"; - run_cmd - disp("Since the grouped system is a multiple-input multiple-output system,") - disp("the output system is by default in state-space format.") - disp(" ") - disp("********* N O T E *********") - disp("sysgroup is further demonstrated in the design examples (option 13)") - prompt - elseif (k == 8) - help sysmult - disp("sysmult performs a series connection of two systems.") - disp("Example 1") - disp(" ") - disp(" ---------- ----------") - disp(" u --->| Bsys |---->| Asys |---> y") - disp(" ---------- ----------") - disp(" ") - Asys = tf(1,[1, 2, 1],0,"a_in","a_out"); - Bsys = tf([2, 3],[1, 3, 2],0,"b_in","b_out"); - disp("Asys=") - sysout(Asys); - disp("Bsys="); - sysout(Bsys); - cmd = "sys = sysmult(Asys,Bsys);"; - run_cmd - disp("sys =") - sysout(sys); - disp("Notice that sysmult automatically transforms to state space") - disp("internal representation. This is to avoid numerical problems") - disp("when multiplying polynomials"); - prompt - disp("Example 2: same system, except that Bsys is discrete-time"); - Bsys = tf([2, 3],[1, 3, 2],1e-2,"b_in","b_out"); - sysout(Bsys); - cmd = "sys = sysmult(Asys,Bsys);"; - run_cmd - disp("sys =") - sysout(sys); - prompt - elseif (k == 9) - help sysprune - prompt - disp("********* N O T E *********") - disp("sysprune is demonstrated in the design examples (option 13)"); - prompt - elseif (k == 10) - help sysscale - disp(" ") - prompt - disp("********* N O T E *********") - disp("See the design examples (option 13) for use of sysscale.") - prompt - elseif ( k == 11) - help parallel - disp("parallel operates by making a call to sysgroup and sysscale.") - disp("Example:") - sys1 = tf(1,[1, 1],0,"in1","out1"); - sys2 = tf(2,[1, 2],0,"in2","out2"); - disp("sys1=") - sysout(sys1); - disp("sys2=") - sysout(sys2); - cmd = "sysp = parallel(sys1,sys2);"; - run_cmd - disp("sysp=") - sysout(sysp); - prompt - disp("parallel can be used for multiple input systems as well:") - - in1 = {"u1.1","u1.2"}; - in2 = {"u2.1","u2.2"}; - out1 = {"y1.1","y1.2"}; - out2 = {"y2.1","y2.2"}; - - sys1 = ss([-1, 0; 0, -2],eye(2),eye(2),[]); - sys2 = ss([-2, 0; 0, -4],eye(2),eye(2),[]); - - sys1 = syssetsignals(sys1,"in",in1); - sys1 = syssetsignals(sys1,"out",out1); - - sys2 = syssetsignals(sys2,"in",in2); - sys2 = syssetsignals(sys2,"out",out2); - - disp("sys1=") - sysout(sys1); - disp("sys2=") - sysout(sys2); - cmd = "sysp = parallel(sys1,sys2);"; - run_cmd - disp("sysp=") - sysout(sysp); - prompt - elseif (k == 12) - ## buildssic description - disp(" ") - disp(" ---------------------------------------") - disp(" b u i l d s s i c") - disp(" (BUILD State Space InterConnections)") - disp(" ---------------------------------------") - disp(" ") - disp("buildssic builds a single system from up to 8 systems.") - disp("It's primary pupose is the forming of interconnections") - disp("for H2/H_inf designs and the building of closed loop") - disp("systems.") - disp("The interconnections may be of arbitrary complexity.") - disp("The use of buildssic is an alternative to sysgroup,") - disp("sysadd/syssub, sysappend, sysconnect, sysdup, sysmult") - disp("sysprune, sysscale, parallel etc.") - disp("In contrast to these functions buildssic does not") - disp("handle mixed continuous and discrete systems. However,") - disp("discrete systems can be connected as long as their") - disp("sampling times are identical. Another drawback: the") - disp("names of input/output and state variables are clobbered.") - disp("Of course, buildsysic is useful in combination with sysgroup,") - disp("sysmult etc.") - prompt - disp("********* N O T E *********") - disp("buildssic is demonstrated in the design examples (option 13)"); - prompt - elseif (k == 13) - disp("Design examples") - disp("Packed system matrices may be connected and manipulated") - disp("With the functions listed below:") - disp(" sysdup: duplicate selected inputs/outputs") - disp(" sysconnect: connect selected inputs/outputs") - disp(" sysgroup: group two systems together") - disp(" sysprune: prune a system to keep only selected inputs and outputs") - disp(" sysscale:pre/post multiply a system by constant matrices") - disp(" buildssic: connect systems with arbitrary complexity.") - prompt - disp("As a simple example, we will construct the system block ") - disp("diagram shown below ") - disp(" ") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" -^ -------- -------- |"); - disp(" | |"); - disp(" ------------------------------"); - disp(" ") - disp("where P(s) is the plant, K(s) is the controller.") - prompt - disp("Simple example: P(s) is a first order lag, K(s) is a PI ") - disp("controller") - nump = 1; - denp = [1, 1]; - disp("P(s)=") - tfout(nump,denp) - numk = [1, 1]; - denk = [1, 0]; - disp("\nK(s)=") - tfout(numk,denk); - prompt - disp("We'll show three approaches. ") - P = tf(nump,denp,0,"plant input","plant output"); - K = tf(numk, denk,0,"controller input","controller output"); - - meth = 0; - while(meth != 5) - disp("The first method consists of the following steps:") - disp(" step 1: create systems P and K") - disp(" step 2: group P and K together") - disp(" step 3: create a summing junction") - disp(" step 4: connect outputs to respective inputs") - disp(" step 5: prune the desired i/o connections") - disp("The second method is done as follows:") - disp(" step 1: create systems P and K and a summing block S") - disp(" step 2: connect P, K, and S in series") - disp(" step 3: connect y to inverted summing connection") - disp(" step 4: prune the desired i/o connections") - disp("The third method uses buildssic:") - disp(" step 1: GW = buildssic(...,K,P)") - disp(" ") - disp("Other design examples are in dgkfdemo (controldemo option 7)") - disp(" ") - meth = menu("Select design example method", ... - "Method 1 ", ... - "Method 1 (w/o algebraic loop warning)", ... - "Method 2", ... - "Method 3", ... - "Exit design examples"); - if(meth == 1) - disp(" * * * Method 1 * * *") - disp(" ") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" -^ -------- -------- |"); - disp(" | |"); - disp(" ------------------------------"); - disp(" ") - disp("Step 1: put plants in system format:"); - nump - denp - cmd = "P = tf(nump,denp,0,""plant input"",""plant output"");"; - run_cmd - disp("P=") - sysout(P) - prompt - numk - denk - cmd = "K = tf(numk, denk,0,""controller input"",""controller output"");"; - run_cmd - sysout(K) - prompt - disp("Step 2: group the systems together") - cmd = "PK = sysgroup(P,K);"; - run_cmd - disp("PK=") - sysout(PK); - prompt - disp(" ") - disp(" y2 u1") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" u2 -^ -------- -------- | y1"); - disp(" u3 | |"); - disp(" --------------------------------"); - disp(" ") - disp("The controller has two inputs summed together, r(t)") - disp("and the negative feedback of y(t)") - disp("Step 3a: duplicate controller input: (input 2 of PK)") - prompt - cmd = "PK = sysdup(PK,[],2);"; - run_cmd - disp("PK=") - sysout(PK); - disp("Notice that PK now has three inputs (input 3 is a duplicate "); - prompt("of input 2). Press return to go on") - disp("Step 3b: scale input 3 by -1") - cmd = "PK = sysscale(PK,[],diag([1, 1, -1]));"; - run_cmd - disp("PK=") - sysout(PK); - prompt - disp("Step 4: connect:") - disp(" y(t) (output 1) to the negative sum junction (input 3)") - disp(" u(t) (output 2) to plant input (input 1)") - disp("and prune extraneous inputs/outputs (retain input 2, output 1)") - prompt - out_connect = [1, 2] - in_connect = [3, 1] - cmd = "PK0 = sysconnect(PK,out_connect,in_connect);"; - run_cmd - prompt - disp("Notice that sysconnect detects the possibility of algebraic") - disp("connections when connecting inputs. Option 2 (Method 1 ") - disp("without algebraic loops) shows how to avoid this warning") - disp("by performing connections one at a time.") - prompt - disp("PK0=") - sysout(PK0); - disp("Notice that the connected inputs now have stars on their") - disp("names. This is how the Octave controls toolbox reminds you") - disp("that the loop has been closed around these inputs.") - prompt("Press return to prune extra inputs/outputs from system") - disp("Only keep plant output (output 1) and r(t) (input 2)") - cmd = "PK0 = sysprune(PK0,1,2);"; - run_cmd - disp("PK0=") - sysout(PK0); - prompt - disp("The resulting closed-loop transfer function is obtained as follows:") - cmd = "[num,den] = sys2tf(PK0);"; - run_cmd - prompt - disp("Transfer function is now") - tfout(num,den) - disp("You can check this: Pk0=PK/(1+PK), as expected") - prompt - elseif(meth == 2) - disp("Method 1 without algebraic loops") - disp(" ") - disp(" y2 u1") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" u2 -^ -------- -------- | y1"); - disp(" u3 | |"); - disp(" --------------------------------"); - disp(" ") - disp("Recall that sysconnect checks for algebraic loops. Although") - disp("Design option 1 gets a warning message about a possible"); - disp("algebraic loop, such a loop does not exist.") - disp("This can be seen by performing the connections one at a time"); - cmd = "PK = sysgroup(P,K);"; - run_cmd - disp("PK=") - sysout(PK); - disp("Create an additial inverted input to the controller.") - cmd = "PK = sysdup(PK,[],2);"; - run_cmd - cmd = "PK = sysscale(PK,[],diag([1,1,-1]));"; - run_cmd - disp("PK=") - sysout(PK); - disp("Connect controller to plant:") - cmd = "PK0 = sysconnect(PK,2,1);"; - run_cmd - disp("Plant output to negative control input") - cmd = "PK0 = sysconnect(PK0,1,3);"; - run_cmd - disp("Only keep plant output (output 1) and r(t) (input 2)") - cmd = "PK0 = sysprune(PK0,1,2);"; - run_cmd - disp("PK0=") - sysout(PK0); - prompt - disp("The transfer function form of PK0 is:") - sysout(PK0,"tf"); - prompt - elseif(meth == 3) - disp(" * * * Method 2 * * *") - disp(" ") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" -^ -------- -------- |"); - disp(" | |"); - disp(" ------------------------------"); - disp(" ") - disp("Step 1: We've already created systems P and K. Create a sum ") - disp("block as follows:") - cmd = 'S = ss([],[],[],[1, -1],0,0,0,[],{"r(t)", "y(t)"},"e(t)");'; - run_cmd - disp("(You may wish to look at help ss to see what the above does)"); - disp("S=") - sysout(S) - disp("notice that this is just a gain block that outputs e = r - y") - prompt - disp("Step 2: series connections of P, K, and S") - cmd = "PKS = sysmult(P,sysmult(K,S));"; - run_cmd - disp("PKS=") - sysout(PKS) - disp("Step 3: connect y to inverted input") - cmd = "PKcl = sysconnect(PKS,1,2);"; - run_cmd - disp("PKcl=") - sysout(PKcl) - disp("Step 4: prune desired inputs/outputs") - cmd = "PKcl=sysprune(PKcl,1,1);"; - run_cmd - disp("PKcl=") - sysout(PKcl) - prompt - elseif(meth == 4) - disp(" * * * Method 3 * * *") - disp(" ") - disp(" + -------- --------"); - disp(" r(t) ---> (+) --->| K(s) |--->| P(s) | ----> y(t)"); - disp(" -^ -------- -------- |"); - disp(" | |"); - disp(" ------------------------------"); - disp(" ") - disp("Step 1: We've already created systems P and K.") - disp(" Let us call buildssic:") - disp(" PKcl = buildssic([1, 2; 2, -1],[],[1],[2],P,K)") - disp(" ") - disp(" ^ ^ ^ ^ ^ ^") - disp(" | | | | | |") - disp(" Connection list ----+ | | | | |") - disp(" internal input list -----------+ | | | +-- controller") - disp(" output list --------------+ | |") - disp(" input list ------------------+ +---- plant") - disp(" ") - disp(" Connection list: connect input 1 (P) with output 2 (K)") - disp(" connect input 2 (K) with neg. outp. 1 (P)") - disp(" ") - disp(" int. inp. list: do not append internal inputs") - disp(" (e.g. the internal input of K (r-y))") - disp(" ") - disp(" output list: the only output is 1 (P), positive") - disp(" ") - disp(" input list: the only input is 2 (K), positive") - disp(" ") - cmd = "PKcl = buildssic([1, 2; 2, -1],[],[1],[2],P,K);" - run_cmd - sysout(PKcl) - prompt - disp("The transfer function form of PKcl is:") - sysout(PKcl,"tf"); - disp("You can check this: PKcl = PK / (1 + PK), as expected") - prompt - elseif(meth != 5) - disp("invalid selection") - endif - endwhile - - elseif (k == 14) - return - endif - endwhile - implict_str_to_num_ok = str_sav; - page_screen_output (sav_page); -endfunction
deleted file mode 100644 --- a/scripts/control/base/bode.m +++ /dev/null @@ -1,209 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{mag}, @var{phase}, @var{w}] =} bode (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx}) -## If no output arguments are given: produce Bode plots of a system; otherwise, -## compute the frequency response of a system data structure -## -## @strong{Inputs} -## @table @var -## @item sys -## a system data structure (must be either purely continuous or discrete; -## see is_digital) -## @item w -## frequency values for evaluation. -## -## if @var{sys} is continuous, then bode evaluates @math{G(jw)} where -## @math{G(s)} is the system transfer function. -## -## if @var{sys} is discrete, then bode evaluates G(@code{exp}(jwT)), where -## @itemize @bullet -## @item @math{T} is the system sampling time -## @item @math{G(z)} is the system transfer function. -## @end itemize -## -## @strong{Default} the default frequency range is selected as follows: (These -## steps are @strong{not} performed if @var{w} is specified) -## @enumerate -## @item via routine __bodquist__, isolate all poles and zeros away from -## @var{w}=0 (@var{jw}=0 or @math{@code{exp}(jwT)}=1) and select the frequency -## range based on the breakpoint locations of the frequencies. -## @item if @var{sys} is discrete time, the frequency range is limited -## to @math{jwT} in -## @ifinfo -## [0,2 pi /T] -## @end ifinfo -## @iftex -## @tex -## $[0,2\pi/T]$ -## @end tex -## @end iftex -## @item A "smoothing" routine is used to ensure that the plot phase does -## not change excessively from point to point and that singular -## points (e.g., crossovers from +/- 180) are accurately shown. -## -## @end enumerate -## @item out_idx -## @itemx in_idx -## -## The names or indices of outputs and inputs to be used in the frequency -## response. See @code{sysprune}. -## -## @strong{Example} -## @example -## bode(sys,[],"y_3", @{"u_1","u_4"@}); -## @end example -## @end table -## @strong{Outputs} -## @table @var -## @item mag -## @itemx phase -## the magnitude and phase of the frequency response @math{G(jw)} or -## @math{G(@code{exp}(jwT))} at the selected frequency values. -## @item w -## the vector of frequency values used -## @end table -## -## @enumerate -## @item If no output arguments are given, e.g., -## @example -## bode(sys); -## @end example -## bode plots the results to the screen. Descriptive labels are -## automatically placed. -## -## Failure to include a concluding semicolon will yield some garbage -## being printed to the screen (@code{ans = []}). -## -## @item If the requested plot is for an @acronym{MIMO} system, mag is set to -## @math{||G(jw)||} or @math{||G(@code{exp}(jwT))||} -## and phase information is not computed. -## @end enumerate -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 10, 1996 -## Based on previous code by R. Bruce Tenison, July 13, 1994 -## Modified by David Clem November 13, 1994 -## again by A. S. Hodel July 1995 (smart plot range, etc.) -## Modified by Kai P. Mueller September 28, 1997 (multiplot mode) - -function [mag_r, phase_r, w_r] = bode (sys, w, outputs, inputs, plot_style) - - ## check number of input arguments given - if (nargin < 1 || nargin > 5) - print_usage (); - endif - if (nargin < 2) - w = []; - endif - if (nargin < 3) - outputs = []; - endif - if (nargin < 4) - inputs = []; - endif - if (nargin < 5) - plot_style = "dB"; - endif - - if (strcmp (plot_style, "dB")) - do_db_plot = 1; - elseif (strcmp (plot_style, "mag")) - do_db_plot = 0; - else - error ("bode: invalid value of plot_style specified"); - endif - - [f, w, sys] = __bodquist__ (sys, w, outputs, inputs, "bode"); - bode_nin = sysdimensions (sys, "in"); - bode_nout = sysdimensions (sys, "out"); - - [stname, inname, outname] = sysgetsignals (sys); - systsam = sysgettsam (sys); - - ## Get the magnitude and phase of f. - mag = abs (f); - phase = unwrap (arg (f)) * 180.0 / pi; - - if (nargout < 1), - ## Plot the information - if (is_digital (sys)) - xlstr = sprintf ("Digital frequency w=rad/sec. pi/T=%g", pi/systsam); - tistr = "(exp(jwT)) "; - else - xlstr = "Frequency in rad/sec"; - tistr = "(jw)"; - endif - - wv = [min(w), max(w)]; - - is_siso_sys = is_siso (sys); - max_mag_positive = max (mag) > 0; - - if (is_siso_sys) - subplot (2, 1, 1); - endif - - if (do_db_plot) - md = 20 * log10 (mag); - semilogx (w, md); - if (max_mag_positive) - ylabel ("Gain in dB"); - axvec = axis2dlim ([w(:), md(:)]); - axvec(1:2) = wv; - axis (axvec); - endif - else - loglog (w, mag); - ylabel ("Gain |Y/U|") - endif - xlabel (xlstr); - grid ("on"); - - if (is_siso_sys) - title (sprintf ("|[Y/U]%s|, u=%s, y=%s", tistr, inname{1}, outname{1})); - else - title (sprintf ("||Y(%s)/U(%s)||", tistr, tistr)); - disp ("MIMO plot from") - disp (__outlist__(inname," ")); - disp ("to") - disp (__outlist__(outname," ")); - endif - - if (is_siso_sys) - subplot (2, 1, 2); - axvec = axis2dlim ([w(:), phase(:)]); - axvec(1:2) = wv; - semilogx (w, phase); - axis (axvec); - xlabel (xlstr); - ylabel ("Phase in deg"); - title (sprintf ("phase([Y/U]%s), u=%s, y=%s", - tistr, inname{1}, outname{1})); - grid ("on"); - endif - else - mag_r = mag; - phase_r = phase; - w_r = w; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/bode_bounds.m +++ /dev/null @@ -1,110 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{wmin}, @var{wmax}] =} bode_bounds (@var{zer}, @var{pol}, @var{dflg}, @var{tsam}) -## Get default range of frequencies based on cutoff frequencies of system -## poles and zeros. -## Frequency range is the interval -## @iftex -## @tex -## $ [ 10^{w_{min}}, 10^{w_{max}} ] $ -## @end tex -## @end iftex -## @ifinfo -## [10^@var{wmin}, 10^@var{wmax}] -## @end ifinfo -## -## Used internally in @command{__freqresp__} (@command{bode}, @command{nyquist}) -## @end deftypefn - -function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam) - - if (nargin != 4) - print_usage (); - endif - - ## make sure zer,pol are row vectors - if (! isempty (pol)) - pol = reshape (pol, 1, length (pol)); - endif - if (! isempty (zer)) - zer = reshape (zer, 1, length (zer)); - endif - - if (isa (zer, "single") || isa (pol, "single")) - myeps = eps ("single"); - else - myeps = eps; - endif - - ## check for natural frequencies away from omega = 0 - if (DIGITAL) - ## The 2nd conditions prevents log(0) in the next log command - iiz = find (abs(zer-1) > norm(zer)*myeps && abs(zer) > norm(zer)*myeps); - iip = find (abs(pol-1) > norm(pol)*myeps && abs(pol) > norm(pol)*myeps); - - ## avoid dividing empty matrices, it would work but looks nasty - if (! isempty (iiz)) - czer = log (zer(iiz))/tsam; - else - czer = []; - endif - - if (! isempty (iip)) - cpol = log (pol(iip))/tsam; - else - cpol = []; - endif - else - ## continuous - iip = find (abs(pol) > norm(pol)*myeps); - iiz = find (abs(zer) > norm(zer)*myeps); - - if (! isempty (zer)) - czer = zer(iiz); - else - czer = []; - endif - if (! isempty (pol)) - cpol = pol(iip); - else - cpol = []; - endif - endif - - if (isempty (iip) && isempty (iiz)) - ## no poles/zeros away from omega = 0; pick defaults - wmin = -1; - wmax = 3; - else - wmin = floor (log10 (min (abs ([cpol, czer])))); - wmax = ceil (log10 (max (abs ([cpol, czer])))); - endif - - ## expand to show the entirety of the "interesting" portion of the plot - wmin--; - wmax++; - - ## run digital frequency all the way to pi - if (DIGITAL) - wmax = log10 (pi/tsam); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/controldemo.m +++ /dev/null @@ -1,31 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} controldemo () -## Control Systems Toolbox demo. -## @seealso{Demo programs: bddemo, frdemo, analdemo, moddmeo, rldemo} -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 - -function controldemo () - DEMOcontrol (); -endfunction
deleted file mode 100644 --- a/scripts/control/base/ctrb.m +++ /dev/null @@ -1,70 +0,0 @@ -## Copyright (C) 1997, 2000, 2002, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} ctrb (@var{sys}, @var{b}) -## @deftypefnx {Function File} {} ctrb (@var{a}, @var{b}) -## Build controllability matrix: -## @iftex -## @tex -## $$ Q_s = [ B AB A^2B \ldots A^{n-1}B ] $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## 2 n-1 -## Qs = [ B AB A B ... A B ] -## @end example -## @end ifinfo -## -## of a system data structure or the pair (@var{a}, @var{b}). -## -## @command{ctrb} forms the controllability matrix. -## The numerical properties of @command{is_controllable} -## are much better for controllability tests. -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: November 4, 1997 -## based on is_controllable.m of Scottedward Hodel - -function Qs = ctrb (sys, b) - - if (nargin == 2) - a = sys; - elseif (nargin == 1 && isstruct (sys)) - sysupdate (sys, "ss"); - [a, b] = sys2ss (sys); - else - print_usage (); - endif - - if (! is_abcd (a, b)) - Qs = []; - else - ## no need to check dimensions, we trust is_abcd(). - [na, ma] = size (a); - ## using imb avoids name conflict with the "mb" function - [inb, imb] = size (b); - Qs = zeros (na, ma*imb); - for i = 1:na - Qs(:,(i-1)*imb+1:i*imb) = b; - b = a * b; - endfor - endif -endfunction
deleted file mode 100644 --- a/scripts/control/base/damp.m +++ /dev/null @@ -1,89 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} damp (@var{p}, @var{tsam}) -## Displays eigenvalues, natural frequencies and damping ratios -## of the eigenvalues of a matrix @var{p} or the @math{A} matrix of a -## system @var{p}, respectively. -## If @var{p} is a system, @var{tsam} must not be specified. -## If @var{p} is a matrix and @var{tsam} is specified, eigenvalues -## of @var{p} are assumed to be in @var{z}-domain. -## @seealso{eig} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: September 29, 1997. - -function damp (p, tsam) - - ## assume a continuous system - DIGITAL = 0; - - if (nargin < 1 || nargin > 2) - print_usage (); - endif - - if (isstruct (p)) - if (nargin != 1) - error("damp: when p is a system, tsamp parameter is not allowed."); - endif - [aa, b, c, d, t_samp] = sys2ss (p); - DIGITAL = is_digital (p); - else - aa = p; - if (nargin == 2) - DIGITAL = 1; - t_samp = tsam; - endif - endif - if (! issquare (aa)) - error ("damp: Matrix p is not square.") - endif - if (DIGITAL && t_samp <= 0.0) - error ("damp: Sampling time tsam must not be <= 0.") - endif - - ## all checks done. - e = eig (aa); - [n, m] = size (aa); - if (DIGITAL) - printf (" (discrete system with sampling time %f)\n", t_samp); - endif - printf ("............... Eigenvalue ........... Damping Frequency\n"); - printf ("--------[re]---------[im]--------[abs]----------------------[Hz]\n"); - for i = 1:n - pole = e(i); - cpole = pole; - if (DIGITAL) - cpole = log (pole) / t_samp; - endif - d0 = -cos (atan2 (imag (cpole), real (cpole))); - f0 = 0.5 / pi * abs (cpole); - if (isa (cpole, "single") && abs(imag (cpole)) < eps ("single") || - ! isa (cpole, "single") && abs (imag (cpole)) < eps) - printf ("%12f --- %12f %10f %12f\n", - real (pole), abs (pole), d0, f0); - else - printf ("%12f %12f %12f %10f %12f\n", - real (pole), imag (pole), abs (pole), d0, f0); - endif - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dare.m +++ /dev/null @@ -1,128 +0,0 @@ -## Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{x} =} dare (@var{a}, @var{b}, @var{q}, @var{r}, @var{opt}) -## -## Return the solution, @var{x} of the discrete-time algebraic Riccati -## equation -## @iftex -## @tex -## $$ -## A^TXA - X + A^TXB (R + B^TXB)^{-1} B^TXA + Q = 0 -## $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a' x a - x + a' x b (r + b' x b)^(-1) b' x a + q = 0 -## @end example -## @end ifinfo -## @noindent -## -## @strong{Inputs} -## @table @var -## @item a -## @var{n} by @var{n} matrix; -## -## @item b -## @var{n} by @var{m} matrix; -## -## @item q -## @var{n} by @var{n} matrix, symmetric positive semidefinite, or a @var{p} by @var{n} matrix, -## In the latter case @math{q:=q'*q} is used; -## -## @item r -## @var{m} by @var{m}, symmetric positive definite (invertible); -## -## @item opt -## (optional argument; default = @code{"B"}): -## String option passed to @code{balance} prior to ordered @var{QZ} decomposition. -## @end table -## -## @strong{Output} -## @table @var -## @item x -## solution of @acronym{DARE}. -## @end table -## -## @strong{Method} -## Generalized eigenvalue approach (Van Dooren; @acronym{SIAM} J. -## Sci. Stat. Comput., Vol 2) applied to the appropriate symplectic pencil. -## -## See also: Ran and Rodman, @cite{Stable Hermitian Solutions of Discrete -## Algebraic Riccati Equations}, Mathematics of Control, Signals and -## Systems, Vol 5, no 2 (1992), pp 165--194. -## @seealso{balance, are} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Adapted-By: jwe - -function x = dare (a, b, q, r, opt) - - if (nargin == 4 || nargin == 5) - if (nargin == 5) - if (! (ischar (opt) - && (strcmp (opt, "N") || strcmp (opt, "P") - || strcmp (opt, "S") || strcmp (opt, "B")))) - warning ("dare: opt has an invalid value -- setting to B"); - opt = "B"; - endif - else - opt = "B"; - endif - - if ((p = issquare (q)) == 0) - q = q'*q; - endif - - ##Checking positive definiteness - if (isdefinite (r) <= 0) - error ("dare: r not positive definite"); - endif - if (isdefinite (q) < 0) - error ("dare: q not positive semidefinite"); - endif - - ## Check r dimensions. - [n, m] = size (b); - if ((m1 = issquare (r)) == 0) - error ("dare: r is not square"); - elseif (m1 != m) - error ("b,r are not conformable"); - endif - - s1 = [a, zeros(n) ; -q, eye(n)]; - s2 = [eye(n), (b/r)*b' ; zeros(n), a']; - - [c, d, s1, s2] = balance (s1, s2, opt); - - [aa, bb, u, lam] = qz (s1, s2, "S"); - - u = d*u; - n1 = n+1; - n2 = 2*n; - x = u (n1:n2, 1:n)/u(1:n, 1:n); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dcgain.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} dcgain (@var{sys}, @var{tol}) -## Returns dc-gain matrix. If dc-gain is infinite -## an empty matrix is returned. -## The argument @var{tol} is an optional tolerance for the condition -## number of the @math{A} Matrix in @var{sys} (default @var{tol} = 1.0e-10) -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: October 1, 1997 - -function gm = dcgain (sys, tol) - - if (nargin < 1 || nargin > 2) - print_usage (); - endif - if (! isstruct (sys)) - error ("dcgain: first argument is not a system data structure.") - endif - sys = sysupdate (sys, "ss"); - [aa, bb, cc, dd] = sys2ss (sys); - if (is_digital (sys)) - aa = aa - eye (size (aa)); - endif - if (nargin == 1) - tol = 1.0e-10; - endif - r = rank (aa, tol); - if (r < rows (aa)) - gm = []; - else - gm = -cc / aa * bb + dd; - endif - if (! is_stable (sys)) - [nn, nz, mm, pp] = sysdimensions (sys); - warning ("dcgain: unstable system; dimensions: nc=%d, nz=%d, mm=%d, pp=%d", - nn, nz, mm, pp); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dgram.m +++ /dev/null @@ -1,72 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} dgram (@var{a}, @var{b}) -## Return controllability gramian of discrete time system -## @iftex -## @tex -## $$ x_{k+1} = ax_k + bu_k $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## x(k+1) = a x(k) + b u(k) -## @end example -## @end ifinfo -## -## @strong{Inputs} -## @table @var -## @item a -## @var{n} by @var{n} matrix -## @item b -## @var{n} by @var{m} matrix -## @end table -## -## @strong{Output} -## @table @var -## @item m -## @var{n} by @var{n} matrix, satisfies -## @iftex -## @tex -## $$ ama^T - m + bb^T = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a m a' - m + b*b' = 0 -## @end example -## @end ifinfo -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1995 - -function m = dgram (a, b) - - if (nargin != 2) - print_usage (); - endif - - ## let dlyap do the error checking... - - m = dlyap (a, b*b'); - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dkalman.m +++ /dev/null @@ -1,187 +0,0 @@ -## Copyright (C) 2000, 2002, 2005, 2007 Gabriele Pannocchia -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{Lp}, @var{Lf}, @var{P}, @var{Z}] =} dkalman (@var{A}, @var{G}, @var{C}, @var{Qw}, @var{Rv}, @var{S}) -## Construct the linear quadratic estimator (Kalman predictor) for the -## discrete time system -## @iftex -## @tex -## $$ -## x_{k+1} = A x_k + B u_k + G w_k -## $$ -## $$ -## y_k = C x_k + D u_k + v_k -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## x[k+1] = A x[k] + B u[k] + G w[k] -## y[k] = C x[k] + D u[k] + v[k] -## @end example -## -## @end ifinfo -## where @var{w}, @var{v} are zero-mean gaussian noise processes with -## respective intensities @code{@var{Qw} = cov (@var{w}, @var{w})} and -## @code{@var{Rv} = cov (@var{v}, @var{v})}. -## -## If specified, @var{S} is @code{cov (@var{w}, @var{v})}. Otherwise -## @code{cov (@var{w}, @var{v}) = 0}. -## -## The observer structure is -## @iftex -## @tex -## $x_{k+1|k} = A x_{k|k-1} + B u_k + L_p (y_k - C x_{k|k-1} - D u_k)$ -## $x_{k|k} = x_{k|k} + L_f (y_k - C x_{k|k-1} - D u_k)$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## x[k+1|k] = A x[k|k-1] + B u[k] + LP (y[k] - C x[k|k-1] - D u[k]) -## x[k|k] = x[k|k-1] + LF (y[k] - C x[k|k-1] - D u[k]) -## @end example -## @end ifinfo -## -## @noindent -## The following values are returned: -## -## @table @var -## @item Lp -## The predictor gain, -## @iftex -## @tex -## $(A - L_p C)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{A} - @var{Lp} @var{C}) -## @end ifinfo -## is stable. -## -## @item Lf -## The filter gain. -## -## @item P -## The Riccati solution. -## @iftex -## @tex -## $P = E \{(x - x_{n|n-1})(x - x_{n|n-1})'\}$ -## @end tex -## @end iftex -## -## @ifinfo -## P = E [(x - x[n|n-1])(x - x[n|n-1])'] -## @end ifinfo -## -## @item Z -## The updated error covariance matrix. -## @iftex -## @tex -## $Z = E \{(x - x_{n|n})(x - x_{n|n})'\}$ -## @end tex -## @end iftex -## -## @ifinfo -## Z = E [(x - x[n|n])(x - x[n|n])'] -## @end ifinfo -## @end table -## @end deftypefn - -## Author: Gabriele Pannocchia <pannocchia@ing.unipi.it> -## Created: July 2000 - -function [Lp, Lf, P, Z] = dkalman (A, G, C, Qw, Rv, S) - - if (nargin != 5 && nargin != 6) - error ("dkalman: invalid number of arguments"); - endif - - ## Check A. - if ((n = issquare (A)) == 0) - error ("dkalman: requires 1st parameter(A) to be square"); - endif - - ## Check C. - [p, n1] = size (C); - if (n1 != n) - error ("dkalman: A,C not conformal"); - endif - - ## Check G. - [n1, nw] = size (G); - if (n1 != n) - error ("dkalman: A,G not conformal"); - endif - - ## Check Qw. - if ((nw1 = issquare (Qw)) == 0) - error ("dkalman: requires 4rd parameter(Qw) to be square"); - else - if (nw1 != nw) - error ("dkalman: G,Qw not conformal"); - endif - endif - - ## Check Rv. - if ((p1 = issquare (Rv)) == 0) - error ("dkalman: requires 5rd parameter(Rv) to be square"); - else - if (p1 != p) - error ("dkalman: C,Rv not conformal"); - endif - endif - - ## Check S if it is there - if (nargin == 6) - [nw1, p1] = size (S); - if (nw1 != nw || p1 != p) - error ("dkalman: S not conformal with Qw and Rv"); - else - Cov_aug = [Qw, S; S', Rv]; - if (! all (eig (Cov_aug) > 0)) - error ("dkalman: augmented noise covariance matrix must be positive definite"); - endif - endif - else - if (! all (eig (Qw) > 0) || ! all (eig (Rv) > 0)) - error ("dkalman: covariance matrices Qw,Rv must be positive definite"); - endif - S = zeros (nw, p); - endif - - ## Incorporate the cross term into A and Qw - As = A - G*S/Rv*C; - Qs = Qw - S/Rv*S'; - - ## Call dare to solve the Riccati eqn. - a = As'; - b = C'; - c = G*Qs*G'; - r = Rv; - p = dare (a, b, c, r); - - ## Output - Lp = (A*p*C'+G*S)/(Rv+C*p*C'); - Lf = (p*C')/(Rv+C*p*C'); - P = p; - Z = p - Lf*C*p; - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dlqe.m +++ /dev/null @@ -1,128 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2005, 2007 Auburn University -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{l}, @var{m}, @var{p}, @var{e}] =} dlqe (@var{a}, @var{g}, @var{c}, @var{sigw}, @var{sigv}, @var{z}) -## Construct the linear quadratic estimator (Kalman filter) for the -## discrete time system -## @iftex -## @tex -## $$ -## x_{k+1} = A x_k + B u_k + G w_k -## $$ -## $$ -## y_k = C x_k + D u_k + v_k -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## x[k+1] = A x[k] + B u[k] + G w[k] -## y[k] = C x[k] + D u[k] + v[k] -## @end example -## -## @end ifinfo -## where @var{w}, @var{v} are zero-mean gaussian noise processes with -## respective intensities @code{@var{sigw} = cov (@var{w}, @var{w})} and -## @code{@var{sigv} = cov (@var{v}, @var{v})}. -## -## If specified, @var{z} is @code{cov (@var{w}, @var{v})}. Otherwise -## @code{cov (@var{w}, @var{v}) = 0}. -## -## The observer structure is -## @iftex -## @tex -## $$ -## z_{k|k} = z_{k|k-1} + l (y_k - C z_{k|k-1} - D u_k) -## $$ -## $$ -## z_{k+1|k} = A z_{k|k} + B u_k -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## z[k|k] = z[k|k-1] + L (y[k] - C z[k|k-1] - D u[k]) -## z[k+1|k] = A z[k|k] + B u[k] -## @end example -## @end ifinfo -## -## @noindent -## The following values are returned: -## -## @table @var -## @item l -## The observer gain, -## @iftex -## @tex -## $(A - ALC)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{a}@var{l}@var{c}). -## @end ifinfo -## is stable. -## -## @item m -## The Riccati equation solution. -## -## @item p -## The estimate error covariance after the measurement update. -## -## @item e -## The closed loop poles of -## @iftex -## @tex -## $(A - ALC)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{a}@var{l}@var{c}). -## @end ifinfo -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Modified for discrete time by R. Bruce Tenison (btenison@eng.auburn.edu) -## October, 1993 -## Modified by Gabriele Pannocchia <pannocchia@ing.unipi.it> -## July 2000 - -function [l, m, p, e] = dlqe (a, g, c, sigw, sigv, s) - - if (nargin != 5 && nargin != 6) - error ("dlqe: invalid number of arguments"); - endif - - ## The problem is dual to the regulator design, so transform to dlqr call. - - if (nargin == 5) - [k, m, e] = dlqr (a', c', g*sigw*g', sigv); - else - [k, m, e] = dlqr (a', c', g*sigw*g', sigv, g*s); - warning ("dlqe: use dkalman when there is a cross-covariance term"); - endif - - l = m*c'/(c*m*c'+sigv); - p = m - m*c'/(c*m*c'+sigv)*c*m; - -endfunction -
deleted file mode 100644 --- a/scripts/control/base/dlqr.m +++ /dev/null @@ -1,153 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2003, 2005, 2007 -## Auburn University -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{k}, @var{p}, @var{e}] =} dlqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{z}) -## Construct the linear quadratic regulator for the discrete time system -## @iftex -## @tex -## $$ -## x_{k+1} = A x_k + B u_k -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## x[k+1] = A x[k] + B u[k] -## @end example -## -## @end ifinfo -## to minimize the cost functional -## @iftex -## @tex -## $$ -## J = \sum x^T Q x + u^T R u -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## J = Sum (x' Q x + u' R u) -## @end example -## @end ifinfo -## -## @noindent -## @var{z} omitted or -## @iftex -## @tex -## $$ -## J = \sum x^T Q x + u^T R u + 2 x^T Z u -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## J = Sum (x' Q x + u' R u + 2 x' Z u) -## @end example -## -## @end ifinfo -## @var{z} included. -## -## The following values are returned: -## -## @table @var -## @item k -## The state feedback gain, -## @iftex -## @tex -## $(A - B K)$ -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{b}@var{k}) -## @end ifinfo -## is stable. -## -## @item p -## The solution of algebraic Riccati equation. -## -## @item e -## The closed loop poles of -## @iftex -## @tex -## $(A - B K)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{b}@var{k}). -## @end ifinfo -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Converted to discrete time by R. B. Tenison -## (btenison@eng.auburn.edu) October 1993 - -function [k, p, e] = dlqr (a, b, q, r, s) - - if (nargin != 4 && nargin != 5) - error ("dlqr: invalid number of arguments"); - endif - - ## Dimension check is done inside dare.m - [n,m] = size(b); - - ## Check if s is there. - if (nargin == 5) - [n1, m1] = size (s); - if (n1 != n || m1 != m) - error ("dlqr: z must be identically dimensioned with b"); - endif - - ## Incorporate cross term into a and q. - ao = a - (b/r)*s'; - qo = q - (s/r)*s'; - else - s = zeros (n, m); - ao = a; - qo = q; - endif - - ## Checking stabilizability and detectability (dimensions are checked - ## inside these calls). - if (isa (a, "single") || isa (b, "single") || isa (q, "single") || isa (r, "single")) - tol = 200 * eps ("single"); - else - tol = 200 * eps; - endif - if (is_stabilizable (ao, b, tol, 1) == 0) - error ("dlqr: (a,b) not stabilizable"); - endif - dflag = is_detectable (ao, qo, tol, 1); - if (dflag == 0) - warning ("dlqr: (a,q) not detectable"); - elseif (dflag == -1) - error ("dlqr: (a,q) has non minimal modes near unit circle"); - endif - - ## Compute the Riccati solution - p = dare (ao, b, qo, r); - k = (r+b'*p*b)\(b'*p*a + s'); - e = eig (a - b*k); - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dlyap.m +++ /dev/null @@ -1,160 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} dlyap (@var{a}, @var{b}) -## Solve the discrete-time Lyapunov equation -## -## @strong{Inputs} -## @table @var -## @item a -## @var{n} by @var{n} matrix; -## @item b -## Matrix: @var{n} by @var{n}, @var{n} by @var{m}, or @var{p} by @var{n}. -## @end table -## -## @strong{Output} -## @table @var -## @item x -## matrix satisfying appropriate discrete time Lyapunov equation. -## @end table -## -## Options: -## @itemize @bullet -## @item @var{b} is square: solve -## @iftex -## @tex -## $$ axa^T - x + b = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @code{a x a' - x + b = 0} -## @end ifinfo -## @item @var{b} is not square: @var{x} satisfies either -## @iftex -## @tex -## $$ axa^T - x + bb^T = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a x a' - x + b b' = 0 -## @end example -## @end ifinfo -## @noindent -## or -## @iftex -## @tex -## $$ a^Txa - x + b^Tb = 0, $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a' x a - x + b' b = 0, -## @end example -## @end ifinfo -## @noindent -## whichever is appropriate. -## @end itemize -## -## @strong{Method} -## Uses Schur decomposition method as in Kitagawa, -## @cite{An Algorithm for Solving the Matrix Equation @math{X = F X F' + S}}, -## International Journal of Control, Volume 25, Number 5, pages 745--753 -## (1977). -## -## Column-by-column solution method as suggested in -## Hammarling, @cite{Numerical Solution of the Stable, Non-Negative -## Definite Lyapunov Equation}, @acronym{IMA} Journal of Numerical Analysis, Volume -## 2, pages 303--323 (1982). -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 - -function x = dlyap (a, b) - - if (nargin != 2) - print_usage (); - endif - - if ((n = issquare (a)) == 0) - warning ("dlyap: a must be square"); - endif - - if ((m = issquare (b)) == 0) - [n1, m] = size (b); - if (n1 == n) - b = b*b'; - m = n1; - else - b = b'*b; - a = a'; - endif - endif - - if (n != m) - warning ("dlyap: a,b not conformably dimensioned"); - endif - - ## Solve the equation column by column. - - [u, s] = schur (a); - b = u'*b*u; - - j = n; - while (j > 0) - j1 = j; - - ## Check for Schur block. - - if (j == 1) - blksiz = 1; - elseif (s (j, j-1) != 0) - blksiz = 2; - j = j - 1; - else - blksiz = 1; - endif - - Ajj = kron (s(j:j1,j:j1), s) - eye (blksiz*n); - - rhs = reshape (b (:,j:j1), blksiz*n, 1); - - if (j1 < n) - rhs2 = s*(x(:,(j1+1):n) * s(j:j1,(j1+1):n)'); - rhs = rhs + reshape (rhs2, blksiz*n, 1); - endif - - v = - Ajj\rhs; - x(:,j) = v (1:n); - - if (blksiz == 2) - x (:, j1) = v ((n+1):blksiz*n); - endif - - j = j - 1; - - endwhile - - ## Back-transform to original coordinates. - - x = u*x*u'; - -endfunction
deleted file mode 100644 --- a/scripts/control/base/dre.m +++ /dev/null @@ -1,188 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{tvals}, @var{plist}] =} dre (@var{sys}, @var{q}, @var{r}, @var{qf}, @var{t0}, @var{tf}, @var{ptol}, @var{maxits}) -## Solve the differential Riccati equation -## @ifinfo -## @example -## -d P/dt = A'P + P A - P B inv(R) B' P + Q -## P(tf) = Qf -## @end example -## @end ifinfo -## @iftex -## @tex -## $$ -{dP \over dt} = A^T P+PA-PBR^{-1}B^T P+Q $$ -## $$ P(t_f) = Q_f $$ -## @end tex -## @end iftex -## for the @acronym{LTI} system sys. Solution of -## standard @acronym{LTI} state feedback optimization -## @ifinfo -## @example -## min int(t0, tf) ( x' Q x + u' R u ) dt + x(tf)' Qf x(tf) -## @end example -## @end ifinfo -## @iftex -## @tex -## $$ \min \int_{t_0}^{t_f} x^T Q x + u^T R u dt + x(t_f)^T Q_f x(t_f) $$ -## @end tex -## @end iftex -## optimal input is -## @ifinfo -## @example -## u = - inv(R) B' P(t) x -## @end example -## @end ifinfo -## @iftex -## @tex -## $$ u = - R^{-1} B^T P(t) x $$ -## @end tex -## @end iftex -## @strong{Inputs} -## @table @var -## @item sys -## continuous time system data structure -## @item q -## state integral penalty -## @item r -## input integral penalty -## @item qf -## state terminal penalty -## @item t0 -## @itemx tf -## limits on the integral -## @item ptol -## tolerance (used to select time samples; see below); default = 0.1 -## @item maxits -## number of refinement iterations (default=10) -## @end table -## @strong{Outputs} -## @table @var -## @item tvals -## time values at which @var{p}(@var{t}) is computed -## @item plist -## list values of @var{p}(@var{t}); @var{plist} @{ @var{i} @} -## is @var{p}(@var{tvals}(@var{i})) -## @end table -## @var{tvals} is selected so that: -## @iftex -## @tex -## $$ \Vert plist_{i} - plist_{i-1} \Vert < ptol $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## || Plist@{i@} - Plist@{i-1@} || < Ptol -## @end example -## @end ifinfo -## for every @var{i} between 2 and length(@var{tvals}). -## @end deftypefn - -function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits) - - if (nargin < 6 || nargin > 8) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a system data structure") - elseif (is_digital (sys)) - error ("sys must be a continuous time system") - elseif (! ismatrix (Q) || ! ismatrix (R) || ! ismatrix (Qf)) - error ("Q, R, and Qf must be matrices"); - elseif (! isscalar (t0) || ! isscalar (tf)) - error ("t0 and tf must be scalars") - elseif (t0 >= tf) - error ("t0=%e >= tf=%e", t0, tf); - elseif (nargin < 7) - Ptol = 0.1; - elseif (! isscalar (Ptol)) - error ("Ptol must be a scalar"); - elseif (Ptol <= 0) - error ("Ptol must be positive"); - endif - - if (nargin < 8) - maxits = 10; - elseif (! isscalar (maxits)) - error ("maxits must be a scalar"); - elseif (maxits <= 0) - error ("maxits must be positive"); - endif - maxits = ceil (maxits); - - [aa, bb] = sys2ss (sys); - nn = sysdimensions (sys, "cst"); - mm = sysdimensions (sys, "in"); - pp = sysdimensions (sys, "out"); - - if (size (Q) != [nn, nn]) - error ("Q(%dx%d); sys has %d states", rows (Q), columns (Q), nn); - elseif (size (Qf) != [nn, nn]) - error ("Qf(%dx%d); sys has %d states", rows (Qf), columns (Qf), nn); - elseif (size (R) != [mm, mm]) - error ("R(%dx%d); sys has %d inputs", rows (R), columns (R), mm); - endif - - ## construct Hamiltonian matrix - H = [aa , -(bb/R)*bb' ; -Q, -aa']; - - ## select time step to avoid numerical overflow - fast_eig = max (abs (eig (H))); - tc = log (10) / fast_eig; - nst = ceil ((tf-t0)/tc); - tvals = -linspace (-tf, -t0, nst); - Plist = list (Qf); - In = eye (nn); - n1 = nn+1; - n2 = nn+nn; - done = 0; - while (! done) - done = 1; # assume this pass will do the job - ## sort time values in reverse order - tvals = -sort (-tvals); - tvlen = length (tvals); - maxerr = 0; - ## compute new values of P(t); recompute old values just in case - for ii = 2:tvlen - uv_i_minus_1 = [In; Plist{ii-1}]; - delta_t = tvals(ii-1) - tvals(ii); - uv = expm (-H*delta_t)*uv_i_minus_1; - Qi = uv(n1:n2,1:nn)/uv(1:nn,1:nn); - Plist(ii) = (Qi+Qi')/2; - ## check error - Perr = norm (Plist{ii} - Plist{ii-1})/norm(Plist{ii}); - maxerr = max (maxerr,Perr); - if (Perr > Ptol) - new_t = mean (tvals([ii,ii-1])); - tvals = [tvals, new_t]; - done = 0; - endif - endfor - - ## check number of iterations - maxits = maxits - 1; - done = done + (maxits == 0); - endwhile - if (maxerr > Ptol) - warning ("dre: exiting with %d points, max rel chg. = %e, Ptol = %e", - tvlen, maxerr, Ptol); - tvals = tvals(1:length(Plist)); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/frdemo.m +++ /dev/null @@ -1,600 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} frdemo () -## Octave Control Toolbox demo: Frequency Response demo. -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## a s hodel: updated to match new order of ss2zp outputs -## J Ingram: updated for system data structure format August 1996 - -function frdemo () - - disp("") - clc - j = 0; - while (j != 4) - disp(""); - j = menu("Octave Controls Systems Toolbox Frequency Response Demo", - "Bode analysis (bode)", - "Nyquist analysis (nyquist)", - "Nichols analysis (nichols)", - "Return to main demo menu"); - - if (j == 1) - k1 = 0; - while (k1 != 4) - disp("\n"); - clc - - k1 = menu("Bode analysis (bode)", - "Continuous system bode analysis", - "Discrete system bode analysis", - "Bode command description", - "Return to frdemo menu"); - - if( k1 == 1 ) - disp(" ") - clc - disp("\nContinuous system bode analysis\n"); - disp("Example #1:") - disp("\nConsider the system sys1="); - sys1=tf([1, 1], [1, 0, -1]); - sysout(sys1); - disp("\nPole-zero form can be obtained as follows:") - cmd = "sysout(sys1,""zp"");"; - run_cmd; - disp("The systems bode plot is obtained as follows:"); - cmd = "bode(sys1);"; - run_cmd; - disp("\nNotice that bode automatically labels the plots according to") - disp("the selected input/output combinations.") - disp(" ") - disp("If the frequency range is not specified, bode automatically") - disp("selects a frequency range based on the natural frequencies of") - disp("of all poles away from s=0 (or z=1 in discrete time). Bode") - disp("then checks to make sure that the phase plot is sufficiently") - disp("smooth that relevant plot behavior is captured.") - disp("") - disp("Bode exits with an error if the system is mixed (both continuous") - disp("and discrete; see is_digital for conditions)") - prompt - disp("\nIf the plot magnitude, phase and frequency data is desired, the"); - disp("user can enter the following command:"); - disp("\n[Mag,Phase,w] = bode(sys);"); - disp("\nThis will return three vectors containing the magnitude,"); - disp("phase and frequency.\n"); - prompt; - - disp("") - clc - disp("Example #2, sys2=") - cmd = "sys2=zp(1, [-1, -5], 10);"; - eval(cmd); - cmd = "sysout(sys2);"; - eval(cmd); - disp("\nThe bode plot command is identical to the tf form:") - cmd = "bode(sys2);"; - run_cmd; - disp("\nThe internal representation of the system is not important;") - disp("bode automatically sorts it out internally.") - prompt; - - disp("") - clc - disp("Example #3, Consider the following state space system sys3=:\n"); - cmd = "sys3=ss([0, 1; -1000, -1001], [0; 1], [0, -891], 1);"; - eval(cmd); - cmd = "sysout(sys3);"; - eval(cmd); - disp("\nOnce again, the bode plot command is the same:"); - cmd = "bode(sys3);"; - run_cmd; - disp("\nSuppose the user is interested in the response of the system"); - disp("defined over the input frequency range of 1 - 1000 rad/s.\n"); - disp("First, a frequency vector is required. It can be created"); - disp("with the command:\n"); - cmd = "wrange = logspace(log10(1),log10(1000),100);"; - disp(cmd); - eval(cmd); - disp("\nThis creates a logarithmically scaled frequency vector with"); - disp("100 values between 1 and 1000 rad/s\n"); - disp("Then, the bode command includes wrange in the input arguments"); - disp("like this:"); - cmd = "bode(sys3,wrange);"; - run_cmd; - prompt; - - disp("") - clc - disp("\nExample #4, The state-space system from example 3 will be"); - disp("grouped with the system from example 2 to form a MIMO system"); - disp("The commands to do this grouping are as follows (changing signal"); - disp("names for clarity):"); - cmd = "sys2 = syssetsignals(sys2,\"out\",\"y_sys2\");"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"in\",\"u_sys2\");"; - disp(cmd); eval(cmd); - cmd = "nn = sysdimensions(sys2);"; - disp(cmd); eval(cmd); - cmd = "[nn,nz] = sysdimensions(sys2);"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"st\",__sysdefioname__(nn+nz,\"x_sys2\"));"; - disp(cmd); eval(cmd); - cmd = "sys_mimo = sysgroup(sys2,sys3);"; - disp(cmd); eval(cmd); - disp("The resulting state-space system (after changing signal names"); - disp("in sys2) is"); - cmd = "sysout(sys_mimo)"; - eval(cmd); - disp("\nNotice that there are now 2 inputs and 2 outputs, and that it did"); - disp("not matter what form the two systems were in when they were grouped."); - disp(["\nTo view the system's bode plots, execute the", - " following command:\n"]) - cmd = "bode(sys_mimo);"; - run_cmd; - prompt - disp("\nTo view the bode plots for selected channels, the command form changes:") - cmd = "wrange = [];"; - disp(cmd) - eval(cmd); - cmd = "out = 1;"; - disp(cmd) - eval(cmd); - cmd = "in = 1;"; - disp(cmd) - eval(cmd); - cmd = "bode(sys_mimo,wrange,out,in);"; - run_cmd; - disp("\nNotice that this bode plot is the same as the plot from example 2."); - prompt - closeplot - - elseif( k1 == 2 ) - disp("") - clc - disp("\nDiscrete system bode analysis\n"); - disp("Display bode plots of a discrete SISO system (dbode)\n") - disp("Example #1, Consider the following discrete transfer"); - disp(" function:\n"); - cmd = "sys1 = tf([0.00100502, -0.00099502], [1, -2, 1], 0.001);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys1)"; - disp(cmd); - eval(cmd); - disp("\nTo examine open loop zeros and poles of the system,"); - disp("use the command:\n") - cmd = "sysout(sys1,""zp"");"; - run_cmd; - disp("\nTo view the system's bode plots, execute the following"); - disp("command:\n") - cmd = "bode(sys1);"; - run_cmd; - disp("\nNotice (1) the plot label uses exp(jwT) for its title axis. This") - disp(" allows the user to determine what kind of system was") - disp(" used to generate the bode plot"); - disp(" (2) the system poles are both at z=1, (break frequency at") - disp(" jwT = 0); pure integrator poles like this are discarded") - disp(" by Octave when computing the plot frequency range.") - - disp("\nIf magnitude, phase, and frequency data are also desired,"); - disp(" perform the following command instead:\n"); - disp("[M,P,w]=dbode(num,den,T,wrange).\n Where:"); - disp("M => Bode magnitude response data"); - disp("P => Bode phase response data"); - disp("w => frequencies that M and P were evaluated at"); - disp("sys1 => system data structure") - disp("T => sample period") - disp("wrange => optional vector of frequencies") - disp(" if wrange is entered in the argument list, the"); - disp(" system will be evaluated at these specific"); - disp(" frequencies\n"); - - prompt - disp("") - clc - disp("Example #2, Consider the following set of discrete poles and"); - disp("zeros:\n") - cmd = "sys2 = zp([0.99258;0.99745],[0.99961;0.99242],1,0.001);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys2)"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's bode plots, execute the following"); - disp("command:\n") - cmd = "bode(sys2);"; - run_cmd; - disp("Notice that the bode command is the same in both of the previous"); - disp("examples. The bode command is also the same for the continuous case."); - disp("The function, dbode, is no longer used."); - - prompt - disp("") - clc - disp("\nExample #3, Now consider the following state space system:\n"); - cmd = "sys3 = ss([.857, .0011; 0, .99930],[1;1],[-.6318, .0057096],5.2, .001);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys3);"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's bode plots, execute the following command:\n") - cmd = "bode(sys3);"; - run_cmd; - disp("\nAgain, notice that the bode command is the same regardless of the form"); - disp("of the system."); - disp("\nSuppose the user is interested in the response of the system"); - disp("defined over the input frequency range of 1 - 1000 rad/s.\n"); - disp("First, a frequency vector is required. It can be created"); - disp("with the command:\n"); - cmd = "wrange = logspace(log10(1),log10(1000),100);"; - disp(cmd); - eval(cmd); - disp("\nThis creates a logrithmetically scaled frequency vector with"); - disp("100 values between 1 and 1000 rad/s\n"); - disp("Then, the bode command includes wrange in the input arguments"); - disp("like this:"); - cmd = "bode(sys3,wrange);"; - run_cmd; - prompt; - - disp("") - clc - disp("\nExample #4, We will now examine a MIMO state-space system. Systems"); - disp("two and three will be grouped."); - cmd = "[nn,nz] = sysdimensions(sys2);"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"out\",\"y_sys2\");"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"in\",\"u_sys2\");"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"st\",__sysdefioname__(nn+nz,\"x_sys2\"));"; - disp(cmd); eval(cmd); - cmd = "sys_mimo = sysgroup(sys2,sys3);"; - disp(cmd); eval(cmd); - cmd = "sysout(sys_mimo);"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's bode plots, execute the following command:\n") - cmd = "bode(sys_mimo);"; - run_cmd; - prompt - - disp("\nThe bode plot of a single channel is viewed as follows:") - cmd = "wrange = [];"; - disp(cmd) - eval(cmd); - cmd = "out = 1;"; - disp(cmd) - eval(cmd); - cmd = "in = 1;"; - disp(cmd) - eval(cmd); - cmd = "bode(sys_mimo,wrange,out,in);"; - run_cmd; - disp("\nNotice that this bode plot is the same as the plot from example 2."); - prompt - closeplot - - elseif( k1 == 3 ) - help bode - prompt - endif - endwhile - elseif (j == 2) - k2 = 0; - disp(""); - while (k2 != 4) - disp("\n"); - help nyquist - prompt; - disp("") - clc; - - k2 = menu("Nyquist analysis (Nyquist)", - "Continuous system nyquist analysis", - "Discrete system nyquist analysis", - "Mixed system nyquist analysis", - "Return to frdemo menu"); - - if( k2 == 1 ) - disp("") - clc - disp("\nContinuous system nyquist analysis\n"); - disp("Display Nyquist plots of a SISO system (nyquist)\n") - disp("Example #1, Consider the following transfer function:\n") - cmd = "sys1 = tf(1, [1, 0.8, 1]);"; - disp(cmd); - eval(cmd); - disp("To examine the transfer function, use the command:"); - cmd = "sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the open loop zeros and poles, use the command:"); - cmd = "sysout(sys1,""zp"");"; - run_cmd; - disp("\nTo view the system""s nyquist plot, execute the following"); - disp("command:\n") - cmd = "nyquist(sys1);"; - run_cmd; - disp("\nIf the real and imaginary parts of the response are desired,"); - disp("use the following command:"); - disp("command: [R,I,w]=nyquist(sys1);\n"); - disp("If the user desires to evaluate the response in a certain"); - disp("frequency range, he may do so by entering the following:"); - disp("command: [M,P,w]=nyquist(num,den,wrange).\n") - disp("wrange is a vector of frequencies that spans the desired"); - disp("viewing range.\n"); - disp("This will be illustrated in the third nyquist example.\n") - disp("Variable Description:\n") - disp("R => real part of response") - disp("I => imaginary part of response") - disp("w => frequencies that the transfer function was evaluated at") - disp("sys1 => system data structure") - disp("wrange => optional vector of frequencies") - disp(" if wrange is entered in the argument list, the"); - disp(" system will be evaluated at these specific"); - disp(" frequencies\n") - prompt - - disp("") - clc - disp("Example #2, Consider the following set of poles and zeros:\n") - cmd = "sys2 = zp([-1;-4],[-2+1.4142i;-2-1.4142i],1);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the poles and zeros, use the command:"); - cmd = "sysout(sys2)"; - disp(cmd); - eval(cmd); - disp("\nTo view the system""s nyquist plot, execute the following"); - disp("command:\n") - cmd = "nyquist(sys2);"; - run_cmd; - prompt - - disp("") - clc - disp("\nExample #3, Consider the following state space system:\n") - cmd = "sys3 = ss([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 0, 0, -20, -12],[0;0;0;1],[50, 100, 0, 0],0);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the state-space system, use the command:"); - cmd = "sysout(sys3)"; - disp(cmd); - eval(cmd); - disp("\nTo examine the poles and zeros, use the command:"); - cmd = "sysout(sys3,""zp"")"; - run_cmd; - disp("\nTo view the system""s nyquist plot, execute the following"); - disp("commands:\n") - cmd = "nyquist(sys3);"; - run_cmd; - prompt - - disp("Example #3 (continued), If the user wishes to evaluate the"); - disp("system response over a desired frequency range, he must first"); - disp("create a frequency vector.\n") - disp("For example, suppose the user is interested in the response"); - disp("of the system defined above over input frequency range of"); - disp("3 - 100 rad/s.\n") - disp("A frequency vector can be created using the command:\n"); - cmd = "wrange = logspace(log10(3),log10(100),100);"; - disp(cmd); - eval(cmd); - disp("\nNyquist can be run again using the frequency vector as"); - disp("follows:\n") - cmd = "nyquist(sys3,wrange);"; - run_cmd; - prompt - - disp("") - clc - disp("Example #4, Nyquist can be used for MIMO systems if the system has"); - disp("an equal number of inputs and outputs. Otherwise, nyquist returns"); - disp("an error. To examine a MIMO system, systems 2 and 3 will be grouped"); - cmd = "[nn,nz] = sysdimensions(sys2);"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"out\",\"y_sys2\");"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"in\",\"u_sys2\");"; - disp(cmd); eval(cmd); - cmd = "sys2 = syssetsignals(sys2,\"st\",__sysdefioname__(nn+nz,\"x_sys2\"));"; - disp(cmd); eval(cmd); - cmd = "sys_mimo = sysgroup(sys2,sys3);"; - disp(cmd); eval(cmd); - cmd = "sysout(sys_mimo);"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's nyquist plot, execute the following command:\n") - cmd = "nyquist(sys_mimo);"; - run_cmd; - prompt - disp("\nTo view the nyquist plots for selected channels, the command form changes:") - cmd = "nyquist(sys_mimo,[],1,1);"; - run_cmd; - disp("\nNotice that this bode plot is the same as the plot from example 2."); - prompt - closeplot - - - - elseif( k2 == 2 ) - disp("") - clc - disp("\nDiscrete system nyquist analysis\n"); - disp("Display Nyquist plots of a discrete SISO system (nyquist)\n") - disp("We will first define a sampling time, T"); - cmd = "T = 0.01;"; - disp(cmd); - eval(cmd); - disp("\nExample #1, Consider the following transfer function:\n") - cmd = "sys1 = tf([2, -3.4, 1.5],[1, -1.6, 0.8],T);"; - disp(cmd); - eval(cmd); - disp("To examine the transfer function, use the command:"); - cmd = "sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the open loop zeros and poles, use the command:"); - cmd = "sysout(sys1,""zp"")"; - disp(cmd); - eval(cmd); - disp("\nTo view the system""s nyquist plot, execute the following"); - disp("command:") - cmd = "nyquist(sys1);"; - run_cmd; - disp("To change the range used for the frequency, a frequency"); - disp("is needed. Suppose the user would like to examine the"); - disp("nyquist plot in the frequency range of 0.01 - 31.6 rad/s."); - disp("\nThe frequency vector needed to do this is created with the"); - disp("command:"); - cmd = "wrange = logspace(-2,1.5,200);"; - disp(cmd); - eval(cmd); - disp("\nNyquist can be run again with this frequency vector"); - cmd = "nyquist(sys1,wrange);"; - run_cmd; - disp("\nIf the real and imaginary parts of the response are desired,"); - disp("perform the following command:\n"); - disp("[R,I,w]=nyquist(sys,wrange)\n") - disp("Variable Description:\n") - disp("R => real part of response") - disp("I => imaginary part of response") - disp("w => frequencies that the transfer function was evaluated at") - disp("sys => The system data structure"); - disp("wrange => optional vector of frequencies") - disp(" if wrange is entered in the argument list, the"); - disp(" system will be evaluated at these specific"); - prompt - - disp("") - clc - disp("\nExample #2, Consider the following set of poles and zeros:\n") - cmd = "sys2 = zp([0.98025 + 0.01397i; 0.98025 - 0.01397i],[0.96079;0.99005],1,T);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the open loop zeros and poles, use the command:"); - cmd = "sysout(sys2)"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's nyquist plot between the frequencies"); - disp("0.01 - 100 rad/s, execute the following commands:\n") - cmd = "wrange = logspace(-2,2,100);"; - disp(cmd); - eval(cmd); - cmd = "nyquist(sys2,wrange);"; - run_cmd; - prompt; - - disp("") - clc - disp("\nExample #3, Consider the following discrete state space"); - disp("system:\n"); - disp("This example will use the same system used in the third"); - disp("example in the continuous nyquist demo. First, that system"); - disp("will have to be re-entered useing the following commands:\n"); - cmd = "sys3 = ss([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 0, 0, -20, -12],[0;0;0;1],[50, 100, 0, 0],0);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the state-space system, use the command:"); - cmd = "sysout(sys3)"; - disp(cmd); - eval(cmd); - disp("\nTo examine the poles and zeros, use the command:"); - cmd = "sysout(sys3,""zp"")"; - disp(cmd); - eval(cmd); - disp("\nTo convert the system to discrete time, we need a sampling"); - disp("time which can be entered like this:"); - cmd = "T = 0.01"; - disp(cmd); - eval(cmd); - disp("\nNow the command, c2d, is used to convert the system from"); - disp("continuous to discrete time, with the following command"); - cmd = "dsys3 = c2d(sys3,T);"; - run_cmd; - disp("\nTo examine the new discrete state-space system, use the"); - disp("command"); - cmd = "sysout(dsys3);"; - disp(cmd); - eval(cmd); - disp("\nTo examine the new discrete poles and zeros, use the command:"); - cmd = "sysout(dsys3,""zp"")"; - disp(cmd); - eval(cmd); - disp("\nTo view the system's nyquist plot, execute the following"); - disp("commands:\n"); - cmd = "axis ([-4, 2, -2.5, 2.5]);"; - disp(cmd); eval(cmd); - cmd = "nyquist(dsys3);"; - run_cmd; - disp("Notice that the asymptotes swamp out the behavior of the plot") - disp("near the origin. You may use interactive nyquist plots") - disp("to \"zoom in\" on a plot as follows:") - - cmd = "atol = 1;"; - disp(cmd) - eval(cmd) - cmd = "nyquist(dsys3,[],[],[],atol);"; - run_cmd - prompt - - - disp("") - clc - disp("MIMO SYSTEM: Nyquist cannot be used for discrete MIMO systems"); - disp("at this time."); - ## cmd = "dsys_mimo = sysgroup(sys2,dsys3);"; - ## disp(cmd); - ## eval(cmd); - ## cmd = "sysout(dsys_mimo);"; - ## disp(cmd); - ## eval(cmd); - ## disp("\nTo view the system's nyquist plot, execute the following command:\n") - ## cmd = "nyquist(dsys_mimo);"; - ## run_cmd; - ## prompt - ## disp("\nTo view the nyquist plots for selected channels, the command form changes:") - ## cmd = "nyquist(dsys_mimo,[],1,1);"; - ## run_cmd; - ## disp("\nNotice that this bode plot is the same as the plot from example 2."); - prompt - closeplot - - - elseif( k2 == 3 ) - disp("\nMixed system nyquist analysis\n"); - disp("Nyquist exits with an error if it is passed a ""mixed"" system (one") - disp("with both continuous and discrete states). Use c2d or d2c to") - disp("convert the system to either pure digital or pure continuous form"); - endif - endwhile - elseif (j == 3) - help nichols - prompt - endif - endwhile - -endfunction
deleted file mode 100644 --- a/scripts/control/base/freqchkw.m +++ /dev/null @@ -1,48 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} freqchkw (@var{w}) -## Used by @command{__freqresp__} to check that input frequency vector @var{w} -## is valid. -## Returns boolean value. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1996 - -function USEW = freqchkw (w) - - if (nargin != 1) - print_usage (); - endif - - if (isempty (w)) - USEW = 0; - elseif (! isvector (w)) - error ("w (%dx%d): must be [], a vector or a scalar", - rows (w), columns (w)); - elseif (max (abs (imag(w))) != 0 && min (real (w)) <= 0) - error ("w must have real positive entries"); - else - w = sort (w); - USEW = 1; ## vector provided (check values later) - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/gram.m +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} gram (@var{a}, @var{b}) -## Return controllability gramian @var{m} of the continuous time system -## @math{dx/dt = a x + b u}. -## -## @var{m} satisfies @math{a m + m a' + b b' = 0}. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> - -function m = gram (a, b) - - if (nargin != 2) - print_usage (); - endif - - ## Let lyap do the error checking... - - m = lyap (a, b*b'); - -endfunction
deleted file mode 100644 --- a/scripts/control/base/impulse.m +++ /dev/null @@ -1,91 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{y}, @var{t}] =} impulse (@var{sys}, @var{inp}, @var{tstop}, @var{n}) -## Impulse response for a linear system. -## The system can be discrete or multivariable (or both). -## If no output arguments are specified, @code{impulse} -## produces a plot or the impulse response data for system @var{sys}. -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure. -## @item inp -## Index of input being excited -## @item tstop -## The argument @var{tstop} (scalar value) denotes the time when the -## simulation should end. -## @item n -## the number of data values. -## -## Both parameters @var{tstop} and @var{n} can be omitted and will be -## computed from the eigenvalues of the A Matrix. -## @end table -## @strong{Outputs} -## @table @var -## @item y -## Values of the impulse response. -## @item t -## Times of the impulse response. -## @end table -## @seealso{step} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: October 2, 1997 -## based on lsim.m of Scottedward Hodel -## modified by - -function [y, t] = impulse (sys, inp, tstop, n) - - if (nargin < 1 || nargin > 4) - print_usage (); - endif - - if (! isstruct (sys)) - error ("impulse: sys must be a system data structure."); - endif - - if (nargout == 0) - switch (nargin) - case (1) - __stepimp__ (2, sys); - case (2) - __stepimp__ (2, sys, inp); - case (3) - __stepimp__ (2, sys, inp, tstop); - case (4) - __stepimp__ (2, sys, inp, tstop, n); - endswitch - else - switch (nargin) - case (1) - [y, t] = __stepimp__ (2, sys); - case (2) - [y, t] = __stepimp__ (2, sys, inp); - case (3) - [y, t] = __stepimp__ (2, sys, inp, tstop); - case (4) - [y, t] = __stepimp__ (2, sys, inp, tstop, n); - endswitch - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/lqe.m +++ /dev/null @@ -1,110 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{k}, @var{p}, @var{e}] =} lqe (@var{a}, @var{g}, @var{c}, @var{sigw}, @var{sigv}, @var{z}) -## Construct the linear quadratic estimator (Kalman filter) for the -## continuous time system -## @iftex -## @tex -## $$ -## {dx\over dt} = A x + G u -## $$ -## $$ -## y = C x + v -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## dx -## -- = A x + G u -## dt -## -## y = C x + v -## @end example -## -## @end ifinfo -## where @var{w} and @var{v} are zero-mean gaussian noise processes with -## respective intensities -## -## @example -## sigw = cov (w, w) -## sigv = cov (v, v) -## @end example -## -## The optional argument @var{z} is the cross-covariance -## @code{cov (@var{w}, @var{v})}. If it is omitted, -## @code{cov (@var{w}, @var{v}) = 0} is assumed. -## -## Observer structure is @code{dz/dt = A z + B u + k (y - C z - D u)} -## -## The following values are returned: -## -## @table @var -## @item k -## The observer gain, -## @iftex -## @tex -## $(A - K C)$ -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{k}@var{c}) -## @end ifinfo -## is stable. -## -## @item p -## The solution of algebraic Riccati equation. -## -## @item e -## The vector of closed loop poles of -## @iftex -## @tex -## $(A - K C)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{k}@var{c}). -## @end ifinfo -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 - -function [k, p, e] = lqe (a, g, c, sigw, sigv, zz) - - if (nargin != 5 && nargin != 6) - error ("lqe: invalid number of arguments"); - endif - - ## The problem is dual to the regulator design, so transform to lqr - ## call. - - if (nargin == 5) - [k, p, e] = lqr (a', c', g*sigw*g', sigv); - else - [k, p, e] = lqr (a', c', g*sigw*g', sigv, g*zz); - endif - - k = k'; - -endfunction
deleted file mode 100644 --- a/scripts/control/base/lqg.m +++ /dev/null @@ -1,167 +0,0 @@ -## Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{k}, @var{q1}, @var{p1}, @var{ee}, @var{er}] =} lqg (@var{sys}, @var{sigw}, @var{sigv}, @var{q}, @var{r}, @var{in_idx}) -## Design a linear-quadratic-gaussian optimal controller for the system -## @example -## dx/dt = A x + B u + G w [w]=N(0,[Sigw 0 ]) -## y = C x + v [v] ( 0 Sigv ]) -## @end example -## or -## @example -## x(k+1) = A x(k) + B u(k) + G w(k) [w]=N(0,[Sigw 0 ]) -## y(k) = C x(k) + v(k) [v] ( 0 Sigv ]) -## @end example -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## @item sigw -## @itemx sigv -## intensities of independent Gaussian noise processes (as above) -## @item q -## @itemx r -## state, control weighting respectively. Control @acronym{ARE} is -## @item in_idx -## names or indices of controlled inputs (see @command{sysidx}, @command{cellidx}) -## -## default: last dim(R) inputs are assumed to be controlled inputs, all -## others are assumed to be noise inputs. -## @end table -## @strong{Outputs} -## @table @var -## @item k -## system data structure format @acronym{LQG} optimal controller (Obtain A, B, C -## matrices with @command{sys2ss}, @command{sys2tf}, or @command{sys2zp} as -## appropriate). -## @item p1 -## Solution of control (state feedback) algebraic Riccati equation. -## @item q1 -## Solution of estimation algebraic Riccati equation. -## @item ee -## Estimator poles. -## @item es -## Controller poles. -## @end table -## @seealso{h2syn, lqe, lqr} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## revised for new system format August 1996 - -function [K, Q1, P1, Ee, Er] = lqg (sys, Sigw, Sigv, Q, R, input_list) - - if (nargin < 5 || nargin > 6) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure"); - endif - - DIG = is_digital (sys); - [A, B, C, D, tsam, n, nz, stname, inname, outname] = sys2ss (sys); - [n, nz, nin, nout] = sysdimensions (sys); - if (nargin == 5) - ## construct default input_list - input_list = (columns(Sigw)+1):nin; - endif - - if (! (n+nz)) - error("lqg: 0 states in system"); - - elseif (nin != columns (Sigw) + columns (R)) - error ("lqg: sys has %d inputs, dim(Sigw)=%d, dim(u)=%d", - nin, columns (Sigw), columns (R)); - - elseif (nout != columns (Sigv)) - error ("lqg: sys has %d outputs, dim(Sigv)=%d", nout, columns (Sigv)); - endif - - ## check for names of signals - if (is_signal_list (input_list) || ischar (input_list)) - input_list = sysidx (sys, "in", input_list); - endif - - if (length (input_list) != columns (R)) - error ("lqg: length(input_list)=%d, columns(R)=%d", - length (input_list), columns (R)); - endif - - if (! issquare (Sigw)) - error ("lqg: Sigw is not square"); - endif - - if (! issquare (Sigv)) - error ("lqg: Sigv is not square"); - endif - - if (! issquare (Q)) - error ("lqg: Q is not square"); - endif - - if (! issquare (R)) - error ("lqg: Q is not square"); - endif - - ## permute (if need be) - if (nargin == 6) - all_inputs = sysreorder (nin, input_list); - B = B(:,all_inputs); - inname = inname (all_inputs); - endif - - ## put parameters into correct variables - m1 = columns (Sigw); - m2 = m1+1; - G = B(:,1:m1); - B = B(:,m2:nin); - - ## now we can just do the design; call dlqr and dlqe, since all matrices - ## are not given in Cholesky factor form (as in h2syn case) - if (DIG) - [Ks, P1, Er] = dlqr (A, B, Q, R); - [Ke, Q1, jnk, Ee] = dlqe (A, G, C, Sigw, Sigv); - else - [Ks, P1, Er] = lqr (A, B, Q, R); - [Ke, Q1, Ee] = lqe (A, G, C, Sigw, Sigv); - endif - Ac = A - Ke*C - B*Ks; - Bc = Ke; - Cc = -Ks; - Dc = zeros (rows (Cc), columns (Bc)); - - ## fix state names - stname1 = strappend (stname, "_e"); - - ## fix controller output names - outname1 = strappend (inname(m2:nin), "_K"); - - ## fix controller input names - inname1 = strappend (outname, "_K"); - - if (DIG) - K = ss (Ac, Bc, Cc, Dc, tsam, n, nz, stname1, inname1, outname1, - 1:rows(Cc)); - else - K = ss (Ac, Bc, Cc, Dc, tsam, n, nz, stname, inname1, outname1); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/lqr.m +++ /dev/null @@ -1,174 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{k}, @var{p}, @var{e}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{z}) -## construct the linear quadratic regulator for the continuous time system -## @iftex -## @tex -## $$ -## {dx\over dt} = A x + B u -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## dx -## -- = A x + B u -## dt -## @end example -## -## @end ifinfo -## to minimize the cost functional -## @iftex -## @tex -## $$ -## J = \int_0^\infty x^T Q x + u^T R u -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## infinity -## / -## J = | x' Q x + u' R u -## / -## t=0 -## @end example -## @end ifinfo -## -## @noindent -## @var{z} omitted or -## @iftex -## @tex -## $$ -## J = \int_0^\infty x^T Q x + u^T R u + 2 x^T Z u -## $$ -## @end tex -## @end iftex -## @ifinfo -## -## @example -## infinity -## / -## J = | x' Q x + u' R u + 2 x' Z u -## / -## t=0 -## @end example -## -## @end ifinfo -## @var{z} included. -## -## The following values are returned: -## -## @table @var -## @item k -## The state feedback gain, -## @iftex -## @tex -## $(A - B K)$ -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{b}@var{k}) -## @end ifinfo -## is stable and minimizes the cost functional -## -## @item p -## The stabilizing solution of appropriate algebraic Riccati equation. -## -## @item e -## The vector of the closed loop poles of -## @iftex -## @tex -## $(A - B K)$. -## @end tex -## @end iftex -## @ifinfo -## (@var{a} - @var{b}@var{k}). -## @end ifinfo -## @end table -## -## @strong{Reference} -## Anderson and Moore, @cite{Optimal control: linear quadratic methods}, -## Prentice-Hall, 1990, pp. 56--58. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993. - -function [k, p, e] = lqr (a, b, q, r, s) - - ## disp("lqr: entry"); - - if (nargin != 4 && nargin != 5) - error ("lqr: invalid number of arguments"); - endif - - ## Check a. - if ((n = issquare (a)) == 0) - error ("lqr: requires 1st parameter(a) to be square"); - endif - - ## Check b. - [n1, m] = size (b); - if (n1 != n) - error ("lqr: a,b not conformal"); - endif - - ## Check q. - if ((n1 = issquare (q)) == 0 || n1 != n) - error ("lqr: q must be square and conformal with a"); - endif - - ## Check r. - if ((m1 = issquare(r)) == 0 || m1 != m) - error ("lqr: r must be square and conformal with column dimension of b"); - endif - - ## Check if n is there. - if (nargin == 5) - [n1, m1] = size (s); - if (n1 != n || m1 != m) - error ("lqr: z must be identically dimensioned with b"); - endif - - ## Incorporate cross term into a and q. - ao = a - (b/r)*s'; - qo = q - (s/r)*s'; - else - s = zeros (n, m); - ao = a; - qo = q; - endif - - ## Check that q, (r) are symmetric, positive (semi)definite - - if (issymmetric (q) && issymmetric (r) - && all (eig (q) >= 0) && all (eig (r) > 0)) - p = are (ao, (b/r)*b', qo); - k = r\(b'*p + s'); - e = eig (a - b*k); - else - error ("lqr: q (r) must be symmetric positive (semi) definite"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/lsim.m +++ /dev/null @@ -1,108 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{y}, @var{x}] =} lsim (@var{sys}, @var{u}, @var{t}, @var{x0}) -## Produce output for a linear simulation of a system; produces -## a plot for the output of the system, @var{sys}. -## -## @var{u} is an array that contains the system's inputs. Each row in @var{u} -## corresponds to a different time step. Each column in @var{u} corresponds to a -## different input. @var{t} is an array that contains the time index of the -## system; @var{t} should be regularly spaced. If initial conditions are required -## on the system, the @var{x0} vector should be added to the argument list. -## -## When the lsim function is invoked a plot is not displayed; -## however, the data is returned in @var{y} (system output) -## and @var{x} (system states). -## @end deftypefn - -## Author: David Clem -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1995 -## modified by John Ingram for system format August 1996 - -function [y, x] = lsim (sys, u, t, x0) - - if (nargin < 3 || nargin > 4) - print_usage (); - endif - - if (! isstruct (sys)) - error ("sys must be in system data structure"); - endif - - sys = sysupdate (sys,"ss"); - - [ncstates, ndstates, nin, nout] = sysdimensions (sys); - [a, b, c, d] = sys2ss (sys); - - if (nargin == 3) - x0 = zeros (columns (a), 1); - endif - - if (rows (u) != length (t)) - error ("lsim: There should be an input value (row) for each time instant"); - endif - if (columns (u) != columns (d)) - error ("lsim: U and d should have the same number of inputs"); - endif - if (columns (x0) > 1) - error ("lsim: Initial condition vector should have only one column"); - endif - if (rows (x0) > rows (a)) - error ("lsim: Initial condition vector is too large"); - endif - - Ts = 0; - t(2)-t(1); - u=u'; - n = max (size (t)); - - if (isa (t, "single")) - tol = 10 * eps ("single"); - else - tol = 10 * eps; - endif - for ii = 1:(n-1) - ## check if step size changed - ## FIXME -- this is probably not the best test, but it is - ## better than a test for exact equality. - if (abs (t(ii+1) - t(ii) - Ts) > tol) - Ts = t(ii+1) - t(ii); - ## [F,G] = c2d(a,b,Ts); - dsys = c2d (sys, Ts); - [F, G] = sys2ss (dsys); - endif - - x(:,ii) = x0; - x0 = F*x0 + G*u(:,ii); - endfor - - ## pick up last point - x(:,n) = x0; - - y = c*x + d*u; - if (nargout == 0) - plot (t, y); - y = []; - x = []; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/ltifr.m +++ /dev/null @@ -1,114 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{out} =} ltifr (@var{a}, @var{b}, @var{w}) -## @deftypefnx {Function File} {@var{out} =} ltifr (@var{sys}, @var{w}) -## Linear time invariant frequency response of single-input systems. -## -## @strong{Inputs} -## @table @var -## @item a -## @itemx b -## coefficient matrices of @math{dx/dt = A x + B u} -## @item sys -## system data structure -## @item w -## vector of frequencies -## @end table -## @strong{Output} -## @table @var -## @item out -## frequency response, that is: -## @end table -## @iftex -## @tex -## $$ G(j\omega) = (j\omega I-A)^{-1}B $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## -1 -## G(s) = (jw I-A) B -## @end example -## @end ifinfo -## for complex frequencies @math{s = jw}. -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Author: David Clem -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1995 -## updated by John Ingram August 1996 for system format - -function out = ltifr (a, b, w) - - if (nargin < 2 || nargin > 3) - error("incorrect number of input arguments"); - endif - - if (nargin == 2) - sys = a; - w = b; - if(! isstruct (sys)) - error ("two arguments: 1st must be a system data structure"); - endif - - if (! isvector (w)) - error ("w must be a vector"); - endif - - [nn, nz, mm, pp] = sysdimensions (sys); - if (mm != 1) - error("sys has %d > 1 inputs", mm); - endif - - [a, b] = sys2ss (sys); - - else - - if (columns (a) != rows (b)), - error ("ltifr: A(%dx%d), B(%dx%d) not compatibly dimensioned", - rows (a), columns(a), rows(b), columns(b)); - endif - - if (columns (b) != 1) - error ("ltifr: b(%dx%d) must be a single column vector", - rows(b), columns(b)); - endif - - if (! issquare (a)) - error ("ltifr: A(%dx$d) must be square", rows(a), columns(a)) - endif - - endif - - if (! isvector (w)) - error ("w must be a vector"); - endif - - ey = eye (size (a)); - lw = length (w); - out = ones (columns (a), lw); - - for ii = 1:lw, - out(:,ii) = (w(ii)*ey-a)\b; - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/base/lyap.m +++ /dev/null @@ -1,142 +0,0 @@ -## Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} lyap (@var{a}, @var{b}, @var{c}) -## @deftypefnx {Function File} {} lyap (@var{a}, @var{b}) -## Solve the Lyapunov (or Sylvester) equation via the Bartels-Stewart -## algorithm (Communications of the @acronym{ACM}, 1972). -## -## If @var{a}, @var{b}, and @var{c} are specified, then @code{lyap} returns -## the solution of the Sylvester equation -## @iftex -## @tex -## $$ A X + X B + C = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a x + x b + c = 0 -## @end example -## @end ifinfo -## If only @code{(a, b)} are specified, then @command{lyap} returns the -## solution of the Lyapunov equation -## @iftex -## @tex -## $$ A^T X + X A + B = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a' x + x a + b = 0 -## @end example -## @end ifinfo -## If @var{b} is not square, then @code{lyap} returns the solution of either -## @iftex -## @tex -## $$ A^T X + X A + B^T B = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a' x + x a + b' b = 0 -## @end example -## @end ifinfo -## @noindent -## or -## @iftex -## @tex -## $$ A X + X A^T + B B^T = 0 $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## a x + x a' + b b' = 0 -## @end example -## @end ifinfo -## @noindent -## whichever is appropriate. -## -## Solves by using the Bartels-Stewart algorithm (1972). -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Adapted-By: jwe - -function x = lyap (a, b, c) - - if (nargin != 3 && nargin != 2) - print_usage (); - endif - - if ((n = issquare(a)) == 0) - error ("lyap: a is not square"); - endif - - if (nargin == 2) - - ## Transform Lyapunov equation to Sylvester equation form. - - if ((m = issquare (b)) == 0) - if ((m = rows (b)) == n) - - ## solve a x + x a' + b b' = 0 - - b = b * b'; - a = a'; - else - - ## Try to solve a'x + x a + b' b = 0. - - m = columns (b); - b = b' * b; - endif - - if (m != n) - error ("lyap: a, b not conformably dimensioned"); - endif - endif - - ## Set up Sylvester equation. - - c = b; - b = a; - a = b'; - - else - - ## Check dimensions. - - if ((m = issquare (b)) == 0) - error ("lyap: b must be square in a sylvester equation"); - endif - - [n1, m1] = size(c); - - if (n != n1 || m != m1) - error("lyap: a,b,c not conformably dimensioned"); - endif - endif - - ## Call octave built-in function. - - x = syl (a, b, c); - -endfunction
deleted file mode 100644 --- a/scripts/control/base/nichols.m +++ /dev/null @@ -1,150 +0,0 @@ -## Copyright (C) 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{mag}, @var{phase}, @var{w}] =} nichols (@var{sys}, @var{w}, @var{outputs}, @var{inputs}) -## Produce Nichols plot of a system. -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure (must be either purely continuous or discrete; -## see @command{is_digital}). -## @item w -## Frequency values for evaluation. -## @itemize -## @item if sys is continuous, then nichols evaluates @math{G(jw)}. -## @item if sys is discrete, then nichols evaluates @math{G(exp(jwT))}, -## where @var{T}=@var{sys}. @var{tsam} is the system sampling time. -## @item the default frequency range is selected as follows (These -## steps are @strong{not} performed if @var{w} is specified): -## @enumerate -## @item via routine @command{__bodquist__}, isolate all poles and zeros away from -## @var{w}=0 (@math{jw=0} or @math{exp(jwT)=1}) and select the frequency range -## based on the breakpoint locations of the frequencies. -## @item if sys is discrete time, the frequency range is limited to jwT in -## @iftex -## @tex -## $ [0, 2p\pi] $. -## @end tex -## @end iftex -## @ifinfo -## [0,2p*pi]. -## @end ifinfo -## @item A ``smoothing'' routine is used to ensure that the plot phase does -## not change excessively from point to point and that singular points -## (e.g., crossovers from +/- 180) are accurately shown. -## @end enumerate -## @end itemize -## @item outputs -## @itemx inputs -## the names or indices of the output(s) and input(s) to be used in the -## frequency response; see @command{sysprune}. -## @end table -## @strong{Outputs} -## @table @var -## @item mag -## @itemx phase -## The magnitude and phase of the frequency response @math{G(jw)} or -## @math{G(exp(jwT))} at the selected frequency values. -## @item w -## The vector of frequency values used. -## @end table -## If no output arguments are given, @command{nichols} plots the results to the screen. -## Descriptive labels are automatically placed. See @command{xlabel}, -## @command{ylabel}, and @command{title}. -## -## Note: if the requested plot is for an @acronym{MIMO} system, @var{mag} is set to -## @iftex -## @tex -## $ \Vert G(jw) \Vert $ or $ \Vert G( {\rm exp}(jwT) \Vert $ -## @end tex -## @end iftex -## @ifinfo -## ||G(jw)|| or ||G(exp(jwT))|| -## @end ifinfo -## and phase information is not computed. -## @end deftypefn - -function [mag2, phase2, w2] = nichols (sys, w, outputs, inputs) - - ## check number of input arguments given - if (nargin < 1 || nargin > 4) - print_usage (); - endif - if (nargin < 2) - w = []; - endif - if (nargin < 3) - outputs = []; - endif - if (nargin < 4) - inputs = []; - endif - - [f, w, sys] = __bodquist__ (sys, w, outputs, inputs, "nichols"); - - [stname, inname, outname] = sysgetsignals (sys); - systsam = sysgettsam (sys); - - ## Get the magnitude and phase of f. - mag = abs (f); - phase = arg (f)*180.0/pi; - - if (nargout < 1), - ## Plot the information - - if (max (mag) > 0) - md = 20 * log10 (mag); - plot (phase, md); - ylabel ("Gain in dB"); - else - md = mag; - plot (phase, md); - ylabel ("Gain |Y/U|") - endif - - grid ("on"); - - if (is_digital (sys)) - tistr = "(exp(jwT)) "; - else - tistr = "(jw)"; - endif - - xlabel ("Phase (deg)"); - - if (is_siso (sys)) - title (sprintf ("Nichols plot of |[Y/U]%s|, u=%s, y=%s", tistr, - sysgetsignals (sys, "in", 1, 1), - sysgetsignals (sys, "out", 1, 1))); - else - title ([ "||Y(", tistr, ")/U(", tistr, ")||"]); - printf ("MIMO plot from\n%s\nto\n%s\n", __outlist__ (inname, " "), - __outlist__ (outname, " ")); - endif - - axis (axis2dlim ([phase(:), md(:)])); - else - mag2 = mag; - phase2 = phase; - w2 = w; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/nyquist.m +++ /dev/null @@ -1,211 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{realp}, @var{imagp}, @var{w}] =} nyquist (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx}, @var{atol}) -## @deftypefnx {Function File} {} nyquist (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx}, @var{atol}) -## Produce Nyquist plots of a system; if no output arguments are given, Nyquist -## plot is printed to the screen. -## -## Compute the frequency response of a system. -## -## @strong{Inputs} (pass as empty to get default values) -## @table @var -## @item sys -## system data structure (must be either purely continuous or discrete; -## see @code{is_digital}) -## @item w -## frequency values for evaluation. -## If sys is continuous, then bode evaluates @math{G(@var{jw})}; -## if sys is discrete, then bode evaluates @math{G(exp(@var{jwT}))}, -## where @var{T} is the system sampling time. -## @item default -## the default frequency range is selected as follows: (These -## steps are @strong{not} performed if @var{w} is specified) -## @enumerate -## @item via routine @command{__bodquist__}, isolate all poles and zeros away from -## @var{w}=0 (@var{jw}=0 or @math{exp(@var{jwT})=1}) and select the frequency -## range based on the breakpoint locations of the frequencies. -## @item if @var{sys} is discrete time, the frequency range is limited -## to @var{jwT} in -## @ifinfo -## [0,2p*pi] -## @end ifinfo -## @iftex -## @tex -## $ [ 0,2 p \pi ] $ -## @end tex -## @end iftex -## @item A ``smoothing'' routine is used to ensure that the plot phase does -## not change excessively from point to point and that singular -## points (e.g., crossovers from +/- 180) are accurately shown. -## @end enumerate -## @item atol -## for interactive nyquist plots: atol is a change-in-slope tolerance -## for the of asymptotes (default = 0; 1e-2 is a good choice). This allows -## the user to ``zoom in'' on portions of the Nyquist plot too small to be -## seen with large asymptotes. -## @end table -## @strong{Outputs} -## @table @var -## @item realp -## @itemx imagp -## the real and imaginary parts of the frequency response -## @math{G(jw)} or @math{G(exp(jwT))} at the selected frequency values. -## @item w -## the vector of frequency values used -## @end table -## -## If no output arguments are given, nyquist plots the results to the screen. -## If @var{atol} != 0 and asymptotes are detected then the user is asked -## interactively if they wish to zoom in (remove asymptotes) -## Descriptive labels are automatically placed. -## -## Note: if the requested plot is for an @acronym{MIMO} system, a warning message is -## presented; the returned information is of the magnitude -## @iftex -## @tex -## $ \Vert G(jw) \Vert $ or $ \Vert G( {\rm exp}(jwT) \Vert $ -## @end tex -## @end iftex -## @ifinfo -## ||G(jw)|| or ||G(exp(jwT))|| -## @end ifinfo -## only; phase information is not computed. -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 13, 1994 -## A. S. Hodel July 1995 (adaptive frequency spacing, -## remove acura parameter, etc.) -## Revised by John Ingram July 1996 for system format - -function [realp, imagp, w] = nyquist (sys, w, outputs, inputs, atol) - - ## Both bode and nyquist share the same introduction, so the common - ## parts are in a file called __bodquist__.m. It contains the part that - ## finds the number of arguments, determines whether or not the system - ## is SISO, andd computes the frequency response. Only the way the - ## response is plotted is different between the two functions. - - ## check number of input arguments given - if (nargin < 1 || nargin > 5) - print_usage (); - endif - if (nargin < 2) - w = []; - endif - if (nargin < 3) - outputs = []; - endif - if (nargin < 4) - inputs = []; - endif - if (nargin < 5) - atol = 0; - elseif (! (is_sample (atol) || atol == 0)) - error ("nyquist: atol must be a nonnegative scalar") - endif - - ## signal to __bodquist__ who's calling - - [f, w, sys] = __bodquist__ (sys, w, outputs, inputs, "nyquist"); - - ## Get the real and imaginary part of f. - realp = real (f); - imagp = imag (f); - - ## No output arguments, then display plot, otherwise return data. - if (nargout == 0) - dnplot = 0; - while (! dnplot) - plot (realp, imagp, "- ;+w;", realp, -imagp, "-@ ;-w;"); - - grid ("on"); - - if (is_digital (sys)) - tstr = " G(e^{jw}) "; - else - tstr = " G(jw) "; - endif - xlabel (sprintf ("Re(%s)", tstr)); - ylabel (sprintf ("Im(%s)", tstr)); - - [stn, inn, outn] = sysgetsignals (sys); - if (is_siso (sys)) - title (sprintf ("Nyquist plot from %s to %s, w (rad/s) in [%e, %e]", - inn{1}, outn{1}, w(1), w(end))); - endif - - axis (axis2dlim ([[realp(:), imagp(:)]; [realp(:), -imagp(:)]])); - - ## check for interactive plots - dnplot = 1; # assume done; will change later if atol is satisfied - if (atol > 0 && length (f) > 2) - - ## check for asymptotes - fmax = max (abs (f)); - fi = find (abs (f) == fmax, 1, "last"); - - ## compute angles from point to point - df = diff (f); - th = atan2 (real (df), imag (df)) * 180 / pi; - - ## get angle at fmax - if (fi == length (f)) - fi = fi-1; - endif - thm = th(fi); - - ## now locate consecutive angles within atol of thm - ith_same = find (abs (th - thm) < atol); - ichk = union (fi, find (diff (ith_same) == 1)); - - ## locate max, min consecutive indices in ichk - loval = max (complement (ichk, 1:fi)); - if (isempty (loval)) - loval = fi; - else - loval = loval + 1; - endif - - hival = min (complement (ichk, fi:length(th))); - if (isempty (hival)) - hival = fi+1; - endif - - keep_idx = complement (loval:hival, 1:length(w)); - - if (length (keep_idx)) - resp = input ("Remove asymptotes and zoom in (y or n): ", 1); - if (resp(1) == "y") - dnplot = 0; # plot again - w = w(keep_idx); - f = f(keep_idx); - realp = real (f); - imagp = imag (f); - endif - endif - - endif - endwhile - w = realp = imagp = []; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/obsv.m +++ /dev/null @@ -1,75 +0,0 @@ -## Copyright (C) 1997, 2000, 2002, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} obsv (@var{sys}, @var{c}) -## @deftypefnx {Function File} {} obsv (@var{a}, @var{c}) -## Build observability matrix: -## @iftex -## @tex -## $$ Q_b = \left[ \matrix{ C \cr -## CA \cr -## CA^2 \cr -## \vdots \cr -## CA^{n-1} } \right ] $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## @group -## | C | -## | CA | -## Qb = | CA^2 | -## | ... | -## | CA^(n-1) | -## @end group -## @end example -## @end ifinfo -## of a system data structure or the pair (@var{a}, @var{c}). -## -## The numerical properties of @command{is_observable} -## are much better for observability tests. -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: November 4, 1997 - -function Qb = obsv (sys, c) - - if (nargin == 2) - a = sys; - elseif (nargin == 1 && isstruct(sys)) - sysupdate (sys, "ss"); - [a, b, c] = sys2ss (sys); - else - print_usage (); - endif - - if (! is_abcd (a, c')) - Qb = []; - else - ## no need to check dimensions, we trust is_abcd(). - [na, ma] = size (a); - [nc, mc] = size (c); - Qb = zeros (na*nc, ma); - for i = 1:na - Qb((i-1)*nc+1:i*nc, :) = c; - c = c * a; - endfor - endif -endfunction
deleted file mode 100644 --- a/scripts/control/base/place.m +++ /dev/null @@ -1,126 +0,0 @@ -## Copyright (C) 1997, 2000, 2002, 2003, 2004, 2005, 2007 -## Jose Daniel Munoz Frias -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{K} =} place (@var{sys}, @var{p}) -## Computes the matrix @var{K} such that if the state -## is feedback with gain @var{K}, then the eigenvalues of the closed loop -## system (i.e. @math{A-BK}) are those specified in the vector @var{p}. -## -## Version: Beta (May-1997): If you have any comments, please let me know. -## (see the file place.m for my address) -## @end deftypefn - -## Author: Jose Daniel Munoz Frias - -## Universidad Pontificia Comillas -## ICAIdea -## Alberto Aguilera, 23 -## 28015 Madrid, Spain -## -## E-Mail: daniel@dea.icai.upco.es -## -## Phone: 34-1-5422800 Fax: 34-1-5596569 -## -## Algorithm taken from "The Control Handbook", IEEE press pp. 209-212 -## -## code adaped by A.S.Hodel (a.s.hodel@eng.auburn.edu) for use in controls -## toolbox - -function K = place (sys, P) - - if (nargin != 2) - print_usage (); - endif - - ## check arguments - - if (! isstruct (sys)) - error ("sys must be in system data structure format (see ss)"); - endif - sys = sysupdate (sys, "ss"); # make sure it has state space form up to date - if (! is_controllable (sys)) - error ("sys is not controllable"); - elseif (min (size (P)) != 1) - error ("P must be a vector") - else - P = P(:); # make P a column vector - endif - ## system must be purely continuous or discrete - is_digital (sys); - [n, nz, m, p] = sysdimensions (sys); - nx = n+nz; # already checked that it's not a mixed system. - if (m != 1) - error ("sys has %d inputs; need only 1", m); - endif - - ## takes the A and B matrix from the system representation - [A, B] = sys2ss (sys); - sp = length (P); - if (nx == 0) - error ("place: A matrix is empty (0x0)"); - elseif (nx != length (P)) - error ("A=(%dx%d), P has %d entries", nx, nx, length (P)) - endif - - ## arguments appear to be compatible; let's give it a try! - ## The second step is the calculation of the characteristic polynomial ofA - PC = poly (A); - - ## Third step: Calculate the transformation matrix T that transforms the state - ## equation in the controllable canonical form. - - ## first we must calculate the controllability matrix M: - M = B; - AA = A; - for n = 2:nx - M(:,n) = AA*B; - AA = AA*A; - endfor - - ## second, construct the matrix W - PCO = PC(nx:-1:1); - PC1 = PCO; # Matrix to shift and create W row by row - - for n = 1:nx - W(n,:) = PC1; - PC1 = [PCO(n+1:nx), zeros(1,n)]; - endfor - - T = M*W; - - ## finaly the matrix K is calculated - PD = poly (P); # The desired characteristic polynomial - PD = PD(nx+1:-1:2); - PC = PC(nx+1:-1:2); - - K = (PD-PC)/T; - - ## Check if the eigenvalues of (A-BK) are the same specified in P - Pcalc = eig (A-B*K); - - Pcalc = sortcom (Pcalc); - P = sortcom (P); - - if (max ((abs(Pcalc)-abs(P))./abs(P) ) > 0.1) - warning ("place: Pole placed at more than 10% relative error from specified"); - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/base/pzmap.m +++ /dev/null @@ -1,89 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{zer}, @var{pol}] =} pzmap (@var{sys}) -## Plots the zeros and poles of a system in the complex plane. -## -## @strong{Input} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Outputs} -## @table @var -## @item pol -## @item zer -## if omitted, the poles and zeros are plotted on the screen. -## otherwise, @var{pol} and @var{zer} are returned as the -## system poles and zeros (see @command{sys2zp} for a preferable function call). -## @end table -## @end deftypefn - -function [zer, pol] = pzmap (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)); - error ("pzmap: sys must be in system format"); - endif - - [zer, pol] = sys2zp (sys); - - ## force to column vectors, split into real, imaginary parts - zerdata = poldata = []; - if (length (zer)) - zer = reshape (zer, length (zer), 1); - zerdata = [real(zer(:,1)), imag(zer(:,1))]; - endif - if (length (pol)) - pol = reshape (pol, length (pol), 1); - poldata = [real(pol(:,1)), imag(pol(:,1))]; - endif - - ## determine continuous or discrete plane - vars = "sz"; - varstr = vars(is_digital (sys) + 1); - - ## Plot the data - - if (length (zer) == 0) - plot (poldata(:,1), poldata(:,2), "@12 ;poles (no zeros);"); - elseif (length (pol) == 0) - plot (zerdata(:,1), zerdata(:,2), "@31 ;zeros (no poles);"); - else - plot (zerdata(:,1), zerdata(:,2), "@31 ;zeros;", - poldata(:,1), poldata(:,2), "@12 ;poles;"); - endif - - if (is_siso (sys)) - title (sprintf ("Pole-zero map from %s to %s", - sysgetsignals (sys, "in", 1, 1), - sysgetsignals (sys, "out", 1, 1))); - endif - - xlabel (sprintf ("Re(%s)", varstr)); - ylabel (sprintf ("Im(%s)", varstr)); - grid ("on"); - - ## compute axis limits - axis (axis2dlim ([zerdata; poldata])); - -endfunction
deleted file mode 100644 --- a/scripts/control/base/rldemo.m +++ /dev/null @@ -1,302 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} rldemo (@var{inputs}) -## Octave Control toolbox demo: Root Locus demo. -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## Updated by John Ingram December 1996 - -function rldemo () - - while (1) - clc - k = menu("Octave Root Locus Demo", ... - "Display continuous system's open loop poles and zeros (pzmap)", ... - "Display discrete system's open loop poles and zeros (pzmap)", ... - "Display root locus diagram of SISO continuous system (rlocus)", ... - "Display root locus diagram of SISO discrete system (rlocus)", ... - "Return to main demo menu"); - if (k == 1) - clc - help pzmap - prompt - - clc - disp("Display continuous system's open loop poles and zeros (pzmap)\n"); - disp("Example #1, Consider the following continuous transfer function:"); - cmd = "sys1 = tf([1.5, 18.5, 6], [1, 4, 155, 302, 5050]);"; - disp(cmd); - eval(cmd); - cmd ="sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys1,""zp"");"; - disp(cmd); - eval(cmd); - disp("View the system's open loop poles and zeros with the command:") - cmd = "pzmap(sys1);"; - run_cmd - prompt - - clc - disp("Example #2, Consider the following set of poles and zeros:"); - cmd = "sys2 = zp([-1, 5, -23],[-1, -10, -7+5i, -7-5i],5);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys2);"; - disp(cmd); - eval(cmd); - disp("\nThe pzmap command for the zp form is the same as the tf form:") - cmd = "pzmap(sys2);"; - run_cmd; - disp("\nThe internal representation of the system is not important;"); - disp("pzmap automatically sorts it out internally."); - prompt; - - clc - disp("Example #3, Consider the following state space system:\n"); - cmd = "sys3=ss([0, 1; -10, -11], [0; 1], [0, -2], 1);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys3);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys3,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nOnce again, the pzmap command is the same:"); - cmd = "pzmap(sys3);"; - run_cmd; - prompt; - - closeplot - clc - - elseif (k == 2) - clc - help pzmap - prompt - - clc - disp("\nDisplay discrete system's open loop poles and zeros (pzmap)\n"); - disp("First we must define a sampling time, as follows:\n"); - cmd = "Tsam = 1;"; - run_cmd; - disp("Example #1, Consider the following discrete transfer function:"); - cmd = "sys1 = tf([1.05, -0.09048], [1, -2, 1],Tsam);"; - disp(cmd); - eval(cmd); - cmd ="sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys1,""zp"");"; - disp(cmd); - eval(cmd); - disp("View the system's open loop poles and zeros with the command:") - cmd = "pzmap(sys1);"; - run_cmd - prompt - - clc - disp("Example #2, Consider the following set of discrete poles and zeros:"); - cmd = "sys2 = zp(-0.717, [1, -0.368], 3.68, Tsam);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys2);"; - disp(cmd); - eval(cmd); - disp("\nThe pzmap command for the zp form is the same as the tf form:") - cmd = "pzmap(sys2);"; - run_cmd; - disp("\nThe internal representation of the system is not important;"); - disp("pzmap automatically sorts it out internally."); - prompt; - - clc - disp("Example #3, Consider the following discrete state space system:\n"); - cmd = "sys3=ss([1, 0.0952; 0, 0.905], [0.00484; 0.0952], [1, 0], 0, Tsam);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys3);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys3,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nOnce again, the pzmap command is the same:"); - cmd = "pzmap(sys3);"; - run_cmd; - prompt; - - closeplot - clc - - elseif (k == 3) - clc - help rlocus - prompt; - - clc - disp("Display root locus of a continuous SISO system (rlocus)\n") - disp("Example #1, Consider the following continuous transfer function:"); - cmd = "sys1 = tf([1.5, 18.5, 6],[1, 4, 155, 302, 5050]);"; - disp(cmd); - eval(cmd); - cmd ="sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys1,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nWhen using rlocus, inital system poles are displayed as X's.") - disp("Moving poles are displayed as diamonds. Zeros are displayed as") - disp("boxes. The simplest form of the rlocus command is as follows:") - cmd = "rlocus(sys1);"; - run_cmd - disp("\nrlocus automatically selects the minimum and maximum gains based") - disp("on the real-axis locus breakpoints. The plot limits are chosen") - disp("to be no more than 10 times the maximum magnitude of the open") - disp("loop poles/zeros."); - prompt - - clc - disp("Example #2, Consider the following set of poles and zeros:"); - cmd = "sys2 = zp([],[0, -20, -2, -0.1],5);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys2);"; - disp(cmd); - eval(cmd); - disp("\nThe rlocus command for the zp form is the same as the tf form:") - cmd = "rlocus(sys2);"; - run_cmd; - disp("\nThe internal representation of the system is not important;"); - disp("rlocus automatically sorts it out internally."); - prompt; - - clc - disp("Example #3, Consider the following state space system:\n"); - cmd = "sys3=ss([0, 1; -10, -11], [0; 1], [0, -2], 0);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys3);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys3,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nOnce again, the rlocus command is the same:"); - cmd = "rlocus(sys3);"; - run_cmd; - - disp("\nNo matter what form the system is in, the rlocus command works the"); - disp("the same."); - prompt; - - closeplot - clc - - elseif (k == 4) - clc - help rlocus - prompt - - clc - disp("Display root locus of a discrete SISO system (rlocus)\n") - disp("First we must define a sampling time, as follows:\n"); - cmd = "Tsam = 1;"; - run_cmd; - disp("Example #1, Consider the following discrete transfer function:"); - cmd = "sys1 = tf([1.05, -0.09048],[1, -2, 1],Tsam);"; - disp(cmd); - eval(cmd); - cmd ="sysout(sys1);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys1,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nWhen using rlocus, inital system poles are displayed as X's.") - disp("Moving poles are displayed as diamonds. Zeros are displayed as") - disp("boxes. The simplest form of the rlocus command is as follows:") - cmd = "rlocus(sys1);"; - run_cmd - disp("\nrlocus automatically selects the minimum and maximum gains based") - disp("on the real-axis locus breakpoints. The plot limits are chosen") - disp("to be no more than 10 times the maximum magnitude of the open") - disp("loop poles/zeros."); - prompt - - clc - disp("Example #2, Consider the following set of discrete poles and zeros:"); - cmd = "sys2 = zp(-0.717, [1, -0.368], 3.68, Tsam);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys2);"; - disp(cmd); - eval(cmd); - disp("\nThe rlocus command for the zp form is the same as the tf form:") - cmd = "rlocus(sys2);"; - run_cmd; - disp("\nThe internal representation of the system is not important;"); - disp("rlocus automatically sorts it out internally. Also, it does not"); - disp("matter if the system is continuous or discrete. rlocus also sorts"); - disp("this out automatically"); - prompt; - - clc - disp("Example #3, Consider the following discrete state space system:\n"); - cmd = "sys3=ss([1, 0.0952; 0, 0.905], [0.00484; 0.0952], [1, 0], 0, Tsam);"; - disp(cmd); - eval(cmd); - cmd = "sysout(sys3);"; - disp(cmd); - eval(cmd); - disp("\nPole-zero form can be obtained as follows:"); - cmd = "sysout(sys3,""zp"");"; - disp(cmd); - eval(cmd); - disp("\nOnce again, the rlocus command is the same:"); - cmd = "rlocus(sys3);"; - run_cmd; - - disp("\nNo matter what form the system is in, the rlocus command works the"); - disp("the same."); - - prompt; - - closeplot - clc - - elseif (k == 5) - return - endif - endwhile -endfunction
deleted file mode 100644 --- a/scripts/control/base/rlocus.m +++ /dev/null @@ -1,331 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{rldata}, @var{k}] =} rlocus (@var{sys}[, @var{increment}, @var{min_k}, @var{max_k}]) -## -## Display root locus plot of the specified @acronym{SISO} system. -## @example -## @group -## ----- --- -------- -## --->| + |---|k|---->| SISO |-----------> -## ----- --- -------- | -## - ^ | -## |_____________________________| -## @end group -## @end example -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## @item min_k -## Minimum value of @var{k} -## @item max_k -## Maximum value of @var{k} -## @item increment -## The increment used in computing gain values -## @end table -## -## @strong{Outputs} -## -## Plots the root locus to the screen. -## @table @var -## @item rldata -## Data points plotted: in column 1 real values, in column 2 the imaginary values. -## @item k -## Gains for real axis break points. -## @end table -## @end deftypefn - -## Author: David Clem -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Updated by Kristi McGowan July 1996 for intelligent gain selection -## Updated by John Ingram July 1996 for systems - -function [rldata, k_break, rlpol, gvec, real_ax_pts] = rlocus (sys, increment, min_k, max_k) - - if (nargin < 1 || nargin > 4) - print_usage (); - endif - - ## Convert the input to a transfer function if necessary - [num, den] = sys2tf (sys); # extract numerator/denom polyomials - lnum = length (num); - lden = length (den); - ## equalize length of num, den polynomials - if (lden < 2) - error ("system has no poles"); - elseif (lnum < lden) - num = [zeros(1,lden-lnum), num]; # so that derivative is shortened by one - endif - - olpol = roots (den); - olzer = roots (num); - nas = lden - lnum; # number of asymptotes - maxk = 0; - if (nas > 0) - cas = (sum (olpol) - sum (olzer)) / nas; - angles = (2*[1:nas]-1)*pi/nas; - # printf("rlocus: there are %d asymptotes centered at %f\n", nas, cas); - else - cas = angles = []; - maxk = 100*den(1)/num(1); - endif - - - # compute real axis break points and corresponding gains - dnum = polyderiv (num); - dden = polyderiv (den); - brkp = conv (den, dnum) - conv (num, dden); - real_ax_pts = roots (brkp); - real_ax_pts = real_ax_pts(find (imag (real_ax_pts) == 0)); - k_break = -polyval (den, real_ax_pts) ./ polyval (num, real_ax_pts); - idx = find (k_break >= 0); - k_break = k_break(idx); - real_ax_pts = real_ax_pts(idx); - if (! isempty (k_break)) - maxk = max (max (k_break), maxk); - endif - - if (nas == 0) - maxk = max (1, 2*maxk); # get at least some root locus - else - ## get distance from breakpoints, poles, and zeros to center of asymptotes - dmax = 3*max (abs ([vec(olzer); vec(olpol); vec(real_ax_pts)] - cas)); - if (dmax == 0) - dmax = 1; - endif - - # get gain for dmax along each asymptote, adjust maxk if necessary - svals = cas + dmax * exp (j*angles); - kvals = -polyval (den, svals) ./ polyval (num, svals); - maxk = max (maxk, max (real (kvals))); - endif - - ## check for input arguments: - if (nargin > 2) - mink = min_k; - else - mink = 0; - endif - if (nargin > 3) - maxk = max_k; - endif - if (nargin > 1) - if (increment <= 0) - error ("increment must be positive"); - else - ngain = (maxk-mink)/increment; - endif - else - ngain = 30; - endif - - ## vector of gains - ngain = max (30, ngain); - gvec = linspace (mink, maxk, ngain); - if (length (k_break)) - gvec = sort ([gvec, vec(k_break)']); - endif - - ## Find the open loop zeros and the initial poles - rlzer = roots (num); - - ## update num to be the same length as den - lnum = length (num); - if (lnum < lden) - num = [zeros(1,lden - lnum),num]; - endif - - ## compute preliminary pole sets - nroots = lden - 1; - for ii = 1:ngain - gain = gvec(ii); - rlpol(1:nroots,ii) = vec(sortcom (roots (den + gain*num))); - endfor - - ## set smoothing tolerance - smtolx = 0.01*(max (max (real (rlpol))) - min (min (real (rlpol)))); - smtoly = 0.01*(max (max (imag (rlpol))) - min (min (imag (rlpol)))); - smtol = max (smtolx, smtoly); - ## sort according to nearest-neighbor - rlpol = sort_roots (rlpol, smtolx, smtoly); - - done = (nargin == 4); # perform a smoothness check - while (! done && ngain < 1000) - done = 1 ; # assume done - dp = abs (diff (rlpol'))'; - maxdp = max (dp); - - ## search for poles whose neighbors are distant - if (lden == 2) - idx = find (dp > smtol); - else - idx = find (maxdp > smtol); - endif - - for ii = 1:length(idx) - i1 = idx(ii); - g1 = gvec(i1); - p1 = rlpol(:,i1); - - i2 = idx(ii)+1; - g2 = gvec(i2); - p2 = rlpol(:,i2); - - ## isolate poles in p1, p2 - if (max (abs (p2-p1)) > smtol) - newg = linspace (g1, g2, 5); - newg = newg(2:4); - gvec = [gvec,newg]; - done = 0; # need to process new gains - endif - endfor - - ## process new gain values - ngain1 = length (gvec); - for ii = (ngain+1):ngain1 - gain = gvec(ii); - rlpol(1:nroots,ii) = vec(sortcom (roots (den + gain*num))); - endfor - - [gvec, idx] = sort (gvec); - rlpol = rlpol(:,idx); - ngain = length (gvec); - ## sort according to nearest-neighbor - rlpol = sort_roots (rlpol, smtolx, smtoly); - endwhile - rldata = rlpol; - - ## Plot the data - if (nargout == 0) - rlpolv = vec(rlpol); - axdata = [real(rlpolv), imag(rlpolv); real(olzer), imag(olzer)]; - axlim = axis2dlim (axdata); - rldata = [real(rlpolv), imag(rlpolv) ]; - [stn, inname, outname] = sysgetsignals (sys); - - ## build plot command args pole by pole - - n_rlpol = rows (rlpol); - nelts = n_rlpol+1; - if (! isempty (rlzer)) - nelts++; - endif - # add asymptotes - n_A = length (olpol) - length (olzer); - if (n_A > 0) - nelts += n_A; - endif - args = cell (3, nelts); - kk = 0; - # asymptotes first - if (n_A > 0) - len_A = 2*max (abs (axlim)); - sigma_A = (sum(olpol) - sum(olzer))/n_A; - for i_A=0:n_A-1 - phi_A = pi*(2*i_A + 1)/n_A; - args{1,++kk} = [sigma_A sigma_A+len_A*cos(phi_A)]; - args{2,kk} = [0 len_A*sin(phi_A)]; - if (i_A == 1) - args{3,kk} = "k--;asymptotes;"; - else - args{3,kk} = "k--"; - endif - endfor - endif - # locus next - for ii = 1:rows(rlpol) - args{1,++kk} = real (rlpol (ii,:)); - args{2,kk} = imag (rlpol (ii,:)); - if (ii == 1) - args{3,kk} = "b-;locus;"; - else - args{3,kk} = "b-"; - endif - endfor - # poles and zeros last - args{1,++kk} = real (olpol); - args{2,kk} = imag (olpol); - args{3,kk} = "rx;open loop poles;"; - if (! isempty (rlzer)) - args{1,++kk} = real (rlzer); - args{2,kk} = imag (rlzer); - args{3,kk} = "go;zeros;"; - endif - - set (gcf,"visible","off"); - hplt = plot (args{:}); - set (hplt(kk--), "markersize", 2); - if (! isempty (rlzer)) - set (hplt(kk--), "markersize", 2); - endif - for ii = 1:rows(rlpol) - set (hplt(kk--), "linewidth", 2); - endfor - legend ("boxon", 2); - grid ("on"); - axis (axlim); - xlabel (sprintf ("Root locus from %s to %s, gain=[%f,%f]: Real axis", - inname{1}, outname{1}, gvec(1), gvec(ngain))); - ylabel ("Imag. axis"); - set (gcf (), "visible","on"); - rldata = []; - endif -endfunction - -function rlpol = sort_roots (rlpol,tolx, toly) - # no point sorting of you've only got one pole! - if (rows (rlpol) == 1) - return; - endif - - # reorder entries in each column of rlpol to be by their nearest-neighbors - dp = diff (rlpol')'; - drp = max (real (dp)); - dip = max (imag (dp)); - idx = find (drp > tolx | dip > toly); - if (isempty (idx)) - return; - endif - - [np, ng] = size (rlpol); # num poles, num gains - for jj = idx - vals = rlpol(:,[jj,jj+1]); - jdx = (jj+1):ng; - for ii = 1:rows(rlpol-1) - rdx = ii:np; - dval = abs (rlpol(rdx,jj+1)-rlpol(ii,jj)); - mindist = min (dval); - sidx = min (find (dval == mindist)) + ii - 1; - if (sidx != ii) - c1 = norm (diff(vals')); - [vals(ii,2), vals(sidx,2)] = swap (vals(ii,2), vals(sidx,2)); - c2 = norm (diff (vals')); - if (c1 > c2) - ## perform the swap - [rlpol(ii,jdx), rlpol(sidx,jdx)] = swap (rlpol(ii,jdx), rlpol(sidx,jdx)); - vals = rlpol(:,[jj,jj+1]); - endif - endif - endfor - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/base/step.m +++ /dev/null @@ -1,92 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{y}, @var{t}] =} step (@var{sys}, @var{inp}, @var{tstop}, @var{n}) -## Step response for a linear system. -## The system can be discrete or multivariable (or both). -## If no output arguments are specified, @code{step} -## produces a plot or the step response data for system @var{sys}. -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure. -## @item inp -## Index of input being excited -## @item tstop -## The argument @var{tstop} (scalar value) denotes the time when the -## simulation should end. -## @item n -## the number of data values. -## -## Both parameters @var{tstop} and @var{n} can be omitted and will be -## computed from the eigenvalues of the A Matrix. -## @end table -## @strong{Outputs} -## @table @var -## @item y -## Values of the step response. -## @item t -## Times of the step response. -## @end table -## -## When invoked with the output parameter @var{y} the plot is not displayed. -## @seealso{impulse} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: September 30, 1997 -## based on lsim.m of Scottedward Hodel - -function [y, t] = step (sys, inp, tstop, n) - - if (nargin < 1 || nargin > 4) - print_usage (); - endif - - if (! isstruct (sys)) - error ("step: sys must be a system data structure."); - endif - - if (nargout == 0) - switch (nargin) - case (1) - __stepimp__ (1, sys); - case (2) - __stepimp__ (1, sys, inp); - case (3) - __stepimp__ (1, sys, inp, tstop); - case (4) - __stepimp__ (1, sys, inp, tstop, n); - endswitch - else - switch (nargin) - case (1) - [y, t] = __stepimp__ (1, sys); - case (2) - [y, t] = __stepimp__ (1, sys, inp); - case (3) - [y, t] = __stepimp__ (1, sys, inp, tstop); - case (4) - [y, t] = __stepimp__ (1, sys, inp, tstop, n); - endswitch - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/base/tzero.m +++ /dev/null @@ -1,152 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{zer}, @var{gain}] =} tzero (@var{a}, @var{b}, @var{c}, @var{d}, @var{opt}) -## @deftypefnx {Function File} {[@var{zer}, @var{gain}] =} tzero (@var{sys}, @var{opt}) -## Compute transmission zeros of a continuous system: -## @iftex -## @tex -## $$ \dot x = Ax + Bu $$ -## $$ y = Cx + Du $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## . -## x = Ax + Bu -## y = Cx + Du -## @end example -## @end ifinfo -## or of a discrete one: -## @iftex -## @tex -## $$ x_{k+1} = Ax_k + Bu_k $$ -## $$ y_k = Cx_k + Du_k $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## x(k+1) = A x(k) + B u(k) -## y(k) = C x(k) + D u(k) -## @end example -## @end ifinfo -## -## @strong{Outputs} -## @table @var -## @item zer -## transmission zeros of the system -## @item gain -## leading coefficient (pole-zero form) of @acronym{SISO} transfer function -## returns gain=0 if system is multivariable -## @end table -## @strong{References} -## @enumerate -## @item Emami-Naeini and Van Dooren, Automatica, 1982. -## @item Hodel, @cite{Computation of Zeros with Balancing}, 1992 Lin. Alg. Appl. -## @end enumerate -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 4, 1994 -## A. S. Hodel Aug 1995: allow for MIMO and system data structures - -function [zer, gain] = tzero (A, B, C, D) - - ## get A,B,C,D and Asys variables, regardless of initial form - if (nargin == 4) - Asys = ss (A, B, C, D); - elseif (nargin == 1 && ! isstruct (A)) - error ("tzero: expecting argument to be system structure"); - elseif (nargin != 1) - print_usage (); - else - Asys = A; - [A, B, C, D] = sys2ss (Asys); - endif - - Ao = Asys; # save for leading coefficient - siso = is_siso (Asys); - digital = is_digital (Asys); # check if it's mixed or not - - ## see if it's a gain block - if (isempty (A)) - zer = []; - gain = D; - return; - endif - - ## First, balance the system via the zero computation generalized eigenvalue - ## problem balancing method (Hodel and Tiller, Linear Alg. Appl., 1992) - - ## balance coefficients - Asys = __zgpbal__ (Asys); - [A, B, C, D] = sys2ss (Asys); - if (isa ([A, B; C, D], "single")) - meps = 2*eps("single")*norm ([A, B; C, D], "fro"); - else - meps = 2*eps*norm ([A, B; C, D], "fro"); - endif - ## ENVD algorithm - Asys = zgreduce (Asys, meps); - [A, B, C, D] = sys2ss (Asys); - if (! isempty (A)) - ## repeat with dual system - Asys = ss (A', C', B', D'); - Asys = zgreduce (Asys, meps); - - ## transform back - [A, B, C, D] = sys2ss (Asys); - Asys = ss (A', C', B', D'); - endif - - zer = []; # assume none - [A, B, C, D] = sys2ss (Asys); - if (! isempty (C)) - [W, r, Pi] = qr ([C, D]'); - [nonz, ztmp] = zgrownorm (r, meps); - if (nonz) - ## We can now solve the generalized eigenvalue problem. - [pp, mm] = size (D); - nn = rows (A); - Afm = [A , B ; C, D] * W'; - Bfm = [eye(nn), zeros(nn,mm); zeros(pp,nn+mm)]*W'; - - jdx = (mm+1):(mm+nn); - Af = Afm(1:nn,jdx); - Bf = Bfm(1:nn,jdx); - zer = qz (Af, Bf); - endif - endif - - mz = length (zer); - [A, B, C, D] = sys2ss (Ao); # recover original system - ## compute leading coefficient - if (nargout == 2 && siso) - n = rows (A); - if (mz == n) - gain = D; - elseif (mz < n) - gain = C*(A^(n-1-mz))*B; - endif - else - gain = []; - endif -endfunction -
deleted file mode 100644 --- a/scripts/control/base/tzero2.m +++ /dev/null @@ -1,67 +0,0 @@ -## Copyright (C) 1993, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{zr} =} tzero2 (@var{a}, @var{b}, @var{c}, @var{d}, @var{bal}) -## Compute the transmission zeros of @var{a}, @var{b}, @var{c}, @var{d}. -## -## @var{bal} = balancing option (see balance); default is @code{"B"}. -## -## Needs to incorporate @command{mvzero} algorithm to isolate finite zeros; -## use @command{tzero} instead. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 - -function zr = tzero2 (a, b, c, d, bal) - - if (nargin == 4) - bal = "B"; - elseif (nargin != 5) - error ("tzero: invalid number of arguments"); - endif - - [n, m, p] = abcddim (a, b, c, d); - - if (n > 0 && m > 0 && p > 0) - if (m != p) - fprintf (stderr, "tzero: number of inputs,outputs differ. squaring up"); - if (p > m) - fprintf (stderr, " by padding b and d with zeros."); - b = [b, (zeros (n, p-m))]; - d = [d, (zeros (p, p-m))]; - m = p; - else - fprintf (stderr, " by padding c and d with zeros."); - c = [c; (zeros (m-p, n))]; - d = [d; (zeros (m-p, m))]; - p = m; - endif - fprintf (stderr, "This is a kludge. Try again with SISO system."); - endif - ab = [-a, -b; c, d]; - bb = [(eye (n)), (zeros (n, m)); (zeros (p, n)), (zeros (p, m))]; - [ab,bb] = balance (ab, bb); - zr = -qz (ab, bb); - else - error ("tzero: a, b, c, d not compatible. exiting"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/csrefcard.lt +++ /dev/null @@ -1,1486 +0,0 @@ -@Include { OCSTreport } -@Report - @Title { - { clines 0.8vx } @Break { 1.4f @Font { - Octave Controls Toolbox Reference Card } - 0.8f @Font 0.7vx @Break { The Controls Toolbox was written by - A. Scottedward Hodel <A.S.Hodel@Eng.Auburn.EDU> } - } - } - @Author { clines @Break { Kai P. Mueller - <mueller@ifr.ing.tu-bs.de> } - } - @Institution { clines @Break { Technical University of Braunschweig - Control Department } - } - @DateLine { Yes } - @CoverSheet { No } - @InitialFont { Schoolbook Base 12p } - @InitialSpace { tex } -// - -@Abstract - @Title { } -@Begin -@I { -This document provides an overview of the Controls Toolbox functions -of Octave. It is still under construction, don't rely on details. -} -@End @Abstract - -@Section - @Title { System Analysis } -@Begin - @BeginSubSections - - @SubSection - @Title { Properties } - @Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { is_controllable } - B { controllability check - @DP { Helvetica Base -2p } @Font @CurveBox { - [retval,U] = is_controllable(a [, b ,tol]) - } - } - C { } - @Rowb above { yes } - A { is_detectable } - B { decetability check (unstable subsystem stabilizable?) - @DP { Helvetica Base -2p } @Font @CurveBox { - [retval,U] = is_detectable(a , c [, tol]) - } - } - C { } - @Rowb above { yes } - A { is_dgkf } - B { checks if packed system meets assumptions for the - H{ @Sub @Sym infinity } Doyle-Glover-algorithm - @DP { Helvetica Base -2p } @Font @CurveBox { - retval = dgkf(Asys,nu,ny[,tol]) - } - } - C { } - @Rowb above { yes } - A { is_digital } - B { returns true if packed system is a sampled system - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { is_observable } - B { observability check - @DP { Helvetica Base -2p } @Font @CurveBox { - [retval,U] = is_observable(a , c [, tol]) - } - } - C { } - @Rowb above { yes } - A { is_sample } - B { returns true if sampling time Ts is a legal (scalar) value - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { is_siso } - B { returns true if packed system is siso - @DP { Helvetica Base -2p } @Font @CurveBox { - SISO = is_siso(sys) - } - } - C { } - @Rowb above { yes } - A { is_stabilizable } - B { returns true if system stabilizable - @DP { Helvetica Base -2p } @Font @CurveBox { - [retval,U] = is_stabilizable(a [, b ,tol]) - } - } - C { } - @Rowb above { yes } - A { is_stable } - B { stability check - @DP { Helvetica Base -2p } @Font @CurveBox { - is_stable(a [,tol,disc]) - } - } - C { } - } - @End @SubSection - - @SubSection - @Title { Time Domain } - @Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { step } - B { step response of a system (mimo, discrete, or both) - @DP { Helvetica Base -2p } @Font @CurveBox { - [y, u] = step(sys[, tstop, n, inp]) - } - } - C { } - @Rowb above { yes } - A { impulse } - B { impulse response of a system (mimo, discrete, or both) - @DP { Helvetica Base -2p } @Font @CurveBox { - [y, u] = impulse(sys[, tstop, n, inp]) - } - } - C { } - @Rowb above { yes } - A { stepimp } - B { common code for step and impulse - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { damp } - B { display eigenvalues, damping ratios, and naural frequencies of a - matrix or poles of a packed system (continuous and discrete) - @DP { Helvetica Base -2p } @Font @CurveBox { - damp(p,[ tsamp]) - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { dcgain } - B { calculate steady state gain of a packed system - @DP { Helvetica Base -2p } @Font @CurveBox { - [gm, ok] = dcgain(sys[, tol]) - } - } - C { } - @Rowb above { yes } - A { dgram } - B { discrete controllability grammian - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { gram } - B { continuous controllabilty grammian - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { h2norm } - B { continuous system H{ @Sub 2} norm - @DP { Helvetica Base -2p } @Font @CurveBox { - out = h2norm(sys) - } - } - C { } - @Rowb above { yes } - A { lsim } - B { simulation of a linear system with arbitrary input and - time vector - @DP { Helvetica Base -2p } @Font @CurveBox { - [y,x] = lsim(sys,u,t[,x0]) - } - } - C { } - } - @End @SubSection - - @SubSection - @Title { Frequency Domain } - @Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { bode } - B { bode diagram or compute magnitude and phase data - @DP { Helvetica Base -2p } @Font @CurveBox { - [mag,phase,w] = bode(sys[,w,outputs,inputs]) - } - } - C { } - @Rowb above { yes } - A { bode_bounds } - B { calculation of frequencies for bode and nyquist - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { bodquist } - B { common code for bode und nyquist - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { freqchkw } - B { check frequency vector, used by freqresp - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { freqresp } - B { calculation of the mutivariable frequency response of a system, - used by bode and nyquist - @DP { Helvetica Base -2p } @Font @CurveBox { - out = freqresp(sys, SISO, DIGITAL, USEW - @LLP - [, w, SQUARE_NYQUIST]) - } - } - C { internal use } - @Rowb above { yes } - A { nyquist } - B { nyquist diagram - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { dcgain } - B { calculate steady state gain of a packed system - @DP { Helvetica Base -2p } @Font @CurveBox { - [gm, ok] = dcgain(sys[, tol]) - } - } - C { } - @Rowb above { yes } - A { h2norm } - B { continuous system H{ @Sub 2} norm - @DP { Helvetica Base -2p } @Font @CurveBox { - out = h2norm(sys) - } - } - C { } - @Rowb above { yes } - A { hinfnorm } - B { continuous system H{ @Sub @Sym infinity} norm - @DP { Helvetica Base -2p } @Font @CurveBox { - [g gmin gmax] = hinfnorm(sys[,tol,gmin,gmax,ptol]) - } - } - C { } - @Rowb above { yes } - A { ltifr } - B { siso system frequency response - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { pzmap } - B { plot of poles and zeros of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - pzmap(sys) or [zer,pol] = pzmap(sys) - } - } - C { } - @Rowb above { yes } - A { rlocus } - B { displays root locus plot - @DP { Helvetica Base -2p } @Font @CurveBox { - rlocus(sys[,inc,mink,maxk]) - } - } - C { } - @Rowb above { yes } - A { tzero } - B { transmission zeros of a continuous"/"discrete system - @DP { Helvetica Base -2p } @Font @CurveBox { - [zer,gain] = tzero(A,B,C,D) or - @LLP - zer = tzero(Asys) - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { tzero2 } - B { compute the transmission zeros of an a, b, c, d system - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zgpbal } - B { used by tzero - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = zgpbal(Asys) - packed system input - } - } - C { internal use } - @Rowb above { yes } - A { zgreduce } - B { used by tzero - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { zgrownorm } - B { used by tzero - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - } - @End @SubSection - @EndSubSections -@End @Section - -@Section - @Title { System Building } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { abcddim } - B { dimension compatibility check - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { abcddims } - B { used by abcddim - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { outlist } - B { prints enumerated list of strings - @DP { Helvetica Base -2p } @Font @CurveBox { - outlist(x[,tabchar,yd,ilist]) - } - } - C { internal use } - @Rowb above { yes } - A { parallel } - B { parallel connection of two systems - @DP { Helvetica Base -2p } @Font @CurveBox { - sysp = parallel(Asys,Bsys) - } - } - C { } - @Rowb above { yes } - A { sysadd } - B { addition of two systems - @DP { Helvetica Base -2p } @Font @CurveBox { - [sys] = sysysadd(Gsys,Hsys) - } - } - C { } - @Rowb above { yes } - A { sysappend } - B { append new inputs and outputs to a system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = sysappend(sys,b,c[,d,outname,inname,yd]) - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { syssetsignals } - B { change names of system inputs, outputs, or states - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys=syssetsignals(sys,opt,names[,sigidx]) - } - } - C { } - @Rowb above { yes } - A { syschtsam } - B { change sampling time of a (sampled) system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = syschtsam(sys,tsam) - } - } - C { } - @Rowb above { yes } - A { sysconnect } - B { form a closed loop system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = sysconnect(sys, output_list, input_list [, order, tol]) - } - } - C { } - @Rowb above { yes } - A { syscont } - B { extract continuous part of a mixed continuous"/"discrete system - @DP { Helvetica Base -2p } @Font @CurveBox { - [csys,Acd,Ccd,Dcd] = syscont(sys) - } - } - C { } - @Rowb above { yes } - A { syscont_disc } - B { extract continuous"/"discrete part - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use, used by syscont and sysdisc, internal use } - @Rowb above { yes } - A { sysdefioname } - B { create defaut signal names - @DP { Helvetica Base -2p } @Font @CurveBox { - ioname = sysdefioname(n,str[,m]) - } - } - C { internal use } - @Rowb above { yes } - A { sysdefstname } - B { create default state names - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { sysdimensions } - B { get number of states, inputs, and outputs from system - @DP { Helvetica Base -2p } @Font @CurveBox { - [n,nz,m,p] = sysdimensions(sys) - } - } - C { } - @Rowb above { yes } - A { sysdisc } - B { extract purely discrete portion of a mixed - continuous"/"discrete system - @DP { Helvetica Base -2p } @Font @CurveBox { - [dsys,Adc,Cdc] = sysdisc(sys) - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { sysdup } - B { duplicate specified input"/"output connections of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = sysdup(Asys,output_list,input_list) - } - } - C { } - @Rowb above { yes } - A { sysgroup } - B { combines two packed system matrices into a single system - @DP { Helvetica Base -2p } @Font @CurveBox { - sys = sysgroup(Asys,Bsys) - } - } - C { } - @Rowb above { yes } - A { sysgroupn } - B { locate and mark duplicate names (in sysgroup) - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { sysmult } - B { concatenates two systems - @DP { Helvetica Base -2p } @Font @CurveBox { - [sys] = sysmult(Asys,Bsys) - } - } - C { } - @Rowb above { yes } - A { sysprune } - B { extract specified inputs"/"outputs from a system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = sysprune(sys,output_list,input_list) - } - } - C { } - @Rowb above { yes } - A { sysreorder } - B { reorder elements of a vector - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { used by sysconnect } - @Rowb above { yes } - A { sysscale } - B { input"/"output scaling of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - retsys = sysscale(Asys, output_list, input_list [,inname, outname]) - } - } - C { } - @Rowb above { yes } - A { syssub } - B { subtraction of two systems - @DP { Helvetica Base -2p } @Font @CurveBox { - [sys] = syssub(Gsys,Hsys) - } - } - C { } - @Rowb above { yes } - A { sysupdate } - B { update the internal representation of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - newsys = sysupdate(sys,opt) - } - } - C { } - } - @NP -@End @Section - - -@Section - @Title { Display and Convenience Functions } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { polyout } - B { formatted display of polynomials - @DP { Helvetica Base -2p } @Font @CurveBox { - [y = ] polyout(c,[x]) - } - } - C { } - @Rowb above { yes } - A { prompt } - B { prompt user to continue - @DP { Helvetica Base -2p } @Font @CurveBox { - prompt([str]) - } - } - C { } - @Rowb above { yes } - A { sortcom } - B { sort a complex vector by real, imaginary, or magnitude - @DP { Helvetica Base -2p } @Font @CurveBox { - yy = sortcom(xx[,opt] - } - } - C { } - @Rowb above { yes } - A { swap } - B { exchange two values - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { swapcols } - B { permute columns of a matrix into reverse order - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A {swaprows } - B { permute rows of a matrix into reverse order - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { sysout } - B { print out a packed system in desired format - @DP { Helvetica Base -2p } @Font @CurveBox { - sysout(sys[,opt]) - } - } - C { } - @Rowb above { yes } - A { tfout } - B { formatted transfer function num(s)"/"den(s) - @DP { Helvetica Base -2p } @Font @CurveBox { - tfout(num,denom[,x]) - } - } - C { } - @Rowb above { yes } - A { zpout } - B { print formatted zero-pole form - @DP { Helvetica Base -2p } @Font @CurveBox { - zpout(zer,pol,k[,x]) - } - } - C { } - } - @NP -@End @Section - -@Section - @Title { System Representations and Conversions } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { c2d } - B { continuous to discrete conversion of a packed system - @DP { Helvetica Base -2p } @Font @CurveBox { - dsys=c2d(sys[,T]) - } - } - C { } - @Rowb above { yes } - A { fir2sys } - B { FIR (finite impulse response) to packed system conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { ss2sys } - B { conversion from state space to system - @DP { Helvetica Base -2p } @Font @CurveBox { - OUTSYS = ss2sys(A, B, C [, D, TSAM, N, - NZ, STNAME, INNAME, OUTNAME, OUTLIST]) - } - } - C { } - @Rowb above { yes } - A { ss2tf } - B { conversion from state space to transfer function - @DP { Helvetica Base -2p } @Font @CurveBox { - [num,den] = ss2tf(a,b,c,d) - } - } - C { } - @Rowb above { yes } - A { ss2zp } - B { conversion from state space to zero pole representation - @DP { Helvetica Base -2p } @Font @CurveBox { - [zer,pol,k] = ss2zp(a,b,c,d) - } - } - C { } - @Rowb above { yes } - A { sys2fir } - B { extract fir system from packed system form - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { sys2ss } - B { conversion from packed system to state space form - @DP { Helvetica Base -2p } @Font @CurveBox { - [a, b, c, d, tsam, n, nz, stname, inname, outname] = sys2ss(sys) - } - } - C { } - @Rowb above { yes } - A { sys2tf } - B { conversion from packed system to stransfer function - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { sys2zp } - B { conversion from packed system to zero pole representation - @DP { Helvetica Base -2p } @Font @CurveBox { - [zer,pol,k] = ss2zp(a,b,c,d) - } - } - C { } - @Rowb above { yes } - A { sysdisc } - B { extract purely discrete portion of a mixed - continuous"/"discrete system - @DP { Helvetica Base -2p } @Font @CurveBox { - [dsys,Adc,Cdc] = sysdisc(sys) - } - } - C { } - @Rowb above { yes } - A { tf2ss } - B { function to state-space conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { tf2sys } - B { transfer function to system conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { tf2sysl } - B { strips leading zero coefficient in polynonials - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use (used by tf2sys) } - @Rowb above { yes } - A { tf2zp } - B { transfer function to state-space conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zp2ss } - B { zero-pole representation to state space form conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zp2ssg2 } - B { used by zp2ssg2 - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - @Rowb above { yes } - A { zp2sys } - B { zero-pole representation to packed system conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - outsys = zp2sys(zer, pol, k [, tsam, inname, outname]) - } - } - C { } - @Rowb above { yes } - A { zp2tf } - B { zero-pole representation to transfer function conversion - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - } - @NP -@End @Section - -@Section - @Title { Equation Solvers and Math Functions } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { are } - B { algebraic riccati equation solver - @DP { Helvetica Base -2p } @Font @CurveBox { - x = are (a, b, c) - } - } - C { } - @Rowb above { yes } - A { dlyap } - B { discrete Lyapunov equation solver - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { dare } - B { discrete algebaic riccati equation solver - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { lyap } - B { Lyapunov"/"Sylvester equation solver - @DP { Helvetica Base -2p } @Font @CurveBox { - lyap (a, b [,c]) - } - } - C { } - @Rowb above { yes } - A { pinv } - B { pseudoinverse of a matrix - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zgfmul } - B { compute product of zgep incidence matrix f with vector x - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { used by zgscal } - @Rowb above { yes } - A { zgfslv } - B { solve system of equations for dense zgep problem - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zginit } - B { construct right hand side for the zero-computation generalized - eigenvalue problem - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zgscal } - B { generalized conjugate gradient iteration to solve zero-computation - generalized eigenvalue problem balancing equation - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A {zgsgiv } - B { apply givens rotation c,s to column vector a,b - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { zgshsr } - B { apply householder vector, used by zgfslv - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - } -@End @Section - -@Section - @Title { Controller Design } -@Begin - @BeginSubSections - @SubSection - @Title { Classic Methods } - @Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { dlqe } - B { discrete Kalman filter design - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { dlqr } - B { discrete linear quadratic regulator (Riccati controller) design - @DP { Helvetica Base -2p } @Font @CurveBox { - [k, p, e] = lqr (A, B, Q, R [, Z]) - } - } - C { } - @Rowb above { yes } - A { lqe } - B { contiuous time Kalman filter design - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { lqg } - B { continuous"/"discrete lqg (linear quadratic gaussian) controller - design - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { lqr } - B { continuous lqr (Riccati-) controller design - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { } - @Rowb above { yes } - A { place } - B { calculation of feedback gain matrix K, using pole-placement - @DP { Helvetica Base -2p } @Font @CurveBox { - K = place(sys, P) - } - } - C { } - } - @NP - @End @SubSection - - @SubSection - @Title { Modern Methods } - @Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { h2syn } - B { H{ @Sub 2}-optimal controller design - @DP { Helvetica Base -2p } @Font @CurveBox { - [K, gain, Kc, Kf, Pc, Pf] = h2syn(Asys, nu, ny [, tol]) - } - } - C { } - @Rowb above { yes } - A { hinfsyn } - B { continuous system H{ @Sub @Sym infinity}-optimal controller design - @DP { Helvetica Base -2p } @Font @CurveBox { - [K,g, ghi, glo, Pc, Pf] = hinfsyn(Asys, nu, ny, gmax, - gmin, gtol [, ptol, tol]) - } - } - C { } - @Rowb above { yes } - A { hinfsyn_chk } - B { check of existence of an H{ @Sub @Sym infinity}-optimal - controller, used internally by hinfsyn - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { internal use } - } - @End @SubSection - @EndSubSections - @NP -@End @Section - -@Section - @Title { Miscellanious } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { analdemo } - B { state space analysis demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { use by controldemo } - @Rowb above { yes } - A { bddemo } - B { block diagram manipulations demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { used by controldemo } - @Rowb above { yes } - A { controldemo } - B { Octave Controls Toolbox demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { } - @Rowb above { yes } - A { frdemo } - B { menu-based frequency response demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { used by controldemo } - @Rowb above { yes } - A { jet707 } - B { Boeing 707-321 aircraft mimo example - @DP { Helvetica Base -2p } @Font @CurveBox { - outsys = jet707() - } - } - C { } - @Rowb above { yes } - A { ord2 } - B { second order siso example - @DP { Helvetica Base -2p } @Font @CurveBox { - outsys = ord2(nfreq, damp[, gain]) - } - } - C { } - @Rowb above { yes } - A { dgkfdemo } - B { H{ @Sub 2}"/"H{@Sub @Sym infinity} controller design demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { } - @Rowb above { yes } - A { moddemo } - B { system conversion demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { used by controldemo } - @Rowb above { yes } - A { packedform } - B { srcipt for sysrepdemo, the system representations demo - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { used by controldemo } - @Rowb above { yes } - A { rldemo } - B { root locus demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { used by controldemo } - @Rowb above { yes } - A { sysrepdemo } - B { system representation demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { used by controldemo } - } -@End @Section - -@Section - @Title { New Functions (most likely not on your system) } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { ctrb } - B { Forms the controllability matrix of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - ctrb(sys [, b]) - } - } - C { *not* for controllablity tests, use is_controllable instead - } - @Rowb above { yes } - A { is_abcd } - B { Returns true if dimensions are compatible, false otherwise. - Complains about the (first) failing matrix dimension. - @DP { Helvetica Base -2p } @Font @CurveBox { - retval = is_abcd(a [, b, c, d]) - } - } - C { In contrast to abcddim() the function is_abcd() accepts - 1 to 4 arguments. - } - @Rowb above { yes } - A { obsv } - B { Forms the observability matrix of a system - @DP { Helvetica Base -2p } @Font @CurveBox { - obsv(sys [, c]) - } - } - C { *not* for observablity tests, use is_observable instead - } - @Rowb above { yes } - A { template } - B { Starting point for your own function - @DP { Helvetica Base -2p } @Font @CurveBox { - y = template(x[, a]) - } - } - C { ridiculous calculation } - } -@End @Section - -@Section - @Title { Obsolete } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { DEMOcontrol } - B { Octave Controls Toolbox demo - @DP { Helvetica Base -2p } @Font @CurveBox { - no parameters - } - } - C { obsolete - use democontrol instead } - @Rowb above { yes } - A { dlqg } - B { discrete linear quadratic gaussian design - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { obsolete - use lqg instead } - @Rowb above { yes } - A { minfo } - B { determine type of system matrix - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { obsolete - use ss2sys, tf2sys, sys2ss, or sys2tf instead } - } - - @DP @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { packsys } - B { pack A, B, C, D matrices into a system representation - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { obsolete - use ss2sys instead } - @Rowb above { yes } - A { rotg } - B { givens rotation - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { obsolete - use givens instead } - @Rowb above { yes } - A { series } - B { connect two systems - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { obsolete - superseeded by sysmult} - @Rowb above { yes } - A { unpacksys } - B { conversion from packed system (sys) to state space - @DP { Helvetica Base -2p } @Font @CurveBox { - *** no description *** - } - } - C { use sys2ss insted} - } -@End @Section - -@Section - @Title { Dubious } -@Begin - @PP - @Tab - between { single } - @Fmta { @Col @Heading A ! - @Col @Heading B ! - @Col @Heading C } - @Fmtb { @Col 3c @Wide { ragged nohyphen } @Break A ! - @Col 7c @Wide { ragged nohyphen } @Break B ! - @Col 3c @Wide { ragged nohyphen } @Break C } - { - @Rowa above { double } below { double } - A { name } B { description "/" usage } C { remarks } - @Rowb above { yes } - A { demomarsyas } - B { unknown interface demo } - C { } - @Rowb above { yes } - A { mb } - B { unknown purpose } - C { } - @Rowb above { yes } - A { sysball } - B { unknown purpose } - C { } - } -@End @Section - -@Appendix - @Title { Maintainer } -@Begin -@PP -Mail any comments or suggestions to Kai P. Mueller -<mueller@ifr.ing.tu-bs.de>. -Report m-files problems to A. Scottedward Hodel -<A.S.Hodel@Eng.Auburn.EDU> or to the authors. -@End @Appendix - -@Appendix - @Title { Production Note } -@Begin -@PP -A recent version of this brochure can be copied from -@LLP -ftp:"//"ifr.ing.tu-bs.de"/"pub"/"ControlSW"/"doc -("\""lout"\"" source and PostScript{@Sup @Char registered}). -I am too dump to supply a T{/0.2fo E}X source. -@End @Appendix
deleted file mode 100644 --- a/scripts/control/hinf/Makefile.in +++ /dev/null @@ -1,85 +0,0 @@ -# Makefile for octave's scripts/control/hinf directory -# -# Copyright (C) 2000, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../../.. - -script_sub_dir = control/hinf - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = dgkfdemo.m dhinfdemo.m h2norm.m h2syn.m hinf_ctr.m \ - hinfdemo.m hinfnorm.m hinfsyn.m hinfsyn_chk.m hinfsyn_ric.m \ - is_dgkf.m wgt1o.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir) -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/hinf/dgkfdemo.m +++ /dev/null @@ -1,364 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} dgkfdemo () -## Octave Controls toolbox demo: -## @iftex -## @tex -## $ { \cal H }_2 $/$ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-2/H-infinity -## @end ifinfo -## options demos. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: June 1995 - -function dgkfdemo () - - save_val = page_screen_output (); - page_screen_output (0); - while (1) - clc - sel = 0; - while (sel > 10 || sel < 1) - sel = menu ("Octave H2/Hinfinity options demo", - "LQ regulator", - "LG state estimator", - "LQG optimal control design", - "H2 gain of a system", - "H2 optimal controller of a system", - "Hinf gain of a system", - "Hinf optimal controller of a SISO system", - "Hinf optimal controller of a MIMO system", - "Discrete-time Hinf optimal control by bilinear transform", - "Return to main demo menu"); - endwhile - if (sel == 1) - disp("Linear/Quadratic regulator design:") - disp("Compute optimal state feedback via the lqr command...") - help lqr - disp(" ") - disp("Example:") - A = [0, 1; -2, -1] - B = [0; 1] - Q = [1, 0; 0, 0] - R = 1 - disp("Q = state penalty matrix; R = input penalty matrix") - prompt - disp("Compute state feedback gain k, ARE solution P, and closed-loop") - disp("poles as follows:"); - cmd = "[k, p, e] = lqr(A,B,Q,R)"; - run_cmd - prompt - disp("A similar approach can be used for LTI discrete-time systems") - disp("by using the dlqr command in place of lqr (see LQG example).") - elseif (sel == 2) - disp("Linear/Gaussian estimator design:") - disp("Compute optimal state estimator via the lqe command...") - help lqe - disp(" ") - disp("Example:") - A = [0, 1; -2, -1] - disp("disturbance entry matrix G") - G = eye(2) - disp("Output measurement matrix C") - C = [0, 1] - SigW = [1, 0; 0, 1] - SigV = 1 - disp("SigW = input disturbance intensity matrix;") - disp("SigV = measurement noise intensity matrix") - prompt - disp("Compute estimator feedback gain k, ARE solution P, and estimator") - disp("poles via the command: ") - cmd = "[k, p, e] = lqe(A,G,C,SigW,SigV)"; - run_cmd - disp("A similar approach can be used for LTI discrete-time systems") - disp("by using the dlqe command in place of lqe (see LQG example).") - elseif (sel == 3) - disp("LQG optimal controller of a system:") - disp("Input accepted as either A,B,C matrices or in system data structure form") - disp("in both discrete and continuous time.") - disp("Example 1: continuous time design:") - prompt - help lqg - disp("Example system") - A = [0, 1; .5, .5]; - B = [0; 2]; - G = eye(2) - C = [1, 1]; - sys = ss(A, [B, G], C); - sys = syssetsignals(sys,"in", ... - ["control input"; "disturbance 1"; "disturbance 2"]); - sysout(sys) - prompt - disp("Filtering/estimator parameters:") - SigW = eye(2) - SigV = 1 - prompt - disp("State space (LQR) parameters Q and R are:") - Q = eye(2) - R = 1 - cmd = "[K,Q1,P1,Ee,Er] = lqg(sys,SigW,SigV,Q,R,1);"; - run_cmd - disp("Check: closed loop system A-matrix is") - disp(" [A, B*Cc]") - disp(" [Bc*C, Ac ]") - cmd = "[Ac, Bc, Cc] = sys2ss(K);"; - run_cmd - cmd = "Acl = [A, B*Cc; Bc*C, Ac]"; - run_cmd - disp("Check: poles of Acl:") - Acl_poles = sortcom(eig(Acl)) - disp("Predicted poles from design = union(Er,Ee)") - cmd = "pred_poles = sortcom([Er; Ee])"; - run_cmd - disp("Example 2: discrete-time example") - cmd1 = "Dsys = ss(A, [G, B], C, [0, 0, 0], 1);"; - cmd2 = "[K,Q1,P1,Ee,Er] = lqg(Dsys,SigW, SigV,Q,R);"; - disp("Run commands:") - cmd = cmd1; - run_cmd - cmd = cmd2; - run_cmd - prompt - disp("Check: closed loop system A-matrix is") - disp(" [A, B*Cc]") - disp(" [Bc*C, Ac ]") - [Ac,Bc,Cc] = sys2ss(K); - Acl = [A, B*Cc; Bc*C, Ac] - prompt - disp("Check: poles of Acl:") - Acl_poles = sortcom(eig(Acl)) - disp("Predicted poles from design = union(Er,Ee)") - pred_poles = sortcom([Er;Ee]) - elseif (sel == 4) - disp("H2 gain of a system: (Energy in impulse response)") - disp("Example 1: Stable plant:") - cmd = "A = [0, 1; -2, -1]; B = [0; 1]; C = [1, 0]; sys_poles = eig(A)"; - run_cmd - disp("Put into Packed system form:") - cmd = "Asys = ss(A,B,C);"; - run_cmd - disp("Evaluate system 2-norm (impulse response energy):"); - cmd = "AsysH2 = h2norm(Asys)"; - run_cmd - disp("Compare with a plot of the system impulse response:") - tt = 0:0.1:20; - for ii=1:length(tt) - ht(ii) = C*expm(A*tt(ii))*B; - endfor - plot(tt,ht) - title("impulse response of example plant") - prompt - disp("Example 2: unstable plant") - cmd = "A = [0, 1; 2, 1]"; - eval(cmd); - cmd = "B = [0; 1]"; - eval(cmd); - cmd = "C = [1, 0]"; - eval(cmd); - cmd = "sys_poles = eig(A)"; - run_cmd - prompt - disp("Put into system data structure form:") - cmd="Bsys = ss(A,B,C);"; - run_cmd - disp("Evaluate 2-norm:") - cmd = "BsysH2 = h2norm(Bsys)"; - run_cmd - disp(" ") - prompt("NOTICE: program returns a value without an error signal.") - disp("") - - elseif (sel == 5) - disp("H2 optimal controller of a system: command = h2syn:") - prompt - help h2syn - prompt - disp("Example system: double integrator with output noise and") - disp("input disturbance:") - disp(" "); - disp(" -------------------->y2"); - disp(" | _________"); - disp("u(t)-->o-->| 1/s^2 |-->o-> y1"); - disp(" ^ --------- ^"); - disp(" | |"); - disp(" w1(t) w2(t)"); - disp(" ") - disp("w enters the system through B1, u through B2") - disp("z = [y1; y2] is obtained through C1, y=y1 through C2"); - disp(" ") - cmd = "A = [0, 1; 0, 0]; B1 = [0, 0; 1, 0]; B2 = [0; 1];"; - disp(cmd) - eval(cmd); - cmd = "C1 = [1, 0; 0, 0]; C2 = [1, 0]; D11 = zeros(2);"; - disp(cmd) - eval(cmd); - cmd = "D12 = [0; 1]; D21 = [0, 1]; D22 = 0; D = [D11, D12; D21, D22];"; - disp(cmd) - eval(cmd); - disp("Design objective: compute U(s)=K(s)Y1(s) to minimize the closed") - disp("loop impulse response from w(t) =[w1; w2] to z(t) = [y1; y2]"); - prompt - disp("First: pack system:") - cmd="Asys = ss(A, [B1, B2], [C1; C2], D);"; - run_cmd - disp("Open loop multivariable Bode plot: (will take a moment)") - cmd="bode(Asys);"; - run_cmd - prompt("Press a key to close plot and continue"); - closeplot - disp("Controller design command: (only need 1st two output arguments)") - cmd="[K,gain, Kc, Kf, Pc, Pf] = h2syn(Asys,1,1);"; - run_cmd - disp("Controller is:") - cmd = "sysout(K)"; - run_cmd - disp(["returned gain value is: ",num2str(gain)]); - disp("Check: close the loop and then compute h2norm:") - prompt - cmd="K_loop = sysgroup(Asys,K);"; - run_cmd - cmd = "Kcl = sysconnect(K_loop,[3,4],[4,3]);"; - run_cmd - cmd = "Kcl = sysprune(Kcl,[1,2],[1,2]);"; - run_cmd - cmd="gain_Kcl = h2norm(Kcl)"; - run_cmd - cmd="gain_err = gain_Kcl - gain"; - run_cmd - disp("Check: multivarible bode plot:") - cmd="bode(Kcl);"; - run_cmd - prompt - disp("Related functions: is_dgkf, is_controllable, is_stabilizable,") - disp(" is_observable, is_detectable") - elseif (sel == 6) - disp("Hinfinity gain of a system: (max gain over all j-omega)") - disp("Example 1: Stable plant:") - cmd = "A = [0, 1; -2, -1]; B = [0; 1]; C = [1, 0]; sys_poles = eig(A)"; - run_cmd - disp("Pack into system format:") - cmd = "Asys = ss(A,B,C);"; - run_cmd - disp("The infinity norm must be computed iteratively by") - disp("binary search. For this example, we select tolerance tol = 0.01, ") - disp("min gain gmin = 1e-2, max gain gmax=1e4.") - disp("Search quits when upper bound <= (1+tol)*lower bound.") - cmd = "tol = 0.01; gmin = 1e-2; gmax = 1e+4;"; - run_cmd - cmd = "[AsysHinf,gmin,gmax] = hinfnorm(Asys,tol,gmin,gmax)" - run_cmd - disp("Check: look at max value of magntude Bode plot of Asys:"); - [M,P,w] = bode(Asys); - xlabel("Omega") - ylabel("|Asys(j omega)| ") - grid(); - semilogx(w,M); - disp(["Max magnitude is ",num2str(max(M)), ... - ", compared with gmin=",num2str(gmin)," and gmax=", ... - num2str(gmax),"."]) - prompt - disp("Example 2: unstable plant") - cmd = "A = [0, 1; 2, 1]; B = [0; 1]; C = [1, 0]; sys_poles = eig(A)"; - run_cmd - disp("Pack into system format:") - cmd = "Bsys = ss(A,B,C);"; - run_cmd - disp("Evaluate with BsysH2 = hinfnorm(Bsys,tol,gmin,gmax)") - BsysH2 = hinfnorm(Bsys,tol,gmin,gmax) - disp(" ") - disp("NOTICE: program returns a value without an error signal.") - disp("") - - elseif (sel == 7) - disp("Hinfinity optimal controller of a system: command = hinfsyn:") - prompt - help hinfsyn - prompt - disp("Example system: double integrator with output noise and") - disp("input disturbance:") - A = [0, 1; 0, 0] - B1 = [0, 0; 1, 0] - B2 = [0; 1] - C1 = [1, 0; 0, 0] - C2 = [1, 0] - D11 = zeros(2); - D12 = [0; 1]; - D21 = [0, 1]; - D22 = 0; - D = [D11, D12; D21, D22] - prompt - disp("First: pack system:") - cmd="Asys = ss(A, [B1, B2], [C1; C2], D);"; - run_cmd - prompt - disp("Open loop multivariable Bode plot: (will take a moment)") - cmd="bode(Asys);"; - run_cmd - prompt - disp("Controller design command: (only need 1st two output arguments)") - gmax = 1000 - gmin = 0.1 - gtol = 0.01 - cmd="[K,gain] = hinfsyn(Asys,1,1,gmin,gmax,gtol);"; - run_cmd - disp("Check: close the loop and then compute h2norm:") - prompt - cmd="K_loop = sysgroup(Asys,K);"; - run_cmd - cmd = "Kcl = sysconnect(K_loop,[3,4],[4,3]);"; - run_cmd - cmd = "Kcl = sysprune(Kcl,[1,2],[1,2]);"; - run_cmd - cmd="gain_Kcl = hinfnorm(Kcl)"; - run_cmd - cmd="gain_err = gain_Kcl - gain"; - run_cmd - disp("Check: multivarible bode plot:") - cmd="bode(Kcl);"; - run_cmd - prompt - disp("Related functions: is_dgkf, is_controllable, is_stabilizable,") - disp(" is_observable, is_detectable, buildssic") - elseif (sel == 8) - disp("Hinfinity optimal controller of MIMO system: command = hinfsyn:") - prompt - help hinfsyn - prompt - disp("Example system: Boeing 707-321 airspeed/pitch angle control") - disp(" ") - hinfdemo - elseif (sel == 9) - disp("Discrete time H-infinity control via bilinear transform"); - prompt - dhinfdemo - elseif (sel == 10) - return - endif - prompt - endwhile - page_screen_output (save_val); - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/dhinfdemo.m +++ /dev/null @@ -1,173 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} dhinfdemo () -## Demonstrate the functions available to design a discrete -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## controller. This is not a true discrete design. The -## design is carried out in continuous time while the effect of sampling -## is described by a bilinear transformation of the sampled system. -## This method works quite well if the sampling period is "small" -## compared to the plant time constants. -## -## Continuous plant: -## @iftex -## @tex -## $$ G(s) = { 1 \over (s+2) (s+1) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## @group -## 1 -## G(s) = -------------- -## (s + 2)(s + 1) -## @end group -## @end example -## @end ifinfo -## -## Discretised plant with @acronym{ZOH} (Sampling period = @var{Ts} = 1 second): -## @iftex -## @tex -## $$ G(z) = { 0.39958z + 0.14700 \over (z - 0.36788) (z - 0.13533) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## @group -## 0.39958z + 0.14700 -## G(z) = -------------------------- -## (z - 0.36788)(z - 0.13533) -## @end group -## @end example -## @end ifinfo -## -## @example -## @group -## +----+ -## -------------------->| W1 |---> v1 -## z | +----+ -## ----|-------------+ || T || => min. -## | | vz infty -## | +---+ v +----+ -## *--->| G |--->O--*-->| W2 |---> v2 -## | +---+ | +----+ -## | | -## | +---+ | -## -----| K |<------- -## +---+ -## @end group -## @end example -## -## @noindent -## W1 and W2 are the robustness and performancs weighting functions. -## @end deftypefn - -## K. Mueller, <mueller@ifr.ing.tu-bs.de> -## Technical University of Braunschweig, IfR - -echo off -disp(" "); -disp(" --------------------------------------------------"); -disp(" Discrete H_infinity optimal control for the plant:"); -disp(" "); -disp(" 0.39958z + 0.14700"); -disp(" G(s) = --------------------------"); -disp(" (z - 0.36788)(z - 0.13533)"); -disp(" --------------------------------------------------"); -disp(" "); - -disp("sampling time:") -cmd = "Ts = 1.0;"; -disp(cmd); -eval(cmd); -disp("weighting on actuator value u"); -cmd = "W1 = wgt1o(0.1, 200.0, 50.0);"; -disp(cmd); -eval(cmd); -disp("weighting on controlled variable y"); -cmd = "W2 = wgt1o(350.0, 0.05, 0.0002);"; -disp(cmd); -eval(cmd); -## omega axis (column vector) -ww = vec(logspace(-4.99, 3.99, 100)); - -disp("Create ZOH equivalent model of a continuous plant"); -cmd = "G = tf(2,[1 3 2]); Gd = c2d(G, Ts);"; -run_cmd - -## w-plane (continuous representation of the sampled system) -disp("W-plane transform of discrete time system:"); -cmd = "Gw = d2c(Gd, \"bi\");"; -run_cmd - -disp(" "); -disp(" o building P..."); -## need One as the pseudo transfer function One = 1 -cmd = "One = ugain(1);"; -disp(cmd); -eval(cmd); -cmd = " psys = buildssic([1 4;2 4;3 1],[3],[2 3 5],[3 4],Gw,W1,W2,One);"; -run_cmd; -disp(" o controller design..."); -cmd = "[K, gfin, GWC] = hinfsyn(psys, 1, 1, 0.1, 10.0, 0.02);"; -run_cmd - -disp(" "); -fig_n = 1; -yn = input(" * Plot magnitudes of W1KS and W2S? [n]: ","S"); -if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o magnitudes of W1KS and W2S..."); - gwx = sysprune(GWC, 1, 1); - mag1 = bode(gwx, ww); - if (columns(mag1) > 1); mag1 = mag1'; endif - gwx = sysprune(GWC, 2, 1); - mag2 = bode(gwx, ww); - if (columns(mag2) > 1); mag2 = mag2'; endif - figure(fig_n) - fig_n = fig_n + 1; - loglog(ww, [mag1 mag2]); - grid ("on"); - endif -endif - -Kd = c2d(K, "bi", Ts); -GG = buildssic([1 2; 2 1], [], [1 2], [-2], Gd, Kd); -disp(" o closed loop poles..."); -damp(GG); - -disp(" "); -yn = input(" * Plot closed loop step responses? [n]: ","S"); -if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o step responses of T and KS..."); - figure(fig_n) - step(GG, 1, 10); - endif -endif - -## --------- End of dhinfdemo/kpm
deleted file mode 100644 --- a/scripts/control/hinf/h2norm.m +++ /dev/null @@ -1,77 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} h2norm (@var{sys}) -## Computes the -## @iftex -## @tex -## $ { \cal H }_2 $ -## @end tex -## @end iftex -## @ifinfo -## H-2 -## @end ifinfo -## norm of a system data structure (continuous time only). -## -## Reference: -## Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions to Standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## updated for system data structure by John Ingram November 1996 - -function h2gain = h2norm (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)) - error ("Sys must be in system data structure"); - endif - dflg = is_digital (sys); - - if (! is_stable (sys)) - warning ("h2norm: unstable input system; returning Inf"); - h2gain = Inf; - else - ## compute gain - [a, b, c, d] = sys2ss (sys); - if (dflg) - M = dlyap (a, b*b'); - else - M = lyap (a, b*b'); - endif - if (min (real (eig (M))) < 0) - error ("h2norm: gramian not >= 0 (lightly damped modes?)") - endif - - h2gain = sqrt (trace (d*d' + c*M*c')); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/h2syn.m +++ /dev/null @@ -1,203 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{K}, @var{gain}, @var{kc}, @var{kf}, @var{pc}, @var{pf}] =} h2syn (@var{asys}, @var{nu}, @var{ny}, @var{tol}) -## Design -## @iftex -## @tex -## $ { \cal H }_2 $ -## @end tex -## @end iftex -## @ifinfo -## H-2 -## @end ifinfo -## optimal controller per procedure in -## Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions to Standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989. -## -## Discrete-time control per Zhou, Doyle, and Glover, @cite{Robust and optimal control}, Prentice-Hall, 1996. -## -## @strong{Inputs} -## @table @var -## @item asys -## system data structure (see ss, sys2ss) -## @itemize @bullet -## @item controller is implemented for continuous time systems -## @item controller is @strong{not} implemented for discrete time systems -## @end itemize -## @item nu -## number of controlled inputs -## @item ny -## number of measured outputs -## @item tol -## threshold for 0. Default: 200*@code{eps} -## @end table -## -## @strong{Outputs} -## @table @var -## @item k -## system controller -## @item gain -## optimal closed loop gain -## @item kc -## full information control (packed) -## @item kf -## state estimator (packed) -## @item pc -## @acronym{ARE} solution matrix for regulator subproblem -## @item pf -## @acronym{ARE} solution matrix for filter subproblem -## @end table -## @end deftypefn - -## Updated for System structure December 1996 by John Ingram - -function [K, gain, Kc, Kf, Pc, Pf] = h2syn (Asys, nu, ny, tol) - - if (nargin < 3 || nargin > 4) - print_usage (); - elseif (nargin == 3) - [chkdgkf, dgs] = is_dgkf (Asys, nu, ny); - elseif (nargin == 4) - [chkdgkf, dgs] = is_dgkf (Asys, nu, ny, tol); - endif - - if (! chkdgkf) - error ("h2syn: system does not meet required assumptions") - endif - - ## extract dgs information - nw = dgs.nw; - nu = dgs.nu; - nz = dgs.nz; - ny = dgs.ny; - - A = dgs.A; - - Bw = dgs.Bw; - Bu = dgs.Bu; - - Cz = dgs.Cz; - Cy = dgs.Cy; - - Dzw = dgs.Dzw; - Dzu = dgs.Dzu; - - Dyw = dgs.Dyw; - Dyu = dgs.Dyu; - - d22nz = dgs.Dyu_nz; - - dflg = dgs.dflg; - - if (norm (Dzw, Inf) > norm ([Dzw, Dzu; Dyw, Dyu], Inf)*1e-12) - warning ("h2syn: Dzw nonzero; feedforward not implemented") - Dzw - D = [Dzw, Dzu ; Dyw, Dyu] - endif - - ## recover i/o transformations - Ru = dgs.Ru; - Ry = dgs.Ry; - - [ncstates, ndstates, nout, nin] = sysdimensions (Asys); - Atsam = sysgettsam (Asys); - [Ast, Ain, Aout] = sysgetsignals (Asys); - - if (dgs.dflg == 0) - Pc = are (A, Bu*Bu', Cz'*Cz); # solve control, filtering ARE's - Pf = are(A', Cy'*Cy, Bw*Bw'); - F2 = -Bu'*Pc; # calculate feedback gains - L2 = -Pf*Cy'; - - AF2 = A + Bu*F2; - AL2 = A + L2*Cy; - CzF2 = Cz + (Dzu/Ru)*F2; - BwL2 = Bw+L2*(Ry\Dyw); - - else - ## discrete time solution - error ("h2syn: discrete-time case not yet implemented") - Pc = dare (A, Bu*Bu', Cz'*Cz); - Pf = dare (A', Cy'*Cy, Bw*Bw'); - endif - - nn = ncstates + ndstates; - In = eye (nn); - KA = A + Bu*F2 + L2*Cy; - Kc1 = ss (AF2, Bw, CzF2, zeros (nz, nw)); - Kf1 = ss (AL2, BwL2, F2, zeros (nu, nw)); - - g1 = h2norm (Kc1); - g2 = h2norm (Kf1); - - ## compute optimal closed loop gain - gain = sqrt (g1*g1 + g2*g2); - - if (nargout) - Kst = strappend (Ast, "_K"); - Kin = strappend (Aout((nout-ny+1):(nout)), "_K"); - Kout = strappend (Ain((nin-nu+1):(nin)), "_K"); - - ## compute systems for return - K = ss (KA, -L2/Ru, Ry\F2, zeros(nu,ny), Atsam, ncstates, - ndstates, Kst, Kin, Kout); - endif - - if (nargout > 2) - ## system full information control state names - stname2 = strappend (Ast, "_FI"); - - ## system full information control input names - inname2 = strappend (Ast, "_FI_in"); - - ## system full information control output names - outname2 = strappend (Aout(1:(nout-ny)), "_FI_out"); - - nz = rows (Cz); - nw = columns (Bw); - - Kc = ss (AF2, In, CzF2, zeros(nz,nn), Atsam, - ncstates, ndstates, stname2, inname2, outname2); - endif - - if (nargout >3) - ## fix system state estimator state names - stname3 = strappend (Ast, "_Kf"); - - ## fix system state estimator input names - inname3 = strappend (Ast, "_Kf_noise"); - - ## fix system state estimator output names - outname3 = strappend (Ast, "_est"); - - Kf = ss (AL2, BwL2, In, zeros(nn,nw),Atsam, - ncstates, ndstates, stname3, inname3, outname3); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/hinf_ctr.m +++ /dev/null @@ -1,161 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{K} =} hinf_ctr (@var{dgs}, @var{f}, @var{h}, @var{z}, @var{g}) -## Called by @code{hinfsyn} to compute the -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## optimal controller. -## -## @strong{Inputs} -## @table @var -## @item dgs -## data structure returned by @code{is_dgkf} -## @item f -## @itemx h -## feedback and filter gain (not partitioned) -## @item g -## final gamma value -## @end table -## @strong{Outputs} -## @table @var -## @item K -## controller (system data structure) -## @end table -## -## Do not attempt to use this at home; no argument checking performed. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## Revised by Kai P. Mueller April 1998 to solve the general H_infinity -## problem using unitary transformations Q (on w and z) -## and non-singular transformations R (on u and y). - -function K = hinf_ctr (dgs, F, H, Z, g) - - if (nargin != 5) - print_usage (); - endif - - nw = dgs.nw; - nu = dgs.nu; - nz = dgs.nz; - ny = dgs.ny; - d22nz = dgs.Dyu_nz; - - B1 = dgs.Bw; - B2 = dgs.Bu; - C1 = dgs.Cz; - C2 = dgs.Cy; - C = [C1; C2]; - D11 = dgs.Dzw; - D12 = dgs.Dzu; - D21 = dgs.Dyw; - D22 = dgs.Dyu; - A = dgs.A; - Ru = dgs.Ru; - Ry = dgs.Ry; - - nout = nz + ny; - nin = nw + nu; - nstates = size (A, 1); - - F11 = F(1:(nw-ny),:); - F12 = F((nw-ny+1):nw,:); - F2 = F((nw+1):nin,:); - H11 = H(:,1:(nz-nu)); - H12 = H(:,(nz-nu+1):nz); - H2 = H(:,(nz+1):nout); - - ## D11 partitions - D1111 = D11(1:(nz-nu),1:(nw-ny)); - D1112 = D11(1:(nz-nu),(nw-ny+1):nw); - D1121 = D11((nz-nu+1):nz,1:(nw-ny)); - D1122 = D11((nz-nu+1):nz,(nw-ny+1):nw); - - ## D11ik may be the empty matrix, don't calculate with empty matrices - [nd1111, md1111] = size (D1111); - md1112 = length (D1112); - md1121 = length (D1121); - - if (nd1111 == 0 || md1112 == 0) - d11hat = -D1122; - else - xx = inv (g*g*eye(nz-nu) - D1111*D1111'); - d11hat = -D1121*D1111'*xx*D1112 - D1122; - endif - if (md1112 == 0) - d21hat = eye (ny); - elseif (nd1111 == 0) - d21hat = chol (eye(ny) - D1112'*D1112/g/g); - else - xx = inv (g*g*eye(nz-nu) - D1111*D1111'); - xx = eye (ny) - D1112'*xx*D1112; - d21hat = chol (xx); - endif - if (md1121 == 0) - d12hat = eye (nu); - elseif (md1111 == 0) - d12hat = chol (eye(nu) - D1121*D1121'/g/g)'; - else - xx = inv (g*g*eye(nw-ny) - D1111'*D1111); - xx = eye (nu)-D1121*xx*D1121'; - d12hat = chol (xx)'; - endif - - b2hat = (B2+H12)*d12hat; - c2hat = -d21hat*(C2+F12)*Z; - b1hat = -H2 + (b2hat/d12hat)*d11hat; - c1hat = F2*Z + (d11hat/d21hat)*c2hat; - ahat = A + H*C + (b2hat/d12hat)*c1hat; - - ## rescale controller by Ru and Ry - b1hat = b1hat/Ry; - c1hat = Ru\c1hat; - bhat = [b1hat, b2hat]; - chat = [c1hat; c2hat]; - dhat = [Ru\d11hat/Ry, Ru\d12hat; d21hat/Ry, 0*d11hat']; - - ## non-zero D22 is a special case - if (d22nz) - if (rank (eye(nu) + d11hat*D22) < nu) - error (" *** cannot compute controller for D22 non-zero."); - endif - - d22new = [D22, zeros(ny,ny); zeros(nu,nu), 0*D22']; - xx = inv (eye(nu+ny) + d22new*dhat); - mhat = inv (eye(nu+ny) + dhat*d22new); - ahat = ahat - bhat*((eye(nu+ny)-xx)/dhat)*chat; - bhat = bhat*xx; - chat = mhat*chat; - dhat = dhat*xx; - - endif - - K = ss (ahat, bhat(:,1:ny), chat(1:nu,:), dhat(1:nu,1:ny)); - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/hinfdemo.m +++ /dev/null @@ -1,427 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} hinfdemo () -## -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## design demos for continuous @acronym{SISO} and @acronym{MIMO} systems and a -## discrete system. The @acronym{SISO} system is difficult to control because -## it is non-minimum-phase and unstable. The second design example -## controls the @command{jet707} plant, the linearized state space model of a -## Boeing 707-321 aircraft at @var{v}=80 m/s -## @iftex -## @tex -## ($M = 0.26$, $G_{a0} = -3^{\circ}$, ${\alpha}_0 = 4^{\circ}$, ${\kappa}= 50^{\circ}$). -## @end tex -## @end iftex -## @ifinfo -## (@var{M} = 0.26, @var{Ga0} = -3 deg, @var{alpha0} = 4 deg, @var{kappa} = 50 deg). -## @end ifinfo -## Inputs: (1) thrust and (2) elevator angle -## Outputs: (1) airspeed and (2) pitch angle. The discrete system is a -## stable and second order. -## -## @table @asis -## @item @acronym{SISO} plant: -## -## @iftex -## @tex -## $$ G(s) = { s-2 \over (s+2) (s-1) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## @group -## s - 2 -## G(s) = -------------- -## (s + 2)(s - 1) -## @end group -## @end example -## @end ifinfo -## -## @smallexample -## @group -## -## +----+ -## -------------------->| W1 |---> v1 -## z | +----+ -## ----|-------------+ -## | | -## | +---+ v y +----+ -## u *--->| G |--->O--*-->| W2 |---> v2 -## | +---+ | +----+ -## | | -## | +---+ | -## -----| K |<------- -## +---+ -## @end group -## @end smallexample -## -## @iftex -## @tex -## $$ { \rm min } \Vert T_{vz} \Vert _\infty $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## min || T || -## vz infty -## @end example -## @end ifinfo -## -## @var{W1} und @var{W2} are the robustness and performance weighting -## functions. -## -## @item @acronym{MIMO} plant: -## The optimal controller minimizes the -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## norm of the -## augmented plant @var{P} (mixed-sensitivity problem): -## @smallexample -## @group -## w -## 1 -----------+ -## | +----+ -## +---------------------->| W1 |----> z1 -## w | | +----+ -## 2 ------------------------+ -## | | | -## | v +----+ v +----+ -## +--*-->o-->| G |-->o--*-->| W2 |---> z2 -## | +----+ | +----+ -## | | -## ^ v -## u y (to K) -## (from controller K) -## @end group -## @end smallexample -## -## @iftex -## @tex -## $$ \left [ \matrix{ z_1 \cr -## z_2 \cr -## y } \right ] = -## P \left [ \matrix{ w_1 \cr -## w_2 \cr -## u } \right ] $$ -## @end tex -## @end iftex -## @ifinfo -## @smallexample -## @group -## + + + + -## | z | | w | -## | 1 | | 1 | -## | z | = [ P ] * | w | -## | 2 | | 2 | -## | y | | u | -## + + + + -## @end group -## @end smallexample -## @end ifinfo -## -## @item Discrete system: -## This is not a true discrete design. The design is carried out -## in continuous time while the effect of sampling is described by -## a bilinear transformation of the sampled system. -## This method works quite well if the sampling period is ``small'' -## compared to the plant time constants. -## -## @item The continuous plant: -## @iftex -## @tex -## $$ G(s) = { 1 \over (s+2)(s+1) } $$ -## @end tex -## @end iftex -## -## @ifinfo -## @example -## @group -## 1 -## G (s) = -------------- -## k (s + 2)(s + 1) -## -## @end group -## @end example -## @end ifinfo -## -## is discretised with a @acronym{ZOH} (Sampling period = @var{Ts} = 1 second): -## @iftex -## @tex -## $$ G(z) = { 0.199788z + 0.073498 \over (z - 0.36788) (z - 0.13534) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## @group -## -## 0.199788z + 0.073498 -## G(z) = -------------------------- -## (z - 0.36788)(z - 0.13534) -## @end group -## @end example -## @end ifinfo -## -## @smallexample -## @group -## -## +----+ -## -------------------->| W1 |---> v1 -## z | +----+ -## ----|-------------+ -## | | -## | +---+ v +----+ -## *--->| G |--->O--*-->| W2 |---> v2 -## | +---+ | +----+ -## | | -## | +---+ | -## -----| K |<------- -## +---+ -## @end group -## @end smallexample -## @iftex -## @tex -## $$ { \rm min } \Vert T_{vz} \Vert _\infty $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## min || T || -## vz infty -## @end example -## @end ifinfo -## @var{W1} and @var{W2} are the robustness and performance weighting -## functions. -## @end table -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: April 30, 1998 - -yn = []; -while (length(yn) < 1) - yn = input(" * [s]iso, [m]imo, or [d]iscrete design? [no default]: ","S"); -endwhile -if ((yn(1) == "s") | (yn(1) == 'S')) - sys_type = 1; -elseif ((yn(1) == "m") | (yn(1) == 'M')) - sys_type = 2; -elseif ((yn(1) == "d") | (yn(1) == 'D')) - sys_type = 3; -else - disp(" *** no system type specified, hinfdemo terminated."); - return; -endif - -echo off -switch (sys_type) - - case (1) - ## siso - disp(" "); - disp(" ----------------------------------------------"); - disp(" H_infinity optimal control for the SISO plant:"); - disp(" "); - disp(" s - 2"); - disp(" G(s) = --------------"); - disp(" (s + 2)(s - 1)"); - disp(" "); - disp(" ----------------------------------------------"); - disp(" "); - - ## weighting on actuator u - W1 = wgt1o(0.05, 100.0, 425.0); - ## weighting on controlled variable y - W2 = wgt1o(10.0, 0.05, 0.001); - ## plant - G = tf2sys([1 -2],[1 1 -2]); - - ## need One as the pseudo transfer function One = 1 - One = ugain(1); - disp(" o forming P..."); - psys = buildssic([1 4;2 4;3 1],[3],[2 3 5],[3 4],G,W1,W2,One); - disp(" "); - disp(" o controller design..."); - [K, gfin, GW]=hinfsyn(psys, 1, 1, 0.1, 10.0, 0.02); - disp(" "); - disp("-- OK ----------------------------------------------"); - - disp(" Closed loop poles:"); - damp(GW); - ## disp(" o Testing H_infinity norm: (hinfnorm does not work)"); - ## hinfnorm(GW); - - disp(" "); - yn = input(" * Plot closed loop step response? [n]: ","S"); - if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o step responses of T and KS..."); - GW = buildssic([1 2; 2 1], [], [1 2], [-2], G, K); - figure(1); - step(GW, 1, 10); - endif - endif - - case (2) - ## mimo - disp(" "); - disp(" -----------------------------------------------"); - disp(" H_inf optimal control for the jet707 plant"); - disp(" -----------------------------------------------"); - disp(" "); - - ## Weighting function on u (robustness weight) - ww1 = wgt1o(0.01,5,0.9); - ww2 = wgt1o(0.01,5,2.2); - W1 = buildssic([1 0;2 0],[],[1 2],[1 2],ww1,ww2); - ## Weighting function on y (performance weight) - ww1 = wgt1o(250,0.1,0.0001); - ww2 = wgt1o(250,0.1,0.0002); - W2 = buildssic([1 0;2 0],[],[1 2],[1 2],ww1,ww2); - ## plant (2 x 2 system) - G = jet707; - - disp(" o forming P..."); - One = ugain(2); - Clst = [1 7; 2 8; 3 7; 4 8; 5 1; 6 2]; - P = buildssic(Clst,[5 6],[3:6 9 10],[1 2 5:8],G,W1,W2,One); - - disp(" "); - disp(" o controller design..."); - K = hinfsyn(P, 2, 2, 0.25, 10.0, 0.005); - - disp(" "); - yn = input(" * Plot closed loop step responses? [n]: ","S"); - if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o step responses of T and KS..."); - GW = buildssic([1 3;2 4;3 1;4 2],[],[1 2 3 4],[-3 -4],G,K); - - disp(" "); - disp(" FIGURE 1: speed refence => 1, pitch angle ref. => 0"); - disp(" ==================================================="); - disp(" y1: speed (should be 1)"); - disp(" y2: pitch angle (should remain 0)"); - disp(" y3: thrust (should be a slow transient)"); - disp(" y6: elevator (should be a faster transient)"); - disp(" "); - disp(" FIGURE 2: speed refence => 0, pitch angle ref. => 1"); - disp(" ==================================================="); - disp(" y1: speed (should remain 0)"); - disp(" y2: pitch angle (should be 1)"); - disp(" y3: thrust (should be a slow transient)"); - disp(" y6: elevator (should be a faster transient)"); - disp(" "); - figure(1) - step(GW); - figure(2) - step(GW,2); - endif - endif - - case (3) - ## discrete - disp(" "); - disp(" --------------------------------------------------"); - disp(" Discrete H_infinity optimal control for the plant:"); - disp(" "); - disp(" 0.199788z + 0.073498"); - disp(" G(s) = --------------------------"); - disp(" (z - 0.36788)(z - 0.13533)"); - disp(" --------------------------------------------------"); - disp(" "); - - ## sampling time - Ts = 1.0; - ## weighting on actuator value u - W1 = wgt1o(0.1, 200.0, 50.0); - ## weighting on controlled variable y - W2 = wgt1o(350.0, 0.05, 0.0002); - ## omega axis - ww = logspace(-4.99, 3.99, 100); - if (columns(ww) > 1); ww = ww'; endif - - ## continuous plant - G = tf2sys(2,[1 3 2]); - ## discrete plant with zoh - Gd = c2d(G, Ts); - ## w-plane (continuous representation of the sampled system) - Gw = d2c(Gd, "bi"); - - disp(" "); - disp(" o building P..."); - ## need One as the pseudo transfer function One = 1 - One = ugain(1); - psys = buildssic([1 4;2 4;3 1],[3],[2 3 5],[3 4],Gw,W1,W2,One); - disp(" o controller design..."); - [K, gfin, GWC] = hinfsyn(psys, 1, 1, 0.1, 10.0, 0.02); - - disp(" "); - fig_n = 1; - yn = input(" * Plot magnitudes of W1KS and W2S? [n]: ","S"); - if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o magnitudes of W1KS and W2S..."); - gwx = sysprune(GWC, 1, 1); - mag1 = bode(gwx, ww); - if (columns(mag1) > 1); mag1 = mag1'; endif - gwx = sysprune(GWC, 2, 1); - mag2 = bode(gwx, ww); - if (columns(mag2) > 1); mag2 = mag2'; endif - figure(fig_n) - fig_n = fig_n + 1; - loglog(ww, [mag1 mag2]); - grid ("on"); - endif - endif - - Kd = c2d(K, "bi", Ts); - GG = buildssic([1 2; 2 1], [], [1 2], [-2], Gd, Kd); - disp(" o closed loop poles..."); - damp(GG); - - disp(" "); - yn = input(" * Plot closed loop step responses? [n]: ","S"); - if (length(yn) >= 1) - if ((yn(1) == "y") || (yn(1) == 'Y')) - disp(" o step responses of T and KS..."); - figure(fig_n) - step(GG, 1, 10); - endif - endif - -endswitch - -disp(" o hinfdemo terminated successfully."); - -## KPM-hinfdemo/End
deleted file mode 100644 --- a/scripts/control/hinf/hinfnorm.m +++ /dev/null @@ -1,210 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{g}, @var{gmin}, @var{gmax}] =} hinfnorm (@var{sys}, @var{tol}, @var{gmin}, @var{gmax}, @var{ptol}) -## Computes the -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## norm of a system data structure. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## @item tol -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## norm search tolerance (default: 0.001) -## @item gmin -## minimum value for norm search (default: 1e-9) -## @item gmax -## maximum value for norm search (default: 1e+9) -## @item ptol -## pole tolerance: -## @itemize @bullet -## @item if sys is continuous, poles with -## @iftex -## @tex -## $ \vert {\rm real}(pole) \vert < ptol \Vert H \Vert $ -## @end tex -## @end iftex -## @ifinfo -## @math{ |real(pole))| < ptol*||H|| } -## @end ifinfo -## (@var{H} is appropriate Hamiltonian) -## are considered to be on the imaginary axis. -## -## @item if sys is discrete, poles with -## @iftex -## @tex -## $ \vert { \rm pole } - 1 \vert < ptol \Vert [ s_1 s_2 ] \Vert $ -## @end tex -## @end iftex -## @ifinfo -## @math{|abs(pole)-1| < ptol*||[s1,s2]||} -## @end ifinfo -## (appropriate symplectic pencil) -## are considered to be on the unit circle. -## -## @item Default value: 1e-9 -## @end itemize -## @end table -## -## @strong{Outputs} -## @table @var -## @item g -## Computed gain, within @var{tol} of actual gain. @var{g} is returned as Inf -## if the system is unstable. -## @item gmin -## @itemx gmax -## Actual system gain lies in the interval [@var{gmin}, @var{gmax}]. -## @end table -## -## References: -## Doyle, Glover, Khargonekar, Francis, @cite{State-space solutions to standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{control problems}, @acronym{IEEE} @acronym{TAC} August 1989; -## Iglesias and Glover, @cite{State-Space approach to discrete-time} -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-infinity} -## @end ifinfo -## @cite{control}, Int. J. Control, vol 54, no. 5, 1991; -## Zhou, Doyle, Glover, @cite{Robust and Optimal Control}, Prentice-Hall, 1996. -## @end deftypefn - -function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol) - - if (nargin == 0 || nargin > 4) - print_usage (); - elseif (! isstruct (sys)) - error ("Sys must be a system data structure"); - endif - - ## set defaults where applicable - if (nargin < 5) - ptol = 1e-9; # pole tolerance - endif - if (nargin < 4) - gmax = 1e9; # max gain value - endif - - dflg = is_digital (sys); - sys = sysupdate (sys, "ss"); - [A, B, C, D] = sys2ss (sys); - [n, nz, m, p] = sysdimensions (sys); - - ## eigenvalues of A must all be stable - if (! is_stable (sys)) - warning ("hinfnorm: unstable system (is_stable, ptol=%g), returning Inf", - ptol); - g = Inf; - endif - - Dnrm = norm (D); - if (nargin < 3) - gmin = max (1e-9, Dnrm); # min gain value - elseif (gmin < Dnrm) - warning ("hinfnorm: setting Gmin=||D||=%g", Dnrm); - endif - - if (nargin < 2) - tol = 0.001; # convergence measure for gmin, gmax - endif - - ## check for scalar input arguments 2...5 - if (! isscalar (tol) && isscalar (gmin) - && isscalar (gmax) && isscalar (ptol)) - error ("hinfnorm: tol, gmin, gmax, ptol must be scalars"); - endif - - In = eye (n+nz); - Im = eye (m); - Ip = eye (p); - ## find the Hinf norm via binary search - while (gmax/gmin - 1 > tol) - g = (gmax+gmin)/2; - - if (dflg) - ## multiply g's through in formulas to avoid extreme magnitudes... - Rg = g^2*Im - D'*D; - Ak = A + (B/Rg)*D'*C; - Ck = g^2*C'*((g^2*Ip-D*D')\C); - - ## set up symplectic generalized eigenvalue problem per Iglesias & Glover - s1 = [Ak , zeros(nz); -Ck, In]; - s2 = [In, -(B/Rg)*B'; zeros(nz), Ak']; - - ## guard against roundoff again: zero out extremely small values - ## prior to balancing - s1 = s1 .* (abs(s1) > ptol*norm(s1,"inf")); - s2 = s2 .* (abs(s2) > ptol*norm(s2,"inf")); - [cc, dd, s1, s2] = balance (s1, s2); - [qza, qzb, zz, pls] = qz (s1, s2, "S"); # ordered qz decomposition - eigerr = abs (abs(pls)-1); - normH = norm ([s1, s2]); - Hb = [s1, s2]; - - ## check R - B' X B condition (Iglesias and Glover's paper) - X = zz((nz+1):(2*nz),1:nz)/zz(1:nz,1:nz); - dcondfailed = min (real (eig (Rg - B'*X*B)) < ptol); - else - Rinv = inv(g*g*Im - (D' * D)); - H = [A + B*Rinv*D'*C, B*Rinv*B'; - -C'*(Ip + D*Rinv*D')*C, -(A + B*Rinv*D'*C)']; - ## guard against roundoff: zero out extremely small values prior - ## to balancing - H = H .* (abs (H) > ptol * norm (H, "inf")); - [DD, Hb] = balance (H); - pls = eig (Hb); - eigerr = abs (real (pls)); - normH = norm (H); - dcondfailed = 0; # digital condition; doesn't apply here - endif - if ((min (eigerr) <= ptol * normH) | dcondfailed) - gmin = g; - else - gmax = g; - endif - endwhile -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/hinfsyn.m +++ /dev/null @@ -1,393 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{k}, @var{g}, @var{gw}, @var{xinf}, @var{yinf}] =} hinfsyn (@var{asys}, @var{nu}, @var{ny}, @var{gmin}, @var{gmax}, @var{gtol}, @var{ptol}, @var{tol}) -## -## @strong{Inputs} input system is passed as either -## @table @var -## @item asys -## system data structure (see @command{ss}, @command{sys2ss}) -## @itemize @bullet -## @item controller is implemented for continuous time systems -## @item controller is @strong{not} implemented for discrete time systems (see -## bilinear transforms in @command{c2d}, @command{d2c}) -## @end itemize -## @item nu -## number of controlled inputs -## @item ny -## number of measured outputs -## @item gmin -## initial lower bound on -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## optimal gain -## @item gmax -## initial upper bound on -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## Optimal gain. -## @item gtol -## Gain threshold. Routine quits when @var{gmax}/@var{gmin} < 1+tol. -## @item ptol -## poles with @code{abs(real(pole))} -## @iftex -## @tex -## $ < ptol \Vert H \Vert $ -## @end tex -## @end iftex -## @ifinfo -## < ptol*||H|| -## @end ifinfo -## (@var{H} is appropriate -## Hamiltonian) are considered to be on the imaginary axis. -## Default: 1e-9. -## @item tol -## threshold for 0. Default: 200*@code{eps}. -## -## @var{gmax}, @var{min}, @var{tol}, and @var{tol} must all be positive scalars. -## @end table -## @strong{Outputs} -## @table @var -## @item k -## System controller. -## @item g -## Designed gain value. -## @item gw -## Closed loop system. -## @item xinf -## @acronym{ARE} solution matrix for regulator subproblem. -## @item yinf -## @acronym{ARE} solution matrix for filter subproblem. -## @end table -## -## References: -## @enumerate -## @item Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions -## to Standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989. -## -## @item Maciejowksi, J.M., @cite{Multivariable feedback design}, -## Addison-Wesley, 1989, @acronym{ISBN} 0-201-18243-2. -## -## @item Keith Glover and John C. Doyle, @cite{State-space formulae for all -## stabilizing controllers that satisfy an} -## @iftex -## @tex -## $ { \cal H }_\infty $@cite{norm} -## @end tex -## @end iftex -## @ifinfo -## @cite{H-infinity-norm} -## @end ifinfo -## @cite{bound and relations to risk sensitivity}, -## Systems & Control Letters 11, Oct. 1988, pp 167--172. -## @end enumerate -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## Updated for Packed system structures December 1996 by John Ingram -## -## Revised by Kai P. Mueller April 1998 to solve the general H_infinity -## problem using unitary transformations Q (on w and z) -## and non-singular transformations R (on u and y). - -function [K, g, GW, Xinf, Yinf] = hinfsyn (Asys, nu, ny, gmin, gmax, gtol, ptol, tol) - - if (nargin < 1 || nargin > 8) - print_usage (); - endif - ## set default arguments - if (nargin < 8) - if (isa (Asys.a, "single") || isa (Asys.b, "single") || isa (Asys.c, "single") || - isa (Asys.d, "single")) - tol = 200*eps("single"); - else - tol = 200*eps; - endif - elseif (! is_sample (tol)) - error ("tol must be a positive scalar.") - endif - if (nargin < 7) - ptol = 1e-9; - elseif (! is_sample (ptol)) - error ("hinfsyn: ptol must be a positive scalar"); - endif - - if (! is_sample (gmax) || ! is_sample (gmin) || ! is_sample (gtol)) - error ("hinfsyn: gmax=%g, gmin=%g, gtol=%g must be positive scalars", - gmax, gmin, gtol); - endif - - [chkdgkf, dgs] = is_dgkf (Asys, nu, ny, tol); - - if (! chkdgkf ) - error ("hinfsyn: system does not meet required assumptions") - endif - - ## extract dgs information - nw = dgs.nw; - nu = dgs.nu; - nz = dgs.nz; - ny = dgs.ny; - - A = dgs.A; - - B1 = dgs.Bw; - B2 = dgs.Bu; - - C1 = dgs.Cz; - C2 = dgs.Cy; - - D11 = dgs.Dzw; - D12 = dgs.Dzu; - D21 = dgs.Dyw; - D22 = dgs.Dyu; - - d22nz = dgs.Dyu_nz; - - dflg = dgs.dflg; - - ## recover i/o transformations - R12 = dgs.Ru; - R21 = dgs.Ry; - - [ncstates, ndstates, nin, nout] = sysdimensions (Asys); - - Atsam = sysgettsam (Asys); - - [Ast, Ain, Aout] = sysgetsignals (Asys); - - BB = [B1, B2]; - CC = [C1 ; C2]; - DD = [D11, D12 ; D21, D22]; - - if (dflg == 0) - n = ncstates; - ## perform binary search to find gamma min - ghi = gmax; - ## derive a lower lower bound for gamma from D matrices - xx1 = norm ((eye(nz) - (D12/(D12'*D12))*D12')*D11); - xx2 = norm (D11*(eye(nw)-(D21'/(D21*D21'))*D21)); - glo = max (xx1, xx2); - if (glo > gmin) - warning (" *** D matrices indicate a greater value of gamma min."); - warning (" gamma min (%f) superseeded by %f.", gmin, glo); - glo = xx1; - else - glo = gmin; - endif - if (glo > ghi) - error (" *** lower bound of gamma greater than upper bound (%g, %g)", - glo, ghi); - endif - - de = ghi - glo; - g = glo; - search_state = 0; - iteration_finished = 0; - disp(" o structural tests passed, start of iteration..."); - disp(" o <-> test passed # <-> test failed - <-> cannot test"); - printf("----------------------------------------"); - printf("--------------------------------------\n"); - - ## ------123456789012345678901234567890123456789012345678901234567890 - printf(" .........X......... .........Y......... "); - printf(".Z. PASS REMARKS\n"); - printf(" ga iax nev ene sym pos iax nev ene sym pos "); - printf("rho y/n ======>\n"); - printf("----------------------------------------"); - printf("--------------------------------------\n"); - - ## set up error messages - errmesg = {" o o o o o ", ... - " # - - - - ", ... - " o # - - - ", ... - " o o # - - ", ... - " o o o # - ", ... - " o o o o # ", ... - " - - - - - "}; - errdesx = {"", ... - "X im eig.", ... - "Hx not Ham.", ... - "X inf.eig", ... - "X not symm.", ... - "X not pos", ... - "R singular"}; - - errdesy = {" ", ... - "Y im eig.", ... - "Hy not Ham.", ... - "Y inf.eig", ... - "Y not symm.", ... - "Y not pos", ... - "Rtilde singular"}; - - - ## now do the search - while (! iteration_finished) - switch (search_state) - case 0 - g = ghi; - case 1 - g = glo; - case 2 - g = 0.5 * (ghi + glo); - otherwise - error (" *** This should never happen!"); - endswitch - printf ("%10.4f ", g); - - ## computing R and R~ - d1dot = [D11, D12]; - R = zeros (nin, nin); - R(1:nw,1:nw) = -g*g*eye(nw); - R = R + d1dot' * d1dot; - ddot1 = [D11; D21]; - Rtilde = zeros (nout, nout); - Rtilde(1:nz,1:nz) = -g*g*eye(nz); - Rtilde = Rtilde + ddot1 * ddot1'; - - [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol); - [Yinf, y_ha_err] = hinfsyn_ric (A', CC', B1', ddot1', Rtilde, ptol); - - ## assume failure for this gamma - passed = 0; - rerr = ""; - if (! x_ha_err && ! y_ha_err) - ## test spectral radius condition - rho = max (abs (eig (Xinf * Yinf))); - if (rho < g*g) - ## spectral radius condition passed - passed = 1; - else - rerr = sprintf ("rho=%f",rho); - endif - endif - - if (x_ha_err >= 0 && x_ha_err <= 6) - printf ("%s", errmesg{x_ha_err+1}); - xerr = errdesx{x_ha_err+1}; - else - error (" *** Xinf fail: this should never happen!"); - endif - - if (y_ha_err >= 0 && y_ha_err <= 6) - printf ("%s", errmesg{y_ha_err+1}); - yerr = errdesy{y_ha_err+1}; - else - error (" *** Yinf fail: this should never happen!"); - endif - - if (passed) - printf (" y all tests passed.\n"); - else - printf (" n %s/%s%s\n", xerr, yerr, rerr); - endif - - if (passed && (de/g < gtol)) - search_state = 3; - endif - - switch (search_state) - case 0 - if (! passed) - ## upper bound must pass but did not - fprintf(" *** the upper bound of gamma (%f) is too small.\n", g); - iteration_finished = 2; - else - search_state = 1; - endif - case 1 - if (! passed) - search_state = 2; - else - ## lower bound must not pass but passed - fprintf (" *** the lower bound of gamma (%f) passed.\n", g); - iteration_finished = 3; - endif - case 2 - ## Normal case; must check that singular R, Rtilde wasn't the problem. - if (! passed && x_ha_err != 6 && y_ha_err != 6) - glo = g; - else - ghi = g; - endif - de = ghi - glo; - case 3 - iteration_finished = 1; # done - otherwise - error (" *** This should never happen!"); - endswitch - endwhile - - printf ("----------------------------------------"); - printf ("--------------------------------------\n"); - if (iteration_finished != 1) - K = []; - else - ## success: compute controller - fprintf (" hinfsyn final: glo=%f ghi=%f, test gain g=%f\n", - glo, ghi, g); - printf ("----------------------------------------"); - printf ("--------------------------------------\n"); - Z = inv (eye(ncstates) - Yinf*Xinf/g/g); - F = -R \ (d1dot'*C1 + BB'*Xinf); - H = -(B1*ddot1' + Yinf*CC') / Rtilde; - K = hinf_ctr (dgs, F, H, Z, g); - - Kst = strappend (Ast, "_K"); - Kin = strappend (Aout((nout-ny+1):(nout)),"_K"); - Kout = strappend (Ain((nin-nu+1):(nin)),"_K"); - [Ac, Bc, Cc, Dc] = sys2ss (K); - K = ss (Ac, Bc, Cc, Dc, Atsam, ncstates, ndstates, Kst, Kin, Kout); - if (nargout >= 3) - GW = starp (Asys, K); - endif - endif - - elseif (ndstates) - - ## discrete time solution - error ("hinfsyn: discrete-time case not yet implemented") - - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/hinfsyn_chk.m +++ /dev/null @@ -1,135 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{retval}, @var{pc}, @var{pf}] =} hinfsyn_chk (@var{a}, @var{b1}, @var{b2}, @var{c1}, @var{c2}, @var{d12}, @var{d21}, @var{g}, @var{ptol}) -## Called by @code{hinfsyn} to see if gain @var{g} satisfies conditions in -## Theorem 3 of -## Doyle, Glover, Khargonekar, Francis, @cite{State Space Solutions to Standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989. -## -## @strong{Warning:} do not attempt to use this at home; no argument -## checking performed. -## -## @strong{Inputs} -## -## As returned by @code{is_dgkf}, except for: -## @table @var -## @item g -## candidate gain level -## @item ptol -## as in @code{hinfsyn} -## @end table -## -## @strong{Outputs} -## @table @var -## @item retval -## 1 if g exceeds optimal Hinf closed loop gain, else 0 -## @item pc -## solution of ``regulator'' -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## @acronym{ARE} -## @item pf -## solution of ``filter'' -## @iftex -## @tex -## $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity -## @end ifinfo -## @acronym{ARE} -## @end table -## Do not attempt to use this at home; no argument checking performed. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 - -function [retval, Pc, Pf] = hinfsyn_chk (A, B1, B2, C1, C2, D12, D21, g, ptol) - - if (nargin != 9) - print_usage (); - endif - - Pc = Pf = []; - - ## Construct the two Hamiltonians - g2 = 1/(g*g); - Hc = [A, g2*B1*B1' - B2*B2'; -C1'*C1, -A']; - Hf = [A', g2*C1'*C1 - C2'*C2; -B1*B1', -A]; - - ## check if Hc, Hf are in dom(Ric) - Hcminval = min (abs (real (eig (Hc)))); - Hfminval = min (abs (real (eig (Hf)))); - if (Hcminval < ptol); - warning ("hinfsyn_chk: Hc is not in dom(Ric)"); - retval = 0; - return - endif - if(Hfminval < ptol) - warning ("hinfsyn_chk: Hf is not in dom(Ric)"); - retval = 0; - return - endif - - ## Solve ARE's - Pc = are (A, B2*B2'-g2*B1*B1', C1'*C1); - Pf = are (A', C2'*C2-g2*C1'*C1, B1*B1'); - - Pceig = eig (Pc); - Pfeig = eig (Pf); - Pcfeig = eig (Pc*Pf); - - if (min (Pceig) < -ptol) - warning ("hinfsyn_chk: Pc is not >= 0"); - retval = 0; - return - endif - if (min (Pfeig) < -ptol) - warning ("hinfsyn_chk: Pf is not >= 0"); - retval = 0; - return - endif - if (max (abs (Pcfeig)) >= g*g) - warning ("hinfsyn_chk: rho(Pf*Pc) is not < g^2"); - retval = 0; - return - endif - - ## all conditions met. - retval = 1; - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/hinfsyn_ric.m +++ /dev/null @@ -1,93 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{xinf}, @var{x_ha_err}] =} hinfsyn_ric (@var{a}, @var{bb}, @var{c1}, @var{d1dot}, @var{r}, @var{ptol}) -## Forms -## @example -## xx = ([bb; -c1'*d1dot]/r) * [d1dot'*c1 bb']; -## Ha = [a 0*a; -c1'*c1 - a'] - xx; -## @end example -## and solves associated Riccati equation. -## The error code @var{x_ha_err} indicates one of the following -## conditions: -## @table @asis -## @item 0 -## successful -## @item 1 -## @var{xinf} has imaginary eigenvalues -## @item 2 -## @var{hx} not Hamiltonian -## @item 3 -## @var{xinf} has infinite eigenvalues (numerical overflow) -## @item 4 -## @var{xinf} not symmetric -## @item 5 -## @var{xinf} not positive definite -## @item 6 -## @var{r} is singular -## @end table -## @end deftypefn - -function [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol) - - if (nargin != 6) - print_usage (); - endif - - x_ha_err = 0; # assume success - Xinf = []; # default return value - n = issquare (A); - nw = issquare (R); - if (rank (R) != nw) - x_ha_err = 6; - else # build hamiltonian Ha for X_inf - xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1, BB']; - Ha = [A, 0*A; -C1'*C1, -A'] - xx; - x_ha_err = 0; - [d, Ha] = balance (Ha); - [u, s] = schur (Ha, "A"); - rev = real (eig (s)); - - if (any (abs (rev) <= ptol)) # eigenvalues near the imaginary axis - x_ha_err = 1; - elseif (sum (rev > 0) != sum (rev < 0)) - ## unequal number of positive and negative eigenvalues - x_ha_err = 2; - else - ## compute positive Riccati equation solution - u = d * u; - Xinf = u(n+1:2*n,1:n) / u(1:n,1:n); - if (! all (all (finite (Xinf)))) - x_ha_err = 3; - elseif (norm (Xinf-Xinf') >= 10*ptol) - ## solution not symmetric - x_ha_err = 4; - else - ## positive semidefinite? - ## force symmetry (faster, avoids some convergence problems) - Xinf = (Xinf + Xinf')/2; - rev = eig (Xinf); - if (any (rev <= -ptol)) - x_ha_err = 5; - endif - endif - endif - endif -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/is_dgkf.m +++ /dev/null @@ -1,283 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{retval}, @var{dgkf_struct} ] =} is_dgkf (@var{asys}, @var{nu}, @var{ny}, @var{tol} ) -## Determine whether a continuous time state space system meets -## assumptions of @acronym{DGKF} algorithm. -## Partitions system into: -## @example -## [dx/dt] [A | Bw Bu ][w] -## [ z ] = [Cz | Dzw Dzu ][u] -## [ y ] [Cy | Dyw Dyu ] -## @end example -## or similar discrete-time system. -## If necessary, orthogonal transformations @var{qw}, @var{qz} and nonsingular -## transformations @var{ru}, @var{ry} are applied to respective vectors -## @var{w}, @var{z}, @var{u}, @var{y} in order to satisfy @acronym{DGKF} assumptions. -## Loop shifting is used if @var{dyu} block is nonzero. -## -## @strong{Inputs} -## @table @var -## @item asys -## system data structure -## @item nu -## number of controlled inputs -## @item ny -## number of measured outputs -## @item tol -## threshold for 0; default: 200*@code{eps}. -## @end table -## @strong{Outputs} -## @table @var -## @item retval -## true(1) if system passes check, false(0) otherwise -## @item dgkf_struct -## data structure of @command{is_dgkf} results. Entries: -## @table @var -## @item nw -## @itemx nz -## dimensions of @var{w}, @var{z} -## @item a -## system @math{A} matrix -## @item bw -## (@var{n} x @var{nw}) @var{qw}-transformed disturbance input matrix -## @item bu -## (@var{n} x @var{nu}) @var{ru}-transformed controlled input matrix; -## -## @math{B = [Bw Bu]} -## @item cz -## (@var{nz} x @var{n}) Qz-transformed error output matrix -## @item cy -## (@var{ny} x @var{n}) @var{ry}-transformed measured output matrix -## -## @math{C = [Cz; Cy]} -## @item dzu -## @item dyw -## off-diagonal blocks of transformed system @math{D} matrix that enter -## @var{z}, @var{y} from @var{u}, @var{w} respectively -## @item ru -## controlled input transformation matrix -## @item ry -## observed output transformation matrix -## @item dyu_nz -## nonzero if the @var{dyu} block is nonzero. -## @item dyu -## untransformed @var{dyu} block -## @item dflg -## nonzero if the system is discrete-time -## @end table -## @end table -## @code{is_dgkf} exits with an error if the system is mixed -## discrete/continuous. -## -## @strong{References} -## @table @strong -## @item [1] -## Doyle, Glover, Khargonekar, Francis, @cite{State Space Solutions to Standard} -## @iftex -## @tex -## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## @cite{H-2 and H-infinity} -## @end ifinfo -## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989. -## @item [2] -## Maciejowksi, J.M., @cite{Multivariable Feedback Design}, Addison-Wesley, 1989. -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Updated by John Ingram July 1996 to accept structured systems - -## Revised by Kai P. Mueller April 1998 to solve the general H_infinity -## problem using unitary transformations Q (on w and z) -## and non-singular transformations R (on u and y) such -## that the Dzu and Dyw matrices of the transformed plant -## -## ~ -## P (the variable Asys here) -## -## become -## -## ~ -1 T -## D = Q D R = [ 0 I ] or [ I ], -## 12 12 12 12 -## -## ~ T -## D = R D Q = [ 0 I ] or [ I ]. -## 21 21 21 21 -## -## This transformation together with the algorithm in [1] solves -## the general problem (see [2] for example). - -function [retval, dgkf_struct] = is_dgkf (Asys, nu, ny, tol) - - if (nargin < 3) || (nargin > 4) - print_usage (); - elseif (! isscalar (nu) || ! isscalar (ny)) - error ("is_dgkf: arguments 2 and 3 must be scalars") - elseif (! isstruct (Asys)) - error ("Argument 1 must be a system data structure"); - endif - if (nargin < 4) - if (isa (Asys.a, "single") || isa (Asys.b, "single") || isa (Asys.c, "single") || - isa (Asys.d, "single")) - tol = 200*eps("single"); - else - tol = 200*eps; - endif - elseif (! is_sample (tol)) - error ("is_dgkf: tol must be a positive scalar") - endif - - retval = 1; # assume passes test - - dflg = is_digital (Asys); - [Anc, Anz, nin, nout ] = sysdimensions (Asys); - - if (Anz == 0 && Anc == 0) - error ("is_dgkf: no system states"); - elseif (nu >= nin) - error ("is_dgkf: insufficient number of disturbance inputs"); - elseif (ny >= nout) - error ("is_dgkf: insufficient number of regulated outputs"); - endif - - nw = nin - nu; - nz = nout - ny; - - nw1 = nw + 1; - nz1 = nz + 1; - - [A, B, C, D] = sys2ss (Asys); - ## scale input/output for numerical reasons - if (norm (C, "fro") * norm (B, "fro") == 0) - error ("||C||*||B|| = 0; no dynamic connnection from inputs to outputs"); - endif - xx = sqrt (norm (B, Inf) / norm (C, Inf)); - B = B / xx; C = C * xx; - - ## partition matrices - Bw = B(:,1:nw); - Bu = B(:,nw1:nin); - - Cz = C(1:nz,:); - Cy = C(nz1:nout,:); - - Dzw = D(1:nz,1:nw); - Dzu = D(1:nz,nw1:nin); - - Dyw = D(nz1:nout,1:nw); - Dyu = D(nz1:nout,nw1:nin); - - ## Check for loopo shifting - Dyu_nz = (norm (Dyu, Inf) != 0); - if (Dyu_nz) - warning ("is_dgkf: D22 nonzero; performing loop shifting"); - endif - - ## 12 - rank condition at w = 0 - xx =[A, Bu; Cz, Dzu]; - [nr, nc] = size (xx); - irank = rank (xx); - if (irank != nc) - retval = 0; - warning ("rank([A Bu; Cz Dzu]) = %d, need %d; n=%d, nz=%d, nu=%d", - irank, nc, Anc+Anz, nz, nu); - warning (" *** 12-rank condition violated at w = 0"); - endif - - ## 21 - rank condition at w = 0 - xx =[A, Bw; Cy, Dyw]; - [nr, nc] = size (xx); - irank = rank (xx); - if (irank != nr) - retval = 0; - warning ("rank([A Bw; Cy Dyw]) = %d, need %d; n=%d, ny=%d, nw=%d", - irank, nr, Anc+Anz, ny, nw); - warning (" *** 21-rank condition violated at w = 0"); - endif - - ## can Dzu be transformed to become [0 I]' or [I]? - ## This ensures a normalized weight - [Qz, Ru] = qr (Dzu); - irank = rank (Ru); - if (irank != nu) - retval = 0; - warning ("*** rank(Dzu(%d x %d) = %d", nz, nu, irank); - warning ("*** Dzu does not have full column rank"); - endif - if (nu >= nz) - Qz = Qz(:,1:nu)'; - else - Qz = [Qz(:,(nu+1):nz), Qz(:,1:nu)]'; - endif - Ru = Ru(1:nu,:); - - ## can Dyw be transformed to become [0 I] or [I]? - ## This ensures a normalized weight - [Qw, Ry] = qr (Dyw'); - irank = rank (Ry); - if (irank != ny) - retval = 0; - warning ("*** rank(Dyw(%d x %d) = %d", ny, nw, irank); - warning (" *** Dyw does not have full row rank"); - endif - - if (ny >= nw) - Qw = Qw(:,1:ny); - else - Qw = [Qw(:,(ny+1):nw), Qw(:,1:ny)]; - endif - Ry = Ry(1:ny,:)'; - - ## transform P by Qz/Ru and Qw/Ry - Bw = Bw*Qw; - Bu = Bu/Ru; - B = [Bw, Bu]; - Cz = Qz*Cz; - Cy = Ry\Cy; - C = [Cz; Cy]; - Dzw = Qz*Dzw*Qw; - Dzu = Qz*Dzu/Ru; - Dyw = Ry\Dyw*Qw; - - ## pack the return structure - dgkf_struct.nw = nw; - dgkf_struct.nu = nu; - dgkf_struct.nz = nz; - dgkf_struct.ny = ny; - dgkf_struct.A = A; - dgkf_struct.Bw = Bw; - dgkf_struct.Bu = Bu; - dgkf_struct.Cz = Cz; - dgkf_struct.Cy = Cy; - dgkf_struct.Dzw = Dzw; - dgkf_struct.Dzu = Dzu; - dgkf_struct.Dyw = Dyw; - dgkf_struct.Dyu = Dyu; - dgkf_struct.Ru = Ru; - dgkf_struct.Ry = Ry; - dgkf_struct.Dyu_nz = Dyu_nz; - dgkf_struct.dflg = dflg; - -endfunction
deleted file mode 100644 --- a/scripts/control/hinf/wgt1o.m +++ /dev/null @@ -1,75 +0,0 @@ -## Copyright (C) 1998, 2000, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{W} =} wgt1o (@var{vl}, @var{vh}, @var{fc}) -## State space description of a first order weighting function. -## -## Weighting function are needed by the -## @iftex -## @tex -## $ { \cal H }_2 / { \cal H }_\infty $ -## @end tex -## @end iftex -## @ifinfo -## H-2/H-infinity -## @end ifinfo -## design procedure. -## These functions are part of the augmented plant @var{P} -## (see @command{hinfdemo} for an application example). -## -## @strong{Inputs} -## @table @var -## @item vl -## Gain at low frequencies. -## @item vh -## Gain at high frequencies. -## @item fc -## Corner frequency (in Hz, @strong{not} in rad/sec) -## @end table -## -## @strong{Output} -## @table @var -## @item W -## Weighting function, given in form of a system data structure. -## @end table -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: September 30, 1997 - -function wsys = wgt1o (vl, vh, fc) - - if (nargin != 3) - print_usage (); - endif - - if (vl == vh) - a = []; - b = []; - c = []; - else - a = -2*pi*fc; - b = -2*pi*fc; - c = vh-vl; - endif - d = vh; - - wsys = ss (a, b, c, d); - -endfunction
deleted file mode 100755 --- a/scripts/control/install-ocst +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh -# -# install-ocst -- install/update Octave Controls Toolbox (OCST) -# of A. Scottedward Hodel <A.S.Hodel@Eng.Auburn.EDU> -# -# This script uses chunks of "install-octave" -# from John W. Eaton <jwe@bevo.che.wisc.edu> -# -# Kai P Mueller <mueller@ifr.ing.tu-bs.-de>, TU Braunschweig -# 11/22/97 initial version -# - -if [ $# -ne 1 ] -then - echo - echo " usage: $0 (help | all | select)" - echo - exit 1 -fi - -case $1 in - - help) - cat << EOF -========================================================================== - install-ocst attempts to install (or update) the OCST (Octave controls - toolbox) of your version of Octave. - - The files in the subdirectories "general", "linear-algebra", - "strings", "plot", and "control" will be copied to the Octave data - directories with proper permissions. - - If the file "obsolete.files" exists this script file fill - ask if the files listed in "obsolete.files" should be removed. - - The install and update procedures differ in the way they perform the - copy of the files in this OCST version. - - o all Copy all files to the Octave data directories assuming that - this version is newer. Install does not ask any questions. - This modfe is best if you are the system administrator you - just want to install the control stuff. - - o select Copy all files but ask before replacing an existing file - which differs from the one in this distribution. The update - mode is appropriate for developers. New files will be - copied without confirmation. - Note: it can be very annoying to confirm the replacements. -========================================================================== -EOF - exit 0 - ;; - - all) - ask=no - ;; - - select) - ask=yes - ;; - - *) - echo - echo " usage: $0 (help | all | select)" - echo - exit 1 - ;; -esac - -if [ `whoami` != root ] -then - echo -n " * You should execute install-ocst as root, continue anyway? [n]: " - read ans - case "$ans" in - y | Y | yes | YES) - ;; - *) - exit 1 - ;; - esac -fi - -# change location of the distribution file here: -ocst_version=1.2 -datadir=/usr/local/share -oct_version=2.0.12 - -echo -echo " - This is the OCST V$ocst_version update procedure -" - -# change everything below at your own risk. -# check data directory -echo -echo -n " * Octave data dir is $datadir/octave; is that correct? [y]: " -read ans -case "$ans" in - n | N | no | NO) - echo -n " * Enter Octave data dir (without /octave/...): " - read datadir - ;; -esac -if [ ! -d "$datadir/octave" ] -then - echo "install-ocst: Octave dir ($datadir/octave) does not exist - Goodbye." - exit 1 -fi - -# check Octave version -echo -echo -n " * Octave version is $oct_version; is that correct? [y]: " -read ans -case "$ans" in - n | N | no | NO) - echo -n " * Enter Octave version: " - read oct_version - ;; -esac -toplevel=$datadir/octave/$oct_version/m -if [ ! -d $toplevel ] -then -echo "install-ocst: toplevel dir ($toplevel) does not exist - Goodbye." - exit 1 -fi - -# perform installation -echo -echo -n " * This is your last chance to quit, continue installation? [y]: " -read ans -case "$ans" in - n | N | no | NO) - echo "install-ocst aborted." - exit 0 - ;; -esac - -echo -distdir=`pwd` -for dd in general linear-algebra strings plot control -do - if [ -d "$dd" ] - then - echo " o installing files in $dd..." - cd $dd - for ff in `ls` - do - if [ $ask = yes ] - then - if [ -e "$toplevel/$dd/$ff" ] - then - diff $ff "$toplevel/$dd/$ff" > /dev/null - if [ "$?" = 0 ] - then - # files are identical; do not copy - echo "---> $ff (same version does already exist, no replacement)" - else - # file already exit, our version is (possible) newer - echo -n " * Replace existing $ff? [y]: " - read ans - case "$ans" in - n | N | no | NO) - echo "---> $ff skipped." - ;; - *) - cp $ff $toplevel/$dd - chmod 644 $toplevel/$dd/$ff - ;; - esac - fi - else - echo "---> $ff (new file)" - cp $ff $toplevel/$dd - chmod 644 $toplevel/$dd/$ff - fi - else - # copy everything without asking - cp $ff $toplevel/$dd - chmod 644 $toplevel/$dd/$ff - fi - done - echo " ...files in $dd installed." - fi - cd $distdir -done - -# check for "obsolete.files" -if [ ! -r obsolete.files ] -then - echo " o No obsolete files." -else - echo " o removing obsolete files..." - flist=`cat obsolete.files` - for ff in $flist - do - dfile=$toplevel/$ff - if [ ! -e "$dfile" ] - then - echo " * no obsolete file: $ff" - else - echo -n " * remove $ff? [n]: " - read ans - case "$ans" in - y | Y | yes | YES) - rm $dfile - ;; - esac - fi - done -fi - -echo -echo " All files have been installed. Now to the final question:" -echo - -echo -n " * Replace/create ls-R file? [y]: " -read ans -case "$ans" in - n | N | no | NO) - echo "--> no new ls-R file." - ;; - *) - if [ -d "$datadir/libexec" ] - then - echo "install-ocst: libexec directory found." - ls -LR $datadir/octave $libexecdir/octave > $datadir/octave/ls-R - else - echo "install-ocst: libexec directory not found." - echo " (you can safely ingnore this message.)" - ls -LR $datadir/octave > $datadir/octave/ls-R - fi - ;; -esac - -echo "Thank you for using install-ocst." -exit 0
deleted file mode 100644 --- a/scripts/control/obsolete/Makefile.in +++ /dev/null @@ -1,84 +0,0 @@ -# Makefile for octave's scripts/control/obsolete directory -# -# Copyright (C) 2000, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../../.. - -script_sub_dir = control/obsolete - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = dezero.m dlqg.m minfo.m packsys.m qzval.m rotg.m \ - series.m swapcols.m swaprows.m syschnames.m unpacksys.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir) -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/obsolete/dezero.m +++ /dev/null @@ -1,58 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2006, 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Functin File} {} dezero (@var{s}) -## Remove trailing blank entries and all zero entries from the string s. -## @end deftypefn - -## Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> -## Adapted-By: jwe - -## Adapted from deblank by A. S. Hodel (a.s.hodel@eng.auburn.edu) -## (the name dezero is a reference to the Fermilab D0 experiment, -## where my sister did her PhD research) - -function t = dezero (s) - - ## delete the next line if you're stubbornly going to use dezero. - error ("dezero is no longer supported."); - - if (nargin != 1) - print_usage (); - elseif (ischar (s)) - - [nr, nc] = size (s); - len = nr * nc; - - if (len == 0) - t = s; - else - - s = reshape (s, 1, len); - - ## need to remove zeros first, then call deblank - s = toascii (s); - t = deblank (char (s(find (s != 0)))); - endif - - else - error ("dezero: expecting string argument"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/dlqg.m +++ /dev/null @@ -1,125 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## O B S O L E T E * * * D O N O T U S E! -## -## Use lqg instead. -## -## function [K,Q,P,Ee,Er] = dlqg(A,B,C,G,Sigw,Sigv,Q,R) -## function [K,Q,P,Ee,Er] = dlqg(Sys,Sigw,Sigv,Q,R) -## -## design a discrete-time linear quadratic gaussian optimal controller -## for the system -## -## x(k+1) = A x(k) + B u(k) + G w(k) [w]=N(0,[Sigw 0 ]) -## y(k) = C x(k) + v(k) [v] ( 0 Sigv ]) -## -## Outputs: -## K: system data structure format LQG optimal controller -## P: Solution of control (state feedback) algebraic Riccati equation -## Q: Solution of estimation algebraic Riccati equation -## Ee: estimator poles -## Es: controller poles -## inputs: -## A,B,C,G, or Sys: state space representation of system. -## Sigw, Sigv: covariance matrices of independent Gaussian noise processes -## (as above) -## Q, R: state, control weighting matrices for dlqr call respectively. -## -## See also: lqg, dlqe, dlqr - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 - -function [K, Q, P, Ee, Er] = dlqg (A, B, C, G, Sigw, Sigv, Q, R) - - warning ("dlqg: obsolete. use lqg instead (system data structure format)"); - - if (nargin == 5) - ## system data structure format - - ## check that it really is system data structure - if (! isstruct (A)) - error ("dlqg: 5 arguments, first argument is not a system data structure structure") - endif - - sys = sysupdate (sys, "ss"); # make sure in proper form - [ncstates, ndstates, nin, nout] = sysdimensions (sys); - if (ndstates == -1) - error ("this message should never appear: bad system dimensions"); - endif - - if (ncstates) - error ("dlqg: system has continuous-time states (try lqg?)") - elseif (ndstates < 1) - error ("dlqg: system has no discrete time states") - elseif (nin <= columns (Sigw)) - error ("dlqg: %d inputs provided, noise dimension is %d", - nin, columns (Sigw)); - elseif (nout != columns(Sigv)) - error ("dlqg: number of outputs (%d) incompatible with dimension of Sigv (%d)", - nout, columns (Sigv)); - endif - - ## put parameters into correct variables - R = Sigw; - Q = G; - Sigv = C; - Sigw = B; - [A, B, C, D] = sys2ss (Sys) - [n, m] = size (B) - m1 = columns(Sigw); - m2 = m1+1; - G = B(:,1:m1); - B = B(:,m2:m); - - elseif (nargin == 8) - ## state-space format - m = columns (B); - m1 = columns (G); - p = rows (C); - n = abcddim (A, B, C, zeros (p, m)); - n1 = abcddim (A, G, C, zeros (p, m1)); - if (n == -1 || n1 == -1) - error ("dlqg: A,B,C,G incompatibly dimensioned"); - elseif (p != columns (Sigv)) - error ("dlqg: C, Sigv incompatibly dimensioned"); - elseif (m1 != columns (Sigw)) - error ("dlqg: G, Sigw incompatibly dimensioned"); - endif - else - error ("dlqg: invalid number of arguments") - endif - - if (! (issquare (Sigw) && issquare (Sigv))) - error ("dlqg: Sigw, Sigv must be square"); - endif - - ## now we can just do the design; call dlqr and dlqe, since all matrices - ## are not given in Cholesky factor form (as in h2syn case) - [Ks, P, Er] = dlqr (A, B, Q, R); - [Ke, Q, jnk, Ee] = dlqe (A, G, C, Sigw, Sigv); - Ac = A - Ke*C - B*Ks; - Bc = Ke; - Cc = -Ks; - Dc = zeros (rows(Cc), columns(Bc)); - K = ss (Ac, Bc, Cc, Dc, 1); - disp ("HODEL: need to add names to this guy!") - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/minfo.m +++ /dev/null @@ -1,95 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{systype}, @var{nout}, @var{nin}, @var{ncstates}, @var{ndstates}] =} minfo (@var{inmat}) -## Determines the type of system matrix. @var{inmat} can be a varying, -## a system, a constant, and an empty matrix. -## -## @strong{Outputs} -## @table @var -## @item systype -## Can be one of: varying, system, constant, and empty. -## @item nout -## The number of outputs of the system. -## @item nin -## The number of inputs of the system. -## @item ncstates -## The number of continuous states of the system. -## @item ndstates -## The number of discrete states of the system. -## @end table -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 29, 1994 -## Modified by David Clem November 13, 1994 -## Modified by A. S. Hodel July 1995 - -function [systype, nout, nin, ncstates, ndstates] = minfo (inmat) - - warning ("minfo: obsolete. Use sys2ss, sys2tf, or sys2zp."); - - if (nargin != 1 ) - disp ("MINFO: Wrong number of arguments") - systype = nout = nin = ncstates = ndstates = []; - endif - - [rr, cc] = size (inmat); - - ## Check for empty matrix first! - if (isempty (inmat)) - systype = "empty"; - nout = nin = ncstates = ndstates = 0; - return - - ## Check for Constant matrix - - elseif (rr == 1 || cc == 1) - systype = "constant"; - nout = nin = ncstates = ndstates = 1; - return - - ## Check for system type matrix - elseif (inmat(rr,cc) == -Inf) - systype = "system"; - ncstates = inmat(1,cc); - ndstates = inmat(rr,1); - nstates = ncstates + ndstates; - nout = rr - nstates - 1; - nin = cc - nstates - 1; - - ## Check for Varying type matrix - elseif (inmat(rr,cc) == Inf) - systype = "varying"; - npoints = inmat(rr,cc-1); - nin = cc - 1; - nout = rr / npoints; - nstates = 0; - - ## Must be a standard matrix - else - systype = "constant"; - nin = cc; - nout = rr; - ncstates = 0; - ndstates = 0; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/packsys.m +++ /dev/null @@ -1,71 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## O B S O L E T E: use ss instead. -## function Asys = packsys(a,b,c[,d,dflg]) -## -## dflg: 0 for continuous time system, 1 for discrete-time system. -## -## defaults: -## D: 0 matrix of appropriate dimension. -## dflg: 0 (continuous time) -## -## Note: discrete-state sampling time is not included! - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 29, 1994 -## Modified by David Clem November 13, 1994 -## Modified by A. S. Hodel April 1995 - -function Asys = packsys (a, b, c, d, dflg) - - warning("packsys is obsolete! Use ss instead."); - - if (nargin < 3 || nargin > 5) - disp ("packsys: Invalid number of arguments"); - endif - - ## check dflg - if (nargin == 5) - if (! isscalar (dflg)) - [m, n] = size(dflg); - error ("packsys: dflg (%d,%d) must be a scalar", m, n); - elseif (dflg != 0 && dflg != 1) - error ("packsys: dflg=%g must be 0 or 1", dflg); - endif - else - ## default condition - dflg = 0; - endif - - if (nargin == 3) - ## No D matrix. Form a zero one! - [brows, bcols] = size (b); - [crows, ccols] = size (c); - d = zeros (crows, bcols); - endif - - [n, m, p] = abcddim (a, b, c, d); - if (n == -1 || m == -1 || p == -1) - error ("packsys: incompatible dimensions") - endif - - Asys = ss (a, b, c, d, dflg); - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/qzval.m +++ /dev/null @@ -1,47 +0,0 @@ -## Copyright (C) 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qzval (@var{a}, @var{b}) -## Compute generalized eigenvalues of the matrix pencil -## @ifinfo -## @example -## (A - lambda B). -## @end example -## @end ifinfo -## @iftex -## @tex -## $(A - \lambda B)$. -## @end tex -## @end iftex -## -## @var{a} and @var{b} must be real matrices. -## -## @code{qzval} is obsolete; use @code{qz} instead. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1998 - -function lam = qzval (A, B) - - warning ("qzval is obsolete; calling qz instead") - lam = qz (A, B); - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/rotg.m +++ /dev/null @@ -1,29 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## function [c,s] = rotg(a,b) -## givens rotation calculation -## -## NOTE: Use [c,s] = givens(a,b) instead. - -function [c, s] = rotg (a, b) - - [c, s] = givens (a, b); - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/series.m +++ /dev/null @@ -1,100 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Forms the series connection of two systems. -## -## Superseded by sysmult. Do not use this routine! -## used internally in zp2ss -## -## Type of input: Transfer functions -## Command: [num,den]=series(num1,den1,num2,den2) -## Forms the series representation of the two transfer functions. -## -## Type of input: State space systems -## Command: [a,b,c,d]=series(a1,b1,c1,d1,a2,b2,c2,d2) -## Forms the series representation of the two state space system arguments. -## The series connected system will have the inputs of system 1 and the -## outputs of system 2. -## -## Type of input: system data structure -## Command: syst=series(syst1,syst2) -## Forms the series representation of the two mu system arguments. - -## Author: David Clem -## Created: August 15, 1994 - -function [a, b, c, d] = series (a1, b1, c1, d1, a2, b2, c2, d2) - - ## If two arguments input, take care of mu system case - - warning ("series is superseded by sysmult; use sysmult instead.") - - muflag = 0; - if (nargin == 2) - temp = b1; - [a1, b1, c1, d1] = sys2ss (a1); - [a2, b2, c2, d2] = sys2ss (temp); - muflag = 1; - endif - - ## If four arguments input, put two transfer functions in series - - if (nargin == 4) - a = conv (a1, c1); # was conv1 - b = conv (b1, d1); # was conv1 - c = 0; - d = 0; - - ## Find series combination of 2 state space systems - - elseif (nargin == 8 || muflag == 1) - - ## check matrix dimensions - - [n1, m1, p1] = abcddim (a1, b1, c1, d1); - [n2, m2, p2] = abcddim (a2, b2, c2, d2); - - if (n1 == -1 || n2 == -1) - error ("incorrect matrix dimensions"); - endif - - ## check to make sure the number of outputs of system1 equals the number - ## of inputs of system2 - - if(p1 != m2) - error ("system 1 output / system 2 input connection sizes do not match"); - endif - - ## put the two state space systems in series - - a = [a1, zeros(rows(a1), columns(a2)); b2*c1, a2]; - b = [b1; b2*d1]; - c = [d2*c1, c2]; - d = [d2*d1]; - - ## take care of mu output - - if (muflag == 1) - a = ss (a, b, c, d); - b = c = d = 0; - endif - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/obsolete/swapcols.m +++ /dev/null @@ -1,39 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} swapcols (inputs) -## @format -## function B = swapcols(A) -## permute columns of A into reverse order -## @end format -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 23, 1992 -## Conversion to Octave R. Bruce Tenison July 4, 1994 - -function B = swapcols (A) - - m = length (A(1,:)); - idx = m:-1:1; - B = A(:,idx); - -endfunction -
deleted file mode 100644 --- a/scripts/control/obsolete/swaprows.m +++ /dev/null @@ -1,39 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} swaprows (inputs) -## @format -## function B = swaprows(A) -## permute rows of A into reverse order -## @end format -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 23, 1992 -## Conversion to Octave R. Bruce Tenison July 4, 1994 - -function B = swaprows (A) - - m = rows (A); - idx = m:-1:1; - B = A(idx,:); - -endfunction -
deleted file mode 100644 --- a/scripts/control/obsolete/syschnames.m +++ /dev/null @@ -1,33 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} syschnames (@var{sys}, @var{opt}, @var{list}, @var{names}) -## Superseded by @command{syssetsignals}. -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 -## updated by A. S. Hodel 1998 - -function retsys = syschnames (sys, opt, list, names) - - retsys = syssetsignals (sys, opt, names, list); - -endfunction
deleted file mode 100644 --- a/scripts/control/obsolete/unpacksys.m +++ /dev/null @@ -1,32 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## [a,b,c,d] = unpacksys(sys) -## Obsolete. Use sys2ss instead. - -## Author: David Clem -## Created: August 19, 1994 - -function [a, b, c, d] = unpacksys (syst) - - warning ("unpacksys obsolete; calling sys2ss"); - [a, b, c, d] = sys2ss (syst); - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/Makefile.in +++ /dev/null @@ -1,97 +0,0 @@ -# Makefile for octave's scripts/control/system directory -# -# Copyright (C) 2000, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../../.. - -script_sub_dir = control/system - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = __abcddims__.m __syschnamesl__.m __sysconcat__.m \ - __syscont_disc__.m __sysdefioname__.m __sysdefstname__.m \ - __sysgroupn__.m __tf2sysl__.m __tfl__.m __zp2ssg2__.m \ - abcddim.m buildssic.m c2d.m cellidx.m d2c.m dmr2d.m fir2sys.m \ - is_abcd.m is_controllable.m is_detectable.m is_digital.m \ - is_observable.m is_sample.m is_signal_list.m is_siso.m \ - is_stabilizable.m is_stable.m jet707.m listidx.m moddemo.m \ - ord2.m packedform.m parallel.m ss.m ss2sys.m ss2tf.m ss2zp.m \ - starp.m sys2fir.m sys2ss.m sys2tf.m sys2zp.m sysadd.m \ - sysappend.m syschtsam.m sysconnect.m syscont.m sysdimensions.m \ - sysdisc.m sysdup.m sysgetsignals.m sysgettsam.m sysgettype.m \ - sysgroup.m sysidx.m sysmin.m sysmult.m sysout.m sysprune.m \ - sysreorder.m sysrepdemo.m sysscale.m syssetsignals.m syssub.m \ - sysupdate.m tf.m tf2ss.m tf2sys.m tf2zp.m tfout.m ugain.m zp.m \ - zp2ss.m zp2sys.m zp2tf.m zpout.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir) -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/system/__abcddims__.m +++ /dev/null @@ -1,41 +0,0 @@ -## Copyright (C) 1997, 2000, 2003, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{y}, @var{my}, @var{ny}] =} __abcddims__ (@var{x}) -## -## Used internally in @code{abcddim}. If @var{x} is a zero-size matrix, -## both dimensions are set to 0 in @var{y}. -## @var{my} and @var{ny} are the row and column dimensions of the result. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: February 1997 - -function [y, my, ny] = __abcddims__ (x) - - y = x; - if (isempty (y)) - y = []; - endif - [my, ny] = size (y); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__syschnamesl__.m +++ /dev/null @@ -1,120 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __syschnamesl__ (@var{olist}, @var{old_names}, @var{inames}, @var{listname}) -## used internally in syschnames -## item olist: index list -## old_names: original list names -## inames: new names -## listname: name of index list -## -## combines the two string lists old_names and inames -## @end deftypefn - -function old_names = __syschnamesl__ (olist, old_names, inames, listname) - - probstr = []; - - if (max (olist) > rows (old_names)) - probstr = sprintf ("index list value(s) exceed(s) number of signals (%d)", - rows (old_names)); - - elseif (length (olist) > rows (inames)) - probstr = sprintf ("index list dimension exceeds number of replacement names (%d)", - rows (inames)); - - elseif (isempty (olist)) - probstr = []; # do nothing, no changes - - elseif (min (size (olist)) != 1) - probstr = "index list must be either a vector or an empty matrix"; - - elseif (max (olist) > rows (old_names)) - probstr = sprintf ("max(%s)=%d > %d, too big", listname, - max (olist), rows (old_names)); - - elseif (min (olist) < 1) - probstr = sprintf ("min(%s)=%d < 1, too small", listname, min (olist)); - - else - if (length(olist) == 1) - len_in = columns (inames); - len_out = columns (old_names); - - if (len_in < len_out) - inames(1,(len_in+1):(len_out)) = zeros (1, len_out-len_in); - endif - - old_names(olist,1:length(inames)) = inames; - elseif (length(olist) > 1) - for ii = 1:length(olist) - mystr = inames(ii,:); - len_my = columns (mystr); - len_out = columns (old_names); - - if (len_my < len_out) - mystr(1,(len_my+1):len_out) = repmat (" ", 1, len_out-len_my); - len_my = len_out; - endif - - old_names(olist(ii),1:len_my) = mystr; - endfor - endif - endif - if (! isempty (probstr)) - ## the following lines are NOT debugging code! - disp ("Problem in syschnames: old names are") - __outlist__ (old_names," ") - disp ("new names are") - __outlist__(inames," ") - disp ("list indices are") - disp (olist) - error (sprintf ("syschnames: \"%s\" dim=(%d x %d)--\n\t%s\n", ... - listname, rows (olist), columns (olist), probstr)); - endif - - ## change zeros to blanks - if (find (old_names == 0)) - ## disp("__syschnamesl__: old_names contains zeros ") - ## old_names - ## disp("/__syschnamesl__"); - - [ii, jj] = find (old_names == 0); - for idx = 1:length(ii) - old_names(ii(idx),jj(idx)) = " "; - endfor - - ## disp("__syschnamesl__: old_names fixed zeros ") - ## old_names - ## disp("/__syschnamesl__"); - endif - - ## just in case it's not a string anymore - if (! ischar (old_names)) - old_names = char (old_names); - endif - - ## disp("__syschnamesl__: exit, old_names=") - ## old_names - ## disp("/__syschnamesl__: exiting") - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__sysconcat__.m +++ /dev/null @@ -1,44 +0,0 @@ -## Copyright (C) 1996, 1998, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -function c = __sysconcat__ (a, b) - - ## c = __sysconcat__ (a, b) - ## cell array replacement for append, used by control systems toolbox - - if (ischar (a)) - a = {a}; - endif - if (ischar (b)) - b = {b}; - endif - - if (! (is_signal_list (a) && is_signal_list (b))) - error("need cell arrays of strings"); - endif - - c = a; - la = length (a); - for ii = 1:length (b) - c{la+ii} = b{ii}; - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__syscont_disc__.m +++ /dev/null @@ -1,57 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{n_tot}, @var{st_c}, @var{st_d}, @var{y_c}, @var{y_d}] =} __syscont_disc__ (@var{sys}) -## Used internally in syscont and sysdisc. -## -## @strong{Inputs} -## @var{sys} is a system data structure. -## -## @strong{Outputs} -## @table @var -## @item n_tot -## total number of states -## @item st_c -## vector of continuous state indices (empty if none) -## @item st_d -## vector of discrete state indices (empty if none) -## @item y_c -## vector of continuous output indices -## @item y_d -## vector of discrete output indices -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: February 1997 - -function [n_tot, st_c, st_d, y_c, y_d] = __syscont_disc__ (sys) - - ## get ranges for discrete/continuous states and outputs - [nn, nz, mm, pp, yd] = sysdimensions (sys); - n_tot = nn + nz; - st_c = 1:(nn); - st_d = nn + (1:nz); - y_c = find (yd == 0); # y_c, y_d will be empty if there are none. - y_d = find (yd == 1); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__sysdefioname__.m +++ /dev/null @@ -1,62 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __sysdefioname__ (@var{n}, @var{str}, @var{m}) -## return default input or output names given @var{n}, @var{str}, @var{m}. -## @var{n} is the final value, @var{str} is the string prefix, and @var{m} -## is start value -## -## used internally, minimal argument checking -## -## @strong{Example} @code{ioname = __sysdefioname__(5,"u",3)} -## returns the cell array: -## @example -## ioname = -## ( -## [1] = u_3 -## [2] = u_4 -## [3] = u_5 -## ) -## @end example -## @end deftypefn - -function ioname = __sysdefioname__ (n, str, m) - - if (nargin < 2 || nargin > 3) - print_usage (); - endif - - if (nargin == 2) - m = min (1, n); - endif - - ioname = {}; - jj = 1; - if (n > 0 && m > 0 && m <= n) - for ii = m:n - ioname{ii+1-m} = sprintf ("%s_%d", str, ii); - endfor - elseif (m > n) - error ("str=%s; start value m=%d > final value n=%d", str, m, n); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__sysdefstname__.m +++ /dev/null @@ -1,45 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __sysdefstname__ (@var{n}, @var{nz}) -## return default state names given @var{n}, @var{nz} -## -## used internally, minimal argument checking -## @end deftypefn - -function stname = __sysdefstname__ (n, nz) - - stname = {}; - if (n > 0) - for ii = 1:n - stname{ii} = sprintf ("x_%d", ii); - endfor - endif - - ## Set default names for discrete states - if (nz > 0) - for ii = (n+1):(n+nz) - stname{ii} = sprintf ("xd_%d", ii); - endfor - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__sysgroupn__.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __sysgroupn__ (@var{names}) -## Locate and mark duplicate names -## inputs: -## names: list of signal names -## kind: kind of signal name (used for diagnostic message purposes only) -## outputs: -## returns names with unique suffixes added; diagnostic warning -## message is printed to inform the user of the new signal name -## -## used internally in sysgroup and elsewhere. -## @end deftypefn - -function names = __sysgroupn__ (names, kind) - - ## check for duplicate names - l = length (names); - ii = 1; - while (ii <= l-1) - st1 = names{ii}; - jj = ii+1; - while (jj <= l) - st2 = names{jj}; - if (strcmp (st1, st2)) - warning ("sysgroup: %s name(%d) = %s name(%d) = %s", - kind, ii, kind, jj, st1); - strval = sprintf ("%s_%d", st2, jj) - names{jj} = strval; - warning ("sysgroup: changed %s name %d to %s", kind, jj, strval); - ## restart the check (just to be sure there's no further duplications) - ii = 0; - jj = l; - endif - jj++; - endwhile - ii++; - endwhile -endfunction
deleted file mode 100644 --- a/scripts/control/system/__tf2sysl__.m +++ /dev/null @@ -1,32 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __tf2sysl__ (@var{vec}) -## used internally in tf2sys. -## strip leading zero coefficients to get the true polynomial length -## @end deftypefn - -function vec = __tf2sysl__ (vec) - - error ("__tf2sysl__ no longer used; use the tf function."); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__tfl__.m +++ /dev/null @@ -1,38 +0,0 @@ -## Copyright (C) 1996, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __tfl__ (@var{vec}) -## used internally in tf. -## strip leading zero coefficients to get the true polynomial length -## @end deftypefn - -function vec = __tfl__ (vec) - - while (length (vec) > 1 && vec(1) == 0) - vec = vec (2:end); - endwhile - - if (vec(1) == 0) - warning ("tf: polynomial has no nonzero coefficients!") - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/__zp2ssg2__.m +++ /dev/null @@ -1,74 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2001, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{poly}, @var{rvals}] =} __zp2ssg2__ (@var{rvals}) -## Used internally in @code{zp2ss} -## Extract 2 values from @var{rvals} (if possible) and construct -## a polynomial with those roots. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1996 - -function [poly, rvals] = __zp2ssg2__ (rvals) - - ## locate imaginary roots (if any) - cidx = find (imag (rvals)); - - if (! isempty (cidx)) - ## select first complex root, omit from cidx - r1i = cidx(1); - r1 = rvals(r1i); - cidx = complement (r1i, cidx); - - ## locate conjugate root (must be in cidx list, just in case there's - ## roundoff) - err = abs (rvals(cidx) - r1'); - minerr = min (err); - c2i = find (err == minerr, 1); - r2i = cidx(c2i); - r2 = rvals(r2i); - cidx = complement (r2i, cidx); - - ## don't check for divide by zero, since 0 is not complex. - if (abs (r2-r1') / abs (r1) > 1e-12) - error ("r1=(%f,%f); r2=(%f,%f), not conjugates.", - real (r1), imag (r1), real (r2), imag(r2)); - endif - - ## complex conjugate pair - poly = [1, -2*real(r1), real(r1)^2+imag(r1)^2]; - else - ## select two roots (they're all real) - r1 = rvals(1); - r2 = rvals(2); - poly = [1, -(r1+r2), (r1*r2)]; - r1i = 1; - r2i = 2; - endif - - ## remove roots used - idx = complement ([r1i, r2i], 1:length(rvals)); - rvals = rvals(idx); - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/abcddim.m +++ /dev/null @@ -1,130 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{n}, @var{m}, @var{p}] =} abcddim (@var{a}, @var{b}, @var{c}, @var{d}) -## Check for compatibility of the dimensions of the matrices defining -## the linear system -## @iftex -## @tex -## $[A, B, C, D]$ corresponding to -## $$ -## \eqalign{ -## {dx\over dt} &= A x + B u\cr -## y &= C x + D u} -## $$ -## @end tex -## @end iftex -## @ifinfo -## [A, B, C, D] corresponding to -## -## @example -## dx/dt = a x + b u -## y = c x + d u -## @end example -## -## @end ifinfo -## or a similar discrete-time system. -## -## If the matrices are compatibly dimensioned, then @code{abcddim} returns -## -## @table @var -## @item n -## The number of system states. -## -## @item m -## The number of system inputs. -## -## @item p -## The number of system outputs. -## @end table -## -## Otherwise @code{abcddim} returns @var{n} = @var{m} = @var{p} = @minus{}1. -## -## Note: n = 0 (pure gain block) is returned without warning. -## @seealso{is_abcd} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993. -## a s hodel: modified to accept pure-gain systems aug 1996 - -function [n, m, p] = abcddim (a, b, c, d) - - if (nargin != 4) - print_usage (); - endif - - n = m = p = -1; - - [a, an, am] = __abcddims__ (a); - [b, bn, bm] = __abcddims__ (b); - [c, cn, cm] = __abcddims__ (c); - [d, dn, dm] = __abcddims__ (d); - - if (! issquare (a) && ! isempty (a)) - warning ("abcddim: a is not square (%dx%d)", an, am); - return; - endif - - if (bm == 0 && dm == 0) - warning ("abcddim: no inputs"); - elseif (bn != am) - warning ("abcddim: a(%dx%d) and b(%dx%d) are not compatible", - an, am, bn, bm); - return; - endif - - if (cn == 0 && dn == 0) - warning ("abcddim: no outputs"); - elseif (cm != an) - warning ("abcddim: a(%dx%d) and c(%dx%d) are not compatible", - an, am, cn, cm); - return; - endif - - have_connections = (bn*cn != 0); - - if (dn == 0 && have_connections) - warning ("abcddim: empty d matrix passed; setting compatibly with b, c"); - [d, dn, dm] = __abcddims__ (zeros (cn, bm)); - endif - - if (an > 0) - [dn, dm] = size (d); - if (cn != dn && have_connections) - warning ("abcddim: c(%dx%d) and d(%dx%d) are not compatible", - cn, cm, dn, dm); - return; - endif - - if (bm != dm && have_connections) - warning ("abcddim: b(",num2str(bn),"x",num2str(bm), ... - " and d(",num2str(dn),"x",num2str(dm),") are not compatible"); - return; - endif - - m = bm; - p = cn; - else - [p, m] = size (d); - endif - n = an; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/buildssic.m +++ /dev/null @@ -1,333 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} buildssic (@var{clst}, @var{ulst}, @var{olst}, @var{ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8}) -## -## Form an arbitrary complex (open or closed loop) system in -## state-space form from several systems. @command{buildssic} can -## easily (despite its cryptic syntax) integrate transfer functions -## from a complex block diagram into a single system with one call. -## This function is especially useful for building open loop -## interconnections for -## @iftex -## @tex -## $ { \cal H }_\infty $ and $ { \cal H }_2 $ -## @end tex -## @end iftex -## @ifinfo -## H-infinity and H-2 -## @end ifinfo -## designs or for closing loops with these controllers. -## -## Although this function is general purpose, the use of @command{sysgroup} -## @command{sysmult}, @command{sysconnect} and the like is recommended for -## standard operations since they can handle mixed discrete and continuous -## systems and also the names of inputs, outputs, and states. -## -## The parameters consist of 4 lists that describe the connections -## outputs and inputs and up to 8 systems @var{s1}--@var{s8}. -## Format of the lists: -## @table @var -## @item clst -## connection list, describes the input signal of -## each system. The maximum number of rows of Clst is -## equal to the sum of all inputs of s1-s8. -## -## Example: -## @code{[1 2 -1; 2 1 0]} means that: new input 1 is old input 1 -## + output 2 - output 1, and new input 2 is old input 2 -## + output 1. The order of rows is arbitrary. -## -## @item ulst -## if not empty the old inputs in vector @var{ulst} will -## be appended to the outputs. You need this if you -## want to ``pull out'' the input of a system. Elements -## are input numbers of @var{s1}--@var{s8}. -## -## @item olst -## output list, specifies the outputs of the resulting -## systems. Elements are output numbers of @var{s1}--@var{s8}. -## The numbers are allowed to be negative and may -## appear in any order. An empty matrix means -## all outputs. -## -## @item ilst -## input list, specifies the inputs of the resulting -## systems. Elements are input numbers of @var{s1}--@var{s8}. -## The numbers are allowed to be negative and may -## appear in any order. An empty matrix means -## all inputs. -## @end table -## -## Example: Very simple closed loop system. -## @example -## @group -## w e +-----+ u +-----+ -## --->o--*-->| K |--*-->| G |--*---> y -## ^ | +-----+ | +-----+ | -## - | | | | -## | | +----------------> u -## | | | -## | +-------------------------|---> e -## | | -## +----------------------------+ -## @end group -## @end example -## -## The closed loop system @var{GW} can be obtained by -## @example -## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K); -## @end example -## @table @var -## @item clst -## 1st row: connect input 1 (@var{G}) with output 2 (@var{K}). -## -## 2nd row: connect input 2 (@var{K}) with negative output 1 (@var{G}). -## @item ulst -## Append input of 2 (@var{K}) to the number of outputs. -## @item olst -## Outputs are output of 1 (@var{G}), 2 (@var{K}) and -## appended output 3 (from @var{ulst}). -## @item ilst -## The only input is 2 (@var{K}). -## @end table -## -## Here is a real example: -## @example -## @group -## +----+ -## -------------------->| W1 |---> v1 -## z | +----+ -## ----|-------------+ -## | | -## | +---+ v +----+ -## *--->| G |--->O--*-->| W2 |---> v2 -## | +---+ | +----+ -## | | -## | v -## u y -## @end group -## @end example -## @iftex -## @tex -## $$ { \rm min } \Vert GW_{vz} \Vert _\infty $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## min || GW || -## vz infty -## @end example -## @end ifinfo -## -## The closed loop system @var{GW} -## @iftex -## @tex -## from $ [z, u]^T $ to $ [v_1, v_2, y]^T $ -## @end tex -## @end iftex -## @ifinfo -## from [z, u]' to [v1, v2, y]' -## @end ifinfo -## can be obtained by (all @acronym{SISO} systems): -## @example -## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5], -## [3, 4], G, W1, W2, One); -## @end example -## where ``One'' is a unity gain (auxiliary) function with order 0. -## (e.g. @code{One = ugain(1);}) -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: April 1998 - -function sys = buildssic (Clst, Ulst, Olst, Ilst, s1, s2, s3, s4, s5, s6, s7, s8) - - if (nargin < 5 || nargin > 12) - print_usage (); - endif - if (nargin >= 5) - if (! isstruct (s1)) - error ("---> s1 must be a structed system."); - endif - s1 = sysupdate (s1, "ss"); - [n, nz, m, p] = sysdimensions (s1); - if (! n && ! nz) - error ("---> pure static system must not be the first in list."); - endif - if (n && nz) - error ("---> cannot handle mixed continuous and discrete systems."); - endif - D_SYS = (nz > 0); - [A, B, C, D, tsam] = sys2ss (s1); - nt = n + nz; - endif - for ii = 6:nargin - eval (["mysys = s", num2str(ii-4), ";"]); - if (! isstruct (mysys)) - error ("---> Parameter must be a structed system."); - endif - mysys = sysupdate (mysys, "ss"); - [n1, nz1, m1, p1] = sysdimensions (mysys); - if (n1 && nz1) - error ("---> cannot handle mixed continuous and discrete systems."); - endif - if (D_SYS) - if (n1) - error ("---> cannot handle mixed cont. and discr. systems."); - endif - if (tsam != sysgettsam (mysys)) - error ("---> sampling time of all systems must match."); - endif - endif - [as, bs, cs, ds] = sys2ss (mysys); - nt1 = n1 + nz1; - if (! nt1) - ## pure gain (pad B, C with zeros) - B = [B, zeros(nt,m1)]; - C = [C; zeros(p1,nt)]; - else - A = [A, zeros(nt,nt1); zeros(nt1,nt), as]; - B = [B, zeros(nt,m1); zeros(nt1,m), bs]; - C = [C, zeros(p,nt1); zeros(p1,nt), cs]; - endif - D = [D, zeros(p,m1); zeros(p1,m), ds]; - n = n + n1; - nz = nz + nz1; - nt = nt + nt1; - m = m + m1; - p = p + p1; - endfor - - ## check maximum dimensions - [nx, mx] = size (Clst); - if (nx > m) - error ("---> more rows in Clst than total number of inputs."); - endif - if (mx > p+1) - error ("---> more cols in Clst than total number of outputs."); - endif - ## empty vector Ulst is OK - lul = length (Ulst); - if (lul) - if (! isvector (Ulst)) - error ("---> Input u list Ulst must be a vector."); - endif - if (lul > m) - error ("---> more values in Ulst than number of inputs."); - endif - endif - if (! length (Olst)) - Olst = 1:(p+lul); - endif - if (! length (Ilst)) - Ilst = 1:m; - endif - if (! isvector(Olst)) - error ("---> Output list Olst must be a vector."); - endif - if (! isvector (Ilst)) - error ("---> Input list Ilst must be a vector."); - endif - - ## build the feedback "K" from the interconnection data Clst - K = zeros (m, p); - inp_used = zeros (m, 1); - for ii = 1:nx - xx = Clst(ii,:); - iu = xx(1); - if (iu < 1 || iu > m) - error ("---> invalid value in first col of Clst."); - endif - if (inp_used(iu)) - error ("---> Input specified more than once."); - endif - inp_used(iu) = 1; - for kk = 2:mx - it = xx(kk); - if (abs (it) > p) - error ("---> invalid row value in Clst."); - elseif (it) - K(iu,abs(it)) = sign (it); - endif - endfor - endfor - - ## form the "closed loop", i.e replace u in - ## . - ## x = Ax + Bu - ## ~ - ## y = Cx + Du by u = K*y+u - ## - ## -1 - ## R = (I-D*K) must exist. - - R = eye (p) - D*K; - if (rank (R) < p) - error ("---> singularity in algebraic loop."); - else - R = inv (R); - endif - A = A + B*K*R*C; - B = B + B*K*R*D; - C = R*C; - D = R*D; - - ## append old inputs u to the outputs (if lul > 0) - kc = K*C; - kdi = eye (m) + K*D; - for ii = 1:lul - it = Ulst(ii); - if (it < 1 || it > m) - error ("---> invalid value in Ulst."); - endif - C = [C; kc(it,:)]; - D = [D; kdi(it,:)]; - endfor - - ## select and rearrange outputs - nn = length (A); - lol = length (Olst); - Cnew = zeros (lol, nn); - Dnew = zeros (lol, m); - for ii = 1:lol - iu = Olst(ii); - if (! iu || abs(iu) > p+lul) - error ("---> invalid value in Olst."); - endif - Cnew(ii,:) = sign(iu)*C(abs(iu),:); - Dnew(ii,:) = sign(iu)*D(abs(iu),:); - endfor - C = Cnew; - D = Dnew; - lil = length (Ilst); - Bnew = zeros (nn, lil); - Dnew = zeros (lol, lil); - for ii = 1:lil - iu = Ilst(ii); - if (! iu || abs(iu) > m) - error ("---> invalid value in Ilst."); - endif - Bnew(:,ii) = sign (iu) * B(:,abs(iu)); - Dnew(:,ii) = sign (iu) * D(:,abs(iu)); - endfor - - sys = ss (A, Bnew, C, Dnew, tsam, n, nz); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/c2d.m +++ /dev/null @@ -1,227 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2004, 2005, 2006, -## 2007 John W. Eaton -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} c2d (@var{sys}, @var{opt}, @var{t}) -## @deftypefnx {Function File} {} c2d (@var{sys}, @var{t}) -## -## Converts the system data structure describing: -## @iftex -## @tex -## $$ \dot x = A_cx + B_cu $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## . -## x = Ac x + Bc u -## @end example -## @end ifinfo -## into a discrete time equivalent model: -## @iftex -## @tex -## $$ x_{n+1} = A_dx_n + B_du_n $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## x[n+1] = Ad x[n] + Bd u[n] -## @end example -## @end ifinfo -## via the matrix exponential or bilinear transform. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure (may have both continuous time and discrete -## time subsystems) -## @item opt -## string argument; conversion option (optional argument; -## may be omitted as shown above) -## @table @code -## @item "ex" -## use the matrix exponential (default) -## @item "bi" -## use the bilinear transformation -## @iftex -## @tex -## $$ s = { 2(z-1) \over T(z+1) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## 2(z-1) -## s = ----- -## T(z+1) -## @end example -## @end ifinfo -## FIXME: This option exits with an error if @var{sys} is not purely -## continuous. (The @code{ex} option can handle mixed systems.) -## @item "matched" -## Use the matched pole/zero equivalent transformation (currently only -## works for purely continuous @acronym{SISO} systems). -## @end table -## @item t -## sampling time; required if @var{sys} is purely continuous. -## -## @strong{Note} that if the second argument is not a string, @code{c2d()} -## assumes that the second argument is @var{t} and performs -## appropriate argument checks. -## @end table -## -## @strong{Output} -## @table @var -## @item dsys -## Discrete time equivalent via zero-order hold, sample each @var{t} sec. -## @end table -## -## This function adds the suffix @code{_d} -## to the names of the new discrete states. -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: October 1993 -## Updated by John Ingram for system data structure August 1996 - -function dsys = c2d (sys, opt, T) - - ## parse input arguments - if (nargin < 1 || nargin > 3) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a system data structure"); - elseif (nargin == 1) - opt = "ex"; - elseif (nargin == 2 && ! ischar (opt)) - T = opt; - opt = "ex"; - endif - - if (! ischar (opt)) - error ("expecting option as a string"); - endif - - ## check if sampling period T was passed. - Ts = sysgettsam (sys); - if (! exist ("T")) - T = Ts; - if (T == 0) - error ("sys is purely continuous; no sampling period T provided"); - endif - elseif (T != Ts && Ts > 0) - warning ("c2d: T=%g, system tsam=%g: using T=", T, Ts, min (T, Ts)); - T = min (T, Ts); - endif - - if (! is_sample (T)) - error ("sampling period T must be a positive, real scalar"); - elseif (! (strcmp (opt, "ex") - || strcmp (opt, "bi") - || strcmp (opt, "matched"))) - error ("invalid option passed: %s", opt); - endif - - sys = sysupdate (sys, "ss"); - [n, nz, m, p] = sysdimensions (sys); - if (n == 0) - dsys = syssetsignals (sys, "yd", ones(1:p)); - elseif (strcmp (opt, "ex")); - [aa, bb, cc, dd] = sys2ss (sys); - crng= 1:n; - drng = n+(1:nz); - - ## partition state equations into continuous, imaginary subsystems - Ac = aa(crng,crng); - Bc = bb(crng,:); - if (nz == 0) - Acd = Adc = Add = Bd = 0; - else - Acd = aa(crng,drng); - Adc = aa(drng,crng); - Add = aa(drng,drng); - Bd = bb(drng,:); - Bc = [Bc, Acd]; ## append discrete states as inputs to cont system - endif - - ## convert state equations - mat = [Ac, Bc; zeros(m+nz,n+nz+m)]; - matexp = expm (mat * T); - - ## replace Ac - aa(crng,crng) = matexp(crng,crng); ## discretized homegenous diff eqn - - ## replace Bc - bb(crng,:) = matexp(crng,n+(1:m)); - - ## replace Acd - if (nz) - aa(crng,drng) = matexp(crng,n+m+(1:nz)); - endif - - stnames = sysgetsignals (sys, "st"); ## continuous states renamed below - innames = sysgetsignals (sys, "in"); - outnames = sysgetsignals (sys, "out"); - outlist = 1:p; - dsys = ss (aa, bb, cc, dd, T, 0, n+nz, stnames, innames, - outnames, outlist); - ## rename states - for ii = 1:n - strval = sprintf ("%s_d", sysgetsignals (dsys, "st", ii, 1)); - dsys = syssetsignals (dsys, "st", strval, ii); - endfor - - elseif (strcmp (opt, "bi")) - if (is_digital (sys)) - error ("c2d: system is already digital") - else - ## convert with bilinear transform - [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys); - IT = (2/T) * eye (size (a)); - A = (IT+a)/(IT-a); - iab = (IT-a)\b; - tk = 2 / sqrt (T); - B = tk*iab; - C = tk*(c/(IT-a)); - D = d + (c*iab); - stnamed = strappend (stname, "_d"); - dsys = ss (A, B, C, D, T, 0, rows (A), stnamed, inname, outname); - endif - elseif (strcmp (opt, "matched")) - if (is_digital (sys)) - error ("c2d: system is already digital"); - elseif (length (sys.inname) != 1 || length (sys.outname) != 1) - error ("c2d: system in not single input, single output"); - else - sys = sysupdate (sys, "zp"); - p = exp (sys.pol*T); - z = exp (sys.zer*T); - infinite_zeros = max (size (sys.pol)) - max (size (sys.zer)) - 1; - for i = 1:infinite_zeros - z = [z ; -1]; - endfor - ## Should the freaquency we adjust around always be 1? - [cmag, cphase, cw] = bode (sys, 1); - [dmag, dpahse, dw] = bode (zp (z, p, 1, T), 1); - dsys = zp (z, p, cmag/dmag, T); - endif - else - error ("invalid option = %s", opt); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/cellidx.m +++ /dev/null @@ -1,100 +0,0 @@ -## Copyright (C) 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{idxvec}, @var{errmsg}] =} cellidx (@var{listvar}, @var{strlist}) -## Return indices of string entries in @var{listvar} that match strings -## in @var{strlist}. -## -## Both @var{listvar} and @var{strlist} may be passed as strings or -## string matrices. If they are passed as string matrices, each entry -## is processed by @code{deblank} prior to searching for the entries. -## -## The first output is the vector of indices in @var{listvar}. -## -## If @var{strlist} contains a string not in @var{listvar}, then -## an error message is returned in @var{errmsg}. If only one output -## argument is requested, then @var{cellidx} prints @var{errmsg} to the -## screen and exits with an error. -## @end deftypefn - -function [idxvec,errmsg] = cellidx (listvar, strlist) - - if (nargin != 2) - print_usage (); - endif - - if (ischar (strlist)) - tmp = strlist; - strlist = {}; - for kk = 1:rows(tmp) - strlist{kk} = deblank (tmp(kk,:)); - endfor - endif - - if (ischar (listvar)) - tmp = listvar; - listvar = {}; - for kk = 1:rows(tmp) - listvar{kk} = deblank (tmp(kk,:)); - endfor - endif - - ## initialize size of idxvec (for premature return) - idxvec = zeros (length(strlist), 1); - - errmsg = ""; - if (! is_signal_list (listvar)) - errmsg = "listvar must be a list of strings"; - elseif (! is_signal_list (strlist)) - errmsg = "strlist must be a list of strings"; - endif - - if (length (errmsg)) - if (nargout < 2) - error (errmsg); - else - return; - endif - endif - - nsigs = length(listvar); - for idx = 1:length(strlist) - signame = strlist{idx}; - for jdx = 1:nsigs - if (strcmp (signame, listvar{jdx}) ) - if (idxvec(idx) != 0) - warning ("Duplicate signal name %s (%d,%d)\n", - listvar{jdx}, jdx, idxvec(idx)); - else - idxvec(idx) = jdx; - endif - endif - endfor - if (idxvec(idx) == 0) - errmsg = sprintf ("Did not find %s", signame); - if (nargout == 1) - error (errmsg); - else - break; - endif - endif - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/system/d2c.m +++ /dev/null @@ -1,233 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} d2c (@var{sys}, @var{tol}) -## @deftypefnx {Function File} {} d2c (@var{sys}, @var{opt}) -## Convert a discrete (sub)system into a purely continuous one. -## The sampling time used is @code{sysgettsam(@var{sys})}. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure with discrete components -## @item tol -## Scalar value. -## Tolerance for convergence of default @code{"log"} option (see below) -## @item opt -## conversion option. Choose from: -## @table @code -## @item "log" -## (default) Conversion is performed via a matrix logarithm. -## Due to some problems with this computation, it is -## followed by a steepest descent algorithm to identify continuous time -## @var{a}, @var{b}, to get a better fit to the original data. -## -## If called as @code{d2c (@var{sys}, @var{tol})}, with @var{tol} -## positive scalar, the @code{"log"} option is used. The default value -## for @var{tol} is @code{1e-8}. -## @item "bi" -## Conversion is performed via bilinear transform -## @math{z = (1 + s T / 2)/(1 - s T / 2)} where @math{T} is the -## system sampling time (see @code{sysgettsam}). -## -## FIXME: bilinear option exits with an error if @var{sys} is not purely -## discrete -## @end table -## @end table -## @strong{Output} -## @table @var -## @item csys -## continuous time system (same dimensions and signal names as in @var{sys}). -## @end table -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: August 23, 1994 -## Updated by John Ingram for system data structure August 1996 - -function csys = d2c (sys, opt) - - ## SYS_INTERNAL accesses members of system data structure - - if (nargin != 1 && nargin != 2) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure"); - elseif (nargin == 1) - opt = "log"; - tol = 1e-12; - elseif (ischar (opt)) # all remaining cases are for nargin == 2 - tol = 1e-12; - if (! (strcmp (opt, "log") || strcmp (opt, "bi"))) - error ("d2c: invalid opt passed=%s", opt); - endif - elseif (! is_sample (opt)) - error ("tol must be a positive scalar") - elseif (opt > 1e-2) - warning ("d2c: ridiculous error tolerance passed=%g, intended c2d call?", - opt); - else - tol = opt; - opt = "log"; - endif - T = sysgettsam (sys); - - if (isa (sys.a, "single") || isa (sys.b, "single") || isa (sys.c, "single") || - isa (sys.d, "single")) - myeps = eps ("single"); - else - myeps = eps; - endif - - if (strcmp (opt, "bi")) - ## bilinear transform - ## convert with bilinear transform - if (! is_digital (sys) ) - error ("d2c requires a discrete time system for input") - endif - [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys); - - poles = eig (a); - if (find (abs (poles-1) < 200*(n+nz)*myeps)) - warning ("d2c: some poles very close to one. May get bad results."); - endif - - I = eye (size (a)); - tk = 2 / sqrt (T); - A = (2/T)*(a-I)/(a+I); - iab = (I+a)\b; - B = tk*iab; - C = tk*(c/(I+a)); - D = d- (c*iab); - stnamec = strappend (stname, "_c"); - csys = ss (A, B, C, D, 0, rows (A), 0, stnamec, inname, outname); - elseif (strcmp (opt, "log")) - sys = sysupdate (sys, "ss"); - [n, nz, m, p] = sysdimensions (sys); - - if (nz == 0) - warning ("d2c: all states continuous; setting outputs to agree"); - csys = syssetsignals (sys, "yd", zeros (1, 1:p)); - return; - elseif (n != 0) - warning ("d2c: n=%d > 0; performing c2d first", n); - sys = c2d (sys, T); - endif - [a, b] = sys2ss (sys); - - [ma, na] = size (a); - [mb, nb] = size (b); - - if (isempty (b)) - warning ("d2c: empty b matrix"); - Amat = a; - else - Amat = [a, b; zeros(nb,na), eye(nb)]; - endif - - poles = eig (a); - if (find (abs (poles) < 200*(n+nz)*myeps)) - warning ("d2c: some poles very close to zero. logm not performed"); - Mtop = zeros (ma, na+nb); - elseif (find (abs (poles-1) < 200*(n+nz)*myeps)) - warning ("d2c: some poles very close to one. May get bad results."); - logmat = real (logm (Amat) / T); - Mtop = logmat(1:na,:); - else - logmat = real (logm (Amat) / T); - Mtop = logmat(1:na,:); - endif - - ## perform simplistic, stupid optimization approach. - ## should re-write with a Davidson-Fletcher CG approach - mxthresh = norm (Mtop); - if (mxthresh == 0) - mxthresh = 1; - endif - eps1 = mxthresh; #gradient descent step size - cnt = max (20, (n*nz)*4); #max number of iterations - newgrad=1; #signal for new gradient - while ((eps1/mxthresh > tol) && cnt) - cnt--; - ## calculate the gradient of error with respect to Amat... - geps = norm (Mtop) * 1e-8; - if (geps == 0) - geps = 1e-8; - endif - DMtop = Mtop; - if (isempty (b)) - Mall = Mtop; - DMall = DMtop; - else - Mall = [Mtop; zeros(nb,na+nb)]; - DMall = [DMtop; zeros(nb,na+nb) ]; - endif - - if (newgrad) - GrMall = zeros (size (Mall)); - for ii = 1:rows(Mtop) - for jj = 1:columns(Mtop) - DMall(ii,jj) = Mall(ii,jj) + geps; - GrMall(ii,jj) = norm (Amat - expm (DMall*T), "fro") ... - - norm (Amat - expm (Mall*T), "fro"); - DMall(ii,jj) = Mall(ii,jj); - endfor - endfor - GrMall = GrMall/norm(GrMall,1); - newgrad = 0; - endif - - ## got a gradient, now try to use it - DMall = Mall-eps1*GrMall; - - FMall = expm (Mall*T); - FDMall = expm (DMall*T); - FmallErr = norm (Amat - FMall); - FdmallErr = norm (Amat - FDMall); - if (FdmallErr < FmallErr) - Mtop = DMall(1:na,:); - eps1 = min (eps1*2, 1e12); - newgrad = 1; - else - eps1 = eps1/2; - endif - - if (FmallErr == 0) - eps1 = 0; - endif - - endwhile - - [aa, bb, cc, dd, tsam, nn, nz, stnam, innam, outnam, yd] = sys2ss (sys); - aa = Mall(1:na,1:na); - if (! isempty (b)) - bb = Mall(1:na,(na+1):(na+nb)); - endif - csys = ss (aa, bb, cc, dd, 0, na, 0, stnam, innam, outnam); - - ## update names - nn = sysdimensions (sys); - for ii = (nn+1):na - strval = sprintf ("%s_c", sysgetsignals (csys, "st", ii, 1)); - csys = syssetsignals (csys, "st", strval, ii); - endfor - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/dmr2d.m +++ /dev/null @@ -1,256 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{dsys}, @var{fidx}] =} dmr2d (@var{sys}, @var{idx}, @var{sprefix}, @var{ts2}, @var{cuflg}) -## convert a multirate digital system to a single rate digital system -## states specified by @var{idx}, @var{sprefix} are sampled at @var{ts2}, all -## others are assumed sampled at @var{ts1} = @code{sysgettsam (@var{sys})}. -## -## @strong{Inputs} -## @table @var -## @item sys -## discrete time system; -## @code{dmr2d} exits with an error if @var{sys} is not discrete -## @item idx -## indices or names of states with sampling time -## @code{sysgettsam(@var{sys})} (may be empty); see @code{cellidx} -## @item sprefix -## list of string prefixes of states with sampling time -## @code{sysgettsam(@var{sys})} (may be empty) -## @item ts2 -## sampling time of states not specified by @var{idx}, @var{sprefix} -## must be an integer multiple of @code{sysgettsam(@var{sys})} -## @item cuflg -## "constant u flag" if @var{cuflg} is nonzero then the system inputs are -## assumed to be constant over the revised sampling interval @var{ts2}. -## Otherwise, since the inputs can change during the interval -## @var{t} in @math{[k ts2, (k+1) ts2]}, an additional set of inputs is -## included in the revised B matrix so that these intersample inputs -## may be included in the single-rate system. -## default @var{cuflg} = 1. -## @end table -## -## @strong{Outputs} -## @table @var -## @item dsys -## equivalent discrete time system with sampling time @var{ts2}. -## -## The sampling time of sys is updated to @var{ts2}. -## -## if @var{cuflg}=0 then a set of additional inputs is added to -## the system with suffixes _d1, @dots{}, _dn to indicate their -## delay from the starting time k @var{ts2}, i.e. -## u = [u_1; u_1_d1; @dots{}, u_1_dn] where u_1_dk is the input -## k*ts1 units of time after u_1 is sampled. (@var{ts1} is -## the original sampling time of the discrete time system and -## @var{ts2} = (n+1)*ts1) -## -## @item fidx -## indices of "formerly fast" states specified by @var{idx} and @var{sprefix}; -## these states are updated to the new (slower) sampling interval @var{ts2}. -## @end table -## -## @strong{WARNING} Not thoroughly tested yet; especially when -## @var{cuflg} == 0. -## @end deftypefn - -## Adapted from c2d by a.s.hodel@eng.auburn.edu - -function [dsys, fidx] = dmr2d (sys, idx, sprefix, Ts2, cuflg) - - ## parse input arguments - if (nargin != 4) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure form"); - elseif (! is_digital (sys)) - error ("sys must be discrete-time; continuous time passed"); - endif - - if (is_signal_list (idx) || ischar (idx)) - idx = sysidx (sys, "st", idx); - elseif (! (isvector (idx) || isempty (idx))) - error ("idx(%dx%d) must be a vector", rows (idx), columns (idx)); - elseif (any (idx <= 0)) - idv = find (idx <= 0); - ii = idv(1); - error ("idx(%d)=%g; entries of idx must be positive", ii, idx(ii)); - elseif (! (is_signal_list (sprefix) || isempty (sprefix))) - error ("sprefix must be a signal list (see is_signal_list) or empty"); - elseif (! is_sample (Ts2)) - error ("Ts2=%g; invalid sampling time", Ts2); - endif - - ## optional argument: cuflg - if (nargin <= 4) - cuflg = 1; # default: constant inputs over Ts2 sampling interv. - elseif (! isscalar (cuflg)) - error ("cuflg must be a scalar") - elseif (cuflg != 0 || cuflg != 1) - error ("cuflg = %g, should be 0 or 1", cuflg); - endif - - ## extract state space information - [da, db, dc, dd, Ts1, nc, nz, stname, inname, outname, yd] = sys2ss (sys); - - ## compute number of steps - if (Ts1 > Ts2) - error ("Current sampling time=%g > Ts2=%g", Ts1, Ts2); - endif - nstp = floor (Ts2/Ts1+0.5); - if (abs ((Ts2 - Ts1*nstp)/Ts1) > 1e-12) - warning ("dmr2d: Ts1=%g, Ts2=%g, selecting nsteps=%d; mismatch", - Ts1, Ts2, nstp); - endif - - if (isempty (sprefix) && isempty (idx)) - warning ("both sprefix and idx are empty; returning dsys=sys"); - fidx = []; - dsys = sys; - return - elseif (isempty (sprefix)) - fidx = idx; - else - fidx = reshape (idx, 1, length(idx)); - ## find states whose name begins with any strings in sprefix. - ns = length (sprefix); - for kk = 1:ns - spk = sprefix{kk}; # get next prefix and length - spl = length (spk); - - ## check each state name - for ii = 1:nz - sti = stname{ii}; # compare spk with this state name - if (length (sti) >= spl) - ## if the prefix matches and ii isn't already in the list, add ii - if (strcmp (sti(1:spl), spk) && ! any (fidx == ii)) - fidx = sort ([fidx, ii]); - endif - endif - endfor - endfor - endif - - if (nstp == 0) - warning ("dmr2d: nstp = 0; setting tsam and returning"); - dsys = syschtsam (sys, Ts2); - return; - elseif (nstp < 0) - error ("nstp = %d < 0; this shouldn't be!", nstp); - endif - - ## permute system matrices - pv = sysreorder (nz, fidx); - pv = pv(nz:-1:1); # reverse order to put fast modes in leading block - - ## construct inverse permutation - Inz = eye (nz); - pvi = (Inz(pv,:)'*[1:nz]')'; - - ## permute A, B (stname permuted for debugging only) - da = da(pv,pv); - db = db(pv,:); - stname = stname (pv); - - ## partition A, B: - lfidx = length (fidx); - bki = 1:lfidx; - a11 = da(bki,bki); - b1 = db(bki,:); - - if (lfidx < nz) - lfidx1 = lfidx+1; - bki2 = (lfidx1):nz; - a12 = da(bki,bki2); - b2 = db(bki2,:); - else - warning ("dmr2d: converting entire A,B matrices to new sampling rate"); - lfidx1 = -1; - bki2 = []; - endif - - ## begin system conversion: nstp steps - - ## compute abar_{n-1}*a12 and appropriate b matrix stuff - a12b = a12; # running total of abar_{n-1}*a12 - a12w = a12; # current a11^n*a12 (start with n = 0) - if (cuflg) - b1b = b1; - b1w = b1; - else - ## cuflg == 0, need to keep track of intersample inputs too - ## FIXME: check tolerance relative to ||b1|| - nzdx = find (max (abs (b1)) != 0); - b1w = b1(nzdx); - innamenz = inname(nzdx); - b1b = b1; # initial b1 must match columns in b2 - endif - - ## compute a11h = a11^nstp by squaring - a11h = eye (size (a11)); - p2 = 1; - a11p2 = a11; #a11^p2 - - nstpw = nstp; # workspace for computing a11^nstp - while (nstpw > 0.5) - oddv = rem (nstpw, 2); - if (oddv) - a11h = a11h*a11p2; - endif - nstpw = (nstpw-oddv)/2; - if (nstpw > 0.5) - a11p2 = a11p2*a11p2; # a11^(next power of 2) - endif - endwhile - - ## FIXME: this part should probably also use squaring, but - ## that would require exponentially growing memory. What do do? - for kk = 2:nstp - ## update a12 block to sum(a12 + ... + a11^(kk-1)*a12) - a12w = a11*a12w; - a12b = a12b + a12w; - - ## similar for b1 block (checking for cuflg first!) - b1w = a11*b1w; - if (cuflg) - b1b = b1b + b1w; # update b1 block just like we did a12 - else - b1b = [b1b, b1w]; # append new inputs - newin = sprintf ("%s_d%d", innamenz, kk-1); - inname = __sysconcat__ (inname, newin); - endif - endfor - - ## reconstruct system and return - da(bki,bki) = a11h; - db(bki,1:columns(b1b)) = b1b; - if (! isempty (bki2)) - da(bki,bki2) = a12b; - endif - - da = da(pvi,pvi); - db = db(pvi,:); - stname = stname(pvi); - - ## construct new system and return - dsys = ss (da, db, dc, dd, Ts2, 0, nz, stname, inname, outname, - find (yd == 1)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/fir2sys.m +++ /dev/null @@ -1,114 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} fir2sys (@var{num}, @var{tsam}, @var{inname}, @var{outname}) -## construct a system data structure from @acronym{FIR} description -## -## @strong{Inputs} -## @table @var -## @item num -## vector of coefficients -## @ifinfo -## [c0, c1, @dots{}, cn] -## @end ifinfo -## @iftex -## @tex -## $ [c_0, c_1, \ldots, c_n ]$ -## @end tex -## @end iftex -## of the @acronym{SISO} @acronym{FIR} transfer function -## @ifinfo -## C(z) = c0 + c1*z^(-1) + c2*z^(-2) + @dots{} + cn*z^(-n) -## @end ifinfo -## @iftex -## @tex -## $$ C(z) = c_0 + c_1z^{-1} + c_2z^{-2} + \ldots + c_nz^{-n} $$ -## @end tex -## @end iftex -## -## @item tsam -## sampling time (default: 1) -## -## @item inname -## name of input signal; may be a string or a list with a single entry. -## -## @item outname -## name of output signal; may be a string or a list with a single entry. -## @end table -## -## @strong{Output} -## @table @var -## @item sys -## system data structure -## @end table -## -## @strong{Example} -## @example -## octave:1> sys = fir2sys([1 -1 2 4],0.342,\ -## > "A/D input","filter output"); -## octave:2> sysout(sys) -## Input(s) -## 1: A/D input -## -## Output(s): -## 1: filter output (discrete) -## -## Sampling interval: 0.342 -## transfer function form: -## 1*z^3 - 1*z^2 + 2*z^1 + 4 -## ------------------------- -## 1*z^3 + 0*z^2 + 0*z^1 + 0 -## @end example -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 29, 1994 -## Name changed to TF2SYS July 1995 -## updated for new system data structure format July 1996 -## adapted from tf2sys july 1996 - -function sys = fir2sys (num, tsam, inname, outname) - - ## Test for the correct number of input arguments - if (nargin < 1 || nargin > 4) - print_usage (); - endif - - ## let tf do the argument checking - den = [1, zeros(1,length(num)-1)]; - - ## check sampling interval (if any) - if (nargin < 2 || isempty (tsam)) - tsam = 1; # default - endif - - ## Set name of input - if (nargin < 3) - inname = __sysdefioname__ (1, "u"); - endif - - ## Set name of output - if (nargin < 4) - outname = __sysdefioname__ (1, "y"); - endif - - sys = tf (num, den, tsam, inname, outname); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_abcd.m +++ /dev/null @@ -1,104 +0,0 @@ -## Copyright (C) 1997, 2000, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retval} =} is_abcd (@var{a}, @var{b}, @var{c}, @var{d}) -## Returns @var{retval} = 1 if the dimensions of @var{a}, @var{b}, -## @var{c}, @var{d} are compatible, otherwise @var{retval} = 0 with an -## appropriate diagnostic message printed to the screen. The matrices -## @var{b}, @var{c}, or @var{d} may be omitted. -## @seealso{abcddim} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: November 4, 1997 -## based on is_controllable.m of Scottedward Hodel - -function retval = is_abcd (a, b, c, d) - - retval = 0; - - switch (nargin) - case 1 - ## A only - [na, ma] = size (a); - if (na != ma) - disp ("Matrix A ist not square.") - endif - case 2 - ## A, B only - [na, ma] = size (a); - [nb, mb] = size(b); - if (na != ma) - disp ("Matrix A ist not square.") - return; - endif - if (na != nb) - disp ("A and B column dimension different.") - return; - endif - case 3 - ## A, B, C only - [na, ma] = size(a); - [nb, mb] = size(b); - [nc, mc] = size(c); - if (na != ma) - disp ("Matrix A ist not square.") - return; - endif - if (na != nb) - disp ("A and B column dimensions not compatible.") - return; - endif - if (ma != mc) - disp ("A and C row dimensions not compatible.") - return; - endif - case 4 - ## all matrices A, B, C, D - [na, ma] = size(a); - [nb, mb] = size(b); - [nc, mc] = size(c); - [nd, md] = size(d); - if (na != ma) - disp ("Matrix A ist not square.") - return; - endif - if (na != nb) - disp ("A and B column dimensions not compatible.") - return; - endif - if (ma != mc) - disp ("A and C row dimensions not compatible.") - return; - endif - if (mb != md) - disp ("B and D row dimensions not compatible.") - return; - endif - if (nc != nd) - disp ("C and D column dimensions not compatible.") - return; - endif - otherwise - print_usage (); - endswitch - ## all tests passed, signal ok. - retval = 1; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_controllable.m +++ /dev/null @@ -1,122 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{retval}, @var{u}] =} is_controllable (@var{sys}, @var{tol}) -## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} is_controllable (@var{a}, @var{b}, @var{tol}) -## Logical check for system controllability. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## @item a -## @itemx b -## @var{n} by @var{n}, @var{n} by @var{m} matrices, respectively -## @item tol -## optional roundoff parameter. Default value: @code{10*eps} -## @end table -## -## @strong{Outputs} -## @table @var -## @item retval -## Logical flag; returns true (1) if the system @var{sys} or the -## pair (@var{a}, @var{b}) is controllable, whichever was passed as input -## arguments. -## @item u -## @var{u} is an orthogonal basis of the controllable subspace. -## @end table -## -## @strong{Method} -## Controllability is determined by applying Arnoldi iteration with -## complete re-orthogonalization to obtain an orthogonal basis of the -## Krylov subspace -## @example -## span ([b,a*b,...,a^@{n-1@}*b]). -## @end example -## The Arnoldi iteration is executed with @code{krylov} if the system -## has a single input; otherwise a block Arnoldi iteration is performed -## with @code{krylovb}. -## @seealso{size, rows, columns, length, ismatrix, isscalar, isvector -## is_observable, is_stabilizable, is_detectable, krylov, krylovb} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Updated by A. S. Hodel (scotte@eng.auburn.edu) Aubust, 1995 to use krylovb -## Updated by John Ingram (ingraje@eng.auburn.edu) July, 1996 for packed systems - -function [retval, U] = is_controllable (a, b, tol) - - deftol = 1; # assume default tolerance - - if (nargin < 1 || nargin > 3) - print_usage (); - elseif (isstruct (a)) - ## system structure passed. - sys = sysupdate (a, "ss"); - [a, bs] = sys2ss (sys); - if (nargin > 2) - print_usage (); - elseif (nargin == 2) - tol = b; % get tolerance - deftol = 0; - endif - b = bs; - else - ## a,b arguments sent directly. - if (nargin < 2) - print_usage (); - else - deftol = 1; - endif - endif - - ## check for default tolerance - if (deftol) - if (isa (a, "single") || isa (b, "single")) - tol = 1000 * eps("single"); - else - tol = 1000*eps; - endif - endif - - ## check tol dimensions - if (! isscalar (tol)) - error ("is_controllable: tol(%dx%d) must be a scalar", ... - rows (tol), columns (tol)); - elseif (! is_sample (tol)) - error ("is_controllable: tol=%e must be positive",tol); - endif - - ## check dimensions compatibility - n = issquare (a); - [nr, nc] = size (b); - - if (n == 0 || n != nr || nc == 0) - warning ("is_controllable: a=(%dx%d), b(%dx%d)",rows(a),columns(a),nr,nc); - retval = 0; - else - ## call block-krylov subspace routine to get an orthogonal basis - ## of the controllable subspace. - [U, H, Ucols] = krylov (a, b, n, tol, 1); - retval = (Ucols == n); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_detectable.m +++ /dev/null @@ -1,72 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2003, 2004, 2005, 2006, -## 2007 Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retval} =} is_detectable (@var{a}, @var{c}, @var{tol}, @var{dflg}) -## @deftypefnx {Function File} {@var{retval} =} is_detectable (@var{sys}, @var{tol}) -## Test for detectability (observability of unstable modes) of (@var{a}, @var{c}). -## -## Returns 1 if the system @var{a} or the pair (@var{a}, @var{c}) is -## detectable, 0 if not, and -1 if the system has unobservable modes at the -## imaginary axis (unit circle for discrete-time systems). -## -## @strong{See} @command{is_stabilizable} for detailed description of -## arguments and computational method. -## @seealso{is_stabilizable, size, rows, columns, length, ismatrix, -## isscalar, isvector} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. - -function [retval, U] = is_detectable (a, c, tol, dflg) - - if (nargin < 1) - print_usage (); - elseif (isstruct (a)) - ## system form - if (nargin == 2) - tol = c; - elseif (nargin > 2) - print_usage (); - endif - dflg = is_digital (a); - [a,b,c] = sys2ss (a); - else - if (nargin > 4 || nargin == 1) - print_usage (); - endif - if (! exist ("dflg")) - dflg = 0; - endif - endif - - if (! exist ("tol")) - if (isa (a, "single") || isa (c, "single")) - tol = 200 * eps("single"); - else - tol = 200 * eps; - endif - endif - - retval = is_stabilizable (a', c', tol, dflg); - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/is_digital.m +++ /dev/null @@ -1,84 +0,0 @@ -## Copyright (C) 1996, 1999, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{digital} =} is_digital (@var{sys}, @var{eflg}) -## Return nonzero if system is digital. -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure. -## @item eflg -## When equal to 0 (default value), exits with an error if the system -## is mixed (continuous and discrete components); when equal to 1, print -## a warning if the system is mixed (continuous and discrete); when equal -## to 2, operate silently. -## @end table -## -## @strong{Output} -## @table @var -## @item digital -## When equal to 0, the system is purely continuous; when equal to 1, the -## system is purely discrete; when equal to -1, the system is mixed continuous -## and discrete. -## @end table -## Exits with an error if @var{sys} is a mixed (continuous and discrete) system. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1996 - -function DIGITAL = is_digital (sys, eflg) - - switch (nargin) - case 1 - eflg = 0; - case 2 - if (isempty (find (eflg == [0, 1, 2]))) - error ("invalid value of eflg=%g", eflg); - endif - otherwise, - print_usage (); - endswitch - - ## checked for sampled data system (mixed) - ## discrete system - sysyd = sysgetsignals (sys, "yd"); - [nn, nz] = sysdimensions (sys); - cont = sum (sysyd == 0) + nn; - tsam = sysgettsam (sys); - dig = sum (sysyd != 0) + nz + tsam; - - ## check for mixed system - if (cont*dig != 0) - switch (eflg) - case 0 - error ("continuous/discrete system; use syscont, sysdisc, or c2d first"); - case 1 - warning ("is_digital: mixed continuous/discrete system"); - endswitch - dig_sign = -1; - else - dig_sign = 1; - endif - - DIGITAL = dig_sign*(tsam > 0); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_observable.m +++ /dev/null @@ -1,61 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{retval}, @var{u}] =} is_observable (@var{a}, @var{c}, @var{tol}) -## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} is_observable (@var{sys}, @var{tol}) -## Logical check for system observability. -## -## Default: tol = @code{tol = 10*norm(a,'fro')*eps} -## -## Returns 1 if the system @var{sys} or the pair (@var{a}, @var{c}) is -## observable, 0 if not. -## -## See @command{is_controllable} for detailed description of arguments -## and default values. -## @seealso{size, rows, columns, length, ismatrix, isscalar, isvector} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996. - -function [retval, U] = is_observable (a, c, tol) - - if (nargin < 1) - print_usage (); - elseif (isstruct (a)) - ## system form - if (nargin == 2) - tol = c; - elseif (nargin > 2) - print_usage (); - endif - [a, b, c] = sys2ss (a); - elseif (nargin > 3) - print_usage (); - endif - if (exist ("tol")) - [retval, U] = is_controllable (a', c', tol); - else - [retval, U] = is_controllable (a', c'); - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/is_sample.m +++ /dev/null @@ -1,37 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_sample (@var{ts}) -## Return true if @var{ts} is a valid sampling time -## (real, scalar, > 0). -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1995 - -function out = is_sample (Ts) - - if (nargin != 1) - print_usage (); - endif - - out = (isscalar (Ts) && (Ts == abs (Ts)) && (Ts != 0)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_signal_list.m +++ /dev/null @@ -1,43 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_signal_list (@var{mylist}) -## Return true if @var{mylist} is a list of individual strings. -## @end deftypefn - -function flg = is_signal_list (mylist) - - if (nargin != 1) - print_usage (); - endif - - flg = iscell (mylist); - if (flg) - flg = (rows (mylist) == 1 || columns (mylist) == 1); - endif - if (flg) - for ii = 1:length (mylist) - if (! (ischar (mylist{ii}) && rows (mylist{ii}) == 1)) - flg = 0; - endif - endfor - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_siso.m +++ /dev/null @@ -1,41 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_siso (@var{sys}) -## Returns nonzero if the system data structure -## @var{sys} is single-input, single-output. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1996, 1998 - -function SISO = is_siso (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)) - error ("input must be a system structure (see ss, tf, zp)"); - endif - - [n, nz, m, p] = sysdimensions (sys); - - SISO = (m == 1 && p == 1); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_stabilizable.m +++ /dev/null @@ -1,129 +0,0 @@ -## Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -## Kai P. Mueller. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retval} =} is_stabilizable (@var{sys}, @var{tol}) -## @deftypefnx {Function File} {@var{retval} =} is_stabilizable (@var{a}, @var{b}, @var{tol}, @var{dflg}) -## Logical check for system stabilizability (i.e., all unstable modes are controllable). -## Returns 1 if the system is stabilizable, 0 if the system is not stabilizable, -1 -## if the system has non stabilizable modes at the imaginary axis (unit circle for -## discrete-time systems. -## -## Test for stabilizability is performed via Hautus Lemma. If -## @iftex -## @tex -## @var{dflg}$\neq$0 -## @end tex -## @end iftex -## @ifinfo -## @var{dflg}!=0 -## @end ifinfo -## assume that discrete-time matrices (a,b) are supplied. -## @seealso{size, rows, columns, length, ismatrix, isscalar, isvector -## is_observable, is_stabilizable, is_detectable} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Updated by A. S. Hodel (scotte@eng.auburn.edu) Aubust, 1995 to use krylovb -## Updated by John Ingram (ingraje@eng.auburn.edu) July, 1996 to accept systems - -function retval = is_stabilizable (a, b, tol, dflg) - - if (nargin < 1) - print_usage (); - elseif (isstruct (a)) - ## system passed. - if (nargin == 2) - tol = b; % get tolerance - elseif (nargin > 2) - print_usage (); - endif - disc = is_digital(a); - [a, b] = sys2ss (a); - else - ## a,b arguments sent directly. - if (nargin > 4 || nargin == 1) - print_usage (); - endif - if (exist ("dflg")) - disc = dflg; - else - disc = 0; - endif - endif - - if (! exist ("tol")) - if (isa (a, "single") || isa (b, "single")) - tol = 200 * eps("single"); - else - tol = 200 * eps; - endif - endif - - ## Checking dimensions - n = is_square (a); - if (n == 0) - error ("is_stabilizable: a must be square"); - endif - [nr, m] = size (b); - if (nr != n) - error ("is_stabilizable: (a,b) not conformal"); - endif - - ##Computing the eigenvalue of A - L = eig (a); - retval = 1; - specflag = 0; - for i = 1:n - if (disc == 0) - ## Continuous time case - rL = real (L(i)); - if (rL >= 0) - H = [eye(n)*L(i)-a, b]; - f = (rank (H, tol) == n); - if (f == 0) - retval = 0; - if (rL == 0) - specflag = 1; - endif - endif - endif - else - ## Discrete time case - rL = abs (L(i)); - if (rL >= 1) - H = [eye(n)*L(i)-a, b]; - f = (rank (H, tol) == n); - if (f == 0) - retval = 0; - if (rL == 1) - specflag = 1; - endif - endif - endif - endif - endfor - if (specflag == 1) - ## This means that the system has uncontrollable modes at the imaginary axis - ## (or at the unit circle for discrete time systems) - retval = -1; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/is_stable.m +++ /dev/null @@ -1,90 +0,0 @@ -## Copyright (C) 1993, 1994, 1995, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} is_stable (@var{a}, @var{tol}, @var{dflg}) -## @deftypefnx {Function File} {} is_stable (@var{sys}, @var{tol}) -## Returns 1 if the matrix @var{a} or the system @var{sys} -## is stable, or 0 if not. -## -## @strong{Inputs} -## @table @var -## @item tol -## is a roundoff parameter, set to 200*@code{eps} if omitted. -## @item dflg -## Digital system flag (not required for system data structure): -## @table @code -## @item @var{dflg} != 0 -## stable if eig(a) is in the unit circle -## -## @item @var{dflg} == 0 -## stable if eig(a) is in the open LHP (default) -## @end table -## @end table -## @seealso{size, rows, columns, length, ismatrix, isscalar, isvector -## is_observable, is_stabilizable, is_detectable, krylov, krylovb} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1993 -## Updated by John Ingram (ingraje@eng.auburn.edu) July, 1996 for systems -## Updated to simpler form by a.s.hodel 1998 - -function retval = is_stable (a, tol, disc) - - if (nargin < 1 || nargin > 3) - print_usage (); - elseif (isstruct (a)) - ## system was passed - if (nargin < 3) - disc = is_digital(a); - elseif (disc != is_digital (a)) - warning ("is_stable: disc =%d does not match system", disc) - endif - sys = sysupdate (a, "ss"); - a = sys2ss (sys); - else - if (nargin < 3) - disc = 0; - endif - if (issquare (a) == 0) - error ("A(%dx%d) must be square", rows (A), columns (A)); - endif - endif - - if (nargin < 2) - if (isa (a, "single")) - tol = 200 * eps("single"); - else - tol = 200 * eps; - endif - elseif (! isscalar (tol)) - error ("is_stable: tol(%dx%d) must be a scalar", rows (tol), - columns (tol)); - endif - - l = eig (a); - if (disc) - nbad = sum (abs(l)*(1+tol) > 1); - else - nbad = sum (real(l)+tol > 0); - endif - retval = (nbad == 0); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/jet707.m +++ /dev/null @@ -1,71 +0,0 @@ -## Copyright (C) 1997, 2000, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{sys} =} jet707 () -## Creates a linearized state-space model of a Boeing 707-321 aircraft -## at @var{v}=80 m/s -## @iftex -## @tex -## ($M = 0.26$, $G_{a0} = -3^{\circ}$, ${\alpha}_0 = 4^{\circ}$, ${\kappa}= 50^{\circ}$). -## @end tex -## @end iftex -## @ifinfo -## (@var{M} = 0.26, @var{Ga0} = -3 deg, @var{alpha0} = 4 deg, @var{kappa} = 50 deg). -## @end ifinfo -## -## System inputs: (1) thrust and (2) elevator angle. -## -## System outputs: (1) airspeed and (2) pitch angle. -## -## @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight -## Control), Springer, 1994. -## @seealso{ord2} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: September 28, 1997 - -function outsys = jet707 () - - if (nargin != 0) - print_usage (); - endif - - a = [-0.46E-01, 0.10681415316, 0.0, -0.17121680433; - -0.1675901504661613, -0.515, 1.0, 0.6420630320636088E-02; - 0.1543104215347786, -0.547945, -0.906, -0.1521689385990753E-02; - 0.0, 0.0, 1.0, 0.0]; - - b = [0.1602300107479095, 0.2111848453E-02; - 0.8196877780963616E-02, -0.3025E-01; - 0.9173594317692437E-01, -0.75283075; - 0.0, 0.0]; - - c = [1.0, 0.0, 0.0, 0.0; - 0.0, 0.0, 0.0, 1.0]; - - d = zeros(2,2); - - inam = {"thrust"; "rudder"}; - onam = {"speed"; "pitch"}; - snam = {"x1"; "x2"; "x3"; "x4"}; - - outsys = ss (a, b, c, d, 0.0, 4, 0, snam, inam, onam); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/listidx.m +++ /dev/null @@ -1,102 +0,0 @@ -## Copyright (C) 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{idxvec}, @var{errmsg}] =} listidx (@var{listvar}, @var{strlist}) -## Return indices of string entries in @var{listvar} that match strings -## in @var{strlist}. -## -## Both @var{listvar} and @var{strlist} may be passed as strings or -## string matrices. If they are passed as string matrices, each entry -## is processed by @code{deblank} prior to searching for the entries. -## -## The first output is the vector of indices in @var{listvar}. -## -## If @var{strlist} contains a string not in @var{listvar}, then -## an error message is returned in @var{errmsg}. If only one output -## argument is requested, then @var{listidx} prints @var{errmsg} to the -## screen and exits with an error. -## @end deftypefn - -function [idxvec, errmsg] = listidx (listvar, strlist) - - error ("listidx: don't use this anymore, ok?"); - - if (nargin != 2) - print_usage (); - endif - - if (ischar (strlist)) - tmp = strlist; - strlist = list(); - for kk = 1:rows(tmp) - strlist(kk) = deblank (tmp(kk,:)); - endfor - endif - - if (ischar (listvar)) - tmp = listvar; - listvar = list(); - for kk = 1:rows(tmp) - listvar(kk) = deblank (tmp(kk,:)); - endfor - endif - - ## initialize size of idxvec (for premature return) - idxvec = zeros (length(strlist), 1); - - errmsg = ""; - if (! is_signal_list (listvar)) - errmsg = "listvar must be a list of strings"; - elseif (! is_signal_list(strlist)) - errmsg = "strlist must be a list of strings"; - endif - - if (length (errmsg)) - if (nargout < 2) - error(errmsg); - else - return; - endif - endif - - nsigs = length (listvar); - for idx = 1:length(strlist) - signame = strlist{idx}; - for jdx = 1:nsigs - if (strcmp (signame, listvar{jdx})) - if (idxvec(idx) != 0) - warning ("Duplicate signal name %s (%d,%d)\n", - listvar{jdx}, jdx, idxvec(idx)); - else - idxvec(idx) = jdx; - endif - endif - endfor - if (idxvec (idx) == 0) - errmsg = sprintf ("Did not find %s", signame); - if (nargout == 1) - error (errmsg); - else - break; - endif - endif - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/system/moddemo.m +++ /dev/null @@ -1,206 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} moddemo (@var{inputs}) -## Octave Control toolbox demo: Model Manipulations demo. -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## a s hodel: updated to reflect updated output order in ss2zp - -function moddemo () - - while (1) - clc - disp("Octave Model Manipulations Demo") - disp("=======================================") - disp(" 1) Perform continuous to discrete time conversion (c2d)") - disp(" 2) Convert from state space to zero / pole form (ss2zp)") - disp(" Convert from zero / pole to state space form (zp2ss)") - disp(" 3) Convert from state space to transfer function form (ss2tf)") - disp(" Convert from transfer function to state space form (tf2ss)") - disp(" 4) Convert from transfer function to zero / pole form (tf2zp)") - disp(" Convert from zero / pole to transfer function form (zp2tf)") - disp(" 5) Return to main demo menu") - disp(" ") - k=6; - while(k > 5 || k < 1) - k = input("Please enter a number:"); - endwhile - if (k == 1) - clc - disp("Perform continuous to discrete time conversion (c2d)\n") - disp("Example #1, Consider the following continuous time state space system:\n") - a=[0, 1; -25, -4] - b=[0; 1] - c=[1, 1] - d=1 - prompt - disp("\nTo convert this to a discrete time system (using a zero order hold),") - disp("use the following commands:\n") - cmd="sys=ss(a,b,c,d);"; - run_cmd - cmd="dsys = c2d(sys,0.2);"; - run_cmd - cmd="sysout(dsys);"; - run_cmd - disp("Function check\n") - disp("Check the poles of sys vs dsys:\n") - cmd="[da,db]=sys2ss(dsys);"; - run_cmd - cmd="lam = eig(a);"; - run_cmd - disp("Discretize the continuous time eigenvalues using the matrix exponential:\n") - disp("lambc = exp(lam*0.2)\n") - lambc = exp(lam*0.2) - disp("Check the eigenvalues of da\n") - lambd = eig(da) - disp("Calculate the difference between lambd and lambc:\n") - cmd = "error = sort(lambd)-sort(lambc)\n"; - run_cmd - disp("The error is on the order of roundoff noise, so we're o.k.") - prompt - clc - elseif (k == 2) - clc - disp("Convert from state space to zero / pole form (ss2zp)\n") - disp("Example #1, Consider the following state space system:\n") - a=[0, 3, 1; -2, -4, 5; 5, 8, 2] - b=[0; 5; 2.5] - c=[6, -1.9, 2] - d=[-20] - prompt - disp(" ") - disp("\nTo find the poles and zeros of this sytstem, use the following command:\n") - disp("\n[zer, pol] = ss2zp(a, b, c, d)\n") - prompt - disp("Results:\n") - [zer, pol] = ss2zp(a, b, c, d) - disp("Variable Description:\n") - disp("zer, pol => zeros and poles of the state space system") - disp("a, b, c, d => state space system\n") - prompt - clc - disp("Convert from zero / pole to state space form (zp2ss)\n") - disp("Example #1, Consider the following set of zeros and poles:\n") - zer - pol - prompt - disp("\nTo find an equivalent state space representation for this set of poles") - disp("and zeros, use the following commands:\n") - k=1 - disp("\n[na, nb, nc, nd] = zp2ss(zer, pol, k)\n") - prompt - disp("Results:\n") - [na, nb, nc, nd] = zp2ss(zer, pol, k) - disp("Variable Description:\n") - disp("na, nb, nc, nd => state space system equivalent to zero / pole input") - disp("zer, pol => zeros and poles of desired state space system") - disp("k => gain associated with the zeros\n") - prompt - disp("Function check\n") - disp("Are the eigenvalues of the origonal state space system the same as the") - disp("eigenvalues of the newly constructed state space system ?\n") - disp("Find the difference between the two sets of eigenvalues") - disp("error = sort(eig(a)) - sort(eig(na))\n") - error = sort(eig(a)) - sort(eig(na)) - prompt - clc - elseif (k == 3) - clc - disp("Convert from state space to transfer function (ss2tf)\n") - disp("Example #1, Consider the following state space system:\n") - a=[0, 1; -2, -3] - b=[1; 1] - c=[1, 9] - d=[1] - prompt - disp("\nTo find an equivalent transfer function for this system, use") - disp("the following command:\n") - disp("[num, den] = ss2tf(a, b, c, d)\n") - prompt - disp("Results:\n") - [num,den] = ss2tf(a, b, c, d) - disp("Variable Description:\n") - disp("num, den => numerator and denominator of transfer function that is") - disp(" equivalent to the state space system") - disp("a, b, c, d => state space system\n") - prompt - clc - disp("Convert from transfer function to state space form (tf2ss)\n") - disp("Example #1, Consider the following transfer function:\n") - num - den - prompt - disp("\nTo find an equivalent state space representation for this system, use") - disp("the following command:\n") - disp("[a, b, c, d] = tf2ss(num, den)\n") - prompt - disp("Results:\n") - [a, b, c, d] = tf2ss(num, den) - disp("Variable Description:\n") - disp("a, b, c, d => state space system equivalent to transfer function input") - disp("num, den => numerator and denominator of transfer function that is equivalent") - disp(" to the state space system\n") - prompt - clc - elseif (k == 4) - clc - disp("Convert from transfer function to zero / pole form (tf2zp)\n") - disp("Example #1, Consider the following transfer function:\n") - num=[1, 2, 3, 4, 5, ] - den=[1, 2, 3, 4, 5, 6, 7] - prompt - disp("\nTo find the zeros and poles of this system, use the following command:\n") - disp("[zer,pol] = tf2zp(num,den)\n") - prompt - disp("Results:\n") - [zer,pol] = tf2zp(num,den) - disp("Variable Description:\n") - disp("zer,pol => zeros and poles of the transfer function") - disp("num, den => numerator and denominator of transfer function\n") - prompt - clc - disp("Convert from zero / pole to transfer function (zp2tf)\n") - disp("Example #1, Consider the following set of zeros and poles:\n") - zer - pol - prompt - disp("\nTo find an equivalent transfer function representation for this set") - disp("of poles and zeros, use the following commands:\n") - k=1 - disp("\n[num, den] = zp2tf(zer, pol, k)\n") - prompt - disp("Results:\n") - [num, den] = zp2tf(zer, pol, k) - disp("Variable Description:\n") - disp("[num, den] => transfer function representation of desired set of zeros") - disp(" and poles") - disp("a, b, c, d => state space system") - disp("zer, pol => zeros and poles of desired state space system") - disp("k => gain associated with the zeros\n") - prompt - clc - elseif (k == 5) - return - endif - endwhile -endfunction
deleted file mode 100644 --- a/scripts/control/system/ord2.m +++ /dev/null @@ -1,78 +0,0 @@ -## Copyright (C) 1997, 2000, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} ord2 (@var{nfreq}, @var{damp}, @var{gain}) -## Creates a continuous 2nd order system with parameters: -## -## @strong{Inputs} -## @table @var -## @item nfreq -## natural frequency [Hz]. (not in rad/s) -## @item damp -## damping coefficient -## @item gain -## dc-gain -## This is steady state value only for damp > 0. -## gain is assumed to be 1.0 if omitted. -## @end table -## -## @strong{Output} -## @table @var -## @item outsys -## system data structure has representation with -## @ifinfo -## @math{w = 2 * pi * nfreq}: -## @end ifinfo -## @iftex -## @tex -## $ w = 2 \pi f $: -## @end tex -## @end iftex -## @example -## @group -## / \ -## | / -2w*damp -w \ / w \ | -## G = | | |, | |, [ 0 gain ], 0 | -## | \ w 0 / \ 0 / | -## \ / -## @end group -## @end example -## @end table -## @strong{See also} @command{jet707} (@acronym{MIMO} example, Boeing 707-321 -## aircraft model) -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: September 28, 1997 - -function outsys = ord2 (nfreq, damp, gain) - - ## Updates - - if (nargin == 2 || nargin == 3) - if (nargin == 2) - gain = 1.0; - endif - w = 2.0 * pi * nfreq; - outsys = ss ([-2.0*w*damp, -w; w, 0], [w; 0], [0, gain]); - else - print_usage (); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/packedform.m +++ /dev/null @@ -1,96 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -save_var = page_screen_output (); -page_screen_output (1); -disp("Description of system data structure:") -disp("A linear system is stored in a structure, and may be represented in") -disp("ss (state space), tf (transfer function), and/or zp (zero-pole-gain)") -disp("form.") -disp(" ") -disp("variables in all representations:") -disp("inname: list of signal names (strings) containing name(s) of system ") -disp(" inputs; see is_signal_list"); -disp("n: number of continuous states") -disp("nz: number of discrete states") -disp("outname: list of signal names (strings) containing name(s) of system ") -disp(" outputs"); -disp(" ") -disp("variables in all representations:(cont'd)") -disp("sys: system status vector. This vector indicates both what") -disp(" representation was used to initialize the system data structure") -disp(" (called the primary system type) and which other representations") -disp(" are currently up-to-date with the primary system type.") -disp(" sys(0): primary system type") -disp(" =0 for tf form") -disp(" =1 for zp form") -disp(" =2 for ss form") -disp(" sys(1:3): indicate whether tf, zp, or ss, respectively, are") -disp(" \"up to date\" (whether it is safe to use the variables") -disp(" associated with these representations)") -disp(" sys(1): = 1 if tf variables are up to date") -disp(" = 0 else"); -disp(" sys(2): = 1 if zp variables are up to date") -disp(" = 0 else"); -disp(" sys(3): = 1 if ss variables are up to date") -disp(" = 0 else"); -disp("You can update alternative representations internally with the") -disp("sysupdate command:") -disp(" ") -help sysupdate -disp("===============================") -disp("More variables common to all representations in system data structures:"); -disp("tsam: discrete time sampling interval ") -disp(" =0 if system is purely continuous"); -disp(" >0 if system has discrete-time states or outputs"); -disp("yd: vector indicating which outputs are discrete time (i.e.,") -disp(" produced by D/A converters) and which are continuous time.") -disp(" yd(ii) = 0 if output ii is continuous, = 1 if discrete.") -disp(" ") -disp("===============================") -disp("variables in tf representations (SISO only):") -disp("num: vector of numerator coefficients") -disp("den: vector of denominator coefficients") -disp(" ") -disp("===============================") -disp("variables in zp representations (SISO only):") -disp("zer: vector of system zeros") -disp("pol: vector of system poles") -disp("k: system leading coefficient") -disp(" ") -disp("===============================") -disp("variables in ss representations:") -disp("a,b,c,d: usual state-space matrices. If a system has both") -disp(" continuous and discrete states, they are sorted so that") -disp(" continuous states come first, then discrete states") -disp(" ") -disp("WARNING: some functions (e.g., bode) will not accept systems") -disp("with both discrete and continuous states/outputs") -disp("stname: list of signal names (strings) containing name(s) of system ") -disp(" states"); -disp("===============================") -disp("Object oriented programming:") -disp("It is recommended that users do not directly access the internal") -disp("variables themselves, but use the interface functions") -disp(" fir ss tf sys2fir") -disp(" sys2ss sys2tf sys2zp syschtsam") -disp(" sysdimensions sysgetsignals syssetsignals sysgettype") -disp(" zp ") -disp("to create/access internal variables. "); -page_screen_output (save_var);
deleted file mode 100644 --- a/scripts/control/system/parallel.m +++ /dev/null @@ -1,73 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{ksys} =} parallel (@var{asys}, @var{bsys}) -## Forms the parallel connection of two systems. -## -## @example -## @group -## -------------------- -## | -------- | -## u ----->|----> | asys |--->|----> y1 -## | | -------- | -## | | -------- | -## |--->|----> | bsys |--->|----> y2 -## | -------- | -## -------------------- -## ksys -## @end group -## @end example -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## completely rewritten Oct 1996 a s hodel -## SYS_INTERNAL accesses members of system structure - -function sysp = parallel (Asys, Bsys) - - if(nargin != 2) - print_usage (); - endif - if (! isstruct(Asys) ) - error ("1st input argument is not a system data structure"); - elseif (! isstruct(Bsys) ) - error ("2nd input argument is not a system data structure"); - endif - [Ann, Anz, mA] = sysdimensions(Asys); - [Bnn, Bnz, mB] = sysdimensions(Bsys); - if (mA != mB) - error ("Asys has %d inputs, Bsys has %d inputs", mA, mB); - endif - - ## save signal names - Ain = sysgetsignals (Asys, "in"); - - ## change signal names to avoid warning messages from sysgroup - Asys = syssetsignals (Asys, "in", __sysdefioname__ (length (Ain), "Ain_u")); - Bsys = syssetsignals (Bsys, "in", __sysdefioname__ (length (Ain), "Bin_u")); - - sysp = sysgroup (Asys, Bsys); - sysD = ss ([], [], [], [eye(mA); eye(mA)]); - - sysp = sysmult (sysp, sysD); - sysp = syssetsignals (sysp, "in", Ain); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/ss.m +++ /dev/null @@ -1,306 +0,0 @@ -## Copyright (C) 1996, 1998, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{outsys} =} ss (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist}) -## Create system structure from state-space data. May be continuous, -## discrete, or mixed (sampled data) -## -## @strong{Inputs} -## @table @var -## @item a -## @itemx b -## @itemx c -## @itemx d -## usual state space matrices. -## -## default: @var{d} = zero matrix -## -## @item tsam -## sampling rate. Default: @math{tsam = 0} (continuous system) -## -## @item n -## @itemx nz -## number of continuous, discrete states in the system -## -## If @var{tsam} is 0, @math{n = @code{rows}(@var{a})}, @math{nz = 0}. -## -## If @var{tsam} is greater than zero, @math{n = 0}, -## @math{nz = @code{rows}(@var{a})} -## -## see below for system partitioning -## -## @item stname -## cell array of strings of state signal names -## -## default (@var{stname}=[] on input): @code{x_n} for continuous states, -## @code{xd_n} for discrete states -## -## @item inname -## cell array of strings of input signal names -## -## default (@var{inname} = [] on input): @code{u_n} -## -## @item outname -## cell array of strings of output signal names -## -## default (@var{outname} = [] on input): @code{y_n} -## -## @item outlist -## -## list of indices of outputs y that are sampled -## -## If @var{tsam} is 0, @math{outlist = []}. -## -## If @var{tsam} is greater than 0, @math{outlist = 1:@code{rows}(@var{c})}. -## @end table -## -## Unlike states, discrete/continuous outputs may appear in any order. -## -## @code{sys2ss} returns a vector @var{yd} where -## @var{yd}(@var{outlist}) = 1; all other entries of @var{yd} are 0. -## -## @strong{Output} -## @table @var -## @item outsys -## system data structure -## @end table -## -## @strong{System partitioning} -## -## Suppose for simplicity that outlist specified -## that the first several outputs were continuous and the remaining outputs -## were discrete. Then the system is partitioned as -## @example -## @group -## x = [ xc ] (n x 1) -## [ xd ] (nz x 1 discrete states) -## a = [ acc acd ] b = [ bc ] -## [ adc add ] [ bd ] -## c = [ ccc ccd ] d = [ dc ] -## [ cdc cdd ] [ dd ] -## -## (cdc = c(outlist,1:n), etc.) -## @end group -## @end example -## with dynamic equations: -## @ifinfo -## @math{d/dt xc(t) = acc*xc(t) + acd*xd(k*tsam) + bc*u(t)} -## -## @math{xd((k+1)*tsam) = adc*xc(k*tsam) + add*xd(k*tsam) + bd*u(k*tsam)} -## -## @math{yc(t) = ccc*xc(t) + ccd*xd(k*tsam) + dc*u(t)} -## -## @math{yd(k*tsam) = cdc*xc(k*tsam) + cdd*xd(k*tsam) + dd*u(k*tsam)} -## @end ifinfo -## @iftex -## @tex -## $$\eqalign{ -## {d \over dt} x_c(t) -## & = a_{cc} x_c(t) + a_{cd} x_d(k*t_{sam}) + bc*u(t) \cr -## x_d((k+1)*t_{sam}) -## & = a_{dc} x_c(k t_{sam}) + a_{dd} x_d(k t_{sam}) + b_d u(k t_{sam}) \cr -## y_c(t) -## & = c_{cc} x_c(t) + c_{cd} x_d(k t_{sam}) + d_c u(t) \cr -## y_d(k t_{sam}) -## & = c_{dc} x_c(k t_{sam}) + c_{dd} x_d(k t_{sam}) + d_d u(k t_{sam}) -## }$$ -## @end tex -## @end iftex -## -## @strong{Signal partitions} -## @example -## @group -## | continuous | discrete | -## ---------------------------------------------------- -## states | stname(1:n,:) | stname((n+1):(n+nz),:) | -## ---------------------------------------------------- -## outputs | outname(cout,:) | outname(outlist,:) | -## ---------------------------------------------------- -## @end group -## @end example -## where @math{cout} is the list of in 1:@code{rows}(@var{p}) -## that are not contained in outlist. (Discrete/continuous outputs -## may be entered in any order desired by the user.) -## -## @strong{Example} -## @example -## octave:1> a = [1 2 3; 4 5 6; 7 8 10]; -## octave:2> b = [0 0 ; 0 1 ; 1 0]; -## octave:3> c = eye (3); -## octave:4> sys = ss (a, b, c, [], 0, 3, 0, ... -## > @{"volts", "amps", "joules"@}); -## octave:5> sysout(sys); -## Input(s) -## 1: u_1 -## 2: u_2 -## -## Output(s): -## 1: y_1 -## 2: y_2 -## 3: y_3 -## -## state-space form: -## 3 continuous states, 0 discrete states -## State(s): -## 1: volts -## 2: amps -## 3: joules -## -## A matrix: 3 x 3 -## 1 2 3 -## 4 5 6 -## 7 8 10 -## B matrix: 3 x 2 -## 0 0 -## 0 1 -## 1 0 -## C matrix: 3 x 3 -## 1 0 0 -## 0 1 0 -## 0 0 1 -## D matrix: 3 x 3 -## 0 0 -## 0 0 -## 0 0 -## @end example -## Notice that the @math{D} matrix is constructed by default to the -## correct dimensions. Default input and output signals names were assigned -## since none were given. -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 20, 1996 - -function retsys = ss (a, b, c, d, tsam, n, nz, stname, inname, outname, outlist) - - ## Test for correct number of inputs - if (nargin < 3 || nargin > 11) - print_usage (); - endif - - ## verify A, B, C, D arguments - ## If D is not specified, set it to a zero matrix of appriate dimension. - if (nargin == 3) - d = zeros (rows (c), columns (b)); - elseif (isempty (d)) - d = zeros (rows (c), columns (b)); - endif - - ## Check the dimensions - [na, m, p] = abcddim (a, b, c, d); - - ## If dimensions are wrong, exit function - if (m == -1) - error ("a(%dx%d), b(%dx%d), c(%dx%d), d(%dx%d); incompatible", - rows (a), columns (a), rows (b), columns (b), - rows (c), columns (c), rows (d), columns (d)); - endif - - ## check for tsam input - if (nargin < 5) - tsam = 0; - elseif (! (is_sample (tsam) || tsam == 0)) - error ("tsam must be a nonnegative real scalar"); - endif - - ## check for continuous states - if (nargin < 6 && tsam == 0) - n = na; - elseif (nargin < 6) - n = 0; - elseif (! ismatrix (n) || ischar (n)) - error ("Parameter n is not a numerical value."); - elseif (! isscalar(n) || n < 0 || n != round (n)) - if (isscalar (n)) - error ("invalid value of n=%d,%e", n, n); - else - error ("invalid value of n=(%dx%d)", rows (n), columns (n)); - endif - endif - - ## check for num discrete states - if (nargin < 7 && tsam == 0) - nz = 0; - elseif (nargin < 7) - nz = na - n; - elseif (! ismatrix(nz) || ischar (nz)) - error ("Parameter nz is not a numerical value."); - elseif (! isscalar(nz) || nz < 0 || nz != round(nz)) - if (isscalar (nz)) - error ("invalid value of nz=%d", nz); - else - error ("invalid value of nz=(%d,%d)", rows (nz), columns (nz)); - endif - endif - - ## check for total number of states - if ((n + nz) != na) - error ("invalid: a is %dx%d, n=%d, nz=%d", na, na, n, nz); - endif - - ## construct system with default names - retsys.a = a; - retsys.b = b; - retsys.c = c; - retsys.d = d; - - retsys.n = n; - retsys.nz = nz; - retsys.tsam = tsam; - retsys.yd = zeros (1, p); # default value entered below - - ## Set the system vector: active = 2(ss), updated = [0 0 1]; - retsys.sys = [2, 0, 0, 1]; - - retsys.stname = __sysdefstname__ (n, nz); - retsys.inname = __sysdefioname__ (m, "u"); - retsys.outname = __sysdefioname__ (p, "y"); - - ## check for state names - if (nargin >= 8) - if (! isempty (stname)) - retsys = syssetsignals (retsys, "st", stname); - endif - endif - - ## check for input names - if (nargin >= 9) - if (! isempty (inname)) - retsys = syssetsignals (retsys, "in", inname); - endif - endif - - ## check for output names - if (nargin >= 10) - if (! isempty (outname)) - retsys = syssetsignals (retsys, "out", outname); - endif - endif - - ## set up yd - if (nargin < 11) - retsys = syssetsignals (retsys, "yd", ones(1,p)*(tsam > 0)); - else - if (! isempty (outlist)) - retsys = syssetsignals (retsys, "yd", ones (size (outlist)), outlist); - endif - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/ss2sys.m +++ /dev/null @@ -1,193 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} ss2sys (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist}) -## Create system structure from state-space data. May be continuous, -## discrete, or mixed (sampled data) -## -## @strong{Inputs} -## @table @var -## @item a -## @itemx b -## @itemx c -## @itemx d -## usual state space matrices. -## -## default: @var{d} = zero matrix -## -## @item tsam -## sampling rate. Default: @math{tsam = 0} (continuous system) -## -## @item n -## @itemx nz -## number of continuous, discrete states in the system -## -## If @var{tsam} is 0, @math{n = @code{rows}(@var{a})}, @math{nz = 0}. -## -## If @var{tsam} is greater than zero, @math{n = 0}, -## @math{nz = @code{rows}(@var{a})} -## -## see below for system partitioning -## -## @item stname -## cell array of strings of state signal names -## -## default (@var{stname}=[] on input): @code{x_n} for continuous states, -## @code{xd_n} for discrete states -## -## @item inname -## cell array of strings of input signal names -## -## default (@var{inname} = [] on input): @code{u_n} -## -## @item outname -## cell array of strings of input signal names -## -## default (@var{outname} = [] on input): @code{y_n} -## -## @item outlist -## -## list of indices of outputs y that are sampled -## -## If @var{tsam} is 0, @math{outlist = []}. -## -## If @var{tsam} is greater than 0, @math{outlist = 1:@code{rows}(@var{c})}. -## @end table -## -## Unlike states, discrete/continuous outputs may appear in any order. -## -## @code{sys2ss} returns a vector @var{yd} where -## @var{yd}(@var{outlist}) = 1; all other entries of @var{yd} are 0. -## -## @strong{Outputs} -## @var{outsys} = system data structure -## -## @strong{System partitioning} -## -## Suppose for simplicity that outlist specified -## that the first several outputs were continuous and the remaining outputs -## were discrete. Then the system is partitioned as -## @example -## @group -## x = [ xc ] (n x 1) -## [ xd ] (nz x 1 discrete states) -## a = [ acc acd ] b = [ bc ] -## [ adc add ] [ bd ] -## c = [ ccc ccd ] d = [ dc ] -## [ cdc cdd ] [ dd ] -## -## (cdc = c(outlist,1:n), etc.) -## @end group -## @end example -## with dynamic equations: -## @ifinfo -## @math{d/dt xc(t) = acc*xc(t) + acd*xd(k*tsam) + bc*u(t)} -## -## @math{xd((k+1)*tsam) = adc*xc(k*tsam) + add*xd(k*tsam) + bd*u(k*tsam)} -## -## @math{yc(t) = ccc*xc(t) + ccd*xd(k*tsam) + dc*u(t)} -## -## @math{yd(k*tsam) = cdc*xc(k*tsam) + cdd*xd(k*tsam) + dd*u(k*tsam)} -## @end ifinfo -## @iftex -## @tex -## $$\eqalign{ -## {d \over dt} x_c(t) -## & = a_{cc} x_c(t) + a_{cd} x_d(k*t_{sam}) + bc*u(t) \cr -## x_d((k+1)*t_{sam}) -## & = a_{dc} x_c(k t_{sam}) + a_{dd} x_d(k t_{sam}) + b_d u(k t_{sam}) \cr -## y_c(t) -## & = c_{cc} x_c(t) + c_{cd} x_d(k t_{sam}) + d_c u(t) \cr -## y_d(k t_{sam}) -## & = c_{dc} x_c(k t_{sam}) + c_{dd} x_d(k t_{sam}) + d_d u(k t_{sam}) -## }$$ -## @end tex -## @end iftex -## -## @strong{Signal partitions} -## @example -## @group -## | continuous | discrete | -## ---------------------------------------------------- -## states | stname(1:n,:) | stname((n+1):(n+nz),:) | -## ---------------------------------------------------- -## outputs | outname(cout,:) | outname(outlist,:) | -## ---------------------------------------------------- -## @end group -## @end example -## where @math{cout} is the list of in 1:@code{rows}(@var{p}) -## that are not contained in outlist. (Discrete/continuous outputs -## may be entered in any order desired by the user.) -## -## @strong{Example} -## @example -## octave:1> a = [1 2 3; 4 5 6; 7 8 10]; -## octave:2> b = [0 0 ; 0 1 ; 1 0]; -## octave:3> c = eye (3); -## octave:4> sys = ss (a, b, c, [], 0, 3, 0, -## > @{"volts", "amps", "joules"@}); -## octave:5> sysout(sys); -## Input(s) -## 1: u_1 -## 2: u_2 -## -## Output(s): -## 1: y_1 -## 2: y_2 -## 3: y_3 -## -## state-space form: -## 3 continuous states, 0 discrete states -## State(s): -## 1: volts -## 2: amps -## 3: joules -## -## A matrix: 3 x 3 -## 1 2 3 -## 4 5 6 -## 7 8 10 -## B matrix: 3 x 2 -## 0 0 -## 0 1 -## 1 0 -## C matrix: 3 x 3 -## 1 0 0 -## 0 1 0 -## 0 0 1 -## D matrix: 3 x 3 -## 0 0 -## 0 0 -## 0 0 -## @end example -## Notice that the @math{D} matrix is constructed by default to the -## correct dimensions. Default input and output signals names were assigned -## since none were given. -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 20, 1996 - -function retsys = ss2sys (varargin ) - - warning ("ss2sys is deprecated. Use ss instead."); - retsys = ss (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/ss2tf.m +++ /dev/null @@ -1,101 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{num}, @var{den}] =} ss2tf (@var{a}, @var{b}, @var{c}, @var{d}) -## Conversion from transfer function to state-space. -## The state space system: -## @iftex -## @tex -## $$ \dot x = Ax + Bu $$ -## $$ y = Cx + Du $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## . -## x = Ax + Bu -## y = Cx + Du -## @end example -## @end ifinfo -## -## is converted to a transfer function: -## @iftex -## @tex -## $$ G(s) = { { \rm num }(s) \over { \rm den }(s) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## -## num(s) -## G(s)=------- -## den(s) -## @end example -## @end ifinfo -## -## used internally in system data structure format manipulations. -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: June 24, 1994 -## a s hodel: modified to allow for pure gain blocks Aug 1996 - -function [num, den] = ss2tf (a, b, c, d) - - if (nargin != 4) - print_usage (); - endif - - ## Check args - [n, m, p] = abcddim (a, b, c, d); - if (n == -1) - num = []; - den = []; - error("ss2tf: Non compatible matrix arguments"); - elseif (m != 1 || p != 1) - num = []; - den = []; - error ("ss2tf: not SISO system: m=%d, p=%d", m, p); - endif - - if(n == 0) - ## gain block only - num = d; - den = 1; - else - ## First, get the denominator coefficients - den = poly (a); - - ## Get the zeros of the system - [zz, g] = tzero (a, b, c, d); - - ## Form the Numerator (and include the gain) - if (! isempty (zz)) - num = g * poly (zz); - else - num = g; - endif - - ## the coefficients must be real - den = real (den); - num = real (num); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/ss2zp.m +++ /dev/null @@ -1,56 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{pol}, @var{zer}, @var{k}] =} ss2zp (@var{a}, @var{b}, @var{c}, @var{d}) -## Converts a state space representation to a set of poles and zeros; -## @var{k} is a gain associated with the zeros. -## -## Used internally in system data structure format manipulations. -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## Hodel: changed order of output arguments to zer, pol, k. July 1996 -## a s hodel: added argument checking, allow for pure gain blocks aug 1996 - -function [zer, pol, k] = ss2zp (a, b, c, d) - - if (nargin != 4) - print_usage (); - endif - - [n, m, p] = abcddim (a, b, c, d); - if (n == -1) - error ("ss2tf: Non compatible matrix arguments"); - elseif (m != 1 || p != 1) - error ("ss2tf: not SISO system: m=%d p=%d", m, p); - endif - - if (n == 0) - ## gain block only - k = d; - zer = pol = []; - else - ## First, get the denominator coefficients - [zer, k] = tzero (a, b, c, d); - pol = eig (a); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/starp.m +++ /dev/null @@ -1,133 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} starp (@var{P}, @var{K}, @var{ny}, @var{nu}) -## -## Redheffer star product or upper/lower LFT, respectively. -## @example -## @group -## -## +-------+ -## --------->| |---------> -## | P | -## +--->| |---+ ny -## | +-------+ | -## +-------------------+ -## | | -## +----------------+ | -## | | -## | +-------+ | -## +--->| |------+ nu -## | K | -## --------->| |---------> -## +-------+ -## @end group -## @end example -## If @var{ny} and @var{nu} ``consume'' all inputs and outputs of -## @var{K} then the result is a lower fractional transformation. -## If @var{ny} and @var{nu} ``consume'' all inputs and outputs of -## @var{P} then the result is an upper fractional transformation. -## -## @var{ny} and/or @var{nu} may be negative (i.e. negative feedback). -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: May 1998 - -function sys = starp (P, K, ny, nu); - - if (nargin != 2 && nargin != 4) - print_usage (); - endif - if (! isstruct (P)) - error ("---> P must be in system data structure"); - endif - if (! isstruct (K)) - error ("---> K must be in system data structure"); - endif - - P = sysupdate (P, "ss"); - [n, nz, mp, pp] = sysdimensions (P); - np = n + nz; - K = sysupdate (K, "ss"); - [n, nz, mk, pk] = sysdimensions (K); - nk = n + nz; - ny_sign = 1; - nu_sign = 1; - if (nargin == 2) - ## perform a LFT of P and K (upper or lower) - ny = min ([pp, mk]); - nu = min ([pk, mp]); - else - if (ny < 0) - ny = -ny; - ny_sign = -1; - endif - if (nu < 0) - nu = -nu; - nu_sign = -1; - endif - endif - if (ny > pp) - error ("---> P has not enough outputs."); - endif - if (nu > mp) - error ("---> P has not enough inputs."); - endif - if (ny > mk) - error ("---> K has not enough inputs."); - endif - if (nu > pk) - error ("---> K has not enough outputs."); - endif - nwp = mp - nu; - nzp = pp - ny; - nwk = mk - ny; - nzk = pk - nu; - if (nwp + nwk < 1) - error ("---> no inputs left for star product."); - endif - if (nzp + nzk < 1) - error ("---> no outputs left for star product."); - endif - - ## checks done, form sys - if (nzp) - Olst = 1:nzp; - endif - if (nzk) - Olst = [Olst, pp+nu+1:pp+pk]; - endif - if (nwp) - Ilst = 1:nwp; - endif - if (nwk) - Ilst = [Ilst, mp+ny+1:mp+mk]; - endif - Clst = zeros (ny+nu, 2); - for ii = 1:nu - Clst(ii,:) = [nwp+ii, nu_sign*(pp+ii)]; - endfor - for ii = 1:ny - Clst(nu+ii,:) = [mp+ii, ny_sign*(nzp+ii)]; - endfor - sys = buildssic (Clst, [], Olst, Ilst, P, K); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sys2fir.m +++ /dev/null @@ -1,58 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{c}, @var{tsam}, @var{input}, @var{output}] =} sys2fir (@var{sys}) -## -## Extract @acronym{FIR} data from system data structure; see @command{fir2sys} for -## parameter descriptions. -## @seealso{fir2sys} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 1996 - -function [c, tsam, inname, outname] = sys2fir (sys) - - if (nargin != 1) - print_usage (); - endif - - ## let sys2tf do most of the work - - [num, den, tsam, inname, outname] = sys2tf (sys); - - alph = den(1); # scale to get monic denominator - den /= alph; - num /= alph; - l = length (den); - m = length (num); - if (norm (den(2:l))) - sysout (sys, "tf"); - error ("denominator has poles away from origin"); - elseif (! is_digital (sys)) - error ("system must be discrete-time to be FIR"); - elseif (m != l) - warning ("sys2fir: deg(num) - deg(den) = %d; coefficients must be shifted", - m-l); - endif - c = num; - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sys2ss.m +++ /dev/null @@ -1,106 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{yd}] =} sys2ss (@var{sys}) -## Extract state space representation from system data structure. -## -## @strong{Input} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Outputs} -## @table @var -## @item a -## @itemx b -## @itemx c -## @itemx d -## State space matrices for @var{sys}. -## -## @item tsam -## Sampling time of @var{sys} (0 if continuous). -## -## @item n -## @itemx nz -## Number of continuous, discrete states (discrete states come -## last in state vector @var{x}). -## -## @item stname -## @itemx inname -## @itemx outname -## Signal names (lists of strings); names of states, -## inputs, and outputs, respectively. -## -## @item yd -## Binary vector; @var{yd}(@var{ii}) is 1 if output @var{y}(@var{ii}) -## is discrete (sampled); otherwise @var{yd}(@var{ii}) is 0. -## -## @end table -## A warning massage is printed if the system is a mixed -## continuous and discrete system. -## -## @strong{Example} -## @example -## octave:1> sys=tf2sys([1 2],[3 4 5]); -## octave:2> [a,b,c,d] = sys2ss(sys) -## a = -## 0.00000 1.00000 -## -1.66667 -1.33333 -## b = -## 0 -## 1 -## c = 0.66667 0.33333 -## d = 0 -## @end example -## @end deftypefn - -## Author: David Clem -## Created: August 19, 1994 -## Updates by John Ingram July 14, 1996 - -function [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys) - - if (nargin != 1) - print_usage (); - endif - - if (! isstruct (sys)) - error ("input argument must be a system data structure"); - endif - - sys = sysupdate (sys, "ss"); # make sure state space data is there - [n, nz, m, p] = sysdimensions (sys); - [stname, inname, outname, yd] = sysgetsignals (sys); - tsam = sysgettsam (sys); - - cont = sum (yd == 0) + n; - dig = sum (yd != 0) + nz + tsam; - if (cont*dig) - warning ("sys2ss: input system is mixed continuous/discrete"); - endif - - a = sys.a; - b = sys.b; - c = sys.c; - d = sys.d; - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sys2tf.m +++ /dev/null @@ -1,63 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}] =} sys2tf (@var{sys}) -## Extract transfer function data from a system data structure. -## -## See @command{tf} for parameter descriptions. -## -## @strong{Example} -## @example -## octave:1> sys=ss([1 -2; -1.1,-2.1],[0;1],[1 1]); -## octave:2> [num,den] = sys2tf(sys) -## num = 1.0000 -3.0000 -## den = 1.0000 1.1000 -4.3000 -## @end example -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: June 24, 1994 -## modified to make sys2tf by A. S. Hodel Aug 1995 -## modified again for updated system format by John Ingram July 1996 - -function [num, den, tsam, inname, outname] = sys2tf (Asys) - - if (nargin != 1) - print_usage (); - endif - - if (! isstruct (Asys)) - error ("Asys must be a system data structure (see ss, tf, zp)"); - elseif (! is_siso (Asys)) - [n, nz, m, p] = sysdimensions (Asys); - error ("system is not SISO: %d inputs, %d outputs", m, p); - endif - - Asys = sysupdate (Asys, "tf"); # just in case - - num = Asys.num; - den = Asys.den; - - tsam = sysgettsam (Asys); - inname = sysgetsignals (Asys, "in"); - outname = sysgetsignals (Asys, "out"); - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sys2zp.m +++ /dev/null @@ -1,65 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -##@deftypefn {Function File} {[@var{zer}, @var{pol}, @var{k}, @var{tsam}, @var{inname}, @var{outname}] =} sys2zp (@var{sys}) -## Extract zero/pole/leading coefficient information from a system data -## structure. -## -## See @command{zp} for parameter descriptions. -## -## @strong{Example} -## @example -## octave:1> sys=ss([1 -2; -1.1,-2.1],[0;1],[1 1]); -## octave:2> [zer,pol,k] = sys2zp(sys) -## zer = 3.0000 -## pol = -## -2.6953 -## 1.5953 -## k = 1 -## @end example -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 15, 1996 - -function [zer, pol, k, tsam, inname, outname] = sys2zp (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)) - error ("sysconnect: sys must be in system data structure form") - elseif (! is_siso (sys)) - [n, nz, m, p] = sysdimensions (sys); - error ("system is not SISO: %d inputs, %d outputs", m, p); - endif - - ## update zero-pole form - sys = sysupdate (sys, "zp"); - - zer = sys.zer; - pol = sys.pol; - k = sys.k; - tsam = sysgettsam (sys); - inname = sysgetsignals (sys, "in"); - outname = sysgetsignals (sys, "out"); - -endfunction - -
deleted file mode 100644 --- a/scripts/control/system/sysadd.m +++ /dev/null @@ -1,133 +0,0 @@ -## Copyright (C) 1996, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysadd (@var{gsys}, @var{hsys}) -## returns @var{sys} = @var{gsys} + @var{hsys}. -## @itemize @bullet -## @item Exits with -## an error if @var{gsys} and @var{hsys} are not compatibly dimensioned. -## @item Prints a warning message is system states have identical names; -## duplicate names are given a suffix to make them unique. -## @item @var{sys} input/output names are taken from @var{gsys}. -## @end itemize -## @example -## @group -## ________ -## ----| gsys |--- -## u | ---------- +| -## ----- (_)----> y -## | ________ +| -## ----| hsys |--- -## -------- -## @end group -## @end example -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 1996 -## Updated for variable number of arguments July 1999 A. S. Hodel - -function sys = sysadd (varargin) - - if (nargin < 1) - print_usage (); - endif - - ## collect all arguments - arglist = {}; - for kk = 1:nargin - arglist{kk} = varargin{kk}; - if (! isstruct (arglist{kk})) - error ("sysadd: argument %d is not a data structure", kk); - endif - endfor - - ## check system dimensions - [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); - for kk = 2:nargin - [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); - if (mg != mh) - error ("arg 1 has %d inputs; arg %d has vs %d inputs", mg, kk, mh); - elseif (pg != ph) - error ("arg 1 has %d outputs; arg %d has vs %d outputs", pg, kk, ph); - elseif (norm (Gyd - Hyd)) - warning ("cannot add a discrete output to a continuous output"); - error ("Output type mismatch: arguments 1 and %d\n", kk); - endif - endfor - - ## perform the add - if (nargin == 2) - Gsys = arglist{1}; - Hsys = arglist{2}; - - # check if adding scalar transfer functions with identical denoms - [Gn, Gnz, Gm, Gp] = sysdimensions (Gsys); - [Hn, Hnz, Hm, Hp] = sysdimensions (Hsys); - if (Gm == 1 & Gp == 1 & Hm == 1 & Hp == 1 & Gn == Hn & Gnz == Hnz) - ## dimensions are compatible, check if can add - [Gnum, Gden, GT, Gin, Gout] = sys2tf (Gsys); - [Hnum, Hden, HT, Hin, Hout] = sys2tf (Hsys); - if (length (Hden) == length (Gden) ) - if ((Hden == Gden) & (HT == GT)) - sys = tf (Gnum+Hnum, Gden, GT, Gin, Gout); - return; - endif - endif - endif - - ## make sure in ss form - Gsys = sysupdate (Gsys, "ss"); - Hsys = sysupdate (Hsys, "ss"); - Gin = sysgetsignals (Gsys, "in"); - Gout = sysgetsignals (Gsys, "out"); - Hin = sysgetsignals (Hsys, "in"); - Hout = sysgetsignals (Hsys, "out"); - - ## change signal names to avoid warning messages from sysgroup - Gsys = syssetsignals (Gsys, "in", - __sysdefioname__ (length (Gin), "Gin_u")); - - Gsys = syssetsignals (Gsys, "out", - __sysdefioname__ (length (Gout), "Gout_u")); - - Hsys = syssetsignals (Hsys, "in", - __sysdefioname__ (length (Hin), "Hin_u")); - - Hsys = syssetsignals (Hsys, "out", - __sysdefioname__ (length (Hout), "Hout_u")); - - sys = sysgroup (Gsys, Hsys); - - eyin = eye (mg); - eyout = eye (pg); - - sys = sysscale (sys, [eyout, eyout], [eyin; eyin], Gout, Gin); - - else - ## multiple systems (or a single system); combine together one by one - sys = arglist{1}; - for kk = 2:length(arglist) - sys = sysadd (sys, arglist{kk}); - endfor - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sysappend.m +++ /dev/null @@ -1,210 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{sys} =} sysappend (@var{syst}, @var{b}, @var{c}, @var{d}, @var{outname}, @var{inname}, @var{yd}) -## appends new inputs and/or outputs to a system -## -## @strong{Inputs} -## @table @var -## @item syst -## system data structure -## -## @item b -## matrix to be appended to sys "B" matrix (empty if none) -## -## @item c -## matrix to be appended to sys "C" matrix (empty if none) -## -## @item d -## revised sys d matrix (can be passed as [] if the revised d is all zeros) -## -## @item outname -## list of names for new outputs -## -## @item inname -## list of names for new inputs -## -## @item yd -## binary vector; @math{yd(ii)=0} indicates a continuous output; -## @math{yd(ii)=1} indicates a discrete output. -## @end table -## -## @strong{Outputs} -## @table @var -## @item sys -## @example -## @group -## sys.b := [syst.b , b] -## sys.c := [syst.c ] -## [ c ] -## sys.d := [syst.d | D12 ] -## [ D21 | D22 ] -## @end group -## @end example -## where @math{D12}, @math{D21}, and @math{D22} are the appropriate dimensioned -## blocks of the input parameter @var{d}. -## @itemize @bullet -## @item The leading block @math{D11} of @var{d} is ignored. -## @item If @var{inname} and @var{outname} are not given as arguments, -## the new inputs and outputs are be assigned default names. -## @item @var{yd} is a binary vector of length rows(c) that indicates -## continuous/sampled outputs. Default value for @var{yd} is: -## @itemize @minus -## @item @var{sys} is continuous or mixed -## @var{yd} = @code{zeros(1,rows(c))} -## -## @item @var{sys} is discrete -## @var{yd} = @code{ones(1,rows(c))} -## @end itemize -## @end itemize -## @end table -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 - -function retsys = sysappend (sys, b, c, d, outname, inname, yd) - - ## check input arguments - if (nargin < 2 || nargin > 7) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a system data structure"); - endif - - ## default system type must be state space form - [Aa, Ab, Ac, Ad, Ats, Ann, Anz, Ast, Ain, Aout, Ayd] = sys2ss(sys); - [Ann, Anz, Am, Ap] = sysdimensions(sys); - - ## default c - if (nargin < 3) - c = []; - endif - - ## default d - if (nargin < 4) - make_d = 1; - elseif (isempty(d)) - make_d = 1; - else - make_d = 0; - endif - - if (make_d) - d = zeros (rows(c)+Ap, columns(b)+Am); - endif - - ## Append new input(s) if any - Bm = max (columns(d), columns(b)+Am); - if (Bm != Am) - ## construct new signal names - if (nargin >= 6) # new names were passed - if (! ischar (inname)) - error ("inname must be a string"); - elseif (rows (inname) != Bm - Am) - error ("%d new inputs requested; inname(%dx%d)", - Bm-Am, rows (inname), columns (inname)); - endif - else - inname = __sysdefioname__ (Bm, "u", Am+1); - endif - - if (Am) - Ain = __sysconcat__(Ain, inname); - else - Ain = inname; - endif - - ## default b matrix - if (isempty (b)) - b = zeros (Ann+Anz, (Bm-Am)); - elseif (rows (b) != Ann+Anz || columns (b) != Bm-Am) - error ("b(%dx%d); should be (%dx%d)", rows(b), columns(b), - Ann+Anz, Bm-Am); - endif - - ## append new b matrix - Ab = [Ab, b]; - endif - - ## Append new output(s) if any - Bp = max (rows(d), rows(c)+Ap); - if (Bp != Ap) - - ## construct new signal names, output classification - if (nargin >= 5) # new names were passed - if (! ischar (outname)) - error ("outname must be a string"); - elseif (rows (outname) != Bp-Ap) - error ("%d new outputs requested; outname(%dx%d)", - Bp-Ap, rows (outname), columns (outname)); - endif - else - outname = __sysdefioname__ (Bp, "y", (Ap+1)); - endif - if (Ap) - Aout = __sysconcat__ (Aout, outname); - else - Aout = outname; - endif - - ## construct new yd entries - if (nargin == 7) - if (! isvector (yd)) - error ("yd(%dx%d) must be a vector", rows (yd), columns (yd)); - elseif (rows (c) != length (yd) && rows (d) != length (yd)) - error ("length(yd) = %d; c(%dx%d), d(%dx%d); mismatch", - length (yd), rows (c), columns (c), rows (d), columns (d)); - endif - else - ## default yd values - yd = ones (1, Bp) * ((Ats > 0) & (Ann == 0) & isempty (find (Ayd == 0))); - endif - Ayd = [vec(Ayd); vec(yd)]; - - ## default c matrix - if (isempty (c)) - c = zeros (Bp-Ap, Ann+Anz); - elseif (columns (c) != Ann+Anz || rows (c) != Bp-Ap) - error ("c(%dx%d); should be (%dx%d)", rows (c), columns (c), - Bp-Ap, Ann+Anz); - endif - - ## append new c matrix - Ac = [Ac; c]; - endif - - ## check d matrix - if (isempty (d)) - d = zeros (Bp, Bm); - elseif (rows (d) != Bp || columns (d) != Bm) - error ("d(%dx%d) should be (%dx%d)", rows (d), columns (d), Bp, Bp); - endif - - ## Splice in original D matrix - if (Am & Ap) - d(1:Ap, 1:Am) = Ad; - endif - Ad = d; - - ## construct return system - retsys = ss (Aa, Ab, Ac, Ad, Ats, Ann, Anz, Ast, Ain, Aout, find (Ayd == 1)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/syschtsam.m +++ /dev/null @@ -1,51 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} syschtsam (@var{sys}, @var{tsam}) -## This function changes the sampling time (tsam) of the system. Exits with -## an error if sys is purely continuous time. -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 - -function retsys = syschtsam (sys, tsam) - - if (nargin != 2) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure form"); - elseif (! isscalar (tsam)) - disp ("syschtsam:") - tsam - error ("tsam must be a scalar") - elseif (! (is_sample (tsam) || tsam <= 0)) - error ("tsam must be real, scalar, and greater than zero"); - elseif (sysgettsam (sys) == 0) - [nc, nz, mm, pp] = sysdimensions (sys); - warning ("syschtsam: continuous system (nc=%d, nz=%d, mm=%d, pp=%d)", - nc, nz, mm, pp); - warning ("syschtsam: The system is continuous, use c2d to make the system discrete"); - endif - - retsys = sys; - retsys.tsam = tsam; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysconnect.m +++ /dev/null @@ -1,296 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{clsys} =} sysconnect (@var{sys}, @var{out_idx}, @var{in_idx}, @var{order}, @var{tol}) -## Close the loop from specified outputs to respective specified inputs -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure. -## @item out_idx -## @itemx in_idx -## Names or indices of signals to connect (see @code{sysidx}). -## The output specified by @math{out_idx(ii)} is connected to the input -## specified by @math{in_idx(ii)}. -## @item order -## logical flag (default = 0) -## @table @code -## @item 0 -## Leave inputs and outputs in their original order. -## @item 1 -## Permute inputs and outputs to the order shown in the diagram below. -## @end table -## @item tol -## Tolerance for singularities in algebraic loops, default: 200@code{eps}. -## @end table -## -## @strong{Outputs} -## @table @var -## @item clsys -## Resulting closed loop system. -## @end table -## -## @strong{Method} -## -## @code{sysconnect} internally permutes selected inputs, outputs as shown -## below, closes the loop, and then permutes inputs and outputs back to their -## original order -## @example -## @group -## -------------------- -## u_1 ----->| |----> y_1 -## | sys | -## old u_2 | | -## u_2* ---->(+)--->| |----->y_2 -## (in_idx) ^ -------------------- | (out_idx) -## | | -## ------------------------------- -## @end group -## @end example -## The input that has the summing junction added to it has an * added to -## the end of the input name. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## modified by John Ingram July 1996 - -function sys = sysconnect (sys, output_list, input_list, order, tol) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - ## check order - if (nargin < 4) - order = 0; - elseif (order != 0 && order != 1) - error ("sysconnect: order must be either 0 or 1") - endif - - if (isa (sys.a, "single") || isa (sys.b, "single") || isa (sys.c, "single") || - isa (sys.d, "single")) - myeps = eps ("single"); - else - myeps = eps; - endif - - if (nargin < 5) - tol = 200*myeps; - elseif (! is_sample (tol)) - error ("sysconnect: tol must be a positive scalar"); - elseif (tol > 1e2*sqrt(myeps)) - warning ("sysconnect: tol set to large value=%g, eps=%g", tol, myeps); - endif - - ## convert signal names to indices - if (is_signal_list (input_list) || ischar (input_list)) - input_list = sysidx (sys, "in", input_list); - endif - if (is_signal_list (output_list) || ischar (output_list)) - output_list = sysidx (sys, "out", output_list); - endif - - ## verify sizes,format of input, output lists - if (min (size (output_list)) * min (size (input_list)) != 1) - error ("output_list and input_list must be vectors"); - else - lo = length (output_list); - li = length (input_list); - if (lo != li) - error ("output_list and input_list must be of the same length") - endif - - if (is_duplicate_entry (output_list) || is_duplicate_entry (input_list)) - error ("duplicate entry in input_list and/or output_list"); - endif - endif - - [nc, nz, mm, pp] = sysdimensions (sys); - nn = nc+nz; - - if (! isstruct (sys)) - error ("sys must be in structured system form") - elseif (pp < lo) - error ("length(output_list)=%d, sys has only %d system outputs", lo, pp); - elseif (mm < li) - error ("length(input_list)=%d, sys has only %d system inputs", li, mm); - endif - - ## check that there are enough inputs/outputs in the system for the lists - if (max (input_list) > mm) - error ("max(input_list) exceeds the number of inputs"); - elseif (max (output_list) > pp) - error ("max(output_list) exceeds the number of outputs"); - endif - - output_list = reshape (output_list, 1, length (output_list)); - - ## make sure we're in state space form - sys = sysupdate (sys, "ss"); - - ## permute rows and columns of B,C,D matrices into pseudo-dgkf form... - all_inputs = sysreorder (mm, input_list); - all_outputs = sysreorder (pp, output_list); - - [aa, bb, cc, dd] = sys2ss (sys); - bb = bb(:,all_inputs); - cc = cc(all_outputs,:); - dd = dd(all_outputs,all_inputs); - - yd = sysgetsignals (sys, "yd"); - yd = yd(all_outputs); - - ## m1, p1 = number of inputs, outputs that are not being connected - m1 = mm-li; - p1 = pp-li; - - ## m2, p2: 1st column, row of B, C that is being connected - m2 = m1+1; - p2 = p1+1; - - ## partition system into a DGKF-like form; the loop is closed around - ## B2, C2 - if (m1 > 0) - B1 = bb(:,1:m1); - D21= dd(p2:pp,1:m1); - endif - B2 = bb(:,m2:mm); - if (p1 > 0) - C1 = cc(1:p1,:); - D12= dd(1:p1,m2:mm); - endif - C2 = cc(p2:pp,:); - if (m1*p1 > 0) - D11 = dd(1:p1,1:m1); - endif - D22 = dd(p2:pp,m2:mm); - - if (norm (D22)) - warning ("sysconnect: possible algebraic loop, D22 non-zero"); - D22i = eye (size (D22)) - D22; - C2h = D22i\C2; - if (m1 > 0) - D21h = D22i\D21; - endif - D22h = D22i\D22; - else - C2h = C2; - if (m1 > 0) - D21h = D21; - endif - D22h = D22; - - endif - - ## check cont state -> disc output -> cont state - dyi = find (yd(p2:pp)); - - ## disp("sysconnect: dyi=") - ## dyi - ## nc - ## disp("/sysconnect"); - - if ((nc > 0) & find (dyi > 0)) - B2con = B2(1:nc,dyi); # connection to cont states - C2hd = C2h(dyi,1:nc); # cont states -> outputs - else - B2con = C2hd = []; - endif - - if (max (size (B2con)) & max (size (C2hd))) - if (norm (B2con*C2hd)) - warning ("sysconnect: cont-state -> disc output -> cont state derivative"); - warning ("connection made; resulting system may not be meaningful"); - endif - endif - - Ac = aa+B2*C2h; - if (m1 > 0) - B1c = B1 + B2*D21h; - endif - B2c = B2*(eye(size(D22h)) + D22h); - if (p1*m1 > 0) - D11c = D11 + D12*D21h; - endif - if (p1 > 0) - C1c = C1+D12*C2h; - D12c = D12*(eye(size(D22h))+D22h); - endif - - ## construct system data structure - if (m1 > 0) - Bc = [B1c, B2c]; - else - Bc = B2c; - endif - - if (p1 > 0) - Cc = [C1c;C2h]; - else - Cc = C2h; - endif - - if (m1*p1 > 0) - Dc = [D11c,D12c; D21h,D22h]; - elseif (m1 > 0) - Dc = [D21h, D22h]; - elseif (p1 > 0) - Dc = [D12c; D22h]; - else - Dc = D22h; - endif - - ## permute rows and columns of Bc, Cc, Dc back into original order - Im = eye (mm, mm); - Pi = Im(:,all_inputs); - back_inputs = Pi*[1:mm]'; - - Ip = eye (pp, pp); - Po = Ip(:,all_outputs); - back_outputs = Po*[1:pp]'; - - Bc = Bc(:,back_inputs); - Cc = Cc(back_outputs,:); - Dc = Dc(back_outputs,back_inputs); - yd = yd(back_outputs); - - ## rebuild system - Ts = sysgettsam (sys); - [stnam, innam, outnam] = sysgetsignals (sys); - sys = ss (Ac, Bc, Cc, Dc, Ts, nc, nz, stnam, innam, outnam, find (yd)); - - ## update connected input names - for ii = 1:length(input_list) - idx = input_list(ii); - tmpval = sysgetsignals (sys, "in", idx); - strval = sprintf ("%s*", tmpval{1} ); - sys = syssetsignals (sys, "in", strval, idx); - endfor - - ## maintain original system type if it was SISO - if (strcmp (sysgettype (sys), "tf")) - sysupdate (sys, "tf"); - elseif (strcmp (sysgettype (sys),"zp")) - sysupdate (sys, "zp"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/syscont.m +++ /dev/null @@ -1,87 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{csys}, @var{acd}, @var{ccd}] =} syscont (@var{sys}) -## Extract the purely continuous subsystem of an input system. -## -## @strong{Input} -## @table @var -## @item sys -## system data structure. -## @end table -## -## @strong{Outputs} -## @table @var -## @item csys -## is the purely continuous input/output connections of @var{sys} -## @item acd -## @itemx ccd -## connections from discrete states to continuous states, -## discrete states to continuous outputs, respectively. -## -## If no continuous path exists, @var{csys} will be empty. -## @end table -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 - -function [csys, Acd, Ccd] = syscont (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure form"); - endif - - sys = sysupdate (sys, "ss"); - [n_tot, st_c, st_d, y_c, y_d] = __syscont_disc__ (sys); # get ranges - - ## assume there's nothing there; build partitions as appropriate - Acc = Acd = Bcc = Ccc = Ccd = Dcc = []; - - if (isempty (st_c) && isempty (y_c)) - error ("syscont: expecting continuous states and/or continuous outputs"); - elseif (isempty (st_c)) - warning ("syscont: no continuous states"); - elseif (isempty (y_c)) - warning ("syscont: no continuous outputs"); - endif - - [sys_a, sys_b, sys_c, sys_d ] = sys2ss (sys); - [sys_stname, sys_inname, sys_outname] = sysgetsignals (sys); - [sys_n, sys_nz, sys_m, sys_p] = sysdimensions (sys); - if (! isempty (st_c)) - Acc = sys_a(st_c,st_c); - stname = sys_stname(st_c); - Bcc = sys_b(st_c,:); - Ccc = sys_c(y_c,st_c); - Acd = sys_a(st_c,st_d); - else - stname = []; - endif - outname = sys_outname(y_c); - Dcc = sys_d(y_c,:); - Ccd = sys_c(y_c,st_d); - inname = sys_inname; - - csys = ss (Acc, Bcc, Ccc, Dcc, 0, sys_n, 0, stname, inname, outname); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysdimensions.m +++ /dev/null @@ -1,102 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{n}, @var{nz}, @var{m}, @var{p}, @var{yd}] =} sysdimensions (@var{sys}, @var{opt}) -## return the number of states, inputs, and/or outputs in the system -## @var{sys}. -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure -## -## @item opt -## String indicating which dimensions are desired. Values: -## @table @code -## @item "all" -## (default) return all parameters as specified under Outputs below. -## -## @item "cst" -## return @var{n}= number of continuous states -## -## @item "dst" -## return @var{n}= number of discrete states -## -## @item "in" -## return @var{n}= number of inputs -## -## @item "out" -## return @var{n}= number of outputs -## @end table -## @end table -## -## @strong{Outputs} -## @table @var -## @item n -## number of continuous states (or individual requested dimension as specified -## by @var{opt}). -## @item nz -## number of discrete states -## @item m -## number of system inputs -## @item p -## number of system outputs -## @item yd -## binary vector; @var{yd}(@var{ii}) is nonzero if output @var{ii} is -## discrete. -## @math{yd(ii) = 0} if output @var{ii} is continuous -## @end table -## @seealso{sysgetsignals, sysgettsam} -## @end deftypefn - -function [n, nz, m, p, yd] = sysdimensions (sys, opt) - - if (nargin < 1 || nargin > 2) - print_usage (); - elseif (! isstruct (sys)) - error ("sysdimensions: expecting system structure as first argument"); - elseif (nargin == 1) - opt = "all"; - endif - - n = sys.n; - nz = sys.nz; - m = length (sysgetsignals (sys, "in")); - p = length (sysgetsignals (sys, "out")); - yd = sys.yd; - valid_options = {"all", "cst", "dst", "st", "in", "out"}; - valid_values = {n,n,nz,n+nz,m,p}; - - valid_opt = 0; - for ii = 1:length(valid_options) - if (strcmp(valid_options{ii}, opt)) - n = valid_values{ii}; - valid_opt = 1; - if (ii > 1 && nargout > 1) - warning ("opt=%s, %d output arguments requested", opt, nargout); - endif - endif - endfor - - if (! valid_opt) - error ("invalid option passed = %s", opt); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysdisc.m +++ /dev/null @@ -1,98 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{dsys}, @var{adc}, @var{cdc}] =} sysdisc (@var{sys}) -## -## @strong{Input} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Outputs} -## @table @var -## @item dsys -## Purely discrete portion of sys (returned empty if there is -## no purely discrete path from inputs to outputs). -## @item adc -## @itemx cdc -## Connections from continuous states to discrete states and discrete -## outputs, respectively. -## @end table -## @end deftypefn - -function [dsys, Adc, Cdc] = sysdisc (sys) - - if (nargin != 1) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be in system data structure form"); - endif - - sys = sysupdate (sys, "ss"); - [n_tot, st_c, st_d, y_c, y_d] = __syscont_disc__ (sys); # get ranges - - ## assume there's nothing there; build partitions as appropriate - Add = Adc = Bdd = Cdd = Cdc = Ddd = []; - - if (isempty (st_d) && isempty (y_d)) - error ("sysdisc: expecting discrete states and/or continuous outputs"); - elseif (isempty (st_d)) - warning ("sysdisc: no discrete states"); - elseif (isempty (y_d)) - warning ("sysdisc: no discrete outputs"); - endif - - [aa, bb, cc, dd] = sys2ss (sys); - if (! isempty(st_d)) - Add = aa(st_d,st_d); - stname = sysgetsignals (sys, "st", st_d); - Bdd = bb(st_d,:); - if (! isempty (st_c)) - Adc = aa(st_d,st_c); - endif - if (! isempty (y_d)) - Cdd = cc(y_d,st_d); - endif - else - stname = []; - endif - if (! isempty (y_d)) - Ddd = dd(y_d , :); - outname = sysgetsignals (sys, "out", y_d); - if (! isempty (st_c)) - Cdc = cc(y_d,st_c); - endif - else - outname = []; - endif - inname = sysgetsignals (sys, "in"); - outlist = 1:rows(outname); - - if (! isempty (outname)) - tsam = sysgettsam (sys); - [nc, nz] = sysdimensions (sys); - dsys = ss (Add, Bdd, Cdd, Ddd, tsam, 0, nz, stname, inname, - outname, outlist); - else - dsys = []; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysdup.m +++ /dev/null @@ -1,132 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retsys} =} sysdup (@var{asys}, @var{out_idx}, @var{in_idx}) -## Duplicate specified input/output connections of a system -## -## @strong{Inputs} -## @table @var -## @item asys -## system data structure -## @item out_idx -## @itemx in_idx -## indices or names of desired signals (see @code{sigidx}). -## duplicates are made of @code{y(out_idx(ii))} and @code{u(in_idx(ii))}. -## @end table -## -## @strong{Output} -## @table @var -## @item retsys -## Resulting closed loop system: -## duplicated i/o names are appended with a @code{"+"} suffix. -## @end table -## -## @strong{Method} -## -## @code{sysdup} creates copies of selected inputs and outputs as -## shown below. @var{u1}, @var{y1} is the set of original inputs/outputs, and -## @var{u2}, @var{y2} is the set of duplicated inputs/outputs in the order -## specified in @var{in_idx}, @var{out_idx}, respectively -## @example -## @group -## ____________________ -## u1 ----->| |----> y1 -## | asys | -## u2 ------>| |----->y2 -## (in_idx) -------------------- (out_idx) -## @end group -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## modified by John Ingram July 1996 - -function retsys = sysdup (Asys, output_list, input_list) - - if (nargin != 3) - print_usage (); - endif - - if (! isstruct (Asys)) - error ("Asys must be a system data structure (see ss, tf, or zp)") - endif - - Asys = sysupdate (Asys, "ss"); - [nn, nz, mm, pp] = sysdimensions (Asys); - [aa, bb, cc, dd] = sys2ss (Asys); - - ## check for signal names - if (is_signal_list (input_list) || ischar (input_list)) - input_list = sysidx (Asys, "in", input_list); - endif - if (is_signal_list (output_list) || ischar (output_list)) - output_list = sysidx (Asys, "out", output_list); - endif - - ## first duplicate inputs - if (isvector (input_list)) - for ii = 1:length(input_list); - bb(:,mm+ii) = bb(:,input_list(ii)); - dd(:,mm+ii) = dd(:,input_list(ii)); - endfor - elseif (! isempty (input_list)) - error ("input_list must be a vector or empty"); - endif - - - ## now duplicate outputs - osize = min (size (output_list)); - if (osize == 1) - for ii = 1:length(output_list); - cc(pp+ii,:) = cc(output_list(ii),:); - dd(pp+ii,:) = dd(output_list(ii),:); - endfor - elseif (osize != 0) - error ("output_list must be a vector or empty"); - endif - - [stnam, innam, outnam, yd] = sysgetsignals (Asys); - tsam = sysgettsam (Asys); - - ## pack system and then rename signals - retsys = ss (aa, bb, cc, dd, tsam, nn, nz); - retsys = syssetsignals (retsys, "in", innam, 1:mm); - retsys = syssetsignals (retsys, "out", outnam, 1:pp); - retsys = syssetsignals (retsys, "yd", yd, 1:pp); - - ## update added input names - for ii = (mm+1):(mm+length(input_list)) - onum = input_list(ii-mm); - strval = sprintf ("%s(dup)", sysgetsignals (retsys, "in", onum, 1)); - retsys = syssetsignals (retsys, "in", strval, ii); - endfor - - ## update added output names/discrete flags - ## give default names to the added outputs - for jj = (pp+1):(pp+length(output_list)) - onum = output_list(jj-pp); - strval = sprintf ("%s(dup)", sysgetsignals (retsys, "out", onum, 1)); - retsys = syssetsignals (retsys, "out", strval, jj); - dflg = sysgetsignals (retsys, "yd", onum); - retsys = syssetsignals (retsys, "yd", dflg, jj); - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysgetsignals.m +++ /dev/null @@ -1,205 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{stname}, @var{inname}, @var{outname}, @var{yd}] =} sysgetsignals (@var{sys}) -## @deftypefnx {Function File} {@var{siglist} =} sysgetsignals (@var{sys}, @var{sigid}) -## @deftypefnx {Function File} {@var{signame} =} sysgetsignals (@var{sys}, @var{sigid}, @var{signum}, @var{strflg}) -## Get signal names from a system -## -## @strong{Inputs} -## @table @var -## @item sys -## system data structure for the state space system -## -## @item sigid -## signal id. String. Must be one of -## @table @code -## @item "in" -## input signals -## @item "out" -## output signals -## @item "st" -## stage signals -## @item "yd" -## value of logical vector @var{yd} -## @end table -## -## @item signum -## index(indices) or name(s) or signals; see @code{sysidx} -## -## @item strflg -## flag to return a string instead of a cell array; Values: -## @table @code -## @item 0 -## (default) return a cell array (even if signum specifies an individual signal) -## -## @item 1 -## return a string. Exits with an error if signum does not specify an -## individual signal. -## @end table -## -## @end table -## -## @strong{Outputs} -## @table @bullet -## @item If @var{sigid} is not specified: -## @table @var -## @item stname -## @itemx inname -## @itemx outname -## signal names (cell array of strings); names of states, -## inputs, and outputs, respectively. -## @item yd -## binary vector; @var{yd}(@var{ii}) is nonzero if output @var{ii} is -## discrete. -## @end table -## -## @item If @var{sigid} is specified but @var{signum} is not specified: -## @table @code -## @item sigid="in" -## @var{siglist} is set to the cell array of input names. -## -## @item sigid="out" -## @var{siglist} is set to the cell array of output names. -## -## @item sigid="st" -## @var{siglist} is set to the cell array of state names. -## -## stage signals -## @item sigid="yd" -## @var{siglist} is set to logical vector indicating discrete outputs; -## @var{siglist}(@var{ii}) = 0 indicates that output @var{ii} is continuous -## (unsampled), otherwise it is discrete. -## -## @end table -## -## @item If the first three input arguments are specified: -## @var{signame} is a cell array of the specified signal names (@var{sigid} is -## @code{"in"}, @code{"out"}, or @code{"st"}), or else the logical flag -## indicating whether output(s) @var{signum} is(are) discrete (@var{sigval}=1) -## or continuous (@var{sigval}=0). -## @end table -## -## @strong{Examples} (From @code{sysrepdemo}) -## @example -## octave> sys=ss(rand(4),rand(4,2),rand(3,4)); -## octave># get all signal names -## octave> [Ast,Ain,Aout,Ayd] = sysgetsignals(sys) -## Ast = -## ( -## [1] = x_1 -## [2] = x_2 -## [3] = x_3 -## [4] = x_4 -## ) -## Ain = -## ( -## [1] = u_1 -## [2] = u_2 -## ) -## Aout = -## ( -## [1] = y_1 -## [2] = y_2 -## [3] = y_3 -## ) -## Ayd = -## -## 0 0 0 -## octave> # get only input signal names: -## octave> Ain = sysgetsignals(sys,"in") -## Ain = -## ( -## [1] = u_1 -## [2] = u_2 -## ) -## octave> # get name of output 2 (in cell array): -## octave> Aout = sysgetsignals(sys,"out",2) -## Aout = -## ( -## [1] = y_2 -## ) -## octave> # get name of output 2 (as string): -## octave> Aout = sysgetsignals(sys,"out",2,1) -## Aout = y_2 -## @end example -## @end deftypefn - -function [stname, inname, outname, yd] = sysgetsignals (sys, sigid, signum, strflg) - - ## Adapted from ss - - if (nargin < 1 || nargin > 4) - print_usage (); - elseif (! isstruct (sys)) - error ("input argument must be a system data structure"); - endif - if (nargin < 4) - strflg = 0; - endif - - if (nargin == 1) - sys = sysupdate (sys, "ss"); #make sure ss is up to date - stname = sysgetsignals (sys, "st"); - inname = sysgetsignals (sys, "in"); - outname = sysgetsignals (sys, "out"); - yd = sysgetsignals (sys, "yd"); - elseif (! (ischar (sigid) && min (size (sigid)) == 1)) - error ("sigid(%dx%d) must be a string)", rows (sigid), columns (sigid)); - else - if (strcmp ("st", sigid)) - stname = sys.stname; - elseif (strcmp ("in", sigid)) - stname = sys.inname; - elseif (strcmp ("out", sigid)) - stname = sys.outname; - elseif (strcmp ("yd", sigid)) - stname = vec(sys.yd)'; - else - error ("sigid=%s must be \"st\", \"in\", \"out\", or \"yd\"", sigid); - endif - if (nargin >= 3) - if (is_signal_list (signum) || ischar (signum)) - signum = cellidx (stname, signum); - endif - if (max (signum) > length (stname)) - error ("sysgetsignals(sys,\"%s\",%d):only %d entries", - sigid, signum, rows (stname)); - else - if (! isscalar (strflg)) - error ("strflg must be a scalar"); - endif - switch (strflg) - case 0 - stname = stname (signum); - case 1 - if (length (signum) > 1) - error ("strflg=1, length(signum) = %d", length (signum)); - endif - stname = stname{signum}; - otherwise - error ("invalid value of strflg = %e", strflg); - endswitch - endif - endif - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sysgettsam.m +++ /dev/null @@ -1,37 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysgettsam (@var{sys}) -## Return the sampling time of the system @var{sys}. -## @end deftypefn - -function T = sysgettsam (sys) - - if (nargin != 1) - print_usage (); - endif - - if (! isstruct (sys)) - error ("sysgettsam: expecting argument to be system structure"); - endif - - T = sys.tsam; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysgettype.m +++ /dev/null @@ -1,53 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysgettype (@var{sys}) -## return the initial system type of the system -## -## @strong{Input} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Output} -## @table @var -## @item systype -## String indicating how the structure was initially -## constructed. Values: @code{"ss"}, @code{"zp"}, or @code{"tf"}. -## @end table -## -## @acronym{FIR} initialized systems return @code{systype="tf"}. -## @end deftypefn - -function systype = sysgettype (sys) - - if (nargin != 1) - print_usage (); - endif - - if (! isstruct (sys)) - error ("sysgettype: input sys is not a structure"); - endif - - typestr = {"tf", "zp", "ss"}; - systype = typestr{sys.sys(1) + 1}; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysgroup.m +++ /dev/null @@ -1,195 +0,0 @@ -## Copyright (C) 1996, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -## 2007 Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{sys} =} sysgroup (@var{asys}, @var{bsys}) -## Combines two systems into a single system. -## -## @strong{Inputs} -## @table @var -## @item asys -## @itemx bsys -## System data structures. -## @end table -## -## @strong{Output} -## @table @var -## @item sys -## @math{sys = @r{block diag}(asys,bsys)} -## @end table -## @example -## @group -## __________________ -## | ________ | -## u1 ----->|--> | asys |--->|----> y1 -## | -------- | -## | ________ | -## u2 ----->|--> | bsys |--->|----> y2 -## | -------- | -## ------------------ -## Ksys -## @end group -## @end example -## The function also rearranges the internal state-space realization of @var{sys} -## so that the continuous states come first and the discrete states come last. -## If there are duplicate names, the second name has a unique suffix appended -## on to the end of the name. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## modified by John Ingram July 1996 -## A. S. Hodel: modified for variable number of arguments 1999 - -function sys = sysgroup (varargin) - - if (nargin < 1) - print_usage (); - endif - - ## collect all arguments - arglist = {}; - for kk = 1:nargin - arglist(kk) = varargin{kk}; - if (! isstruct (arglist{kk})) - error ("sysgroup: argument %d is not a data structure", kk); - endif - endfor - - if (nargin == 2) - ## the usual case; group the two systems together - Asys = arglist{1}; - Bsys = arglist{2}; - - ## extract information from Asys, Bsys to consruct sys - Asys = sysupdate (Asys, "ss"); - Bsys = sysupdate (Bsys, "ss"); - [n1, nz1, m1, p1] = sysdimensions (Asys); - [n2, nz2, m2, p2] = sysdimensions (Bsys); - [Aa, Ab, Ac, Ad, Atsam, An, Anz, Ast, Ain, Aout, Ayd] = sys2ss (Asys); - [Ba, Bb, Bc, Bd, Btsam, Bn, Bnz, Bst, Bin, Bout, Byd] = sys2ss (Bsys); - nA = An + Anz; - nB = Bn + Bnz; - - if (p1*m1*p2*m2 == 0) - error ("sysgroup: argument lacks inputs and/or outputs"); - - elseif (Atsam + Btsam > 0 && Atsam * Btsam == 0) - warning ("sysgroup: creating combination of continuous and discrete systems") - - elseif (Atsam != Btsam) - error ("sysgroup: Asys.tsam=%e, Bsys.tsam =%e", Atsam, Btsam); - endif - - if (nA*nB > 0) - A12 = zeros (nA, nB); - else - A12 = []; - endif - A = [Aa, A12; A12', Ba]; - - if (nA*m2 > 0) - B12 = zeros (nA, m2); - else - B12 = []; - endif - if (nB*m1 > 0) - B21 = zeros (nB, m1); - else - B21 = []; - endif - if (isempty(Ab)) - Ab = []; - endif - if (isempty (Bb)) - Bb = []; - endif - B = [Ab, B12; B21, Bb]; - - if (p1*nB > 0) - C12 = zeros (p1, nB); - else - C12 = []; - endif - if (p2*nA > 0) - C21 = zeros (p2, nA); - else - C21 = []; - endif - C = [Ac, C12; C21, Bc]; - - if (p1*m2 > 0) - D12 = zeros (p1, m2); - else - D12 = []; - endif - if (p2*m1 > 0) - D21 = zeros (p2, m1); - else - D21 = []; - endif - D = [Ad, D12; D21, Bd]; - tsam = max (Atsam, Btsam); - - ## construct combined signal names; stnames must check for pure gain blocks - if (isempty (Ast)) - stname = Bst; - elseif (isempty (Bst)) - stname = Ast; - else - stname= __sysconcat__ (Ast, Bst); - endif - inname = __sysconcat__ (Ain, Bin); - outname = __sysconcat__ (Aout, Bout); - - ## Sort states into continuous first, then discrete - dstates = ones (1, (nA+nB)); - if (An) - dstates(1:(An)) = zeros (1, An); - endif - if (Bn) - dstates((nA+1):(nA+Bn)) = zeros (1, Bn); - endif - [tmp, pv] = sort (dstates); - A = A(pv,pv); - B = B(pv,:); - C = C(:,pv); - stname = stname (pv); - - ## check for duplicate signal names - inname = __sysgroupn__ (inname, "input"); - stname = __sysgroupn__ (stname, "state"); - outname = __sysgroupn__ (outname, "output"); - - ## mark discrete outputs - outlist = find ([Ayd, Byd]); - - ## build new system - sys = ss (A, B, C, D, tsam, An+Bn, Anz+Bnz, stname, inname, outname); - - else - ## multiple systems (or a single system); combine together one by one - sys = arglist{1}; - for kk = 2:length(arglist) - printf ("sysgroup: kk=%d\n", kk); - sys = sysgroup (sys, arglist{kk}); - endfor - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysidx.m +++ /dev/null @@ -1,54 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysidx (@var{sys}, @var{sigtype}, @var{signamelist}) -## Return indices of signals with specified signal names -## inputs given a system data structure @var{sys}, a signal type to be -## selected @var{sigtype} (@code{"in"}, @code{"out"}, @code{"st"}), and -## a list of desired signal names @var{signamelist}. -## @end deftypefn - -function idxvec = sysidx (sys, sigtype, signamelist) - - if (nargin != 3) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a system data structure"); - elseif (! ischar (sigtype)) - error ("sigtype must be a string"); - elseif (rows (sigtype) != 1) - [nr, nc] = size (sigtype); - error ("sigtype (%d x %d) must be a single string", nr, nc); - endif - - ## extract correct set of signal names values - [idxvec, msg] = cellidx ({"in", "out", "st", "yd"}, sigtype); - if (msg) - error ("invalid sigtype = %s", sigtype); - endif - - syssiglist = sysgetsignals (sys, sigtype); - [idxvec, msg] = cellidx (syssiglist, signamelist); - if (length (msg)) - error ("sysidx (sigtype = %s): %s", sigtype, - strrep (msg, "strlist", "signamelist")); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysmin.m +++ /dev/null @@ -1,207 +0,0 @@ -## Copyright (C) 1996, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{retsys}, @var{nc}, @var{no}] =} sysmin (@var{sys}, @var{flg}) -## Returns a minimal (or reduced order) system -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure -## @item flg -## When equal to 0 (default value), returns minimal system, -## in which state names are lost; when equal to 1, returns system -## with physical states removed that are either uncontrollable or -## unobservable (cannot reduce further without discarding physical -## meaning of states). -## @end table -## @strong{Outputs} -## @table @var -## @item retsys -## Returned system. -## @item nc -## Number of controllable states in the returned system. -## @item no -## Number of observable states in the returned system. -## @item cflg -## @code{is_controllable(retsys)}. -## @item oflg -## @code{is_observable(retsys)}. -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> - -function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg) - - switch (nargin) - case 1 - flg = 0; - case 2 - jnk = flg; # dummy operation - otherwise, - print_usage (); - endswitch - - dflg = is_digital (sys, 2); - - [n, nz, m, p] = sysdimensions (sys); - - if (n*nz > 0) - # both continuous and discrete states - [aa, bb, cc, dd, tsam, n, nz, stnam, innam, outnam, yd] = sys2ss (sys); - crng = 1:n; - drng = n+(1:nz); - - # get minimal realization of continuous part - Ac = aa(crng,crng); - Acd = aa(crng,drng); - Adc = aa(drng,crng); - Ad = aa(drng,drng); - Bc = bb(crng,:); - Bd = bb(drng,:); - Cc = cc(:,crng); - Cd = cc(:,drng); - - cstnam = stnam(crng); - dstnam = stnam(drng); - cinnam = __sysconcat__ (innam, stnam(drng)); - coutnam = __sysconcat__ (outnam, stnam(drng)); - csys = ss (Ac, [Bc, Acd], [Cc; Adc]); - csys = syssetsignals (csys, "st", cstnam); - csys = syssetsignals (csys, "in", cinnam); - csys = syssetsignals (csys, "out", coutnam); - - # reduce continuous system, recombine with discrete part - csys = sysmin (csys, flg); - cn = sysdimensions (csys); - - if (cn == 0) - # continuous states are removed; just reduce the discrete part - sys = sysprune (sys, 1:p, 1:m, drng); - retsys = sysmin (sys, flg); - else - # extract updated parameters from reduced continuous system - [caa, cbb, ccc, cdd, ctsam, cn, cnz, cstnam, cinnam, coutnam] ... - = sys2ss (csys); - - crng = 1:cn; - Ac = caa; - Bc = cbb(:,1:m); - Acd = cbb(:,m+(1:nz)); - Cc = ccc(1:p,:); - Adc = ccc(p + (1:nz),:); - - # recombine to reduce discrete part of the system - dinnam = __sysconcat__ (innam, cstnam); - doutnam = __sysconcat__ (outnam, cstnam); - dsys = ss (Ad, [Bd, Adc], [Cd; Acd], [], tsam); - dsys = syssetsignals (dsys, "st", dstnam); - dsys = syssetsignals (dsys, "in", dinnam); - dsys = syssetsignals (dsys, "out", doutnam); - - # reduce discrete subsystem - dsys = sysmin (dsys); - [n1, nz] = sysdimensions (dsys); - if (nz == 0) - # discrete subsystem is not needed - retsys = sysprune (csys, 1:p, 1:m); - else - # combine discrete, continuous subsystems - [Ad, dbb, dcc] = sys2ss (dsys); - dstnam = sysgetsignals (dsys, "st"); - Bd = dbb(:,1:m); - Adc = dbb(:,m+(1:cn)); - Cd = dcc(1:p,:); - Acd = dcc(p+(1:cn),:); - stnam = __sysconcat__ (cstnam, dstnam); - aa = [Ac, Acd; Adc, Ad]; - bb = [Bc; Bd]; - cc = [Cc, Cd]; - retsys = ss ([Ac, Acd; Adc, Ad], [Bc ; Bd], [Cc, Cd], dd, tsam, - cn, nz, stnam, innam, outnam, find(yd == 1)); - endif - endif - else - Ts = sysgettsam (sys); - switch (flg) - case 0 - ## reduce to a minimal system - [aa, bb, cc, dd] = sys2ss (sys); - [cflg, Uc] = is_controllable (aa, bb); - if (! cflg) - ## reduce to controllable states - if (! isempty (Uc)) - aa = Uc'*aa*Uc; - bb = Uc'*bb; - cc = cc*Uc; - else - aa = bb = cc = []; - endif - endif - if (! isempty (aa)) - [oflg, Uo] = is_observable (aa, cc); - if (! oflg) - if (! isempty (Uo)) - aa = Uo'*aa*Uo; - bb = Uo'*bb; - cc = cc*Uo; - else - aa = bb = cc = []; - endif - endif - endif - switch (dflg) - case 0 - nc = no = nn = columns (aa); - nz = 0; - case 1 - nc = no = nz = columns (aa); - nn = 0; - endswitch - innam = sysgetsignals (sys, "in"); - outnam= sysgetsignals (sys, "out"); - retsys = ss (aa, bb, cc, dd, Ts, nn, nz, [], innam, outnam); - case 1 - ## reduced model with physical states - [cflg, Uc] = is_controllable (sys); - xc = find (max (abs (Uc')) != 0); - [oflg, Uo] = is_observable (sys); - xo = find (max (abs (Uo')) != 0); - xx = intersection (xc, xo); - ## signal no states in reduced model - if (isempty (xx)) - xx = 0; - endif - retsys = sysprune (sys, [], [], xx); - otherwise - error ("invalid value of flg = %d", flg); - endswitch - if (sysdimensions (retsys, "st") > 0) - [cflg, Uc] = is_controllable (retsys); - nc = columns (Uc); - [oflg, Uo] = is_observable (retsys); - no = columns (Uo); - else - nc = no = 0; - endif - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysmult.m +++ /dev/null @@ -1,121 +0,0 @@ -## Copyright (C) 1996, 1999, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{sys} =} sysmult (@var{Asys}, @var{Bsys}) -## Compute @math{sys = Asys*Bsys} (series connection): -## @example -## @group -## u ---------- ---------- -## --->| Bsys |---->| Asys |---> -## ---------- ---------- -## @end group -## @end example -## A warning occurs if there is direct feed-through from an input -## or a continuous state of @var{Bsys}, through a discrete output -## of @var{Bsys}, to a continuous state or output in @var{Asys} -## (system data structure does not recognize discrete inputs). -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 1996 -## updated for variable number of arguments by A. S. Hodel July 1999 - -function sys = sysmult (varargin) - - if (nargin < 1) - print_usage (); - endif - - ## collect all arguments - arglist = {}; - for kk = 1:nargin - arglist{kk} = varargin{kk}; - if (! isstruct (arglist{kk})) - error ("sysadd: argument %d is not a data structure", kk); - endif - endfor - - ## check system dimensions - [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); - for kk = 2:nargin - [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); - if(ph != mg) - error ("arg %d has %d outputs; arg %d has %d inputs", kk, ph, kk-1, mg); - endif - [n, nz, mg, pg, Gyd] = sysdimensions (arglist{kk}); # for next iteration - endfor - - ## perform the multiply - if (nargin == 2) - Asys = arglist{1}; - Bsys = arglist{2}; - - [An, Anz, Am, Ap] = sysdimensions (Asys); - [Bn, Bnz, Bm, Bp] = sysdimensions (Bsys); - - [Aa, Ab, Ac, Ad, Atsam, An, Anz, ... - Astname, Ainname, Aoutname, Ayd] = sys2ss(Asys); - - [Ba, Bb, Bc, Bd, Btsam, Bn, Bnz, ... - Bstname, Binname, Boutname, Byd] = sys2ss(Bsys); - - if (Byd) - ## check direct feed-through of inputs through discrete outputs - alist = find (Byd); - if (An) - bd = Ab(1:An) * Bd(alist,:); - if (norm (bd, 1)) - warning ("sysmult: inputs -> Bsys discrete outputs -> continuous states of Asys"); - endif - endif - ## check direct feed-through of continuous state through discrete outputs - if (Bn) - bc = Ab(1:An) * Bc(alist,1:(Bn)); - if (norm (bc, 1)) - warning ("sysmult: Bsys states -> Bsys discrete outputs -> continuous states of Asys"); - endif - endif - endif - - ## change signal names to avoid spurious warnings from sysgroup - Asys = syssetsignals (Asys, "in", - __sysdefioname__ (Am, "A_sysmult_tmp_name")); - - Bsys = syssetsignals (Bsys, "out", - __sysdefioname__ (Bp, "B_sysmult_tmp_name")); - - sys = sysgroup (Asys, Bsys); - - ## connect outputs of B to inputs of A - sys = sysconnect (sys, Ap+(1:Bp), 1:Am); - - ## now keep only outputs of A and inputs of B - sys = sysprune (sys, 1:Ap, Am+(1:Bm)); - - else - ## multiple systems (or a single system); combine together one by one - sys = arglist{1}; - for kk = 2:length(arglist) - sys = sysmult (sys, arglist{kk}); - endfor - endif - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sysout.m +++ /dev/null @@ -1,156 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysout (@var{sys}, @var{opt}) -## print out a system data structure in desired format -## @table @var -## @item sys -## system data structure -## @item opt -## Display option -## @table @code -## @item [] -## primary system form (default) -## @item "ss" -## state space form -## @item "tf" -## transfer function form -## @item "zp" -## zero-pole form -## @item "all" -## all of the above -## @end table -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: 1995-1996 - -function retsys = sysout (sys, opt) - - if (nargin < 1 || nargin > 2) - print_usage (); - endif - - if (isempty (sys)) - retsys = sys; - error ("sysout: empty system") - return; - endif - - if (! isstruct (sys)) - error ("sysout: input must be a system structure") - endif - - ## set up output type array - if (nargin == 1) - opt = sysgettype (sys); - elseif (! (strcmp (opt, "ss") || strcmp (opt, "tf") - || strcmp (opt, "zp") || strcmp (opt, "all"))) - error ("opt must be one of [], \"ss\", \"tf\", \"zp\", or \"all\""); - endif - - ## now check output for each form: - [nn, nz, mm, pp] = sysdimensions(sys); - if (mm > 0) - disp ("Input(s)") - disp (__outlist__ (sysgetsignals (sys, "in"), " ")); - else - disp ("Input(s): none"); - endif - if (pp > 0) - disp ("Output(s):") - disp (__outlist__ (sysgetsignals (sys, "out"), - " ", sysgetsignals (sys, "yd")) ); - else - disp ("Output(s): none"); - endif - if (sysgettsam (sys) > 0) - printf ("Sampling interval: %g\n", sysgettsam (sys)); - str = "z"; - else - str = "s"; - endif - - ## transfer function form - if (strcmp (opt, "tf") || strcmp (opt, "all")) - sys = sysupdate (sys, "tf"); #make sure tf is up to date - disp ("transfer function form:") - [num, den] = sys2tf (sys); - tfout (num, den, str); - endif - - if (strcmp(opt, "zp") || strcmp(opt, "all")) - sys = sysupdate (sys, "zp"); #make sure zp is up to date - disp("zero-pole form:") - [zer, pol, kk] = sys2zp (sys); - zpout (zer, pol, kk, str) - endif - - if (strcmp(opt, "ss") || strcmp(opt, "all")) - sys = sysupdate (sys, "ss"); - disp ("state-space form:"); - printf ("%d continuous states, %d discrete states\n", nn, nz); - if (nn+nz > 0) - disp ("State(s):") - xi = (nn+1):(nn+nz); - xd = zeros (1, nn+nz); - if (! isempty (xi)) - xd(xi) = 1; - endif - disp (__outlist__ (sysgetsignals (sys, "st"), " ", xd)); - else - disp ("State(s): none"); - endif - - ## display matrix values? - dmat = (max ([nn+nz, mm, pp]) <= 32); - - printf ("A matrix: %d x %d\n", sysdimensions (sys, "st"), - sysdimensions (sys, "st")); - [aa, bb, cc, dd] = sys2ss (sys); - if (dmat) - disp (aa); - endif - - printf ("B matrix: %d x %d\n", sysdimensions (sys, "st"), - sysdimensions (sys, "in")); - if (dmat) - disp (bb); - endif - - printf ("C matrix: %d x %d\n", sysdimensions (sys, "out"), - sysdimensions (sys, "st")); - if (dmat) - disp (cc); - endif - - printf("D matrix: %d x %d\n", sysdimensions (sys, "out"), - sysdimensions (sys, "in")); - if (dmat) - disp (dd); - endif - endif - - if (nargout >= 1) - retsys = sys; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysprune.m +++ /dev/null @@ -1,186 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retsys} =} sysprune (@var{asys}, @var{out_idx}, @var{in_idx}) -## Extract specified inputs/outputs from a system -## -## @strong{Inputs} -## @table @var -## @item asys -## system data structure -## @item out_idx -## @itemx in_idx -## Indices or signal names of the outputs and inputs to be kept in the returned -## system; remaining connections are ``pruned'' off. -## May select as [] (empty matrix) to specify all outputs/inputs. -## -## @example -## retsys = sysprune (Asys, [1:3,4], "u_1"); -## retsys = sysprune (Asys, @{"tx", "ty", "tz"@}, 4); -## @end example -## -## @end table -## -## @strong{Output} -## @table @var -## @item retsys -## Resulting system. -## @end table -## @example -## @group -## ____________________ -## u1 ------->| |----> y1 -## (in_idx) | Asys | (out_idx) -## u2 ------->| |----| y2 -## (deleted)-------------------- (deleted) -## @end group -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## Updated by John Ingram 7-15-96 - -function sys = sysprune (sys, output_idx, input_idx, state_idx) - - if (nargin < 3 || nargin > 4) - print_usage (); - elseif (nargin < 4) - state_idx = []; - endif - - ## default: no action - [nn, nz, mm, pp] = sysdimensions (sys); - if (isempty (output_idx)) - output_idx = 1:pp; - endif - if (isempty (input_idx)) - input_idx = 1:mm; - endif - if (isempty (state_idx)) - state_idx = 1:(nn+nz); - endif - - ## check for signal names - if (is_signal_list (output_idx) || ischar (output_idx)) - output_idx = sysidx (sys, "out", output_idx); - endif - if (is_signal_list (input_idx) || ischar (input_idx)) - input_idx = sysidx (sys, "in", input_idx); - endif - - ## check dimensions - if (! (isvector (output_idx) || isempty (output_idx))) - if (! ismatrix (output_idx)) - error ("sysprune: bad argument passed for output_idx"); - else - error ("sysprune: output_idx (%d x %d) must be a vector or empty", - rows (output_idx), columns (output_idx)); - endif - elseif (is_duplicate_entry (output_idx)) - error ("sysprune: duplicate entries found in output_idx"); - endif - - if (! (isvector (input_idx) || isempty (input_idx))) - if (! ismatrix (input_idx)) - error ("sysprune: bad argument passed for input_idx"); - else - error ("sysprune: input_idx (%d x %d) must be a vector or empty", - rows (input_idx), columns(input_idx)); - endif - elseif (is_duplicate_entry (input_idx)) - error ("sysprune: duplicate entries found in input_idx"); - endif - - if (! (isvector (state_idx) || isempty (state_idx))) - if (! ismatrix (state_idx)) - error ("sysprune: bad argument passed for state_idx"); - else - error ("sysprune: state_idx (%d x %d) must be a vector or empty", - rows (state_idx), columns (state_idx)); - endif - elseif (nn+nz > 0) - if (is_duplicate_entry (state_idx)) - error ("sysprune: duplicate entries found in state_idx"); - endif - endif - - lo = length (output_idx); - li = length (input_idx); - lst = length (state_idx); - - if (! isstruct (sys)) - error ("Asys must be a system data structure (see ss, tf, or zp)"); - elseif (pp < lo) - error("%d output_idx entries, system has only %d outputs", lo, pp); - elseif (mm < li) - error("%d input_idx entries, system has only %d inputs", li, mm); - elseif (nn+nz < lst) - error("%d state_idx entries, system has only %d states", lst, nn+nz); - endif - - [aa, bb, cc, dd, tsam, nn, nz, stnam, innam, outnam, yd] = sys2ss (sys); - - ## check for valid state permutation - if (nn & nz) - c_idx = find (state_idx <= nn); - if (! isempty (c_idx)) - max_c = max (c_idx); - else - max_c = 0; - endif - d_idx = find (state_idx > nn); - if (! isempty (d_idx)) - min_d = min (d_idx); - else - min_d = nn+nz; - endif - if (max_c > min_d) - warning ("sysprune: state_idx(%d)=%d (discrete) preceeds", - min_d, state_idx(min_d)); - warning(" state_idx(%d)=%d (continuous)", - max_c, state_idx(max_c)); - warning ("sysprune: sys has %d continuous states, %d discrete states", - nn, nz); - error("continuous/discrete state partition not preserved; see ss"); - endif - endif - - idx = input_idx; - odx = output_idx; - if (isempty (state_idx)) - idx = []; - odx = []; - endif - aa = aa(state_idx,state_idx); - bb = bb(state_idx,idx); - cc = cc(odx,state_idx); - dd = dd(output_idx,input_idx); - yd = yd(output_idx); - - innam = innam(input_idx); - outnam = outnam(output_idx); - stnam = stnam(state_idx); - nn1 = length (find (state_idx <= nn)); - nz1 = length (find (state_idx > nn)); - - sys = ss (aa, bb, cc, dd, tsam, nn1, nz1, stnam, innam, outnam, find (yd)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysreorder.m +++ /dev/null @@ -1,71 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{pv} =} sysreorder (@var{vlen}, @var{list}) -## -## @strong{Inputs} -## @table @var -## @item vlen -## Vector length. -## @item list -## A subset of @code{[1:vlen]}. -## @end table -## -## @strong{Output} -## @table @var -## @item pv -## A permutation vector to order elements of @code{[1:vlen]} in -## @code{list} to the end of a vector. -## @end table -## -## Used internally by @code{sysconnect} to permute vector elements to their -## desired locations. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 - -function pv = sysreorder (vlen, list) - - if (nargin != 2) - print_usage (); - endif - - ## disp('sysreorder: entry') - - pv = 1:vlen; - ## make it a row vector - list = reshape(list,1,length(list)); - A = pv' * ones (size (list)); - B = ones (size (pv')) * list; - X = (A != B); - if (! isvector (X)) - y = min (X'); - else - y = X'; - endif - z = find (y == 1); - if (! isempty (z)) - pv = [z, list]; - else - pv = list; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysrepdemo.m +++ /dev/null @@ -1,496 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysrepdemo -## Tutorial for the use of the system data structure functions. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: June 1995 -## Revised Aug 1995 for system data structure format - -function sysrepdemo () - - save_val = page_screen_output (); - page_screen_output (1); - - disp("System representation demo:") - num = [5, -1]; - denom = [1, -2, 6]; - a = b = c = []; - syschoice = -1; - ch_init = 2; - ch_extract = ch_init+1; - ch_update = ch_extract+1; - ch_view = ch_update+1; - ch_details = ch_view+1; - ch_quit = ch_details+1; - while(syschoice != ch_quit) - disp(" ") - syschoice = menu("Octave System Representation Menu", ... - "General overview of system representation (DO THIS FIRST)", ... - "Initialize a system (ss, tf, zp)", ... - "Extract data from a system(sys2ss, sys2tf, sys2zp, etc.)", ... - "Update internal representation (sysupdate)", ... - "View the internal contents of a system (sysout)", ... - "Details of internal representation", ... - "Return to main menu"); - if(syschoice == 1) # general overview - disp("The Octave Control Systems Toolbox (OCST) was designed to") - disp("provide a simple user interface to a powerful set of tools.") - disp(" ") - disp(" ----------") - disp(" input(s) ---->| System | ---> output(s) ") - disp(" ----------") - disp(" ") - disp("Like other computer-aided control system design tools, the OCST") - disp("enables users to enter their descriptions of dynamic systems in ") - disp("their preferred form (state space, transfer function, or "); - disp("zero-pole format). "); - disp("The OCST stores system descriptions in a single variable data "); - disp("structure that allows for continuous time, discrete-time, or mixed "); - disp("(sampled-data) systems. "); - disp(" "); - disp("This single variable description of dynamic systems greatly simplifies "); - disp("both the code of the OCST as well as the user interface, since only") - disp("one variable is passed per system, regardless of the internal ") - disp("representation used in the data structure. As a result, the "); - disp("likelihood of user error is greatly reduced when calling OCST") - disp("functions. Further, all OCST functions have been written to") - disp("provide meaningful warning or error message to assist the user") - disp("in correcting their programming errors while using the OCST.") - disp("The details of the internal representation can be seen in "); - disp(["menu option ",num2str(ch_details)]); - disp("The data structure used in the OCST is called a \"system data structure.\""); - disp("A system data structure is contstructed with one of:") - disp(" fir (FIR transfer function to system)") - disp(" ss (state space matrices to system)") - disp(" tf (SISO transfer function to system)") - disp(" zp (SISO zero/pole/leading coefficient to system)") - disp(" ") - disp(["These functions are discussed in in menu option ",num2str(ch_init)]) - disp("The data in a system may be extracted using ") - disp(" sys2fir (FIR transfer function from system") - disp(" sys2ss (state space matrices from system)") - disp(" sys2tf (SISO transfer function from system)") - disp(" sys2zp (SISO zero/pole/leading coefficient from system)") - disp(" ") - disp(["These functions are discussed in menu option ", ... - num2str(ch_extract)]); - disp("Other options discussed under this menu are updating the internal") - disp("representation form of a system data structure with sysupdate and printing") - disp("the description of a dynamic system to the screen with sysout.") - disp(" ") - disp("Once the user is familiar with these commands, the rest of the ") - disp("OCST package will be quite easy to use.") - elseif(syschoice == ch_init) % Initialize - disp("Initialization of a system:"); - disp(" "); - formopt = 0; - while(formopt != 4) - disp("Three data formats may be used to initialize a system:") - formopt = menu("System data structure initialization menu", ... - "State space form (ss)", ... - "Transfer function form (tf)", ... - "zero-pole form (zp)", ... - "Return to System representation menu"); - if(formopt == 1) - disp("State space representation of a system is based on the usual") - disp("multi-variable differential equations") - disp(" ") - disp(" . ") - disp(" x = A x + B u -or - x(k+1) = A x(k) + B u(k) ") - disp(" y = C x + D u y(k) = C x(k) + D u(k) ") - disp(" ") - disp("for matrices A, B, C, D of appropriate dimension.") - disp(" ") - ssopt = 0; - ssquit = 5; - while(ssopt < ssquit) - ssopt = menu("State space initialization examples", ... - "Double integrator example", ... - "Double delay (discrete-time) example", ... - "Summing junction (D-matrix only) example", ... - "ss details (help ss)", ... - "return to system initialization menu", ... - "return to system representation main menu"); - if(ssopt == 1) - disp("Example: construct a system representation of a") - disp("double integrator via state-space form") - cmd = "a = [0, 1; 0, 0];"; - run_cmd - cmd = "b = [0; 1];"; - run_cmd - cmd = "c = [1, 0];"; - run_cmd - cmd = "sys = ss(a,b,c);"; - run_cmd - disp("The state space form of the system is seen via sysout:") - cmd = "sysout(sys)"; - run_cmd - disp("Notice that the Octave controls toolbox automatically") - disp("assigns names to the states, inputs and outputs,") - disp("and that the D matrix was filled in automatically.") - disp("We verify that it's a double integrator via sysout:") - cmd = "sysout(sys,""tf"")"; - run_cmd - prompt - elseif(ssopt == 2) - disp("Example: discrete-time double-delay:") - disp("This example is identical to the double-integrator,") - disp("except that it is a discrete-time system, and so has") - disp("a sampling interval. We arbitrarily select T=1e-3."); - cmd = "a = [0, 1; 0, 0];"; - run_cmd - cmd = "b = [0; 1];"; - run_cmd - cmd = "c = [1, 0];"; - run_cmd - cmd = "sys=ss(a,b,c,[],1e-3);"; - run_cmd - cmd = "sysout(sys)"; - run_cmd - disp("Notice that the D matrix was filled in automatically.") - disp("This is done if D is input as the empty matrix.") - disp(" ") - disp("Notice also that the output y_1 is labelled as a discrete") - disp("output. The OCST data structure keeps track of states") - disp("and output signals that are produced by the discrete-time") - disp("portion of a system. Discrete states and outputs are ") - disp("implemented as shown in the block diagram below:") - disp(" ") - disp(" ") - disp(" _________ ________ x(kT) ________________") - disp("f(t)-->|sampler|-->| delay |----->|zero order hold| -->") - disp(" --------- -------- ----------------") - disp(" ") - disp(" ___________ _______________") - disp("f(t)-->| sampler |-->|zero-order hold| --> y(discrete)") - disp(" ----------- ---------------") - disp(" ") - disp("where f(t) is an input signal to either the output or the") - disp(" discrete state.") - disp(" ") - disp("The OCST does not implement samplers on inputs to continuous") - disp("time states (i.e., there are no samplers implicit in the B") - disp("or D matrices unless there are corresponding discrete") - disp("outputs or states. The OCST provides warning messages when") - disp("if this convention is violated.") - prompt - elseif(ssopt == 3) - disp("A summing junction that computes e(t) = r(t) - y(t) may be"); - disp("constructed as follows:"); - disp("First, we set the matrix D:") - cmd = "D = [1, -1];"; - run_cmd - disp("ss allows the initialization of signal and state names") - disp("(see option 4), so we initialize these as follows:") - cmd = "inname = {\"r(t)\",\"y(t)\"};"; - run_cmd; - cmd = "outname = \"e(t)\";"; - run_cmd - disp("Since the system is continuous time and without states,") - disp("the ss inputs tsam, n, and nz are all zero:") - cmd = "sys = ss([],[],[],D,0,0,0,[],inname,outname);"; - run_cmd - disp("The resulting system is:") - cmd = "sysout(sys)"; - run_cmd - disp("A discrete-time summing block can be implemented by setting") - disp("the sampling time positive:") - cmd = "sys = ss([],[],[],D,1e-3,0,0,[],inname,outname);"; - run_cmd - disp("The resulting system is:") - cmd = "sysout(sys)"; - run_cmd - prompt - elseif(ssopt == 4) - help ss - disp(" ") - disp(" ") - disp("Notice that state-space form allows a single system to have") - disp("both continuous and discrete-time states and to have both continuous") - disp("and discrete-time outputs. Since it's fairly easy to make an") - disp("error when mixing systems of this form, the Octave controls") - disp("toolbox attempts to print warning messages whenever something") - disp("questionable occurs.") - elseif(ssopt == 6) - formopt = 4; # return to main menu - endif - endwhile - elseif(formopt == 2) - tfopt = 0; - while(tfopt < 5) - tfopt = menu("Transfer function initialization menu", ... - "Continuous time initialization" , ... - "Discrete time initialization" , ... - "User specified signal names" , ... - "tf details (help tf)", ... - "Return to system initialization menu", ... - "Return to system representation main menu"); - if(tfopt == 1) # continuous time - disp("A transfer function is represented by vectors of the") - disp("coefficients of the numerator and denominator polynomials"); - disp(" ") - disp("For example: the transfer function"); - disp(" "); - num = [5, -1]; - denom = [1, -2, 6]; - tfout(num,denom); - disp(" ") - disp("is generated by the following commands:") - cmd = "num = [5, -1]"; - run_cmd - cmd = "denom = [1, -2, 6]"; - run_cmd - cmd = "sys = tf(num,denom);"; - run_cmd - disp("alternatively, the system can be generated in a single command:"); - cmd = "sys = tf([5, -1], [1, -2, 6]);"; - run_cmd - disp("Notice the output of sys: it is an Octave data structure.") - disp("The details of its member variables are explained under") - disp("System Representation Menu option 5 (the details of system form)") - disp(" "); - disp("The data structure can be observed with the sysout command:") - cmd = "sysout(sys)"; - run_cmd - disp("Notice that Octave assigns names to inputs and outputs.") - disp("The user may manually select input and output names; see option 3"); - prompt - elseif(tfopt == 2) # discrete time - disp("A transfer function is represented by vectors of the") - disp("coefficients of the numerator and denominator polynomials"); - disp("Discrete-time transfer functions require ") - disp("the additional parameter of a sampling period:") - cmd = "sys=tf([5, -1], [1, 2, -6], 1e-3);"; - run_cmd - cmd = "sysout(sys)"; - run_cmd - disp("The OCST recognizes discrete-time transfer functions and") - disp("accordingly prints them with the frequency domain variable z."); - disp("Notice that Octave assigns names to inputs and outputs.") - disp("The user may set input and output names; see option 3"); - elseif(tfopt == 3) # user specified names - disp("The OCST requires all signals to have names. The OCST assigned default"); - disp("names to the signals in the other examples. We may initialize a transfer"); - disp("function with user-specified names as follows: Consider a simple ") - disp("double-integrator model of aircraft roll dynamics with ") - disp("input \"aileron angle\" and output \"theta\". A ") - disp("system for this model is generated by the command") - cmd = "aircraft=tf(1, [1, 0, 0], 0,\"aileron angle\",\"theta\");"; run_cmd - disp("The sampling time parameter 0 indicates that the system") - disp("is continuous time. A positive sampling time indicates a") - disp("discrete-time system (or sampled data system).") - cmd = "sysout(aircraft)"; - run_cmd - disp("Notice that the user-selected signal names are listed.") - disp("These signal names are used in OCST plots and design functions."); - disp("(Run the frequency response demo to see an example of the use of "); - disp("signal names in plots.)") - prompt - elseif(tfopt == 4) # help - help tf - prompt - elseif(tfopt == 6) # return to main menu - formopt = 4; - endif - endwhile - elseif (formopt == 3) - zpopt = 0; - while(zpopt < 5) - zpopt = menu("Zero-pole initialization menu", ... - "Continuous time initialization" , ... - "Discrete time initialization" , ... - "User specified signal names" , ... - "zp details (help zp)", ... - "Return to system initialization menu", ... - "Return to system representation main menu"); - if(zpopt == 1) # continuous time - disp("A zero-pole form representation of a system includes vectors") - disp("of the system poles and zeros and a scalar leading coefficient."); - disp(" ") - disp("For example: the transfer function"); - disp(" "); - k = 5; - num = [5, -1]; - denom = [1, -2, 6]; - zpout(num,denom,k); - disp(" ") - disp("is generated by the following commands:") - cmd = "num = [5, -1]"; - run_cmd - cmd = "denom = [1, -2, 6]"; - run_cmd - cmd = "k = 5"; - run_cmd - cmd = "sys = zp(num,denom,k);"; - run_cmd - disp("alternatively, the system can be generated in a single command:"); - cmd = "sys = zp([5, -1],[1, -2, 6],5);"; - run_cmd - disp("Notice the output of sys: it is an Octave data structure.") - disp("The details of its member variables are explained under") - disp("System Representation Menu option 5 (the details of system form)") - disp(" "); - disp("The data structure can be observed with the sysout command:") - cmd = "sysout(sys)"; - run_cmd - disp("Notice that Octave assigns names to inputs and outputs.") - disp("The user may manually select input and output names; see option 3"); - prompt - elseif(zpopt == 2) # discrete time - disp("A zero-pole form representation of a system includes vectors") - disp("of the system poles and zeros and a scalar leading coefficient."); - disp(" ") - disp("Discrete-time systems require the additional parameter of a sampling period:") - cmd = "sys=zp([5, -1],[1, 2, -6],5,1e-3);"; - run_cmd - cmd = "sysout(sys)"; - run_cmd - disp("The OCST recognizes discrete-time transfer functions and") - disp("accordingly prints them with the frequency domain variable z."); - disp("Notice that Octave assigns names to inputs and outputs.") - disp("The user may set input and output names; see option 3"); - elseif(zpopt == 3) # user specified names - disp("The OCST requires all signals to have names. The OCST assigned default"); - disp("names to the signals in the other examples. We may initialize a transfer"); - disp("function with user-specified names as follows: Consider a simple ") - disp("double-integrator model of aircraft roll dynamics with ") - disp("input \"aileron angle\" and output \"theta\". A ") - disp("system for this model is generated by the command") - cmd = "aircraft=zp([],[0, 0],1,0,\"aileron angle\",\"theta\");"; run_cmd - disp("The sampling time parameter 0 indicates that the system") - disp("is continuous time. A positive sampling time indicates a") - disp("discrete-time system (or sampled data system).") - cmd = "sysout(aircraft)"; - run_cmd - disp("Notice that the user-selected signal names are listed.") - disp("These signal names are used in OCST plots and design functions."); - disp("(Run the frequency response demo to see an example of the use of "); - disp("signal names in plots.)") - prompt - elseif(zpopt == 4) # help - help zp - prompt - elseif(zpopt == 6) # return to main menu - formopt = 4; - endif - endwhile - endif - endwhile - elseif(syschoice == ch_extract) # extract system information - disp("Extract information from a system data structure in a selected format:") - disp("The actions of operations ss, tf, and zp are reversed by") - disp("respective functions sys2ss, sys2tf, and sys2zp. The latter two"); - disp("functions are applicable only to SISO systems.") - formopt = 0; - while(formopt != 8) - formopt = menu("Extract system information", ... - "in state space form (sys2ss)", ... - "in transfer function form (sys2tf)", ... - "in zero pole form (sys2zp)", ... - "signal names (sysgetsignals,syssetsignals)", ... - "sampling time (sysgettsam)", ... - "signal dimensions (sysdimensions)", ... - "primary system type (sysgettype)", ... - "Return to system representation menu"); - if(formopt == 1) - help sys2ss - elseif(formopt == 2) - help sys2tf - elseif(formopt == 3) - help sys2zp - elseif(formopt == 4) - help sysgetsignals - cmd="sys=ss(rand(4),rand(4,2),rand(3,4));"; - run_cmd - printf("Example: All signals names can be extracted by\n"); - cmd = "[Ast,Ain,Aout,Ayd] = sysgetsignals(sys)"; - run_cmd - printf("Example: Input signal names can be extracted as\n"); - cmd = "Ain = sysgetsignals(sys,\"in\")"; - run_cmd - printf("Example: The name of output signal 2 can be extracted as\n"); - cmd = "Aout = sysgetsignals(sys,\"out\",2)"; - run_cmd - printf("\nNotice that Aout is returned as a cell array; the signal name\n"); - printf("itself is obtained by specifying the input parameter strflg\n"); - cmd = "Aout = sysgetsignals(sys,\"out\",2,1)"; - run_cmd - prompt - cmd = "help syssetsignals"; - run_cmd - printf("Example: set input 2 name to \"motor voltage\"\n"); - cmd = "sys = syssetsignals(sys,\"in\",\"motor voltage\",2); sysout(sys)"; - run_cmd - - printf("Other syssetsignals demos are in the Block diagram demo program bddemo\n"); - elseif(formopt == 5) - help sysgettsam - elseif(formopt == 6) - help sysdimensions - elseif(formopt == 7) - help sysgettype - endif - prompt - endwhile - elseif(syschoice== ch_update) - disp("The OCST system data structure format will store a system in the same format") - disp("as that with which it was initialized. For example, consider the following:") - cmd = "sys=zp([1, 2],[3, 4, 5],6)"; - run_cmd - disp(" ") - disp("Notice the internal variables in the structure include zer, pol, and k,") - disp("the required variables for zero-pole form. We can update the system") - disp("to include state-space form as follows:") - cmd = "sys = sysupdate(sys,\"ss\")"; - run_cmd - disp(" ") - disp("Now the sys data structure includes variables a, b, c, and d, as well") - disp("the default state names stname. sysupdate is usually used internally in") - disp("the OCST, but can be used manually if desired. A full description of") - disp("sysupdate is as follows:") - help sysupdate - prompt - elseif(syschoice == ch_view) - disp("The sysout command can be used to view a system in any desired format.") - disp("For example, consider the system created as follows:") - cmd = "aircraft=zp(1,[0, 0],1,0,\"aileron angle\",\"theta\");"; run_cmd - disp("The system may be viewed in its default format (zero-pole) as follows") - cmd = "sysout(aircraft)"; - run_cmd - disp(" ") - disp("The system may be viewed in state-space or transfer function form as well:") - cmd = "sysout(aircraft,\"ss\")"; - run_cmd - cmd = "sysout(aircraft,\"tf\")"; - run_cmd - disp("A complete description of sysout is below:") - help sysout - prompt - elseif(syschoice == ch_details) - packedform - endif - - endwhile - page_screen_output (save_val); -endfunction -
deleted file mode 100644 --- a/scripts/control/system/sysscale.m +++ /dev/null @@ -1,156 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{retsys} =} sysscale (@var{sys}, @var{outscale}, @var{inscale}, @var{outname}, @var{inname}) -## scale inputs/outputs of a system. -## -## @strong{Inputs} -## @table @var -## @item sys -## Structured system. -## @item outscale -## @itemx inscale -## Constant matrices of appropriate dimension. -## @item outname -## @itemx inname -## Lists of strings with the names of respectively outputs and inputs. -## @end table -## -## @strong{Output} -## @table @var -## @item retsys -## resulting open loop system: -## @smallexample -## ----------- ------- ----------- -## u --->| inscale |--->| sys |--->| outscale |---> y -## ----------- ------- ----------- -## @end smallexample -## @end table -## If the input names and output names (each a list of strings) -## are not given and the scaling matrices -## are not square, then default names will be given to the inputs and/or -## outputs. -## -## A warning message is printed if outscale attempts to add continuous -## system outputs to discrete system outputs; otherwise @var{yd} is -## set appropriately in the returned value of @var{sys}. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: August 1995 -## modified by John Ingram 7-15-96 - -function sys = sysscale (sys, outscale, inscale, outname, inname) - - if (nargin < 3 || nargin > 5) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a structured system"); - endif - - [nn, nz, mm, pp] = sysdimensions (sys); - - ## check for omitted scales - if (isempty (outscale)) - outscale = eye (pp); - endif - if (isempty (inscale)) - inscale = eye (mm); - endif - - ## check dimensions of scaling matrices - if (mm != rows (inscale)) - error ("inscale(%dx%d) should have %d rows(# system inputs)", - rows (inscale), columns (inscale), mm); - elseif (pp != columns (outscale) ) - error ("outscale(%dx%d) should have %d columns(# system outputs)", - rows (outscale), columns (outscale), pp); - endif - - sysyd = sysgetsignals (sys, "yd"); - outc = find (sysyd == 0); - outd = find (sysyd == 1); - - if (length (outc) > 0 && length (outd) > 0) - for ii = 1:rows(outscale) - nci = norm (outscale (ii, outc)); - ndi = norm (outscale (ii, outd)); - - if (nci > 0 && ndi > 0) - warning ("sysscale: outscale(%d,:) sums continuous and discrete outputs; setting output to cont", - ii) - sysyd(ii) = 0; - else - sysyd(ii) = (ndi != 0); - endif - endfor - else - sysyd = ones (1, rows (outscale)) * (length(outd) > 0); - endif - - ## check for SISO system type - if (strcmp (sysgettype (sys), "tf")) - [num, den, tsam, innam, outnam] = sys2tf (sys); - num = num*inscale*outscale; - sys = tf (num, den, tsam, innam, outnam); - return; - elseif (strcmp (sysgettype (sys), "zp")) - [zer, pol, kk, tsam, innam, outnam] = sys2zp (sys); - kk = kk*inscale*outscale; - sys = zp (zer, pol, k, tsam, innam, outnam); - return; - endif - - ## it's a state space system... - - [sysa, sysb, sysc, sysd, systsam, ... - sysn, sysnz, sysstname, sysinname, sysoutname, oldyd] = sys2ss(sys); - - sysb = sysb*inscale; - sysc = outscale*sysc; - sysd = outscale*sysd*inscale; - - if (! issquare (outscale)) - ## strip extra output names (if any) - sysoutname = sysoutname(1:min(rows(outscale), columns(outscale))); - if (nargin < 4) - warning ("sysscale: outscale not square, outname not specified"); - warning ("sysscale: using default output names"); - outname = __sysdefioname__ (rows (sysc), "y"); - endif - else - outname = sysoutname; - endif - if (! issquare (inscale)) - ## strip extra output names (if any) - sysinname = sysinname(1:min(rows(inscale), columns(inscale))); - if (nargin < 5) - warning ("sysscale: inscale not square, inname not specified"); - warning ("sysscale: using default input names"); - inname = __sysdefioname__ (columns (sysb), "u"); - endif - else - inname = sysgetsignals (sys, "in"); - endif - - sys = ss (sysa, sysb, sysc, sysd, systsam, nn, nz, sysstname, - inname, outname, find (sysyd == 1)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/syssetsignals.m +++ /dev/null @@ -1,244 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} syssetsignals (@var{sys}, @var{opt}, @var{names}, @var{sig_idx}) -## change the names of selected inputs, outputs and states. -## -## @strong{Inputs} -## @table @var -## @item sys -## System data structure. -## -## @item opt -## Change default name (output). -## -## @table @code -## @item "out" -## Change selected output names. -## @item "in" -## Change selected input names. -## @item "st" -## Change selected state names. -## @item "yd" -## Change selected outputs from discrete to continuous or -## from continuous to discrete. -## @end table -## -## @item names -## @table @code -## @item opt = "out", "in", "st" -## string or string array containing desired signal names or values. -## @item opt = "yd" -## To desired output continuous/discrete flag. -## Set name to 0 for continuous, or 1 for discrete. -## @end table -## @item sig_idx -## indices or names of outputs, yd, inputs, or -## states whose respective names/values should be changed. -## -## Default: replace entire cell array of names/entire yd vector. -## @end table -## -## @strong{Outputs} -## @table @var -## @item retsys -## @var{sys} with appropriate signal names changed -## (or @var{yd} values, where appropriate). -## @end table -## -## @strong{Example} -## @example -## octave:1> sys=ss ([1 2; 3 4],[5;6],[7 8]); -## octave:2> sys = syssetsignals (sys, "st", -## > str2mat("Posx","Velx")); -## octave:3> sysout(sys) -## Input(s) -## 1: u_1 -## Output(s): -## 1: y_1 -## state-space form: -## 2 continuous states, 0 discrete states -## State(s): -## 1: Posx -## 2: Velx -## A matrix: 2 x 2 -## 1 2 -## 3 4 -## B matrix: 2 x 1 -## 5 -## 6 -## C matrix: 1 x 2 -## 7 8 -## D matrix: 1 x 1 -## 0 -## @end example -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: August 1996 - -function retsys = syssetsignals (sys, opt, names, sig_idx) - - if (nargin < 3 || nargin > 4) - print_usage (); - elseif (! isstruct (sys)) - error ("sys must be a system data structure"); - elseif (isempty (opt)) - opt = "out"; - elseif (! ischar (opt)) - error ("opt must be a string"); - elseif (! (strcmp (opt, "out") || strcmp (opt, "yd") - || strcmp (opt, "in") || strcmp (opt, "st"))) - error ("opt must be one of [], \"out\", \"yd\", \"in\", or \"st\""); - elseif (nargin == 4) - if (is_signal_list (sig_idx) || ischar (sig_idx)) - ## convert to vector of indices - if (opt == "yd") - sig_idx = sysidx (sys, "out", sig_idx); - else - sig_idx = sysidx (sys, opt, sig_idx); - endif - endif - - ## check index vector - if (min (size (sig_idx)) > 1) - disp ("syssetsignals: sig_idx=") - disp (sig_idx); - error ("sig_idx must be a vector") - endif - endif - - sig_vals = sysgetsignals (sys, opt); - - ## make sure it's in state space form if state names are given - if (strcmp (opt, "st")) - sys = sysupdate (sys, "ss"); - endif - - if (strcmp (opt, "yd") == 0) - ## it's a signal name list we're changing - if (! iscell (names)) - names = {names}; - endif - if (! is_signal_list (names) && ! isempty (names)) - if (ischar (names{1})) - tmpstr = names{1}; - for ii=1:rows(tmpstr) - names{ii} = deblank(tmpstr(ii,:)); - endfor - else - error ("parameter \"names\" must be a cell array of strings"); - endif - endif - nsigs = length (sig_vals); - - if (nargin == 3) - ## replace all signal names - if (length (names) != nsigs) - error ("opt=%s, sig_idx omitted: names(len=%d) should have %d entries ", - opt, length (names), nsigs); - endif - sig_idx = 1:nsigs; - elseif (length (names) != length (sig_idx)) - ## replace specified signal names - error ("opt=%s, sig_idx(len=%d), names(len=%d) mismatch", - opt, length (sig_idx), length (names)); - endif - - for ii = 1:length(sig_idx) - jj = sig_idx(ii); - if (jj < 1 || jj > nsigs || jj != floor (jj+0.5)) - error ("opt=%s, sig_idx(%d)=%d, %e: must be an integer between 1 and %d", - opt, ii, jj, jj, nsigs); - endif - sig_vals{jj} = names{ii}; - endfor - - else - ## update yd - ## 1st check pathological case: no outputs - nout = sysdimensions (sys, "out"); - if (nout == 0) - if (nargin != 3) - error ("opt=%s, %d outputs, sysgetsignals cannot take 4 arguments", - opt, nout); - endif - if (! isempty (names)) - error ("opt=%s, %d outputs, names is not empty", opt, nout); - endif - sigvals = []; - else - nsigs = length (sig_vals); - if (! isvector (names)) - error ("syssetsignals: opt=%s, names(%dx%d) must be a vector", - opt, rows (names), columns (names)); - endif - if (nargin == 3) - if (length (names) != nsigs) - error ("opt=%s, sig_idx omitted: names(%d) should be length(%d)", - opt, length (names), nsigs); - endif - sig_idx = 1:nsigs; - elseif (length(names) != length (sig_idx)) - error ("opt=%s: length(names)=%d, length(sig_idx)=%d", - opt, length (names), length (sig_idx)); - endif - - badidx = find (names != 0 & names != 1); - if (! isempty (badidx)) - for ii = 1:length(badidx) - warning ("syssetsignals: opt=%s: names(%d)=%e, must be 0 or 1", - opt, badidx(ii), names(badidx(ii)) ); - endfor - error ("opt=%s: invalid values in names", opt); - endif - - for ii = 1:length(sig_idx) - jj = sig_idx(ii); - if (jj < 1 || jj > nsigs || jj != floor (jj)) - error ("sig_idx(%d)=%d, %e: must be an integer between 1 and %d", - ii, jj, jj, nsigs); - endif - sig_vals(jj) = names(ii); - endfor - if (any (sig_vals == 1) && sysgettsam (sys) == 0) - warning ("Setting system sampling time to 1"); - printf ("syssetsignals: original system sampling time=0 but output(s)\n"); - disp (find (sig_vals == 1)) - printf ("are digital\n"); - sys = syschtsam (sys, 1); - endif - - endif - endif - - if (strcmp (opt, "st")) - sys.stname = sig_vals; - elseif (strcmp (opt, "in")) - sys.inname = sig_vals; - elseif (strcmp (opt, "out")) - sys.outname = sig_vals; - elseif (strcmp (opt, "yd")) - sys.yd = sig_vals; - endif - - retsys = sys; - -endfunction
deleted file mode 100644 --- a/scripts/control/system/syssub.m +++ /dev/null @@ -1,126 +0,0 @@ -## Copyright (C) 1996, 1999, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{sys} =} syssub (@var{Gsys}, @var{Hsys}) -## Return @math{sys = Gsys - Hsys}. -## -## @strong{Method} -## -## @var{Gsys} and @var{Hsys} are connected in parallel. -## The input vector is connected to both systems; the outputs are -## subtracted. Returned system names are those of @var{Gsys}. -## @example -## @group -## +--------+ -## +--->| Gsys |---+ -## | +--------+ | -## | +| -## u --+ (_)--> y -## | -| -## | +--------+ | -## +--->| Hsys |---+ -## +--------+ -## @end group -## @end example -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 1996 -## updated for variable numbers of input arguments by July 1999 A. S. Hodel - -function sys = syssub (varargin) - - if (nargin < 1) - print_usage (); - endif - - ## collect all arguments - arglist = {}; - for kk = 1:nargin - arglist{kk} = varargin{kk}; - if (! isstruct (arglist{kk})) - error ("syssub: argument %d is not a data structure", kk); - endif - endfor - - ## check system dimensions - [n, nz, mg, pg, Gyd] = sysdimensions (arglist{1}); - for kk = 2:nargin - [n, nz, mh, ph, Hyd] = sysdimensions (arglist{kk}); - if (mg != mh) - error ("arg 1 has %d inputs; arg %d has vs %d inputs", mg, kk, mh); - elseif (pg != ph) - error ("arg 1 has %d outputs; arg %d has vs %d outputs", pg, kk, ph); - elseif (norm (Gyd - Hyd)) - warning ("cannot add a discrete output to a continuous output"); - error ("Output type mismatch: arguments 1 and %d", kk); - endif - endfor - - ## perform the subtract - if (nargin == 2) - Gsys = arglist{1}; - Hsys = arglist{2}; - if (strcmp (sysgettype (Gsys), "tf") || strcmp (sysgettype (Hsys), "tf")) - ## see if subtracting transfer functions with identical denominators - [Gnum, Gden, GT, Gin, Gout] = sys2tf (Gsys); - [Hnum, Hden, HT, Hin, Hout] = sys2tf (Hsys); - if (length (Hden) == length (Gden)) - if ((Hden == Gden) & (HT == GT)) - sys = tf (Gnum-Hnum, Gden, GT, Gin, Gout); - return; - endif - ## if not, we go on and do the usual thing... - endif - endif - - ## make sure in ss form - Gsys = sysupdate (Gsys, "ss"); - Hsys = sysupdate (Hsys, "ss"); - - ## change signal names to avoid warning messages from sysgroup - Gsys = syssetsignals (Gsys, "in", - __sysdefioname__(length(Gin), "Gin_u")); - - Gsys = syssetsignals (Gsys, "out", - __sysdefioname__(length(Gout), "Gout_u")); - - Hsys = syssetsignals (Hsys, "in", - __sysdefioname__(length(Hin), "Hin_u")); - - Hsys = syssetsignals (Hsys, "out", - __sysdefioname__(length(Hout), "Hout_u")); - - sys = sysgroup (Gsys, Hsys); - - eyin = eye (mg); - eyout = eye (pg); - - sys = sysscale (sys, [eyout, -eyout], [eyin; eyin], Gout, Gin); - - else - ## multiple systems (or a single system); combine together one by one - sys = arglist{1}; - for kk = 2:length(arglist) - sys = syssub (sys, arglist{kk}); - endfor - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/sysupdate.m +++ /dev/null @@ -1,124 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} sysupdate (@var{sys}, @var{opt}) -## Update the internal representation of a system. -## -## @strong{Inputs} -## @table @var -## @item sys: -## system data structure -## @item opt -## string: -## @table @code -## @item "tf" -## update transfer function form -## @item "zp" -## update zero-pole form -## @item "ss" -## update state space form -## @item "all" -## all of the above -## @end table -## @end table -## -## @strong{Outputs} -## @table @var -## @item retsys -## Contains union of data in sys and requested data. -## If requested data in @var{sys} is already up to date then @var{retsys}=@var{sys}. -## @end table -## -## Conversion to @command{tf} or @command{zp} exits with an error if the system is -## mixed continuous/digital. -## @seealso{tf, ss, zp, sysout, sys2ss, sys2tf, sys2zp} -## @end deftypefn - -## Author: John Ingram <ingraje@eng.auburn.edu> -## Created: July 9, 1996 - -function sys = sysupdate (sys, opt) - - ## check for correct number of inputs - if (nargin != 2) - print_usage (); - elseif (! isstruct (sys)) - error ("first argument must be system data structure"); - elseif (! (strcmp (opt, "tf") || strcmp (opt, "zp") - || strcmp (opt, "ss") || strcmp (opt, "all"))) - error ("second argument must be \"tf\", \"zp\", \"ss\", or \"all\""); - endif - - ## check to make sure not trying to make a SISO system out of a MIMO sys - if ((strcmp (opt, "tf") || strcmp(opt,"zp") || strcmp (opt, "all")) - && strcmp (sysgettype (sys), "ss") && ! is_siso (sys)) - error ("MIMO -> SISO update requested"); - endif - - ## update transfer function if desired - if ((strcmp (opt, "tf") || strcmp (opt, "all")) && (! sys.sys(2))) - ## check to make sure the system is not discrete and continuous - is_digital (sys); - - ## if original system zero-pole - if (strcmp (sysgettype (sys), "zp")) - [sys.num, sys.den] = zp2tf (sys.zer, sys.pol, sys.k); - sys.sys(2) = 1; - ## if original system is state-space - elseif (sys.sys(1) == 2) - [sys.num, sys.den] = ss2tf (sys.a, sys.b, sys.c, sys.d); - sys.sys(2) = 1; - endif - endif - - - ## update zero-pole if desired - if ((strcmp (opt, "zp") || strcmp (opt, "all")) && ! sys.sys(3)) - ## check to make sure the system is not discrete and continuous - is_digital (sys); - - ## original system is transfer function - if (sys.sys(1) == 0) - [sys.zer, sys.pol, sys.k] = tf2zp (sys.num, sys.den); - sys.sys(3) = 1; - ## original system is state-space - elseif (sys.sys(1) == 2) - [sys.zer, sys.pol, sys.k] = ss2zp (sys.a, sys.b, sys.c, sys.d); - sys.sys(3) = 1; - endif - endif - - ## update state-space if desired - if ((strcmp (opt, "ss") || strcmp (opt, "all")) && ! sys.sys(4)) - ## original system is transfer function - if (sys.sys(1) == 0) - [sys.a, sys.b, sys.c, sys.d] = tf2ss (sys.num, sys.den); - sys.sys(4) = 1; - ## original system is zero-pole - elseif (sys.sys(1) == 1) - [sys.a, sys.b, sys.c, sys.d] = zp2ss (sys.zer, sys.pol, sys.k); - sys.sys(4) = 1; - endif - - ## create new state names - sys.stname = __sysdefstname__ (sys.n, sys.nz); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/tf.m +++ /dev/null @@ -1,149 +0,0 @@ -## Copyright (C) 1996, 1998, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} tf (@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}) -## build system data structure from transfer function format data -## -## @strong{Inputs} -## @table @var -## @item num -## @itemx den -## coefficients of numerator/denominator polynomials -## @item tsam -## sampling interval. default: 0 (continuous time) -## @item inname -## @itemx outname -## input/output signal names; may be a string or cell array with a single string -## entry. -## @end table -## -## @strong{Outputs} -## @var{sys} = system data structure -## -## @strong{Example} -## @example -## octave:1> sys=tf([2 1],[1 2 1],0.1); -## octave:2> sysout(sys) -## Input(s) -## 1: u_1 -## Output(s): -## 1: y_1 (discrete) -## Sampling interval: 0.1 -## transfer function form: -## 2*z^1 + 1 -## ----------------- -## 1*z^2 + 2*z^1 + 1 -## @end example -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 29, 1994 -## Name changed to TF2SYS July 1995 -## updated for new system data structure format July 1996 - -function outsys = tf (num, den, tsam, inname, outname) - - ## Test for the correct number of input arguments - if (nargin < 2 || nargin > 5) - print_usage (); - endif - - ## check input format - if (! ((isvector (num) || isscalar (num)) - && (isvector (den) || isscalar (den)))) - error ("num (%dx%d) and den (%dx%d) must be vectors", - rows (num), columns (num), rows (den), columns (den)); - endif - - ## strip leading zero coefficients - num = __tfl__ (num); - den = __tfl__ (den); - - if (length (num) > length (den)) - error ("# of poles (%d) < # of zeros (%d)", length(den)-1, length(num)-1); - endif - - ## check sampling interval (if any) - if (nargin <= 2) - tsam = 0; # default - elseif (isempty (tsam)) - tsam = 0; - endif - if (! (isscalar (tsam) && imag (tsam) == 0) || tsam < 0) - error ("tsam must be a positive real scalar") - endif - - outsys.num = num; - outsys.den = den; - - ## Set the system vector: active = 0(tf), updated = [1 0 0]; - outsys.sys = [0, 1, 0, 0]; - - ## Set defaults - outsys.tsam = tsam; - outsys.n = length (den) - 1; - outsys.nz = 0; - outsys.yd = 0; # assume discrete-time - ## check discrete time - if (tsam > 0) - [outsys.n, outsys.nz] = swap (outsys.n, outsys.nz); - outsys.yd = 1; - endif - - outsys.inname = __sysdefioname__ (1, "u"); - outsys.outname = __sysdefioname__ (1, "y"); - outsys.stname = __sysdefstname__ (outsys.n, outsys.nz); - - ## Set name of input - if (nargin > 3) - ## make sure it's a cell array of a single string - if (! isempty (inname)) - if (! iscell (inname)) - inname = {inname}; - endif - if (! is_signal_list (inname)) - error ("inname must be a string or cell array of strings"); - endif - if (length (inname) > 1) - warning ("tf: %d input names provided; first used", length (inname)); - inname = inname(1); - endif - outsys = syssetsignals (outsys, "in", inname); - endif - endif - - ## Set name of output - if (nargin > 4) - if (! isempty (outname)) - if (! iscell (outname)) - outname = {outname}; - endif - if (! is_signal_list (outname)) - error ("outname must be a string or a cell array of strings"); - endif - if (length (outname) > 1) - warning ("tf: %d output names provided; first used", length(outname)); - outname = outname(1); - endif - outsys = syssetsignals (outsys, "out", outname); - endif - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/tf2ss.m +++ /dev/null @@ -1,135 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} tf2ss (@var{num}, @var{den}) -## Conversion from transfer function to state-space. -## The state space system: -## @iftex -## @tex -## $$ \dot x = Ax + Bu $$ -## $$ y = Cx + Du $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## . -## x = Ax + Bu -## y = Cx + Du -## @end example -## @end ifinfo -## is obtained from a transfer function: -## @iftex -## @tex -## $$ G(s) = { { \rm num }(s) \over { \rm den }(s) } $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## num(s) -## G(s)=------- -## den(s) -## @end example -## @end ifinfo -## -## The vector @var{den} must contain only one row, whereas the vector -## @var{num} may contain as many rows as there are outputs @var{y} of -## the system. The state space system matrices obtained from this function -## will be in controllable canonical form as described in @cite{Modern Control -## Theory}, (Brogan, 1991). -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: June 22, 1994 -## mod A S Hodel July, Aug 1995 - -function [a, b, c, d] = tf2ss (num, den) - - if (nargin != 2) - print_usage (); - elseif (isempty (num)) - error ("tf2ss: empty numerator"); - elseif (isempty (den)) - error ("tf2ss: empy denominator"); - elseif (! isvector (num)) - error ("num(%dx%d) must be a vector", rows (num), columns (num)); - elseif (! isvector (den)) - error ("den(%dx%d) must be a vector", rows (den), columns (den)); - endif - - ## strip leading zeros from num, den - nz = find (num != 0); - if (isempty (nz)) - num = 0; - else - num = num(nz(1):length(num)); - endif - nz = find (den != 0); - if (isempty (nz)) - error ("denominator is 0."); - else - den = den(nz(1):length(den)); - endif - - ## force num, den to be row vectors - num = vec (num)'; - den = vec (den)'; - nn = length (num); - nd = length (den); - if (nn > nd) - error ("deg(num)=%d > deg(den)= %d", nn, nd); - endif - - ## Check sizes - if (nd == 1) - a = b = c = []; - d = num(:,1) / den(1); - else - ## Pad num so that length(num) = length(den) - if (nd-nn > 0) - num = [zeros(1,nd-nn), num]; - endif - - ## Normalize the numerator and denominator vector w.r.t. the leading - ## coefficient - d1 = den(1); - num = num / d1; - den = den(2:nd)/d1; - sw = nd-1:-1:1; - - ## Form the A matrix - if (nd > 2) - a = [zeros(nd-2,1), eye(nd-2,nd-2); -den(sw)]; - else - a = -den(sw); - endif - - ## Form the B matrix - b = zeros (nd-1, 1); - b(nd-1,1) = 1; - - ## Form the C matrix - c = num(:,2:nd)-num(:,1)*den; - c = c(:,sw); - - ## Form the D matrix - d = num(:,1); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/tf2sys.m +++ /dev/null @@ -1,70 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} tf2sys (@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}) -## Build system data structure from transfer function format data. -## -## @strong{Inputs} -## @table @var -## @item num -## @itemx den -## Coefficients of numerator/denominator polynomials. -## @item tsam -## Sampling interval; default: 0 (continuous time). -## @item inname -## @itemx outname -## Input/output signal names; may be a string or cell array with a single string -## entry. -## @end table -## -## @strong{Output} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Example} -## @example -## octave:1> sys=tf2sys([2 1],[1 2 1],0.1); -## octave:2> sysout(sys) -## Input(s) -## 1: u_1 -## Output(s): -## 1: y_1 (discrete) -## Sampling interval: 0.1 -## transfer function form: -## 2*z^1 + 1 -## ----------------- -## 1*z^2 + 2*z^1 + 1 -## @end example -## @end deftypefn - -## Author: R. Bruce Tenison <btenison@eng.auburn.edu> -## Created: July 29, 1994 -## Name changed to TF2SYS July 1995 -## updated for new system data structure format July 1996 -## name changed to tf Feb 2004 - -function outsys = tf2sys (varargin) - - warning ("tf2sys is deprecated. Use tf instead."); - outsys = tf (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/tf2zp.m +++ /dev/null @@ -1,51 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{zer}, @var{pol}, @var{k}] =} tf2zp (@var{num}, @var{den}) -## Converts transfer functions to poles-and-zero representations. -## -## Returns the zeros and poles of the @acronym{SISO} system defined -## by @var{num}/@var{den}. -## @var{k} is a gain associated with the system zeros. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> - -function [zer, pol, k] = tf2zp (num, den) - - if (nargin == 2) - if (length (den) > 1) - pol = roots (den); - else - pol = []; - endif - - if (length (num) > 1) - zer = roots (num); - else - zer = []; - endif - else - print_usage (); - endif - - k = num(1) / den(1); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/tfout.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} tfout (@var{num}, @var{denom}, @var{x}) -## Print formatted transfer function @math{n(s)/d(s)} to the screen. -## @var{x} defaults to the string @code{"s"} -## @seealso{polyval, polyvalm, poly, roots, conv, deconv, residue, -## filter, polyderiv, polyinteg, polyout} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: June 1995 - -function tfout (num, denom, x) - - if (nargin < 2 || nargin > 3) - print_usage (); - endif - - if (! isvector (num) || ! isvector (denom)) - error ("tfout: first two argument must be vectors"); - endif - - if (nargin == 2) - x = "s"; - elseif (! ischar (x)) - error ("tfout: third argument must be a string"); - endif - - numstring = polyout (num, x); - denomstring = polyout (denom, x); - len = max (length (numstring), length (denomstring)); - if (len > 0) - y = strrep (blanks (len), " ", "-"); - disp (numstring) - disp (y) - disp (denomstring) - else - error ("tfout: empty transfer function") - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/ugain.m +++ /dev/null @@ -1,39 +0,0 @@ -## Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2007 Kai P. Mueller -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} ugain (@var{n}) -## Creates a system with unity gain, no states. -## This trivial system is sometimes needed to create arbitrary -## complex systems from simple systems with @command{buildssic}. -## Watch out if you are forming sampled systems since @command{ugain} -## does not contain a sampling period. -## @seealso{hinfdemo, jet707} -## @end deftypefn - -## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> -## Created: April 1998 - -function outsys = ugain (n) - - if (nargin != 1) - print_usage (); - endif - outsys = ss ([], [], [], eye (n)); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/zp.m +++ /dev/null @@ -1,152 +0,0 @@ -## Copyright (C) 1996, 1998, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} zp (@var{zer}, @var{pol}, @var{k}, @var{tsam}, @var{inname}, @var{outname}) -## Create system data structure from zero-pole data. -## -## @strong{Inputs} -## @table @var -## @item zer -## vector of system zeros -## @item pol -## vector of system poles -## @item k -## scalar leading coefficient -## @item tsam -## sampling period. default: 0 (continuous system) -## @item inname -## @itemx outname -## input/output signal names (lists of strings) -## @end table -## -## @strong{Outputs} -## sys: system data structure -## -## @strong{Example} -## @example -## octave:1> sys=zp([1 -1],[-2 -2 0],1); -## octave:2> sysout(sys) -## Input(s) -## 1: u_1 -## Output(s): -## 1: y_1 -## zero-pole form: -## 1 (s - 1) (s + 1) -## ----------------- -## s (s + 2) (s + 2) -## @end example -## @end deftypefn - -## Modified by John Ingram July 20, 1996 - -function outsys = zp (zer, pol, k, tsam, inname, outname) - - ## Test for the correct number of input arguments - if (nargin < 3 || nargin > 6) - print_usage (); - endif - - ## check input format - if (! (isvector (zer) || isempty (zer))) - error ("zer must be a vector or empty"); - endif - if (! isempty (zer)) - zer = reshape (zer, 1, length (zer)); # make it a row vector - endif - - if (! (isvector (pol) || isempty (pol))) - error ("pol must be a vector"); - endif - if (! isempty (pol)) - pol = reshape (pol, 1, length (pol)); - endif - - if (! isscalar (k)) - error ("k must be a scalar"); - endif - - ## Test proper numbers of poles and zeros. The number of poles must be - ## greater than or equal to the number of zeros. - if (length (zer) > length (pol)) - error ("number of poles (%d) < number of zeros (%d)", - length (pol), length (zer)); - endif - - ## Set the system transfer function - outsys.zer = zer; - outsys.pol = pol; - outsys.k = k; - - ## Set the system vector: active = 1, updated = [0 1 0]; - outsys.sys = [1, 0, 1, 0]; - - ## Set defaults - outsys.tsam = 0; - outsys.n = length (pol); - outsys.nz = 0; - outsys.yd = 0; # assume (for now) continuous time outputs - - ## Set the type of system - if (nargin > 3) - if (! isscalar (tsam)) - error ("tsam must be a nonnegative scalar"); - endif - if (tsam < 0) - error ("sampling time must be positve") - elseif (tsam > 0) - [outsys.n, outsys.nz] = swap (outsys.n, outsys.nz); - outsys.yd = 1; # discrete-time output - endif - - outsys.tsam = tsam; - endif - - outsys.inname = __sysdefioname__ (1, "u"); - outsys.outname = __sysdefioname__ (1, "y"); - outsys.stname = __sysdefstname__ (outsys.n, outsys.nz); - - ## Set name of input - if (nargin > 4) - ## make sure its a string - if (! isempty (inname)) - if (! iscell (inname)) - inname = {inname}; - endif - if (! is_signal_list (inname)) - error ("inname must be a single signal name"); - endif - outsys.inname = inname(1); - endif - endif - - ## Set name of output - if (nargin > 5) - if (! isempty (outname)) - if (! iscell (outname)) - outname = {outname}; - endif - if (! is_signal_list (outname)) - error ("outname must be a single signal name"); - endif - outsys.outname = outname(1); - endif - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/system/zp2ss.m +++ /dev/null @@ -1,158 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} zp2ss (@var{zer}, @var{pol}, @var{k}) -## Conversion from zero / pole to state space. -## -## @strong{Inputs} -## @table @var -## @item zer -## @itemx pol -## Vectors of (possibly) complex poles and zeros of a transfer -## function. Complex values must come in conjugate pairs -## (i.e., @math{x+jy} in @var{zer} means that @math{x-jy} is also in @var{zer}). -## The number of zeros must not exceed the number of poles. -## @item k -## Real scalar (leading coefficient). -## @end table -## -## @strong{Outputs} -## @table @var -## @item @var{a} -## @itemx @var{b} -## @itemx @var{c} -## @itemx @var{d} -## The state space system, in the form: -## @iftex -## @tex -## $$ \dot x = Ax + Bu $$ -## $$ y = Cx + Du $$ -## @end tex -## @end iftex -## @ifinfo -## @example -## . -## x = Ax + Bu -## y = Cx + Du -## @end example -## @end ifinfo -## @end table -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 - -function [a, b, c, d] = zp2ss (zer, pol, k) - - if (nargin != 3) - print_usage (); - endif - - if (! (isvector (zer) || isempty (zer))) - error ("zer(%d,%d) should be a vector", rows (zer), columns (zer)); - elseif (! (isvector (pol) || isempty (pol))) - error ("pol(%d,%d) should be a vector", rows (pol), columns (pol)); - elseif (! isscalar(k)) - error ("k(%d,%d) should be a scalar", rows (k), columns (k)); - elseif (k != real (k)) - warning ("zp2ss: k is complex") - endif - - zpsys = ss (zeros (0, 0), zeros (0, 1), zeros (1, 0), k); - - ## Find the number of zeros and the number of poles - nzer = length (zer); - npol = length (pol); - - if (nzer > npol) - error ("%d zeros, exceeds number of poles=%d", nzer, npol); - endif - - ## Sort to place complex conjugate pairs together - zer = sortcom (zer); - pol = sortcom (pol); - - ## construct the system as a series connection of poles and zeros - ## problem: poles and zeros may come in conjugate pairs, and not - ## matched up! - - ## approach: remove poles/zeros from the list as they are included in - ## the ss system - - while (length (pol)) - - ## search for complex poles, zeros - cpol = []; - czer = []; - if (! isempty (pol)) - cpol = find (imag (pol) != 0); - endif - if (! isempty (zer)) - czer = find (imag (zer) != 0); - endif - - if (isempty (cpol) && isempty (czer)) - pcnt = 1; - else - pcnt = 2; - endif - - num = 1; # assume no zeros left. - switch (pcnt) - case 1 - ## real pole/zero combination - if (length (zer)) - num = [1, -zer(1)]; - zer = zer(2:length(zer)); - endif - den = [1, -pol(1)]; - pol = pol(2:length(pol)); - case 2 - ## got a complex pole or zero, need two roots (if available) - if (length (zer) > 1) - [num, zer] = __zp2ssg2__ (zer); # get two zeros - elseif (length (zer) == 1) - num = [1, -zer]; # use last zero (better be real!) - zer = []; - endif - [den, pol] = __zp2ssg2__ (pol); # get two poles - otherwise - error ("pcnt = %d", pcnt); - endswitch - - ## pack tf into system form and put in series with earlier realization - zpsys1 = tf (num, den, 0, "u", "yy"); - - ## change names to avoid warning messages from sysgroup - zpsys = syssetsignals (zpsys, "in", "u1", 1); - zpsys1 = sysupdate (zpsys1, "ss"); - nn = sysdimensions (zpsys); # working with continuous system - zpsys = syssetsignals (zpsys, "st", __sysdefioname__ (nn, "x")); - nn1 = sysdimensions (zpsys1); - zpsys1 = syssetsignals (zpsys1, "st", __sysdefioname__ (nn1, "xx")); - - zpsys = sysmult (zpsys, zpsys1); - - endwhile - - [a, b, c, d] = sys2ss (zpsys); - -endfunction -
deleted file mode 100644 --- a/scripts/control/system/zp2sys.m +++ /dev/null @@ -1,67 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} zp2sys (@var{zer}, @var{pol}, @var{k}, @var{tsam}, @var{inname}, @var{outname}) -## Create system data structure from zero-pole data. -## -## @strong{Inputs} -## @table @var -## @item zer -## Vector of system zeros. -## @item pol -## Vector of system poles. -## @item k -## Scalar leading coefficient. -## @item tsam -## Sampling period; default: 0 (continuous system). -## @item inname -## @itemx outname -## Input/output signal names (lists of strings). -## @end table -## -## @strong{Output} -## @table @var -## @item sys -## System data structure. -## @end table -## -## @strong{Example} -## @example -## octave:1> sys=zp2sys([1 -1],[-2 -2 0],1); -## octave:2> sysout(sys) -## Input(s) -## 1: u_1 -## Output(s): -## 1: y_1 -## zero-pole form: -## 1 (s - 1) (s + 1) -## ----------------- -## s (s + 2) (s + 2) -## @end example -## @end deftypefn - -## Modified by John Ingram July 20, 1996 - -function outsys = zp2sys ( varargin ) - - warning ("zp2sys is deprecated. Use zp instead."); - outsys = zp (varargin{:}); - -endfunction
deleted file mode 100644 --- a/scripts/control/system/zp2tf.m +++ /dev/null @@ -1,86 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{num}, @var{den}] =} zp2tf (@var{zer}, @var{pol}, @var{k}) -## Converts zeros / poles to a transfer function. -## -## @strong{Inputs} -## @table @var -## @item zer -## @itemx pol -## Vectors of (possibly complex) poles and zeros of a transfer -## function. Complex values must appear in conjugate pairs. -## @item k -## Real scalar (leading coefficient). -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## (With help from students Ingram, McGowan.) - -function [num, den] = zp2tf (zer, pol, k) - - if (nargin != 3) - print_usage (); - endif - - ## Find out whether data was entered as a row or a column vector and - ## convert to a column vector if necessary. - - [rp, cp] = size (pol); - [rz, cz] = size (zer); - - if (! (isvector (zer) || isempty (zer))) - error ("zer(%dx%d) must be a vector", rz, cz); - elseif (! (isvector (pol) || isempty (pol))) - error ("pol(%dx%d) must be a vector", rp, cp); - elseif (length (zer) > length (pol)) - error ("zer(%dx%d) longer than pol(%dx%d)", rz, cz, rp, cp); - endif - - ## initialize converted polynomials - - num = k; - den = 1; - - ## call __zp2ssg2__ if there are complex conjugate pairs left, otherwise - ## construct real zeros one by one. Repeat for poles. - - while (! isempty (zer)) - if (max (abs (imag (zer)))) - [poly, zer] = __zp2ssg2__ (zer); - else - poly = [1, -zer(1)]; - zer = zer(2:length(zer)); - endif - num = conv (num, poly); - endwhile - - while (! isempty (pol)) - if (max (abs (imag (pol)))) - [poly, pol] = __zp2ssg2__ (pol); - else - poly = [1, -pol(1)]; - pol = pol(2:length(pol)); - endif - den = conv (den, poly); - endwhile - -endfunction
deleted file mode 100644 --- a/scripts/control/system/zpout.m +++ /dev/null @@ -1,105 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} zpout (@var{zer}, @var{pol}, @var{k}, @var{x}) -## print formatted zero-pole form to the screen. -## @var{x} defaults to the string @code{"s"} -## @seealso{polyval, polyvalm, poly, roots, conv, deconv, residue, -## filter, polyderiv, polyinteg, polyout} -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: June 1995 - -function zpout (zer, pol, k, x) - - if (nargin < 3 || nargin > 4) - print_usage (); - endif - - if (! (isvector (zer) || isempty (zer)) - || ! (isvector (pol) || isempty(pol))) - error ("zer, pol must be vectors or empty"); - endif - - if (! isscalar(k)) - error("zpout: argument k must be a scalar.") - endif - - if (nargin == 3) - x = "s"; - elseif (! ischar (x)) - error ("zpout: third argument must be a string"); - endif - - numstring = num2str (k); - - if (length (zer)) - ## find roots at z,s = 0 - nzr = sum (zer == 0); - if (nzr) - if (nzr > 1) - numstring = sprintf ("%s %s^%d", numstring, x, nzr); - else - numstring = cstrcat (numstring, x); - endif - endif - zer = sortcom (-zer); - for ii = 1:length(zer) - if (zer(ii) != 0) - numstring = sprintf ("%s (%s %s)", numstring, x, com2str (zer(ii), 1)); - endif - endfor - endif - - if (length (pol)) - ## find roots at z,s = 0 - nzr = sum (pol == 0); - if (nzr) - if (nzr > 1) - denomstring = sprintf("%s^%d", x, nzr); - else - denomstring = sprintf ("%s", x); - endif - else - denomstring = " "; - endif - pol = sortcom (-pol); - for ii = 1:length(pol) - if (pol(ii) != 0) - denomstring = sprintf ("%s (%s %s)", denomstring, x, - com2str (pol(ii), 1)); - endif - endfor - endif - - len = max (length (numstring), length (denomstring)); - if(len > 0) - y = strrep (blanks (len), " ", "-"); - disp (numstring) - if (length (denomstring)) - disp (y) - disp (denomstring) - endif - else - error ("zpout: empty transfer function") - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/util/Makefile.in +++ /dev/null @@ -1,85 +0,0 @@ -# Makefile for octave's scripts/control/util directory -# -# Copyright (C) 2000, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../../.. - -script_sub_dir = control/util - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = __outlist__.m __zgpbal__.m axis2dlim.m prompt.m \ - run_cmd.m sortcom.m strappend.m swap.m zgfmul.m zgfslv.m \ - zginit.m zgreduce.m zgrownorm.m zgscal.m zgsgiv.m zgshsr.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir) -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/control/util/__outlist__.m +++ /dev/null @@ -1,81 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __outlist__ (@var{lmat}, @var{tabchar}, @var{yd}, @var{ilist}) -## Prints an enumerated list of strings. -## internal use only; minimal argument checking performed -## -## @strong{Inputs} -## @table @var -## @item lmat -## list of strings -## @item tabchar -## tab character (default: none) -## @item yd -## indices of strings to append with the string "(discrete)" -## (used by @var{sysout}; minimal checking of this argument) -## @math{yd = []} indicates all outputs are continuous -## @item ilist -## index numbers to print with names. -## -## default: @code{1:rows(lmat)} -## @end table -## -## @strong{Outputs} -## prints the list to the screen, numbering each string in order. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: December 1995 - -function str_val = __outlist__ (name_list, tabchar, yd, ilist) - - if (nargin < 1 || nargin > 4) - print_usage (); - endif - - m = length (name_list); - if (nargin < 4) - ilist = 1:m; - endif - if (nargin == 1) - tabchar = ""; - endif - - if (nargin < 3) - yd = zeros (1, m); - elseif (isempty (yd)) - yd = zeros (1, m); - endif - - str_val = ""; - dstr = {"", " (discrete)"}; - if (m >= 1 && iscell (name_list)) - for ii = 1:m - str_val = sprintf ("%s%s%d: %s%s\n", str_val, tabchar, ilist(ii), - name_list{ii}, dstr{yd(ii)+1}); - endfor - else - str_val = sprintf ("%sNone", tabchar); - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/util/__zgpbal__.m +++ /dev/null @@ -1,113 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## Undocumented internal function. - -## -*- texinfo -*- -## @deftypefn {Function File} {} __zgpbal__ (@var{sys}) -## -## Used internally in @command{tzero}; minimal argument checking performed. -## -## Implementation of zero computation generalized eigenvalue problem -## balancing method (Hodel and Tiller, Allerton Conference, 1991) -## Based on Ward's balancing algorithm (@acronym{SIAM} J. Sci Stat. Comput., 1981). -## -## @command{__zgpbal__} computes a state/input/output weighting that attempts to -## reduced the range of the magnitudes of the nonzero elements of [@var{a}, @var{b}, -## @var{c}, @var{d}]. -## The weighting uses scalar multiplication by powers of 2, so no roundoff -## will occur. -## -## @command{__zgpbal__} should be followed by @command{zgpred}. -## @end deftypefn - -## References: -## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to LAA -## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989 - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 24, 1992 -## Conversion to Octave by R. Bruce Tenison July 3, 1994 - -function retsys = __zgpbal__ (Asys) - - if (nargin != 1 || ! isstruct (Asys)) - print_usage (); - endif - - Asys = sysupdate (Asys, "ss"); - [a, b, c, d] = sys2ss (Asys); - - [nn, mm, pp] = abcddim (a, b, c, d); - - np1 = nn+1; - nmp = nn+mm+pp; - - ## set up log vector zz, incidence matrix ff - zz = zginit (a, b, c, d); - - ## disp("__zgpbal__: zginit returns") - ## zz - ## disp("/__zgpbal__") - - if (norm (zz)) - ## generalized conjugate gradient approach - xx = zgscal (a, b, c, d, zz, nn, mm, pp); - - for i = 1:nmp - xx(i) = floor (xx(i)+0.5); - xx(i) = 2.0^xx(i); - endfor - - ## now scale a - ## block 1: a = sigma a inv(sigma) - for i = 1:nn - a(i,1:nn) = a(i,1:nn)*xx(i); - a(1:nn,i) = a(1:nn,i)/xx(i); - endfor - ## block 2: b= sigma a phi - for j = 1:mm - j1 = j+nn; - b(1:nn,j) = b(1:nn,j)*xx(j1); - endfor - for i = 1:nn - b(i,1:mm) = b(i,1:mm)*xx(i); - endfor - for i = 1:pp - i1 = i+nn+mm; - ## block 3: c = psi C inv(sigma) - c(i,1:nn) = c(i,1:nn)*xx(i1); - endfor - for j = 1:nn - c(1:pp,j) = c(1:pp,j)/xx(j); - endfor - ## block 4: d = psi D phi - for j = 1:mm - j1 = j+nn; - d(1:pp,j) = d(1:pp,j)*xx(j1); - endfor - for i = 1:pp - i1 = i + nn + mm; - d(i,1:mm) = d(i,1:mm)*xx(i1); - endfor - endif - - retsys = ss (a, b, c, d); - -endfunction
deleted file mode 100644 --- a/scripts/control/util/axis2dlim.m +++ /dev/null @@ -1,72 +0,0 @@ -## Copyright (C) 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} axis2dlim (@var{axdata}) -## Determine axis limits for 2-D data (column vectors); leaves a 10% -## margin around the plots. -## Inserts margins of +/- 0.1 if data is one-dimensional -## (or a single point). -## -## @strong{Input} -## @table @var -## @item axdata -## @var{n} by 2 matrix of data [@var{x}, @var{y}]. -## @end table -## -## @strong{Output} -## @table @var -## @item axvec -## Vector of axis limits appropriate for call to @command{axis} function. -## @end table -## @end deftypefn - -function axvec = axis2dlim (axdata) - - if (nargin < 1 || isempty (axdata)) - axdata = 0; - endif - - ## compute axis limits - minv = min (axdata); - maxv = max (axdata); - delv = (maxv-minv)/2; # breadth of the plot - midv = (minv + maxv)/2; # midpoint of the plot - axmid = [midv(1), midv(1), midv(2), midv(2)]; - axdel = [-0.1, 0.1, -0.1, 0.1]; # default plot width (if less than 2-d data) - if (max (delv) == 0) - if (midv(1) != 0) - axdel(1:2) = [-0.1*midv(1), 0.1*midv(1)]; - endif - if (midv(2) != 0) - axdel(3:4) = [-0.1*midv(2), 0.1*midv(2)]; - endif - else - ## they're at least one-dimensional - tolv = max(1e-8, 1e-8*abs(midv)); - if (abs (delv(1)) >= tolv(1)) - axdel(1:2) = 1.1*[-delv(1),delv(1)]; - endif - if (abs (delv(2)) >= tolv(2)) - axdel(3:4) = 1.1*[-delv(2),delv(2)]; - endif - endif - axvec = axmid + axdel; - -endfunction
deleted file mode 100644 --- a/scripts/control/util/prompt.m +++ /dev/null @@ -1,52 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} prompt (@var{str}) -## Prompt user to continue -## -## @strong{Input} -## @table @var -## @item str -## Input string. Its default value is: -## @example -## \n ---- Press a key to continue --- -## @end example -## @end table -## @end deftypefn - -## Author: David Clem -## Created: August 15, 1994 -## Modified A. S. Hodel June 1995 - -function prompt (str) - - if (nargin > 1) - print_usage (); - elseif (nargin == 0) - str = "\n ---- Press a key to continue ---"; - elseif (! ischar (str)) - error ("prompt: input must be a string"); - endif - - disp (str); - fflush (stdout); - kbhit (); - -endfunction
deleted file mode 100644 --- a/scripts/control/util/run_cmd.m +++ /dev/null @@ -1,31 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2003, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## run_cmd: short script used in demos -## prints string cmd to the screen, then executes after a pause - -disp (["Command: ", cmd]) -puts ("Press a key to execute command"); -fflush (stdout); -kbhit (); -disp (" executing"); -fflush (stdout); -eval (cmd); -disp ("---") -disp (" ")
deleted file mode 100644 --- a/scripts/control/util/sortcom.m +++ /dev/null @@ -1,104 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{yy}, @var{idx}] =} sortcom (@var{xx}[, @var{opt}]) -## Sort a complex vector. -## -## @strong{Inputs} -## @table @var -## @item xx -## Complex vector -## @item opt -## sorting option: -## @table @code -## @item "re" -## Real part (default); -## @item "mag" -## By magnitude; -## @item "im" -## By imaginary part. -## @end table -## if @var{opt} is not chosen as @code{"im"}, then complex conjugate pairs are grouped together, -## @math{a - jb} followed by @math{a + jb}. -## @end table -## -## @strong{Outputs} -## @table @var -## @item yy -## Sorted values -## @item idx -## Permutation vector: @code{yy = xx(idx)} -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: June 1995 - -function [yy, idx] = sortcom (xx, opt) - - if (nargin < 1 || nargin > 2) - print_usage (); - elseif (! (isvector (xx) || isempty (xx))) - error ("sortcom: first argument must be a vector"); - endif - - if (nargin == 1) - opt = "re"; - else - if (! ischar (opt)) - error ("sortcom: second argument must be a string"); - endif - endif - - if (isempty (xx)) - yy = idx = []; - else - if (strcmp (opt, "re")) - datavec = real (xx); - elseif (strcmp (opt, "im")) - datavec = imag (xx); - elseif (strcmp (opt, "mag")) - datavec = abs (xx); - else - error ("sortcom: invalid option = %s", opt); - endif - - [datavec, idx] = sort (datavec); - yy= xx(idx); - - if (strcmp (opt, "re") || strcmp (opt, "mag")) - ## sort so that complex conjugate pairs appear together - - ddiff = diff (datavec); - zidx = find (ddiff == 0); - - ## sort common datavec values - if (! isempty (zidx)) - for iv = create_set (datavec(zidx)) - vidx = find (datavec == iv); - [vals, imidx] = sort (imag (yy(vidx))); - yy(vidx) = yy(vidx(imidx)); - idx(vidx) = idx(vidx(imidx)); - endfor - endif - endif - endif -endfunction -
deleted file mode 100644 --- a/scripts/control/util/strappend.m +++ /dev/null @@ -1,41 +0,0 @@ -## Copyright (C) 1998, 2000, 2004, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} strappend (@var{strlist}, @var{suffix}) -## Append string @var{suffix} to each string in the list @var{strlist}. -## @end deftypefn - -function retval = strappend (strlist, suffix); - - if (nargin != 2) - print_usage (); - elseif (! is_signal_list (strlist)) - error ("strlist must be a list of strings (see is_signal_list)"); - elseif (! (ischar (suffix) && rows (suffix) == 1)) - error ("suffix must be a single string"); - endif - - retval = {}; - - for ii = 1:length (strlist) - retval{ii} = sprintf ("%s%s", strlist{ii}, suffix); - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/util/swap.m +++ /dev/null @@ -1,42 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} swap (@var{inputs}) -## @format -## [a1,b1] = swap(a,b) -## interchange a and b -## @end format -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 24, 1992 -## Conversion to Octave R. Bruce Tenison July 4, 1994 - -function [a1, b1] = swap (a, b) - - if (nargin != 2) - print_usage (); - endif - - a1 = b; - b1 = a; - -endfunction -
deleted file mode 100644 --- a/scripts/control/util/zgfmul.m +++ /dev/null @@ -1,104 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{y} =} zgfmul (@var{a}, @var{b}, @var{c}, @var{d}, @var{x}) -## Compute product of @var{zgep} incidence matrix @math{F} with vector @var{x}. -## Used by @command{zgepbal} (in @command{zgscal}) as part of generalized conjugate gradient -## iteration. -## @end deftypefn - -## References: -## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to LAA -## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989 - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Conversion to Octave July 3, 1994 - -function y = zgfmul (a, b, c, d, x) - - if (nargin != 5) - print_usage (); - endif - - [n, m] = size (b); - [p, m1] = size (c); - nm = n+m; - y = zeros (nm+p, 1); - - ## construct F column by column - for jj = 1:n - Fj = zeros (nm+p, 1); - - ## rows 1:n: F1 - aridx = complement (jj, find (a(jj,:) != 0)); - acidx = complement (jj, find (a(:,jj) != 0)); - bidx = find (b(jj,:) != 0); - cidx = find (c(:,jj) != 0); - - Fj(aridx) = Fj(aridx) - 1; # off diagonal entries of F1 - Fj(acidx) = Fj(acidx) - 1; - ## diagonal entry of F1 - Fj(jj) = length (aridx) + length (acidx) + length (bidx) + length (cidx); - - ## B' incidence - if (! isempty (bidx)) - Fj(n+bidx) = 1; - endif - - ## -C incidence - if (! isempty (cidx)) - Fj(n+m+cidx) = -1; - endif - y = y + x(jj)*Fj; # multiply by corresponding entry of x - endfor - - for jj = 1:m - Fj = zeros (nm+p, 1); - bidx = find (b(:,jj) != 0); - ## B incidence - if (! isempty (bidx)) - Fj(bidx) = 1; - endif - didx = find (d(:,jj) != 0); - ## D incidence - if (! isempty (didx)) - Fj(n+m+didx) = 1; - endif - Fj(n+jj) = length(bidx) + length(didx); # F2 is diagonal - y = y + x(n+jj)*Fj; # multiply by corresponding entry of x - endfor - - for jj = 1:p - Fj = zeros (nm+p, 1); - cidx = find (c(jj,:) != 0); - ## -C' incidence - if (! isempty (cidx)) - Fj(cidx) = -1; - endif - didx = find(d(jj,:) != 0); - ## D' incidence - if (! isempty (didx)) - Fj(n+didx) = 1; - endif - Fj(n+m+jj) = length (cidx) + length (didx); # F2 is diagonal - y = y + x(n+m+jj)*Fj; # multiply by corresponding entry of x - endfor - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgfslv.m +++ /dev/null @@ -1,82 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} zgfslv (@var{n}, @var{m}, @var{p}, @var{b}) -## Solve system of equations for dense zgep problem. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Converted to Octave by R Bruce Tenison, July 3, 1994 - -function x = zgfslv (n, m, p, b) - - if (nargin != 4) - print_usage (); - endif - - nmp = n+m+p; - gam1 = (2*n)+m+p; - gam2 = n+p; - gam3 = n+m; - - G1 = givens (sqrt (m), -sqrt (p))'; - G2 = givens (m+p, sqrt (n*(m+p)))'; - - x = b; - - ## 1) U1 e^n = sqrt(n)e_1^n - ## 2) U2 e^m = sqrt(m)e_1^m - ## 3) U3 e^p = sqrt(p)e_1^p - xdx1 = 1:n; - xdx2 = n+(1:m); - xdx3 = n+m+(1:p); - - x(xdx1,1) = zgshsr (x(xdx1,1)); - x(xdx2,1) = zgshsr (x(xdx2,1)); - x(xdx3,1) = zgshsr (x(xdx3,1)); - - ## 4) Givens rotations to reduce stray non-zero elements - idx1 = [n+1, n+m+1]; - idx2 = [1, n+1]; - - x(idx1) = G1'*x(idx1); - x(idx2) = G2'*x(idx2); - - ## 6) Scale x, then back-transform to get x - en = ones (n, 1); - em = ones (m, 1); - ep = ones (p, 1); - lam = [gam1*en; gam2*em; gam3*ep]; - lam(1) = n+m+p; - lam(n+1) = 1; # dummy value to avoid divide by zero - lam(n+m+1) = n+m+p; - - x = x ./ lam; - x(n+1) = 0; # minimum norm solution - - ## back transform now. - x(idx2) = G2*x(idx2); - x(idx1) = G1*x(idx1); - x(xdx3,1) = zgshsr (x(xdx3,1)); - x(xdx2,1) = zgshsr (x(xdx2,1)); - x(xdx1,1) = zgshsr (x(xdx1,1)); - -endfunction -
deleted file mode 100644 --- a/scripts/control/util/zginit.m +++ /dev/null @@ -1,98 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{zz} =} zginit (@var{a}, @var{b}, @var{c}, @var{d}) -## Construct right hand side vector @var{zz} -## for the zero-computation generalized eigenvalue problem -## balancing procedure. Called by @command{zgepbal}. -## @end deftypefn - -## References: -## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to LAA -## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989 - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 24, 1992 -## Conversion to Octave by R. Bruce Tenison, July 3, 1994 - -function zz = zginit (a, b, c, d) - - if (nargin != 4) - print_usage (); - endif - - [nn, mm] = size (b); - [pp, mm] = size (d); - - nmp = nn+mm+pp; - - ## set up log vector zz - zz = zeros (nmp, 1); - - ## zz part 1: - for i = 1:nn - ## nonzero off diagonal entries of a - if (nn > 1) - nidx = complement (i, 1:nn); - a_row_i = a(i,nidx); - a_col_i = a(nidx,i); - arnz = a_row_i(find (a_row_i != 0)); - acnz = a_col_i(find (a_col_i != 0)); - else - arnz = acnz = []; - endif - - ## row of b - bidx = find (b(i,:) != 0); - b_row_i = b(i,bidx); - - ## column of c - cidx = find (c(:,i) != 0); - c_col_i = c(cidx,i); - - ## sum the entries - zz(i) = sum (log (abs (acnz))) - sum (log (abs (arnz))) ... - - sum (log (abs (b_row_i))) + sum (log (abs (c_col_i))); - endfor - - ## zz part 2: - bd = [b; d]; - for i = 1:mm - i1 = i+nn; - - ## column of [b;d] - bdidx = find (bd(:,i) != 0); - bd_col_i = bd(bdidx,i); - zz(i1) = sum (log (abs(bd_col_i))); - endfor - - ## zz part 3: - cd = [c, d]; - for i = 1:pp - i1 = i+nn+mm; - cdidx = find (cd(i,:) != 0); - cd_row_i = cd(i,cdidx); - zz(i1) = -sum (log (abs (cd_row_i))); - endfor - - ## now set zz as log base 2 - zz *= (1 / log (2)); - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgreduce.m +++ /dev/null @@ -1,147 +0,0 @@ -## Copyright (C) 1996, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} zgreduce (@var{sys}, @var{meps}) -## Implementation of procedure REDUCE in (Emami-Naeini and Van Dooren, -## Automatica, # 1982). -## @end deftypefn - -function retsys = zgreduce (Asys, meps) - - if (nargin != 2) - print_usage (); - endif - - ## SYS_INTERNAL accesses members of system data structure - - is_digital (Asys); # make sure it's pure digital/continuous - - exit_1 = 0; # exit_1 = 1 or 2 on exit of loop - - if (Asys.n + Asys.nz == 0) - exit_1 = 2; # there are no finite zeros - endif - - while (! exit_1) - [Q, R, Pi] = qr (Asys.d); # compress rows of D - Asys.d = Q'*Asys.d; - Asys.c = Q'*Asys.c; - - ## check row norms of Asys.d - [sig, tau] = zgrownorm (Asys.d, meps); - - ## disp("=======================================") - ## disp(["zgreduce: meps=",num2str(meps), ", sig=",num2str(sig), ... - ## ", tau=",num2str(tau)]) - ## sysout(Asys) - - if (tau == 0) - exit_1 = 1; # exit_1 - reduction complete and correct - else - Cb = Db = []; - if (sig) - Cb = Asys.c(1:sig,:); - Db = Asys.d(1:sig,:); - endif - Ct = Asys.c(sig+(1:tau),:); - - ## compress columns of Ct - [pp, nn] = size (Ct); - rvec = nn:-1:1; - [V, Sj, Pi] = qr (Ct'); - V = V(:,rvec); - [rho, gnu] = zgrownorm (Sj, meps); - - ## disp(["zgreduce: rho=",num2str(rho),", gnu=",num2str(gnu)]) - ## Cb - ## Db - ## Ct - ## Sj' - - if (rho == 0) - exit_1 = 1; # exit_1 - reduction complete and correct - elseif (gnu == 0) - exit_1 = 2; # there are no zeros at all - else - mu = rho + sig; - - ## update system with Q - M = [Asys.a, Asys.b ]; - [nn, mm] = size (Asys.b); - - pp = rows(Asys.d); - Vm =[V, zeros(nn,mm); zeros(mm,nn), eye(mm)]; - if (sig) - M = [M; Cb, Db]; - Vs =[V', zeros(nn,sig); zeros(sig,nn), eye(sig)]; - else - Vs = V'; - endif - ## disp("zgreduce: before transform: M="); - ## M - ## Vs - ## Vm - - M = Vs*M*Vm; - - ## disp("zgreduce: after transform: M="); - ## M - - ## disp("debugging code:") - ## Mtmp = [Asys.a Asys.b; Asys.c Asys.d] - ## Vl = [V', zeros(nn,mm); zeros(mm,nn),Q] - ## Vr =[V,zeros(nn,mm) ; zeros(mm,nn), eye(mm)]; - ## Mtmpf = Vl*Mtmp*Vr - - idx = 1:gnu; - jdx = nn + (1:mm); - sdx = gnu + (1:mu); - - Asys.a = M(idx,idx); - Asys.b = M(idx,jdx); - Asys.c = M(sdx,idx); - Asys.d = M(sdx,jdx); - - ## disp(["zgreduce: resulting system: nn =",num2str(nn)," mu=",num2str(mu)]) - ## sysout(Asys) - ## idx - ## jdx - ## sdx - endif - endif - endwhile - - ## disp(["zgreduce: while loop done: exit_1=",num2str(exit_1)]); - - if (exit_1 == 2) - ## there are no zeros at all! - Asys.a = Asys.b = Asys.c = []; - endif - - ## update dimensions - if (is_digital (Asys)) - Asys.nz = rows (Asys.a); - else - Asys.n = rows (Asys.a); - endif - - retsys = Asys; - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgrownorm.m +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (C) 1996, 2000, 2003, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{nonz}, @var{zer}] =} zgrownorm (@var{mat}, @var{meps}) -## Return @var{nonz} = number of rows of @var{mat} whose two norm -## exceeds @var{meps}, and @var{zer} = number of rows of mat whose two -## norm is less than @var{meps}. -## @end deftypefn - -function [sig, tau] = zgrownorm (mat, meps) - - if (nargin != 2) - print_usage (); - endif - - rownorm = []; - for ii = 1:rows (mat) - rownorm(ii) = norm (mat(ii,:)); - endfor - sig = sum (rownorm > meps); - tau = sum (rownorm <= meps); - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgscal.m +++ /dev/null @@ -1,153 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{x} =} zgscal (@var{f}, @var{z}, @var{n}, @var{m}, @var{p}) -## Generalized conjugate gradient iteration to -## solve zero-computation generalized eigenvalue problem balancing equation -## @math{fx=z}; called by @command{zgepbal}. -## @end deftypefn - -## References: -## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to LAA -## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989 - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 24, 1992 -## Conversion to Octave R. Bruce Tenison July 3, 1994 - -function x = zgscal (a, b, c, d, z, n, m, p) - - if (nargin != 8) - print_usage (); - endif - - ## initialize parameters: - ## Givens rotations, diagonalized 2x2 block of F, gcg vector initialization - - nmp = n+m+p; - - ## x_0 = x_{-1} = 0, r_0 = z - x = zeros (nmp, 1); - xk1 = x; - xk2 = x; - rk1 = z; - k = 0; - - ## construct balancing least squares problem - F = eye (nmp); - for kk = 1:nmp - F(1:nmp,kk) = zgfmul (a, b, c, d, F(:,kk)); - endfor - - [U, H, k1] = krylov (F, z, nmp, 1e-12, 1); - if (! issquare (H)) - if (columns (H) != k1) - error ("zgscal(tzero): k1=%d, columns(H)=%d", k1, columns (H)); - elseif (rows (H) != k1+1) - error ("zgscal: k1=%d, rows(H) = %d", k1, rows (H)); - elseif (norm (H(k1+1,:)) > 1e-12*norm (H, "inf")) - zgscal_last_row_of_H = H(k1+1,:) - error ("zgscal: last row of H nonzero (norm(H)=%e)", norm (H, "inf")) - endif - H = H(1:k1,1:k1); - U = U(:,1:k1); - endif - - ## tridiagonal H can still be rank deficient, so do permuted qr - ## factorization - [qq, rr, pp] = qr (H); # H = qq*rr*pp' - nn = rank (rr); - qq = qq(:,1:nn); - rr = rr(1:nn,:); # rr may not be square, but "\" does least - xx = U*pp*(rr\qq'*(U'*z)); # squares solution, so this works - ## xx1 = pinv(F)*z; - ## zgscal_x_xx1_err = [xx,xx1,xx-xx1] - return; - - ## the rest of this is left from the original zgscal; - ## I've had some numerical problems with the GCG algorithm, - ## so for now I'm solving it with the krylov routine. - - ## initialize residual error norm - rnorm = norm (rk1, 1); - - xnorm = 0; - fnorm = 1e-12 * norm ([a, b; c, d], 1); - - gamk2 = 0; - omega1 = 0; - ztmz2 = 0; - - ## do until small changes to x - len_x = length(x); - while ((k < 2*len_x && xnorm > 0.5 && rnorm > fnorm) || k == 0) - k++; - - ## solve F_d z_{k-1} = r_{k-1} - zk1= zgfslv (n, m, p, rk1); - - ## Generalized CG iteration - ## gamk1 = (zk1'*F_d*zk1)/(zk1'*F*zk1); - ztMz1 = zk1'*rk1; - gamk1 = ztMz1/(zk1'*zgfmul (a, b, c, d, zk1)); - - if (rem (k, len_x) == 1) - omega = 1; - else - omega = 1/(1-gamk1*ztMz1/(gamk2*omega1*ztmz2)); - endif - - ## store x in xk2 to save space - xk2 = xk2 + omega*(gamk1*zk1 + xk1 - xk2); - - ## compute new residual error: rk = z - F xk, check end conditions - rk1 = z - zgfmul (a, b, c, d, xk2); - rnorm = norm (rk1); - xnorm = max (abs (xk1 - xk2)); - - ## printf("zgscal: k=%d, gamk1=%e, gamk2=%e, \nztMz1=%e ztmz2=%e\n", ... - ## k,gamk1, gamk2, ztMz1, ztmz2); - ## xk2_1_zk1 = [xk2 xk1 zk1] - ## ABCD = [a,b;c,d] - ## prompt - - ## get ready for next iteration - gamk2 = gamk1; - omega1 = omega; - ztmz2 = ztMz1; - [xk1, xk2] = swap (xk1, xk2); - endwhile - x = xk2; - - ## check convergence - if (xnorm> 0.5 && rnorm > fnorm) - warning ("zgscal(tzero): GCG iteration failed; solving with pinv"); - - ## perform brute force least squares; construct F - Am = eye (nmp); - for ii = 1:nmp - Am(:,ii) = zgfmul (a, b, c, d, Am(:,ii)); - endfor - - ## now solve with qr factorization - x = pinv (Am) * z; - endif - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgsgiv.m +++ /dev/null @@ -1,42 +0,0 @@ -## Copyright (C) 1996, 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[a, b] =} zgsgiv (@var{c}, @var{s}, @var{a}, @var{b}) -## Apply givens rotation c,s to row vectors @var{a}, @var{b}. -## No longer used in zero-balancing (__zgpbal__); kept for backward -## compatibility. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 29, 1992 -## Convertion to Octave by R. Bruce Tenison July 3, 1994 - -function [a, b] = zgsgiv (c, s, a, b) - - if (nargin != 4) - print_usage (); - endif - - t1 = c*a + s*b; - t2 = -s*a + c*b; - a = t1; - b = t2; - -endfunction
deleted file mode 100644 --- a/scripts/control/util/zgshsr.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1996, 2000, 2002, 2003, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {@var{x} =} zgshsr (@var{y}) -## Apply householder vector based on -## @iftex -## @tex -## $ e^m $ -## @end tex -## @end iftex -## @ifinfo -## @math{e^(m)} -## @end ifinfo -## to column vector @var{y}. -## Called by @command{zgfslv}. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Created: July 24, 1992 -## Conversion to Octave by R. Bruce Tenison July 3, 1994 - -function x = zgshsr (y) - - if (nargin != 1) - print_usage (); - endif - - if (! isvector (y)) - error ("y(%dx%d) must be a vector", rows (y), columns (y)); - endif - x = vec (y); - m = length (x); - if (m > 1) - beta = (1 + sqrt (m)) * x(1) + sum (x(2:m)); - beta /= (m + sqrt (m)); - x(1) -= (beta * (1 + sqrt (m))); - x(2:m) -= (beta * ones (m-1,1)); - else - x = -x; - endif - -endfunction
deleted file mode 100644 --- a/scripts/finance/Makefile.in +++ /dev/null @@ -1,83 +0,0 @@ -# Makefile for octave's scripts/finance directory -# -# Copyright (C) 1999, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../.. - -script_sub_dir = finance - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = fv.m fvl.m irr.m nper.m npv.m pmt.m pv.m pvl.m rate.m vol.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../`cat ../../.fname`/scripts/finance -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/finance/fv.m +++ /dev/null @@ -1,82 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007 -## Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} fv (@var{r}, @var{n}, @var{p}, @var{l}, @var{method}) -## Return the future value at the end of period @var{n} of an investment -## which consists of @var{n} payments of @var{p} in each period, -## assuming an interest rate @var{r}. -## -## The optional argument @var{l} may be used to specify an -## additional lump-sum payment. -## -## The optional argument @var{method} may be used to specify whether the -## payments are made at the end (@code{"e"}, default) or at the -## beginning (@code{"b"}) of each period. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Future value of an investment - -function v = fv (r, n, p, l, m) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - if (! (isscalar (r) && r > -1)) - error ("fv: r must be a scalar > -1"); - elseif (! (isscalar (n) && n > 0)) - error ("fv: n must be a positive scalar"); - elseif (! isscalar (p)) - error ("fv: p must be a scalar"); - endif - - if (r != 0) - v = p * ((1 + r)^n - 1) / r; - else - v = p * n; - endif - - if (nargin > 3) - if (nargin == 5) - if (! ischar (m)) - error ("fv: `method' must be a string"); - endif - elseif ischar (l) - m = l; - l = 0; - else - m = "e"; - endif - if strcmp (m, "b") - v = v * (1 + r); - endif - if isscalar (l) - v = v + fvl (r, n, l); - else - error ("fv: l must be a scalar"); - endif - endif - -endfunction -
deleted file mode 100644 --- a/scripts/finance/fvl.m +++ /dev/null @@ -1,49 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007 -## Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} fvl (@var{r}, @var{n}, @var{l}) -## Return the future value at the end of @var{n} periods of an initial -## lump sum investment @var{l}, given a per-period interest rate -## @var{r}. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Future value of an initial lump sum investment - -function v = fvl (r, n, l) - - if (nargin != 3) - print_usage (); - endif - - if (! (isscalar (r) && r > -1)) - error ("fvl: r has to be a scalar > -1"); - elseif (! (isscalar (n) && n > 0)) - error ("fvl: n has to be a positive scalar"); - elseif (! isscalar (l)) - error ("fvl: l has to be a scalar"); - endif - - v = l * (1 + r)^n; - -endfunction \ No newline at end of file
deleted file mode 100644 --- a/scripts/finance/irr.m +++ /dev/null @@ -1,52 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006, -## 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} irr (@var{p}, @var{i}) -## Return the internal rate of return of a series of payments @var{p} -## from an initial investment @var{i} (i.e., the solution of -## @code{npv (r, p) = i}. If the second argument is omitted, a value of -## 0 is used. -## @seealso{npv, pv, rate} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Internal rate of return of an investment - -function r = irr (p, i) - - if (nargin == 1) - i = 0; - elseif (! (nargin == 2)) - print_usage (); - endif - - if (! (isvector (p))) - error ("irr: p must be a vector"); - else - p_string = cstrcat ("[", sprintf ("%.15f, ", p), "]"); - endif - - if (! isscalar (i)) - error ("irr: i must be a scalar"); - endif - - r = fsolve (sprintf ("npv (x, %s) - %g", p_string, i), 0.01); - -endfunction
deleted file mode 100644 --- a/scripts/finance/nper.m +++ /dev/null @@ -1,83 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006, -## 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} nper (@var{r}, @var{p}, @var{a}, @var{l}, @var{method}) -## Return the number of regular payments of @var{p} necessary to -## amortize @var{a} loan of amount @var{a} and interest @var{r}. -## -## The optional argument @var{l} may be used to specify an additional -## lump-sum payment of @var{l} made at the end of the amortization time. -## -## The optional argument @var{method} may be used to specify whether -## payments are made at the end (@var{"e"}, default) or at the beginning -## (@var{"b"}) of each period. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @seealso{pv, pmt, rate, npv} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Number of payments needed for amortizing a loan - -function n = nper (r, p, a, l, m) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - if (! (isscalar (r) && r > -1)) - error ("nper: r must be a scalar > -1"); - elseif (! isscalar (p)) - error ("nper: p must be a scalar"); - elseif (! isscalar (a)) - error ("nper: a must be a scalar"); - endif - - if (nargin == 5) - if (! ischar (m)) - error ("nper: `method' must be a string"); - endif - elseif (nargin == 4) - if (ischar (l)) - m = l; - l = 0; - else - m = "e"; - endif - else - m = "e"; - l = 0; - endif - - if (strcmp (m, "b")) - p = p * (1 + r); - endif - - q = (p - r * a) / (p - r * l); - - if (q > 0) - n = - log (q) / log (1 + r); - else - n = Inf; - endif - -endfunction -
deleted file mode 100644 --- a/scripts/finance/npv.m +++ /dev/null @@ -1,74 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2005, -## 2006, 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} npv (@var{r}, @var{p}, @var{i}) -## Returns the net present value of a series of irregular (i.e., not -## necessarily identical) payments @var{p} which occur at the ends of @var{n} -## consecutive periods. @var{r} specifies the one-period interest rates and -## can either be a scalar (constant rates) or a vector of the same -## length as @var{p}. -## -## The optional argument @var{i} may be used to specify an initial -## investment. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @seealso{irr, pv} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Net present value of a series of payments - -function v = npv (r, p, i) - - if (nargin < 2 || nargin > 3) - print_usage (); - endif - - if (! (isvector (p))) - error ("npv: p has to be a vector"); - else - n = length (p); - p = reshape (p, 1, n); - endif - - if (any (any (r <= -1))) - error ("npv: all interest rates must be > -1"); - endif - if (isscalar (r)) - d = 1 ./ (1 + r) .^ (0 : n); - elseif (isvector (r) && (length (r) == n)) - d = [1, (1 ./ cumprod (reshape (1 + r, 1, n)))]; - else - error ("npv: r must be a scalar or a vector of the same length as p"); - endif - - if (nargin == 3) - if (! isscalar (i)) - error ("npv: I_0 must be a scalar"); - endif - else - i = 0; - endif - - p = [i, p]; - v = sum (d .* p); - -endfunction
deleted file mode 100644 --- a/scripts/finance/pmt.m +++ /dev/null @@ -1,78 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, -## 2006, 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} pmt (@var{r}, @var{n}, @var{a}, @var{l}, @var{method}) -## Return the amount of periodic payment necessary to amortize a loan -## of amount a with interest rate @var{r} in @var{n} periods. -## -## The optional argument @var{l} may be used to specify a terminal -## lump-sum payment. -## -## The optional argument @var{method} may be used to specify whether -## payments are made at the end (@var{"e"}, default) or at the beginning -## (@var{"b"}) of each period. -## @seealso{pv, nper, rate} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Amount of periodic payment needed to amortize a loan - -function p = pmt (r, n, a, l, m) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - if (! (isscalar (r) && r > -1)) - error ("pmt: rate must be a scalar > -1"); - elseif (! (isscalar (n) && n > 0)) - error ("pmt: n must be a positive scalar"); - elseif (! (isscalar (a) && a > 0)) - error ("pmt: a must be a positive scalar"); - endif - - if (nargin == 5) - if (! ischar (m)) - error ("pmt: `method' must be a string"); - endif - elseif (nargin == 4) - if (ischar (l)) - m = l; - l = 0; - else - m = "e"; - endif - else - l = 0; - m = "e"; - endif - - p = r * (a - l * (1 + r)^(-n)) / (1 - (1 + r)^(-n)); - - if (strcmp (m, "b")) - p = p / (1 + r); - endif - - -endfunction - - - -
deleted file mode 100644 --- a/scripts/finance/pv.m +++ /dev/null @@ -1,82 +0,0 @@ -## Copyright (C) 1995, 1996, 1998, 2000, 2002, 2004, 2005, 2006, 2007 -## Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} pv (@var{r}, @var{n}, @var{p}, @var{l}, @var{method}) -## Returns the present value of an investment that will pay off @var{p} for @var{n} -## consecutive periods, assuming an interest @var{r}. -## -## The optional argument @var{l} may be used to specify an additional -## lump-sum payment made at the end of @var{n} periods. -## -## The optional argument @var{method} may be used to specify whether -## payments are made at the end (@code{"e"}, default) or at the -## beginning (@code{"b"}) of each period. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @seealso{pmt, nper, rate, npv} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Present value of an investment - -function v = pv (r, n, p, l, m) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - if (! (isscalar (r) && r > -1)) - error ("pv: r must be a scalar > -1"); - elseif (! (isscalar (n) && n > 0)) - error ("pv: n must be a positive scalar"); - elseif (! isscalar (p)) - error ("pv: p must be a scalar"); - endif - - if (r != 0) - v = p * (1 - (1 + r)^(-n)) / r; - else - v = p * n; - endif - - if (nargin > 3) - if (nargin == 5) - if (! ischar (m)) - error ("pv: `method' must be a string"); - endif - elseif (ischar (l)) - m = l; - l = 0; - else - m = "e"; - endif - if (strcmp (m, "b")) - v = v * (1 + r); - endif - if (isscalar (l)) - v = v + pvl (r, n, l); - else - error ("pv: l must be a scalar"); - endif - endif - -endfunction -
deleted file mode 100644 --- a/scripts/finance/pvl.m +++ /dev/null @@ -1,49 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007 -## Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} pvl (@var{r}, @var{n}, @var{p}) -## Return the present value of an investment that will pay off @var{p} -## in one lump sum at the end of @var{n} periods, given the interest -## rate @var{r}. -## -## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, -## not 5 percent). -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Present value of an investment that pays off at the end - -function v = pvl (r, n, p) - - if (nargin != 3) - print_usage (); - endif - - if (! (isscalar (r) && (r > -1))) - error ("pvl: r has to be a scalar > -1"); - elseif (! (isscalar (n) && n > 0)) - error ("pvl: n has to be a positive scalar"); - elseif (! isscalar (p)) - error ("pvl: p has to be a scalar"); - endif - - v = p / (1 + r)^n; - -endfunction
deleted file mode 100644 --- a/scripts/finance/rate.m +++ /dev/null @@ -1,74 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2005, 2006, -## 2007 Kurt Hornik -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} rate (@var{n}, @var{p}, @var{v}, @var{l}, @var{method}) -## Return the rate of return on an investment of present value @var{v} which -## pays @var{p} in @var{n} consecutive periods. -## -## The optional argument @var{l} may be used to specify an additional -## lump-sum payment made at the end of @var{n} periods. -## -## The optional string argument @var{method} may be used to specify -## whether payments are made at the end (@code{"e"}, default) or at the -## beginning (@code{"b"}) of each period. -## @seealso{pv, pmt, nper, npv} -## @end deftypefn - -## Author: KH <Kurt.Hornik@wu-wien.ac.at> -## Description: Rate of return of an investment - -function r = rate (n, p, v, l, m) - - if (nargin < 3 || nargin > 5) - print_usage (); - endif - - if (! (isscalar (n) && n > 0)) - error ("rate: n must be a positive scalar"); - elseif (! isscalar (p)) - error ("rate: p must be a scalar"); - elseif (! isscalar (v)) - error ("rate: p must be a scalar"); - endif - - if (nargin == 5) - if (! ischar (m)) - error ("rate: `method' must be a string"); - endif - elseif (nargin == 4) - if (ischar (l)) - m = l; - l = 0; - else - m = "e"; - endif - else - l = 0; - m = "e"; - endif - - if (! isscalar (l)) - error ("rate: l must be a scalar"); - endif - - r = fsolve (sprintf ("pv (x, %g, %g, %g, \"%s\") - %g", - n, p, l, m, v), 0); - -endfunction
deleted file mode 100644 --- a/scripts/finance/vol.m +++ /dev/null @@ -1,75 +0,0 @@ -## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007 -## Friedrich Leisch -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} vol (@var{x}, @var{m}, @var{n}) -## Return the volatility of each column of the input matrix @var{x}. -## The number of data sets per period is given by @var{m} (e.g. the -## number of data per year if you want to compute the volatility per -## year). The optional parameter @var{n} gives the number of past -## periods used for computation, if it is omitted, a value of 1 is used. -## If @var{t} is the number of rows of @var{x}, @code{vol} returns the -## volatility from @code{n*m} to @var{t}. -## @end deftypefn - -## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> -## Description: Volatility of financial time series data - -function retval = vol (X, m, n) - - if (nargin < 2) - print_usage (); - endif - - [xr, xc] = size (X); - - if (nargin > 2) - if (n * m > xr) - error ("vol: I need more data!"); - endif - else - n = 1; - if (n * m > xr) - error ("vol: I need more data!"); - endif - endif - - U = zeros (xr - 1, xc); - - if (all (X)) - U = X ((2 : xr), :) ./ X((1 : (xr-1)), :); - else - error ("vol: zero element in X"); - endif - - U = log(U); - U = U - ones (xr - 1, 1) * sum (U) / (xr - 1); - - retval = zeros (xr - n * m, xc); - - retval(1, :) = sumsq (U((1 : n*m), :)); - for i = 2 : (xr - n * m) - retval(i, :) = retval(i - 1, :) ... - - U(i - 1, :).^2 + U(i + n * m - 1, :).^2; - endfor - - retval = sqrt (retval * m / (n * m - 1)); - -endfunction -
deleted file mode 100644 --- a/scripts/quaternion/Makefile.in +++ /dev/null @@ -1,85 +0,0 @@ -# Makefile for octave's scripts/quaternion directory -# -# Copyright (C) 1998, 2002, 2005, 2006, 2007 John W. Eaton -# -# This file is part of Octave. -# -# Octave is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# Octave is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with Octave; see the file COPYING. If not, see -# <http://www.gnu.org/licenses/>. - -TOPDIR = ../.. - -script_sub_dir = quaternion - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -include $(TOPDIR)/Makeconf - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SOURCES = demoquat.m qconj.m qcoordinate_plot.m qderiv.m \ - qderivmat.m qinv.m qmult.m qtrans.m qtransv.m qtransvmat.m \ - quaternion.m - -DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES)) - -FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) -FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) - -all: PKG_ADD -.PHONY: all - -install install-strip: - $(do-script-install) -.PHONY: install install-strip - -uninstall: - $(do-script-uninstall) -.PHONY: uninstall - -clean: -.PHONY: clean - -PKG_ADD: $(FCN_FILES) - @echo "making PKG_ADD" - @$(do-mkpkgadd) - -tags: $(SOURCES) - ctags $(SOURCES) - -TAGS: $(SOURCES) - etags $(SOURCES) - -mostlyclean: clean -.PHONY: mostlyclean - -distclean: clean - rm -f Makefile PKG_ADD -.PHONY: distclean - -maintainer-clean: distclean - rm -f tags TAGS -.PHONY: maintainer-clean - -dist: - ln $(DISTFILES) ../../`cat ../../.fname`/scripts/quaternion -.PHONY: dist - -check-m-sources: - @$(do-check-m-sources) -.PHONY: check-m-sources
deleted file mode 100644 --- a/scripts/quaternion/demoquat.m +++ /dev/null @@ -1,261 +0,0 @@ -## Copyright (C) 1998, 1999, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} demoquat () -## Demonstrate the functions available for manipulating quaternions. -## -## Thanks to Mr. Charles Hall, Dr. Don Krupp and Dr. Larry Mullins at -## NASA's Marshall Space Flight Center for notes and instruction in -## use and conventions with quaternions. - A. S. Hodel -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function opt = demoquat () - - opt = 0; - quitopt = 5; - - while (opt != quitopt) - opt = menu ("Quaternion function demo (c) 1998 A. S. Hodel, a.s.hodel@eng.auburn.edu", - "quaternion construction/data extraction", - "simple quaternion functions", - "transformation functions", - "body-inertial frame demo", - "Quit"); - - switch(opt) - - case(1) - printf("Quaternion construction/data extraction\n"); - help quaternion - prompt - cmd = "q = quaternion(1,2,3,4)"; - run_cmd - disp("This format stores the i,j,k parts of the quaternion first;") - disp("the real part is stored last.") - prompt - disp(" ") - disp("i, j, and k are all square roots of -1; however they do not") - disp("commute under multiplication (discussed further with the function") - disp("qmult). Therefore quaternions do not commute under multiplcation:") - disp(" q1*q2 != q2*q1 (usually)") - prompt - - disp("Quaternions as rotations: unit quaternion to represent") - disp("rotation of 45 degrees about the vector [1 1 1]") - cmd = "degrees = pi/180; q1 = quaternion([1 1 1],45*degrees)"; - run_cmd - prompt - cmd = "real_q = cos(45*degrees/2)"; - run_cmd - printf("The real part of the quaternion q(4) is cos(theta/2).\n----\n\n"); - cmd = "imag_q = sin(45*degrees/2)*[1 1 1]/norm([1 1 1])" - run_cmd - disp("The imaginary part of the quaternion is sin(theta/2)*unit vector"); - disp("The constructed quaternion is a unit quaternion."); - prompt - disp("Can also extract both forms of the quaternion:") - disp("Vector/angle form of 1i + 2j + 3k + 4:") - cmd = "[vv,th] = quaternion(q)"; - run_cmd - cmd = "vv_norm = norm(vv)"; - run_cmd - disp("Returns the eigenaxis as a 3-d unit vector"); - disp("Check values: ") - cmd = "th_deg = th*180/pi"; - run_cmd - disp("") - disp("This concludes the quaternion construction/extraction demo."); - prompt - - case(2) - printf("Simple quaternion functions\n"); - cmd = "help qconj"; - run_cmd - cmd = "degrees = pi/180; q1 = quaternion([1 1 1],45*degrees)"; - run_cmd - cmd = "q2 = qconj(q1)"; - run_cmd - disp("The conjugate changes the sign of the complex part of the") - printf("quaternion.\n\n"); - prompt - printf("\n\n\nMultiplication of quaternions:\n"); - cmd = "help qmult"; - run_cmd - cmd = "help qinv" - run_cmd - disp("Inverse quaternion: q*qi = qi*q = 1:") - cmd = "q1i = qinv(q1)"; - run_cmd - cmd = "one = qmult(q1,q1i)"; - run_cmd - - printf("Conclusion of simple quaternion functions"); - prompt - - case(3) - printf("Transformation functions\n"); - disp("A problem with the discussion of coordinate transformations is that"); - disp("one must be clear on what is being transformed: does a rotation of"); - disp("theta degrees mean that you're rotating the VECTOR by theta degrees,"); - disp("also called the 'active convention,' or does it mean that you rotate "); - disp("the COORDINATE FRAME by theta degrees, also called the 'passive convention,' "); - disp("which is equivalent to rotating the VECTOR by (-theta) degrees. The"); - disp("functions in this demo use the active convention. I'll point out where"); - disp("this changes the code as the demo runs."); - disp(" -- The author"); - prompt - printf("\n\n"); - disp("Sequences of rotations:") - printf("\n\nRotation of a vector by 90 degrees about the reference z axis\n"); - cmd = "qz = quaternion([0 0 1], pi/2);"; - disp(cmd) ; eval(cmd); - printf("\n\nRotation of a vector by 90 degrees about the reference y axis\n"); - cmd="qy = quaternion([0 1 0], pi/2);"; - disp(cmd) ; eval(cmd); - printf("\n\nRotation of a vector by 90 degrees about the reference x axis\n"); - cmd="qx = quaternion([1 0 0], pi/2);"; - run_cmd - printf("\n\nSequence of three rotations: 90 degrees about x, then 90 degrees\n"); - disp("about y, then 90 degrees about z (all axes specified in the reference frame):"); - qchk = qmult(qz,qmult(qy,qx)); - cmd = "[vv,th] = quaternion(qchk), th_deg = th*180/pi"; - run_cmd - disp("The sequence of the three rotations above is equivalent to a single rotation") - disp("of 90 degrees about the y axis. Check:"); - cmd = "err = norm(qchk - qy)"; - run_cmd - - disp("Transformation of a quaternion by a quaternion:") - disp("The three quaternions above were rotations specified about") - disp("a single reference frame. It is often convenient to specify the"); - disp("eigenaxis of a rotation in a different frame (e.g., when computing"); - disp("the transformation rotation in terms of the Euler angles yaw-pitch-roll)."); - cmd = "help qtrans"; - run_cmd - disp("") - disp("NOTE: If the passive convention is used, then the above"); - disp("formula changes to v = qinv(q)*v*q instead of ") - disp("v = q*v*qinv(q).") - prompt - disp("") - disp("Example: Vectors in Frame 2 are obtained by rotating them from ") - disp(" from Frame 1 by 90 degrees about the x axis (quaternion qx)") - disp(" A quaternion in Frame 2 rotates a vector by 90 degrees about") - disp(" the Frame 2 y axis (quaternion qy). The equivalent rotation") - disp(" in the reference frame is:") - cmd = "q_eq = qtrans(qy,qx); [vv,th] = quaternion(q_eq)"; - run_cmd - disp("The rotation is equivalent to rotating about the reference z axis") - disp("by 90 degrees (quaternion qz)") - prompt - - disp("Transformation of a vector by a quaternion"); - cmd = "help qtransv"; - run_cmd - - disp("NOTE: the above formula changes if the passive quaternion ") - disp("is used; the cross product term is subtracted instead of added."); - prompt - disp("Example: rotate the vector [1,1,1] by 90 degrees about the y axis"); - cmd = "vec_r = qtransv([1,1,1],qy)"; - run_cmd - prompt - disp("Equivalently, one may multiply by qtransvmat:") - cmd = "help qtransvmat"; - run_cmd - disp("NOTE: the passive quaternion convention would use the transpose") - disp("(inverse) of the orthogonal matrix returned by qtransvmat."); - prompt - cmd = "vec_r_2 = qtransvmat(qy)*[1;1;1]; vec_err = norm(vec_r - vec_r_2)"; - run_cmd - - disp("") - disp("The last transformation function is the derivative of a quaternion") - disp("Given rotation rates about the reference x, y, and z axes."); - cmd = "help qderivmat"; - run_cmd - disp("") - disp("Example:") - disp("Frame is rotating about the z axis at 1 rad/s") - cmd = "Omega = [0,0,1]; Dmat = qderivmat(Omega)"; - run_cmd - disp("Notice that Dmat is skew symmetric, as it should be.") - disp("expm(Dmat*t) is orthogonal, so that unit quaternions remain") - disp("unit quaternions as the rotating frame precesses."); - disp(" ") - disp("This concludes the transformation demo."); - prompt; - - case(4) - printf("Body-inertial frame demo: Look at the source code for\n"); - printf("demoquat.m and qcoordinate_plot.m to see how it's done.\n"); - - # i,j,k units - iv = quaternion(1,0,0,0); jv = quaternion(0,1,0,0); - kv = quaternion(0,0,1,0); - - # construct quaternion to desired view. - degrees = pi/180; daz = 45*degrees; del = -30*degrees; - qazimuth = quaternion([0,0,1],daz); - qelevation = quaternion([cos(daz),sin(daz),0],del); - qview = qmult(qelevation,qazimuth); - - # inertial frame i, j, k axes. - iif = iv; jf = qtrans(jv,iv); kf = qtrans(kv,iv); - - # rotation steps - th = 0:5:20; ov = ones(size(th)); myth = [th,max(th)*ov ; 0*ov,th]; - - # construct yaw-pitch-roll cartoon - for kk=1:length(myth(1,:)) - thy = myth(1,kk); - thp = myth(2,kk); - - qyaw = quaternion([0,0,1],thy*pi/180); - [jvy,th] = quaternion(qtrans(jf,qyaw)); - qpitch = quaternion(jvy(1:3),thp*pi/180); - qb = qmult(qpitch, qyaw); - qi = quaternion([1, 0, 0],180*degrees); - - printf("yaw=%8.4f, pitch=%8.4f, \n qbi = (%8.4f)i + (%8.4e)j + (%8.4f)k + (%8.4f)\n",thy,thp, ... - qb(1), qb(2), qb(3), qb(4)); - [vv,th] = quaternion(qb); - printf(" = (vector) = [%8.4f %8.4f %8.4f], th=%5.2f deg\n", ... - vv(1), vv(2), vv(3), th*180/pi); - fflush (stdout); - qb = qmult(qb,qi); - title(sprintf("yaw=%5.2f deg, pitch=%5.2f deg",thy,thp)) - qcoordinate_plot(qi,qb,qview); - drawnow (); - endfor - - case(quitopt) - printf ("Exiting quaternion demo\n"); - - otherwise - error ("invalid option %f", opt); - - endswitch - endwhile - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qconj.m +++ /dev/null @@ -1,44 +0,0 @@ -## Copyright (C) 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qconj (@var{q}) -## Conjugate of a quaternion. -## -## @example -## q = [w, x, y, z] = w*i + x*j + y*k + z -## qconj (q) = -w*i -x*j -y*k + z -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function retval = qconj (q) - - if (nargin != 1 ) - print_usage (); - endif - - [a, b, c, d] = quaternion (q); - - retval = quaternion (-a, -b, -c, d); - -endfunction -
deleted file mode 100644 --- a/scripts/quaternion/qcoordinate_plot.m +++ /dev/null @@ -1,133 +0,0 @@ -## Copyright (C) 1998, 1999, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qcoordinate_plot (@var{qf}, @var{qb}, @var{qv}) -## Plot in the current figure a set of coordinate axes as viewed from -## the orientation specified by quaternion @var{qv}. Inertial axes are -## also plotted: -## -## @table @var -## @item qf -## Quaternion from reference (x,y,z) to inertial. -## @item qb -## Quaternion from reference to body. -## @item qv -## Quaternion from reference to view angle. -## @end table -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function qcoordinate_plot (qf, qb, qv) - - if (nargin != 3 ) - print_usage (); - endif - - degrees = pi / 180; - d180 = 180 * degrees; - - ## construct coordinate transformation to view frame - - cm = qtransvmat(qv); - - p1 = [-1, -1, 1]; - p2 = [-1, -1, -1]; - p3 = [ 1, -1, -1]; - p4 = [ 1, -1, 1]; - p5 = [-1, 1, 1]; - p6 = [ 1, 1, 1]; - p7 = [ 1, 1, -1]; - p8 = [-1, 1, -1]; - - ## outline positive quadrant - - box1 = cm * [p4; p6; p5; p6; p7]'; - - ## outline rest of the box - - box2 = cm * [p7; p8; p5; p1; p4; p3; p7; p3; p2; p1; p2; p8]'; - - ## compute inertial to body rotation eigenaxis - ## qb = qbf*qf => qbf = qb/qf - ## - ## need to use inverse quaternion to rotate axes - - qbf = qinv (qmult (qb, qinv (qf))); - - [eaxv, th_eig] = quaternion (qbf); - - ## draw 1/3 circle in x-y plane around a unit z axis - - th = (0:-12:-120) * degrees * sign (th_eig); - lth = length (th); - - cpts = [0, 0, 0.1*cos(th); - 0, 0, 0.1*sin(th); - 0, 1, 1*ones(1,lth)]; - - ## rotate the 1/3 circle around eigenaxis of inertial to body rotation - ## qez = qe/qz = rotation to get from z axis to eigenaxis. - ## This rotates the 1/3 circle from x-y plane to the plane normal to - ## eigenaxis - - qez = qmult (qbf, qinv (quaternion (0, 0, 1, 0))); - eig_xm = qtransvmat (qez); - cpts = cm*eig_xm * cpts; - - ## transform inertial and body quaternions to view coordinates (rotate - ## by azimuth, elevation) - - qfm = qtransvmat (qf); - qbm = qtransvmat (qf); - - qf = qmult (qv, qf); - qb = qmult (qv, qb); - - ## get coordinate axes in inertial and reference frame - - jnk = qtransvmat (qf); - ifv = jnk(:,1); - jfv = jnk(:,2); - kfv = jnk(:,3); - - jnk = qtransvmat (qb); - ibv = jnk(:,1); - jbv = jnk(:,2); - kbv = jnk(:,3); - - axis ([-2, 2, -2, 2], "square"); - - [vv, theta] = quaternion (qb); - - xlabel (sprintf ("rotate about eigenaxis %5.2f deg", th_eig/degrees)); - - plot ([ibv(1), 0], [ibv(3), 0], "-@11;x (body);", - [0, jbv(1)], [0, jbv(3)], "-@21;y (body);", - [0, kbv(1)], [0, kbv(3)], "-@32;z (body);", - [ifv(1), 0], [ifv(3), 0], "-@13;x (inertial);", - [0, jfv(1)], [0, jfv(3)], "-@23;y (inertial);", - [0, kfv(1)], [0, kfv(3)], "-@34;z (inertial);", - cpts(1,:), cpts(3,:), ".-6 ;eigenaxis;", - box2(1,:), box2(3,:), "-4;;", - box1(1,:), box1(3,:), "-5;;"); - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qderiv.m +++ /dev/null @@ -1,60 +0,0 @@ -## Copyright (C) 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qderiv (omega) -## Derivative of a quaternion. -## -## Let Q be a quaternion to transform a vector from a fixed frame to -## a rotating frame. If the rotating frame is rotating about the -## [x, y, z] axes at angular rates [wx, wy, wz], then the derivative -## of Q is given by -## -## @example -## Q' = qderivmat (omega) * Q -## @end example -## -## If the passive convention is used (rotate the frame, not the vector), -## then -## -## @example -## Q' = -qderivmat (omega) * Q -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function Dmat = qderivmat (Omega) - - if (nargin != 1) - print_usage (); - endif - - Omega = vec (Omega); - - if (length (Omega) != 3) - error ("qderivmat: Omega must be a length 3 vector"); - endif - - Dmat = 0.5 * [ 0.0, Omega(3), -Omega(2), Omega(1); - -Omega(3), 0.0, Omega(1), Omega(2); - Omega(2), -Omega(1), 0.0, Omega(3); - -Omega(1), -Omega(2), -Omega(3), 0.0 ]; -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qderivmat.m +++ /dev/null @@ -1,60 +0,0 @@ -## Copyright (C) 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qderivmat (@var{omega}) -## Derivative of a quaternion. -## -## Let Q be a quaternion to transform a vector from a fixed frame to -## a rotating frame. If the rotating frame is rotating about the -## [x, y, z] axes at angular rates [wx, wy, wz], then the derivative -## of Q is given by -## -## @example -## Q' = qderivmat (omega) * Q -## @end example -## -## If the passive convention is used (rotate the frame, not the vector), -## then -## -## @example -## Q' = -qderivmat (omega) * Q. -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function Dmat = qderivmat (Omega) - - if (nargin != 1 ) - print_usage (); - endif - - Omega = vec (Omega); - - if (length (Omega) != 3) - error ("qderivmat: Omega must be a length 3 vector"); - endif - - Dmat = 0.5 * [ 0.0, Omega(3), -Omega(2), Omega(1); - -Omega(3), 0.0, Omega(1), Omega(2); - Omega(2), -Omega(1), 0.0, Omega(3); - -Omega(1), -Omega(2), -Omega(3), 0.0 ]; -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qinv.m +++ /dev/null @@ -1,45 +0,0 @@ -## Copyright (C) 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qinv (@var{q}) -## Return the inverse of a quaternion. -## -## @example -## q = [w, x, y, z] = w*i + x*j + y*k + z -## qmult (q, qinv (q)) = 1 = [0 0 0 1] -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function retval = qinv (q) - - if (nargin != 1) - print_usage (); - endif - - if (norm (q) != 0) - retval = qconj (q) / sum (q .* q); - else - error ("qinv: zero quaternion passed!"); - endif - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qmult.m +++ /dev/null @@ -1,59 +0,0 @@ -## Copyright (C) 1998, 2000, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qmult (@var{a}, @var{b}) -## Multiply two quaternions. -## -## @example -## [w, x, y, z] = w*i + x*j + y*k + z -## @end example -## -## @noindent -## identities: -## -## @example -## i^2 = j^2 = k^2 = -1 -## ij = k jk = i -## ki = j kj = -i -## ji = -k ik = -j -## @end example -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function retval = qmult (a, b) - - if (nargin != 2 ) - print_usage (); - endif - - [a1, b1, c1, d1] = quaternion (a); - [a2, b2, c2, d2] = quaternion (b); - - ri = b1*c2 - c1*b2 + d1*a2 + a1*d2; - rj = c1*a2 - a1*c2 + d1*b2 + b1*d2; - rk = a1*b2 - b1*a2 + d1*c2 + c1*d2; - rr = -(a1*a2 + b1*b2 + c1*c2) + d1*d2; - - retval = quaternion (ri, rj, rk, rr); - -endfunction -
deleted file mode 100644 --- a/scripts/quaternion/qtrans.m +++ /dev/null @@ -1,43 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qtrans (@var{v}, @var{q}) -## Transform the unit quaternion @var{v} by the unit quaternion @var{q}. -## Returns @code{@var{v} = @var{q}*@var{v}/@var{q}}. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function v = qtrans (v, q) - - if (nargin != 2) - print_usage (); - endif - - if (! isvector (v) || length (v) != 4) - error ("qtrans: v(%d,%d) must be a quaternion", rows (v), columns (v)); - elseif (! isvector (q) || length (q) != 4) - error ("qtrans: q(%d,%d) must be a quaternion", rows (q), columns (q)); - endif - - v = qmult (q, qmult (v, qinv (q))); - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qtransv.m +++ /dev/null @@ -1,52 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qtransv (@var{v}, @var{q}) -## Transform the 3-D vector @var{v} by the unit quaternion @var{q}. -## Return a column vector. -## -## @example -## vi = (2*real(q)^2 - 1)*vb + 2*imag(q)*(imag(q)'*vb) -## + 2*real(q)*cross(imag(q),vb) -## @end example -## -## @noindent -## Where imag(q) is a column vector of length 3. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function vi = qtransv (vb, qib) - - if (! isvector (vb) || length (vb) != 3) - error ("qtransv: v(%d,%d) must be a 3-D vector", rows (vb), columns (vb)); - elseif (! isvector (qib) || length (qib) != 4) - error ("qtransv: q(%d,%d) must be a quaternion", rows (qib), columns (qib)); - elseif (max (abs (imag (vb))) + max (abs (imag (qib))) != 0) - error ("qtransv: input values must be real"); - endif - - qr = qib(4); - qimag = vec (qib(1:3)); - vb = vec (vb); - vi = (2*qr^2 - 1)*vb + 2*qimag*(qimag'*vb) + 2*qr*cross (qimag, vb); - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/qtransvmat.m +++ /dev/null @@ -1,54 +0,0 @@ -## Copyright (C) 1998, 2000, 2002, 2004, 2005, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} qtransvmat (@var{qib}) -## Construct a 3x3 transformation matrix from quaternion @var{qib} that -## is equivalent to rotation of th radians about axis @var{vv}, where -## @code{[@var{vv}, @var{th}] = quaternion (@var{qib})}. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function Aib = qtransvmat (qib) - - if (nargin != 1) - print_usage (); - endif - - if (! isvector(qib) || length (qib) != 4) - error ("qtransvmat: q(%d,%d) must be a quaternion", rows (qib), \ - columns (qib)); - elseif (max (abs (imag (qib))) != 0) - error ("qtransvmat: input values must be real"); - endif - - - Aib = [(2.*(qib(1)^2 + qib(4)^2) -1.), ... - (2.*(qib(1)*qib(2)-qib(3)*qib(4))), ... - (2.*(qib(1)*qib(3)+qib(2)*qib(4))); - (2.*(qib(1)*qib(2)+qib(3)*qib(4))), ... - (2.*(qib(2)*qib(2)+qib(4)*qib(4))-1.), ... - (2.*(qib(2)*qib(3)-qib(1)*qib(4))); - (2.*(qib(1)*qib(3)-qib(2)*qib(4))), ... - (2.*(qib(2)*qib(3)+qib(1)*qib(4))), ... - (2.*(qib(3)*qib(3)+qib(4)*qib(4))-1.)]; - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/quaternion.m +++ /dev/null @@ -1,116 +0,0 @@ -## Copyright (C) 1998, 1999, 2000, 2002, 2005, 2006, 2007 -## Auburn University. All rights reserved. -## -## This file is part of Octave. -## -## Octave is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or (at -## your option) any later version. -## -## Octave is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} quaternion (w) -## @deftypefnx {Function File} {[@var{vv}, @var{theta}] =} quaternion (w) -## @deftypefnx {Function File} {@var{w} =} quaternion (@var{a}, @var{b}, @var{c}, @var{d}) -## @deftypefnx {Function File} {@var{w} =} quaternion (@var{vv}, @var{theta}) -## Construct or extract a quaternion -## -## @example -## w = a*i + b*j + c*k + d -## @end example -## -## @noindent -## from given data. -## @end deftypefn - -## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> -## Adapted-By: jwe - -function [a, b, c, d] = quaternion (w, x, y, z) - - switch (nargin) - case(1) - if (! (isvector (w) && length (w) == 4)) - error ("input vector must be of length 4)"); - endif - ## extract data - switch (nargout) - case(4) - a = w(1); - b = w(2); - c = w(3); - d = w(4); - - case(2) - if (abs (norm (w) - 1) > 1e-12) - warning ("quaternion: ||w||=%e, setting=1 for vv, theta", norm(w)); - w = w/norm(w); - endif - [a, b, c, d] = quaternion (w); - theta = acos (d) * 2; - if (abs (theta) > pi) - theta = theta - sign (theta) * pi; - endif - sin_th_2 = norm ([a, b, c]); - - if (sin_th_2 != 0) - vv = [a, b, c] / sin_th_2; - else - vv = [a, b, c]; - endif - a = vv; - b = theta; - otherwise - print_usage (); - endswitch - - case(2) - if (nargout != 1) - print_usage (); - endif - vv = w; - theta = x; - - if (! isvector (vv) || length (vv) != 3) - error ("vv must be a length three vector"); - elseif (! isscalar (theta)) - error ("theta must be a scalar"); - elseif (norm (vv) == 0) - error ("quaternion: vv is zero"); - elseif (abs (norm (vv) - 1) > 1e-12) - warning ("quaternion: ||vv|| != 1, normalizing") - vv = vv / norm (vv); - endif - - if (abs (theta) > 2*pi) - warning ("quaternion: |theta| > 2 pi, normalizing") - theta = rem (theta, 2*pi); - endif - vv = vv * sin (theta / 2); - d = cos (theta / 2); - a = quaternion (vv(1), vv(2), vv(3), d); - - case(4) - if (nargout != 1) - print_usage (); - endif - if (! (isscalar (w) && isscalar (x) && isscalar (y) && isscalar (z))) - error ("input values must be scalars"); - endif - a = [w, x, y, z]; - - otherwise - print_usage (); - - endswitch - -endfunction
deleted file mode 100644 --- a/scripts/quaternion/quaternion.ps +++ /dev/null @@ -1,8786 +0,0 @@ -%!PS (but not EPSF; comments have been disabled) -%DVIPSCommandLine: dvips tmp -o quaternion.ps -%DVIPSParameters: dpi=600, compressed, comments removed -%DVIPSSource: TeX output 1998.10.23:1515 -/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N -/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 -mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} -ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale -isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div -hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul -TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} -forall round exch round exch]setmatrix}N /@landscape{/isls true N}B -/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B -/FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{ -/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N -string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N -end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ -/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] -N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup -length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ -128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub -get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data -dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N -/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup -/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx -0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff -setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff -.1 sub]/id ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N -/cp 0 N{rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id -gp get /gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp -add /cp X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add -/gp X adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{ -dup 255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 -adv}B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 -idiv S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string -putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval -adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg} -{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{ -adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2 -chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{] -}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup -length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ -cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin -0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul -add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict -/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook -known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X -/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for -65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 -0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V -{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 -getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} -ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false -RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 -false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform -round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg -rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail -{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} -B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{ -4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{ -p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p -a}B /bos{/SS save N}B /eos{SS restore}B end -TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N -/vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen -false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B -/@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit -div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{ -/CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{ -10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B -/@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale -true def end /@MacSetUp{userdict /md known{userdict /md get type -/dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup -length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{} -N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath -clippath mark{transform{itransform moveto}}{transform{itransform lineto} -}{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{ -itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{ -closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39 -0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N -/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 -scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get -ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip -not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 -TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR -pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 --1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg -TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg -sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr -0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add -2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp -{pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72 -div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray} -N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict -maxlength dict begin /magscale true def normalscale currentpoint TR -/psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts -/psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx -psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy -scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR -/showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{SDict -begin /SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial -{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if /showpage{}N /erasepage{}N /copypage{}N newpath -}N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{ -end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin} -N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{ -/SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX -SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X -/startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad -yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end -TeXDict begin 40258431 52099146 1000 600 600 (tmp.dvi) -@start /Fa 1 1 df<007FB712FCB812FEA26C16FC2F047A943C>0 -D E /Fb 3 123 df<90391F801F8090397FE07FE09039E0F0E0703A01C0F9C0F8390380 -7D833807007F000E1403000C15F0001C137E0018EC01C002FEC7FC00385B1210C7FC1301 -5CA31303A25C1640010714E016C0001C5B007E1401010F148000FE1403011FEB0700011B -130E39F839F01C397070F878393FE07FE0390F801F8025227EA02C>120 -D<13F0D803FCEB01C0D8071EEB03E0D80E1F1307121C003813800030140F013F14C00070 -1300126049131FD8E07E14801240EA00FE49133F000115005BA25D0003147E5BA215FE5D -5BA214015DEBF00314070001130F3900F83FF0EB3FFBEB0FC3EB00075DA20007130FD81F -805B003F495AA24AC7FCEB007E003E137C00385B381803F0381E07C0D807FFC8FCEA01F8 -23317EA026>I<903807800390381FE00790383FF00690387FF80E9038FFFC1C48EBFE78 -9038E03FF03803800190C712E0EC01C0C7EA0380EC0700140E143C14705C495A495A49C7 -FC130E133C0170130C49131C484813184848133848C71278D80EC013F0380FFE03391F3F -FFE0D8381F13C0486C1380D86007130038E003FE38C000F020227DA024>I -E /Fc 26 123 df<123C127EB4FCA21380A2127F123D1201A412031300A25A1206120E12 -0C121C5A5A126009177A8715>44 D<B512F0A514057F921A>I<123C127E12FFA4127E12 -3C08087A8715>I<90381FE00390387FFC0748B5FC3907F01FCF390F8003FF48C7FC003E -80814880A200788000F880A46C80A27E92C7FC127F13C0EA3FF013FF6C13F06C13FF6C14 -C06C14F0C680013F7F01037F9038003FFF140302001380157F153FED1FC0150F12C0A215 -07A37EA26CEC0F80A26C15006C5C6C143E6C147E01C05B39F1FC03F800E0B512E0011F13 -8026C003FEC7FC22377CB42B>83 D<EB7F803803FFF0380F80FC381C003E003F133F6D6C -7E6E7EA26E7EEA1F00C7FCA4EB01FF131FEBFF873803FC07EA0FF0EA1FC0EA3F80127F13 -004815C05AA3140FA26C131F6C133B3A3F8071F180391FC1E1FF2607FFC013003900FE00 -3C22237DA126>97 D<EB07F8EB3FFF9038FC07C03901F000E03903E003F03807C007120F -EA1F80123F90380003E04890C7FCA2127E12FEAA127FA26C14187F001F14386D1330000F -14706C6C13E03903F001C03900FC0F8090383FFE00EB07F01D237EA122>99 -D<153FEC0FFFA3EC007F81AEEB07F0EB3FFCEBFC0F3901F003BF3907E001FF48487E4848 -7F8148C7FCA25A127E12FEAA127E127FA27E6C6C5BA26C6C5B6C6C4813803A03F007BFFC -3900F81E3FEB3FFCD90FE0130026357DB32B>I<EB0FE0EB7FFCEBF83F3903F00F80D807 -E013C0390FC007E0381F800315F0EA3F0014014814F8127EA212FEA2B6FCA248C8FCA512 -7E127FA26C1418A26C6C1338000F14306D13706C6C13E03901F003C03900FC0F00EB3FFE -EB07F01D237EA122>I<EB01FCEB07FF90381F078090383E0FC0EB7C1F13FCEA01F8A200 -03EB070049C7FCACB512F0A3D803F0C7FCB3A7487E387FFFE0A31A357FB417>I<151F90 -391FC07F809039FFF8E3C03901F07FC73907E03F033A0FC01F83809039800F8000001F80 -EB00074880A66C5CEB800F000F5CEBC01F6C6C48C7FCEBF07C380EFFF8380C1FC0001CC9 -FCA3121EA2121F380FFFFEECFFC06C14F06C14FC4880381F0001003EEB007F4880ED1F80 -48140FA56C141F007C15006C143E6C5C390FC001F83903F007E0C6B51280D91FFCC7FC22 -337EA126>I<EA03F012FFA312071203AEEC1FC0EC7FF09038F1E0FC9038F3807C9038F7 -007E13FE497FA25BA25BB3486CEB7F80B538C7FFFCA326347EB32B>I<EA0780EA0FC0EA -1FE0A4EA0FC0EA0780C7FCAAEA07E012FFA3120F1207B3A6EA0FF0B5FCA310337EB215> -I<EA07E012FFA3120F1207B3B3A7EA0FF0B5FCA310347EB315>108 -D<2703F01FE013FF00FF90267FF80313C0903BF1E07C0F03E0903BF3803E1C01F02807F7 -003F387FD803FE1470496D486C7EA2495CA2495CB3486C496C487EB53BC7FFFE3FFFF0A3 -3C217EA041>I<3903F01FC000FFEB7FF09038F1E0FC9038F3807C3907F7007EEA03FE49 -7FA25BA25BB3486CEB7F80B538C7FFFCA326217EA02B>I<EB07F0EB3FFE9038FC1F8039 -01F007C03903C001E000078048486C7E48C7127CA248147E003E143E007E143FA300FE15 -80A8007E1500A36C147EA26C147C6D13FC6C6C485A00075C3903F007E03900FC1F80D93F -FEC7FCEB07F021237EA126>I<3903F03F8000FFEBFFE09038F3C0F89038F7007ED807FE -7F6C48EB1F804914C049130F16E0ED07F0A3ED03F8A9150716F0A216E0150F16C06D131F -6DEB3F80160001FF13FC9038F381F89038F1FFE0D9F07FC7FC91C8FCAA487EB512C0A325 -307EA02B>I<3803E07C38FFE1FF9038E38F809038E71FC0EA07EEEA03ECA29038FC0F80 -49C7FCA35BB2487EB512E0A31A217FA01E>114 D<EBFF06000713CE381F00FE003C133E -48131E140E5A1406A27EA200FE90C7FC6C7EEA7FFC383FFFC014F0000F7F6C7FC67FEB0F -FF1300EC3F8000C0131F140F6C1307A37E15006C5B6C130E6C5B38F7807838E1FFE038C0 -7F8019237EA11E>I<1330A51370A313F0A21201A212031207381FFFFEB5FCA23803F000 -AF1403A814073801F806A23800FC0EEB7E1CEB1FF8EB07E0182F7FAD1E>I<D803F0133F -00FFEB0FFFA30007EB007F000380B35DA35D12016D4813800000903803BFFC90387E073F -EB1FFED907F8130026227EA02B>I<B5EBFFF0A3D80FF0EB3F800007EC1F000003140E15 -0C6D131C00011418A26C6C5BA26D1370017E1360137F6D5BA290381F8180A214C3010F90 -C7FCA2EB07E6A214FE6D5AA26D5AA36D5AA2146024217E9F29>I<B53A1FFF81FFF0A33C -07F801FC003F8001F049EB1E0000030100141C816C6C017C1318A26D017E1338000002FE -1330A290267E01FF5B159F168090263F030F5BA216C0903A1F8607C180A202C613E39026 -0FCC0390C7FCA2D907FC13F6ECF80116FE6D486C5AA36D481378A36D48133034217F9F37 ->I<B53801FFF8A32603FE0013806C48EB7C0000001478017E1370017F5B90383F81C090 -381F8380D90FC3C7FCEB07E614FE6D5A6D5A6D7E80805B9038039F809038071FC0903806 -0FE0EB0C0790381C03F0496C7E01707FEBF000000180000FECFF8026FFFC0313FCA32620 -7F9F29>I<3A7FFF807FF8A33A07F8001FC00003EC0F800001EC070015066C6C5BA26D13 -1C017E1318A26D5BA2EC8070011F1360ECC0E0010F5BA2903807E180A214F3010390C7FC -14FBEB01FEA26D5AA31478A21430A25CA214E05CA2495A1278D8FC03C8FCA21306130EEA -701CEA7838EA1FF0EA0FC025307F9F29>I<003FB512F0A2EB000F003C14E00038EB1FC0 -0030EB3F800070137F1500006013FE495A13035CC6485A495AA2495A495A49C7FC153013 -FE485A12035B48481370485A001F14604913E0485A387F000348130F90B5FCA21C207E9F -22>I E /Fd 1 106 df<1338137CA2137813701300A7EA0780EA1FC0EA38E01230EA60F0 -EAC1E0A3EA03C0A3EA0780A2EA0F0013041306EA1E0CA21318121CEA1E70EA0FE0EA0780 -0F237DA116>105 D E /Fe 2 51 df<13E01201120712FF12F91201B3A7487EB512C0A2 -12217AA01E>49 D<EA01FC3807FF80381C0FC0383003E0386001F0EB00F812F86C13FCA2 -147C1278003013FCC7FC14F8A2EB01F0EB03E014C0EB0780EB0F00131E13385B5B3801C0 -0CEA0380380600185A5A383FFFF85AB512F0A216217CA01E>I E -/Ff 4 64 df<B812C0A32A037A9137>0 D<130C131EA50060EB01800078130739FC0C0F -C0007FEB3F80393F8C7F003807CCF83801FFE038007F80011EC7FCEB7F803801FFE03807 -CCF8383F8C7F397F0C3F8000FCEB0FC039781E078000601301000090C7FCA5130C1A1D7C -9E23>3 D<EB7F803801FFE0000713F8380FC0FC381F003E003C130F00387F0078148000 -70130300F014C0481301A76C1303007014800078130700381400003C5B001F133E380FC0 -FC6CB45A000113E038007F801A1B7C9D23>14 D<4A7E1403B3B3A6007FB712FEB8FC7E2F -2E7CAD38>63 D E /Fg 14 119 df<147E49B47E903907C1C38090391F80EFC090383F00 -FF017E137F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F5C90 -C7FCA21401485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13 -E0003E137FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E ->97 D<EC1FE0ECFFF8903803F03E903807C00F90381F8007D93F001380017E131F49137F -485A485A000715005B000F147E484890C7FCA2485AA3127F90C9FCA35A5AA6481403007E -5C5D151E003E5C5D6C5CEC03E0390F800F802603E07EC7FC3801FFF838003FC0212977A7 -2A>99 D<EC3F80903801FFE0903807E0F890381F803CEB3E0001FC131E485A485A120748 -48133E49133C121F4848137C15F8EC03F0397F000FE0ECFF80B5EAFC0014C048C8FCA45A -A61506150E151E007C143C15786C14F0EC01E06CEB07C0390F801F003807C0FC3801FFF0 -38007F801F2976A72A>101 D<EC03F0EC0FFC91383E0E1C9138FC077E903901F003FE13 -03903807E001D90FC013FCEB1F80A2EB3F004914F8137E01FE1303A2484814F0A2150712 -034914E0A2150F12074914C0A2151FA216805B153F1203ED7F006D5BA200015B0000495A -9038F80F7E90387C1EFEEB1FF8903807E0FC90C7FC1401A25DA21403A25D001C1307007F -5C48130F5D4A5A4AC7FC48137E00F85B387C03F0381FFFC0D803FEC8FC273B7CA72A> -103 D<1478EB01FCA21303A314F8EB00E01400AD137C48B4FC38038F80EA0707000E13C0 -121E121CEA3C0F1238A2EA781F00701380A2EAF03F140012005B137E13FE5BA212015BA2 -12035B1438120713E0000F1378EBC070A214F0EB80E0A2EB81C01383148038078700EA03 -FEEA00F8163E79BC1C>105 D<1507ED1FC0A2153FA31680ED0E0092C7FCADEC07C0EC3F -F0EC78F8ECE07CEB01C01303EC807EEB0700A2010E13FE5D131E131CEB3C01A201005BA2 -1403A25DA21407A25DA2140FA25DA2141FA25DA2143FA292C7FCA25CA2147EA214FEA25C -A213015CA2121C387F03F012FF495A5C495A4848C8FCEAF83EEA707CEA3FF0EA0FC02250 -83BC1C>I<D801F0EB3F803A07FC01FFE03A0F3E07C1F83A0E1F0F00FC001E011C137C00 -1C49137E003C13F012385C38783FC012705C91C7FC00F015FE495CEA007EA2150101FE5C -5BA2150300015D5B15075E0003020F13704914C0A2031F13F00007ED80E05B1681EE01C0 -120F49EC0380A2EE0700001FEC0F0E49EB07FC0007C7EA01F02C2979A733>110 -D<EC1FC0ECFFF8903803F07C90380FC01FEB1F8090393F000F80017E14C0491307484814 -E0485A12075B000F15F0485AA2485AA2ED0FE0127F90C7FCA2151F4815C05AA2ED3F80A2 -ED7F00A248147E007C5C007E13015D4A5A003E495A6C495A4A5A260F803EC7FC3807C0FC -3801FFF038003F80242977A72E>I<027E1360903901FF81E0903807C1C390391F80E7C0 -90383F00F7017E137F5B4848EB3F80485AA2485A000F15005B121F5D4848137EA3007F14 -FE90C75AA3481301485CA31403485CA314074A5A127C141F007E133F003E495A14FF381F -01EF380F879F3903FF1F80EA00FC1300143F92C7FCA35C147EA314FE5CA21301130390B5 -12F05AA2233A77A72A>113 D<D801F013FC3A07FC07FF803A0F3E0F03C0260E1F1C13E0 -001EEB380F001C1370003CEBE01F123814C0D8783F14C00070903880070092C7FC91C8FC -12F05BEA007EA313FE5BA312015BA312035BA312075BA3120F5BA3121F5B0007C9FC2329 -79A726>I<EC7F80903801FFE0903807C0F890381F003C013E131C013C131E017C133E49 -137E15FEA2000114FCA215706D13007FEBFFC014FC6C13FF15806D13C06D13E0010F13F0 -1300140F14071403120C123F387F80011403D8FF0013E0A300FCEB07C000F0EB0F801270 -0078EB1F006C133C381F01F83807FFE0C690C7FC1F297AA725>I<EB01C0EB03F01307A2 -5CA2130FA25CA2131FA25CA2133FA291C7FCA2007FB51280B6FC1500D8007EC7FC13FEA2 -5BA21201A25BA21203A25BA21207A25BA2120FA25BA2121F141C1380A2003F133C1438EB -0078147014F05C495AEA1F03495A6C48C7FCEA07FCEA01F0193A78B81E>I<137C48B414 -1C26038F80137EEA0707000E7F001E15FE121CD83C0F5C12381501EA781F007001805BA2 -D8F03F1303140000005D5B017E1307A201FE5C5B150F1201495CA2151F0003EDC1C04914 -81A2153F1683EE0380A2ED7F07000102FF13005C01F8EBDF0F00009038079F0E90397C0F -0F1C90391FFC07F8903907F001F02A2979A731>I<017CEB01C048B4EB07F038038F80EA -0707000E01C013F8121E001C1403EA3C0F0038EC01F0A2D8781F130000705BA2EAF03F91 -C712E012005B017E130116C013FE5B1503000115805BA2ED07001203495B150EA25DA25D -1578000114706D5B0000495A6D485AD97E0FC7FCEB1FFEEB03F0252979A72A>I -E /Fh 12 123 df<123C127EB4FCA21380A2127F123D1201A312031300A25A1206120E5A -5A5A126009157A8714>59 D<000FB8FCA23B1FC003F8003F0100151F001C4A130E123C00 -3801071406123000704A130EA20060010F140C12E0485CA2141FC715005DA2143FA292C8 -FCA25CA2147EA214FEA25CA21301A25CA21303A25CA21307A25C130F131F001FB512F0A2 -302D7FAC29>84 D<EC0780EC1FC0EC3CE0EC786014F0EB01E0A2EB03C015E090380780C0 -130FA2EB1F011580A2EB3E0315005CEB7C06140E5CEBFC18EBF8385C5C00015B13F1EBF3 -8001F7C7FC13FE5B485A5B5BA31207120F121D12390071144000E114C0000013039038F0 -0700140EEB787CEB3FF0EB0F801B3080AE1D>96 D<13F8121FA21201A25BA21203A25BA2 -1207A25BA2120FEBC7E0EB9FF8EBB83C381FF01EEBE01F13C09038800F80EA3F00A2123E -A2007E131FA2127CA2143F00FC14005AA2147EA2147C14FC5C387801F01303495A383C0F -806C48C7FCEA0FFCEA03F0192F7DAD1E>98 D<EB03F8EB0FFE90383E0780EBF803D801F0 -13C03803E001EA07C0000F1303D81F8013801407393F000F00141E387F01FCEBFFF091C7 -FC007EC8FC12FE5AA4127C156015E0EC01C06CEB0380EC0F006C131C380F81F83803FFE0 -C648C7FC1B1F7D9D21>101 D<157C4AB4FC913807C380EC0F87150FEC1F1FA391383E0E -0092C7FCA3147E147CA414FC90383FFFF8A2D900F8C7FCA313015CA413035CA413075CA5 -130F5CA4131F91C8FCA4133EA3EA383C12FC5BA25B12F0EAE1E0EA7FC0001FC9FC213D7C -AE22>I<1307EB0F80EB1FC0A2EB0F80EB070090C7FCA9EA01E0EA07F8EA0E3CEA1C3E12 -3812301270EA607EEAE07C12C013FC485A120012015B12035BA21207EBC04014C0120F13 -801381381F01801303EB0700EA0F06131EEA07F8EA01F0122E7EAC18>105 -D<90387C01F89038FE07FE3901CF8E0F3A03879C0780D907B813C0000713F000069038E0 -03E0EB0FC0000E1380120CA2D8081F130712001400A249130F16C0133EA2017EEB1F80A2 -017C14005D01FC133E5D15FC6D485A3901FF03E09038FB87C0D9F1FFC7FCEBF0FC000390 -C8FCA25BA21207A25BA2120FA2EAFFFCA2232B829D24>112 D<3807C01F390FF07FC039 -1CF8E0E0383879C138307B8738707F07EA607E13FC00E0EB03804848C7FCA2128112015B -A21203A25BA21207A25BA2120FA25BA2121FA290C8FC120E1B1F7E9D20>114 -D<013F137C9038FFC1FF3A01C1E383803A0380F703C0390700F60F000E13FE4813FC1218 -0038EC0700003049C7FCA2EA200100005BA313035CA301075B5D14C000385CD87C0F1306 -00FC140E011F130C011B131C39F03BE038D8707113F0393FE0FFC0260F803FC7FC221F7E -9D28>120 D<EA01E0D807F8130ED80E3C131FD81C3E133F0038143E12301270D8607E13 -7ED8E07C137C12C013FC484813FC000014F812015B1401000314F013E0A21403000714E0 -13C0A2140715C00003130FEBE01F143F3901F07F8038007FEFEB1F8FEB001F1500A2003E -133EA2007E5B5C387C01F0387003E0383007C0383C0F80D80FFEC7FCEA03F0202C7E9D23 ->I<011E1330EB3F809038FFC07048EBE0E0ECF1C03803C0FF9038803F80903800070048 -130EC75A5C5C5C495A495A49C7FC131E13385B491340484813C0485A38070001000EEB03 -80380FE007391FF81F0038387FFF486C5A38601FFC38E00FF038C003C01C1F7D9D21>I -E /Fi 27 106 df<1430147014E0EB01C01303EB0780EB0F00A2131E5BA25B13F85B1201 -5B1203A2485AA3485AA3121F90C7FCA25AA3123EA2127EA6127C12FCB3A2127C127EA612 -3EA2123FA37EA27F120FA36C7EA36C7EA212017F12007F13787FA27F7FA2EB0780EB03C0 -1301EB00E0147014301462738226>0 D<12C07E12707E123C7E7EA26C7E6C7EA26C7E7F -12007F1378137CA27FA37FA31480130FA214C0A31307A214E0A6130314F0B3A214E01307 -A614C0A2130FA31480A2131F1400A3133EA35BA2137813F85B12015B485AA2485A48C7FC -A2121E5A12385A5A5A14627C8226>I<12F0B3B3B2043674811C>12 -D<00F01378B3B3B2153674812E>I<151E153E157C15F8EC01F0EC03E01407EC0FC0EC1F -8015005C147E5CA2495A495AA2495AA2495AA2495AA249C7FCA2137EA213FE5B12015BA2 -12035BA21207A25B120FA35B121FA45B123FA548C8FCA912FEB3A8127FA96C7EA5121F7F -A4120F7FA312077FA21203A27F1201A27F12007F137EA27FA26D7EA26D7EA26D7EA26D7E -A26D7E6D7EA2147E80801580EC0FC0EC07E01403EC01F0EC00F8157C153E151E1F947182 -32>16 D<12F07E127C7E7E6C7E7F6C7E6C7E12017F6C7E137EA27F6D7EA26D7EA26D7EA2 -6D7EA26D7EA26D7EA280147E147F80A21580141FA215C0A2140F15E0A3140715F0A41403 -15F8A5EC01FCA9EC00FEB3A8EC01FCA9EC03F8A515F01407A415E0140FA315C0141FA215 -80A2143F1500A25C147E14FE5CA2495AA2495AA2495AA2495AA2495AA249C7FC137EA25B -485A5B1203485A485A5B48C8FC123E5A5A5A1F947D8232>I<160F161F163E167C16F8ED -01F0ED03E0ED07C0150FED1F801600153E157E5D4A5A5D14034A5A5D140F4A5AA24AC7FC -143E147E5CA2495AA2495AA2495AA2130F5CA2495AA2133F91C8FCA25B137E13FEA25B12 -01A25B1203A35B1207A35B120FA35BA2121FA45B123FA690C9FC5AAA12FEB3AC127FAA7E -7FA6121F7FA4120FA27FA312077FA312037FA312017FA212007FA2137E137F7FA280131F -A26D7EA2801307A26D7EA26D7EA26D7EA2147E143E143F6E7EA26E7E1407816E7E140181 -6E7E157E153E811680ED0FC01507ED03E0ED01F0ED00F8167C163E161F160F28C66E823D ->I<12F07E127C7E7E6C7E6C7E6C7E7F6C7E1200137C137E7F6D7E130F806D7E1303806D -7EA26D7E147C147E80A26E7EA26E7EA26E7EA2811403A26E7EA2811400A281157E157FA2 -811680A2151F16C0A3150F16E0A3150716F0A31503A216F8A4150116FCA6150016FEAA16 -7FB3AC16FEAA16FC1501A616F81503A416F0A21507A316E0150FA316C0151FA31680153F -A216005DA2157E15FE5DA214015DA24A5AA214075DA24A5AA24A5AA24AC7FCA2147E147C -14FC495AA2495A5C1307495A5C131F49C8FC137E137C5B1201485A5B485A485A48C9FC12 -3E5A5A5A28C67E823D>I<EE01E01603EE07C0EE0F80161F1700163E5E5E15015E4B5A15 -074B5A5E151F4BC7FC153E157E5DA24A5A14035D14075D140F5D141F5D143F92C8FC5C14 -7E14FE5C1301A25C13035C1307A25C130FA2495AA3495AA3137F91C9FCA25B5BA312015B -A31203A25BA21207A35BA2120FA35BA3121FA45BA2123FA75B127FAC90CAFC5AB3B3A27E -7FAC123F7FA7121FA27FA4120FA37FA31207A27FA31203A27FA21201A37F1200A37F7FA2 -80133FA36D7EA36D7EA2130780A2130380130180A2130080147E147F8081141F81140F81 -14078114038114016E7EA2157E153E153F6F7E150F826F7E15036F7E821500167C828217 -80160FEE07C0EE03E016012BF86C8242>32 D<12F07E127C7E123F7E6C7E6C7E6C7E7F12 -016C7E7F137E133E133F6D7E130F806D7EA26D7E80130180130080147E147F8081141F81 -140F81140781A2140381140181A2140081A2157FA36F7EA382151FA282150FA3821507A3 -82A21503A282A31501A282A31500A382A482A21780A7163F17C0AC161F17E0B3B3A217C0 -163FAC1780167FA71700A25EA45EA31501A35EA21503A35EA21507A25EA3150F5EA3151F -5EA2153F5EA34BC7FCA315FEA25D1401A25D14035D1407A25D140F5D141F5D143F92C8FC -5C147E14FE5C13015C13035C495AA2495A5C131F49C9FC133E137E5B5B485A12035B485A -485A48CAFC5A123E5A5A5A2BF87E8242>I<B61280A600FCC8FCB3B3B3B3B3B3B3B3B3B3 -B3B3B3A2B61280A619F86A8230>I<B61280A6C7121FB3B3B3B3B3B3B3B3B3B3B3B3B3A2 -B6FCA619F8808230>I<177C17FCEE01F8A2EE03F0EE07E0EE0FC0A2EE1F80EE3F005E16 -7E5E15015E15034B5A5E150F5E151F4B5AA24BC7FCA215FEA24A5AA24A5AA24A5AA2140F -5D141F5D143F5DA2147F92C8FC5CA25C13015C1303A25C1307A3495AA3495AA3133F5CA3 -137F5CA313FF91C9FCA35A5BA31203A25BA31207A35BA3120FA45BA2121FA65BA2123FA8 -5BA2127FAE5B12FFB3A62E95688149>48 D<12F87E127EA27E6C7E6C7EA26C7E6C7E7F12 -016C7E7F137E137F6D7E131F80130F806D7EA26D7EA26D7EA26D7EA2147FA26E7EA28114 -1F81140F811407A281140381A2140181140081A28182A36F7EA36F7EA382150FA3821507 -A3821503A3821501A382A281A31780A3167FA317C0A4163FA217E0A6161FA217F0A8160F -A217F8AE160717FCB3A62E957E8149>I<B612F0A600FCC8FCB3B3B3B3B3B3B3B01C9466 -8137>I<B612F0A6C71203B3B3B3B3B3B3B3B01C94808137>I<12FCB3B3B3B3B3B3B3B0B6 -12F0A61C94668237>I<EC03F0B3B3B3B3B3B3B3B0B6FCA61C94808237>I<12FCB3B3B006 -34668037>I<12FCB3B3B006346A8037>I<B47EB3A6127F7FAE123FA27FA8121FA27FA612 -0FA27FA41207A37FA31203A37FA21201A37F7EA380137FA380133FA380131FA36D7EA36D -7EA3130380A2130180130080A28081143FA281141F81140F811407A26E7EA26E7EA26E7E -A2157FA26F7EA26F7E150F821507826F7E1501821500167E167F82EE1F80EE0FC0A2EE07 -E0EE03F0EE01F8A2EE00FC177C2E95688349>64 D<EE07FCB3A617F8160FAE17F0A2161F -A817E0A2163FA617C0A2167FA41780A316FFA31700A35DA25EA315035EA315075EA3150F -5EA3151F5EA34B5AA34B5AA393C7FC5DA25D14015D1403A25D14075DA2140F5D141F5D14 -3F5DA24AC8FCA214FEA2495AA2495AA2495AA2495A5C131F5C133F49C9FC137E13FE5B48 -5A12035B485A485AA2485A48CAFC127EA25A5A2E957E8349>I<EAFF80B3B3B009346880 -49>I<EAFF80B3B3B00934598049>I<BB12FC86A3D87FC0C9001F7FF0007F6C6C17076C6C -050113806C6CEF007F1A1F6C6CF00FC06C6C18076C6C1803F201E06C6D17006D6C186001 -3F19706E18306D7E6D6C18181B006D7E6D7E6D7EA26D7F6E7E6E7EA26E7E6E7E6E7EA26E -7E6E7E80826F7E6F7EA26F7E6F7E6F5A5EA24B5A5E4BCBFC153E157E5D5D4A5A4A5A1407 -5D4A5A4ACCFC143E147E147C5C4948181801031930495A4A18704948186049CC12E04918 -01017EF003C0017C180749180F4848F01F800003197F49EF01FF4848050713004848173F -48CA000FB5FC48BA5AA25ABB5AA24D537B7F58>80 D<B512E0A500F8C7FCB3B3B3B3B3B3 -B3ACB512E0A513946E8227>104 D<B512E0A5EA0003B3B3B3B3B3B3B3ACB5FCA513947F -8227>I E /Fj 65 123 df<121C127FEAFF80B3EA7F00B2123EC7FCA8121C127FA2EAFF -80A3EA7F00A2121C09396DB830>33 D<00101304007C131F00FEEB3F80A26C137FA24813 -3FB2007E1400007C7F003C131E00101304191C75B830>I<903907C007C0A2496C487EA8 -011F131FA202C05BA3007FB7FCA2B81280A36C16006C5D3A007F807F80A2020090C7FCA9 -495BA2003F90B512FE4881B81280A36C1600A22701FC01FCC7FCA300031303A201F85BA7 -6C486C5AA229387DB730>I<D803C0EB01E0D80FF01303486C497E487E150F487ED87E7E -495AEAFE7F5E486C133FA25E157FA24BC7FC6C5A5D387E7E01EA7FFED83FFC5B1403EA1F -F86C48485AEA03C0C75B140FA25D141FA24A5AA25D147FA292C8FC5CA2495AA25C1303A2 -5C1307A290390FF001E0ED07F84A487E011F497EA24A487E133F163F90267F807F1380ED -7E1F14005BA25B1201A24848EB7F3F033F13004914FF12076F5A5B6F5A6C486D5A0001EC -01E029477DBE30>37 D<EA07C0EA0FF0EA1FF8A213FCA213FE120F1207EA007EA513FE13 -FCA2120113F81203EA07F0120FEA1FE0127FEAFFC013801300127C12380F1D70B730>39 -D<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0EB7F80EBFF00485A5B12035B48 -5A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127FA47F123FA27F121FA26C7EA27F -12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB07FCEB03FEEB01FF7F147F141E -184771BE30>I<127812FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7EEB7F80133F14C013 -1FEB0FE014F01307A2EB03F8A214FC1301A214FE1300A4147FAD14FEA4130114FCA21303 -14F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF00485A485A485A485AEA3FE0485A -485A90C7FC5A1278184778BE30>I<14E0497E497EA60038EC0380007EEC0FC0D8FF83EB -3FE001C3137F9038F3F9FF267FFBFB13C06CB61280000FECFE00000314F86C5C6C6C13C0 -011F90C7FC017F13C048B512F04880000F14FE003FECFF80267FFBFB13C026FFF3F913E0 -9038C3F87F0183133FD87E03EB0FC00038EC0380000091C7FCA66D5A6D5A23277AAE30> -I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76CC8FCAF143EA229297DAF30>I<EA -03E0EA0FF0EA1FF813FCEA3FFEA213FFA27EA27E1203EA007FA2137E13FEEA01FC1203EA -07F8EA3FF0127FEAFFE0EA7F801300123C1019708B30>I<007FB612F0A2B712F8A36C15 -F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C0C6E8B -30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED3FC0A2ED7F80A2EDFF00A24A5A -A25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FCA2495AA25C1303A2495AA2495A -A2495AA2495AA2495AA249C8FCA2485AA25B1203A2485AA2485AA2485AA2485AA2485AA2 -48C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0497F013F13F8497F90B57E48EB -83FF4848C6138049137F4848EB3FC04848EB1FE049130F001F15F0491307A24848EB03F8 -A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D1303003F15F8A26D1307001F15 -F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13FF2601FF8313006CEBFFFE6D5B -6D5B010F13E06D5BD900FEC7FC273A7CB830>I<EB03C0497EA2130FA2131FA2133F137F -13FF1203123FB5FCA213EF138FEA7E0F1200B3B0003FB512F84814FCB612FEA26C14FC6C -14F81F3977B830>I<EB07FC90383FFFC090B512F00003804814FE4880261FF80F138026 -3FE00113C09038C0007F4848EB3FE090C7121FED0FF04814075A6C15F81503A3127E1218 -C8FCA2150716F0150F16E0151F16C0153FED7F8015FF4A13005DEC07FC4A5A4A5A4A5A4A -5A4A5A4990C7FC495A495AEB0FF0EB3FE0495A495A4890C8FC4848EB01F04848EB03F848 -5AEA1FE048B6FCB7FCA37E6C15F025397BB830>I<EB03FF013F13E090B512F84814FE48 -80481580260FFE0113C09038F0007F4848EB1FE0150F16F01507A26C5A6C5AC8FC150F16 -E0A2151FED3FC0157FEDFF8002071300903807FFFE495B5D8115FF6D1480D9000113C091 -38003FE0ED1FF0ED07F8150316FC150116FE1500A21218127EB4FCA2150116FC4814036C -15F86C6C13076DEB1FF0D83FF0133F3A1FFE01FFE06CB612C06C15806CECFE00C65C013F -13F001031380273A7CB830>I<EC03FC4A7E140F141FA2143F147F157E14FEA2EB01FCEB -03F8A2EB07F0A2EB0FE0EB1FC0A2EB3F80A2EB7F0013FEA2485A485AA2485AA2485A485A -A2485AA248C7FC12FEB8FC1780A46C1600C8007EC7FCAA91387FFFFE91B6FCA46E5B2939 -7DB830>I<000FB612804815C05AA316800180C8FCAEEB83FF019F13C090B512F015FC81 -81D9FE0313809039F0007FC049133F0180EB1FE06CC7120F000E15F0C81207A216F81503 -A31218127EA2B4FC150716F048140F6C15E06C141F6DEB3FC06D137F3A3FE001FF80261F -FC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC25397BB730>I<EC0FF8EC7FFF -49B51280010714E0131F4914F090387FF80F9039FFC007F84813803803FE005B485A4848 -EB03F0ED01E0484890C7FC5B123F5BA2127FEB000C903803FFE0010F13F8D8FF3F13FE48 -B6FCB7128016C09039FE007FE001F8EB1FF001E0130F49EB07F8ED03FC5B90C7120116FE -1500A37EA46C7E15016D14FC121F6D1303000FEC07F86D130F6C6CEB1FF06DEB3FE03A03 -FF81FFC06C90B512806C15006D5B011F13F8010713E001011380273A7CB830>I<127CB7 -12FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0C8EA7F80EDFF00A24A5A4A5A5D14 -075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213035CA213075CA4495AA6131F5CA9 -6D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13FC90B57E0003ECFF804815C04801 -0113E03A1FF8003FF049131FD83FC0EB07F8A24848EB03FC90C71201A56D1303003F15F8 -6D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF83FF806C90B512006C6C13FC011F -13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0D81FE0EB0FF04848EB07F8491303 -007F15FC90C712014815FE481400A66C14016C15FC6D1303003F15F86D1307D81FF0EB1F -F06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE006D5B011F13F0010190C7FC273A7C -B830>I<49B4FC010F13E0013F13F890B57E4880488048010113803A0FFC007FC0D81FF0 -EB3FE04848131F49EB0FF048481307A290C7EA03F85A4815FC1501A416FEA37E7E6D1303 -15076C7E6C6C130F6D133FD80FFC13FF6CB6FC7E6C14FE6C14F9013FEBE1FC010F138190 -380060011400ED03F8A2150716F0150F000F15E0486C131F486CEB3FC0157FEDFF804A13 -00EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649C7FCEB3FF0273A7CB830>I<120FEA -3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7FCAF120FEA3FC0EA7FE0A2EAFFF0A4 -EA7FE0A2EA3FC0EA0F000C276EA630>I<EA03C0EA0FF0EA1FF8A2EA3FFCA4EA1FF8A2EA -0FF0EA03C0C7FCAFEA03C0EA0FF0121F13F8123F13FCA3121FA2120F12031200120113F8 -120313F01207EA1FE0123FEA7FC0EAFF80EA7F00127E12380E3470A630>I<007FB7FCA2 -B81280A36C16006C5DCBFCA7003FB612FE4881B81280A36C1600A229157DA530>61 -D<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1FFF6D7F01 -0313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153FEDFFF05C -020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC48485A48 -13E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>I<147F4A7E -A2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7FA490383F80FEA590387F00 -7FA4498049133F90B6FCA34881A39038FC001F00038149130FA4000781491307A2D87FFF -EB7FFFB56CB51280A46C496C130029397DB830>65 D<007FB7FCB81280A47ED803F8C712 -3FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800A4157C92C8FCA5EE07C0EE0FE0A900 -7FB7FCB8FCA46C16C02B387EB730>69 D<3B3FFF800FFFE0486D4813F0B56C4813F8A26C -496C13F06C496C13E0D803F8C7EAFE00B290B6FCA601F8C7FCB3A23B3FFF800FFFE0486D -4813F0B56C4813F8A26C496C13F06C496C13E02D387FB730>72 D<D83FF8ECFFE0486C49 -13F0486C4913F8A2007F16F06C6C4913E00007160001EF14BFEC800FA39039E7C01F3FA4 -ECE03F01E3133EA2ECF07EA201E1137CA2ECF8FCA201E013F8A214FDEC7DF0A3147FEC3F -E0A3EC1FC0A2EC070091C7FCADD83FFC903801FFE0486C4913F0B54913F8A26C486D13F0 -6C486D13E02D387FB730>77 D<D83FFC90381FFF80486C4913C0B54913E0A26C6D6C13C0 -6C6E13800003913801F800EBF7C0A3EBF3E0A314F013F1A214F8A213F014FCA2147C147E -A2143E143FA2141FA21581A2140F15C1A2140715E1A2140315F1A21401A215F91400A315 -7DA3153FEA3FFF481380B5EAC01FA26CEB800F6C496C5A2B387EB730>I<90383FFFE048 -B512FC000714FF4815804815C04815E0EBF80001E0133FD87F80EB0FF0A290C71207A448 -15F8481403B3A96C1407A26C15F0A36D130FA26D131F6C6CEB3FE001F813FF90B6FC6C15 -C06C15806C1500000114FCD8003F13E0253A7BB830>I<90390FF803C0D97FFF13E048B5 -12C74814F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37E -ED07C06C91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF0103 -1480D9003F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F0 -7F6DEB0FE06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD8 -78011380253A7BB830>83 D<003FB712C04816E0B8FCA43AFE003F800FA8007CED07C0C7 -91C7FCB3B1011FB5FC4980A46D91C7FC2B387EB730>I<007FB5FCB61280A4150048C8FC -B3B3B3A5B6FC1580A46C140019476DBE30>91 D<127CA212FEA27EA26C7EA26C7EA26C7E -A26C7EA26C7EA26C7EA212017FA26C7EA26D7EA26D7EA26D7EA26D7EA26D7EA26D7EA213 -0180A26D7EA26E7EA26E7EA26E7EA26E7EA26E7EA26E7EA2140181A26E7EA2ED7F80A2ED -3FC0A2ED1FE0A2ED0FF0A2ED07F8A21503A2ED01F0150025477BBE30>I<007FB5FCB612 -80A47EC7123FB3B3B3A5007FB5FCB6FCA46C140019477DBE30>I<007FB612F0A2B712F8 -A36C15F0A225077B7D30>95 D<EB3FFC48B57E4814E04880488048809038F00FFE9038E0 -01FF806F7E6C48133F6C4880C8121FA491B5FC130F137F48B6FC12075A48EBC01F383FFC -00EA7FE0138048C7FC5AA46C143FA26C6C137F9038C001FF263FF80FEBFFC06CB712E0A2 -000714F76C14C3C6020013C0D93FF090C7FC2B2A7CA830>97 D<EA3FFC487E12FFA2127F -123F1200AAEC03FE91381FFF80027F13E091B57E90B612FC82ECFE079138F001FF4A6C13 -804A137F4AEB3FC091C7121F4915E0160FA217F01607A8160FA217E07F161F6EEB3FC0A2 -6EEB7F806E13FFDAF00313009138FC0FFE91B55A5E495CD97E7F13C0D93C1F90C7FC9038 -0003FC2C3980B730>I<ECFFE0010713FC011F7F017F7F90B612804815C048EB807F3907 -FC003F485A485A49EB1F804848EB0F004990C7FC127F90C9FCA25A5AA87E7EA27F003FEC -07C06DEB0FE06C7E6D131F6C6C14C0D807FE133F9039FFC0FF806C90B5FCC615006D5B01 -1F13F801075B01011380232A7AA830>I<913801FFE04A7F5CA28080EC0007AAEB03FE90 -381FFF874913E790B6FC5A5A481303380FFC00D81FF0133F49131F485A150F4848130790 -C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E6D137F390FF801FF2607FE07EBFF -C06CB712E06C16F06C14F76D01C713E0011F010313C0D907FCC8FC2C397DB730>I<49B4 -FC010713E0011F13F8017F7F90B57E488048018113803A07FC007FC04848133FD81FE0EB -1FE0150F484814F0491307127F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC -01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F1480 -6DEBFE00010713F8010013C0252A7CA830>I<EDFF80020713E0021F13F05C4A13F891B5 -FC491387903803FE079138FC03F0903907F800C04A1300A8003FB612C04815E0B7FCA36C -15C0260007F0C7FCB3A9003FB512FE4880B71280A26C15006C5C25397DB830>I<D903FC -13FF90261FFF8713C04913DF90B712E05A5A2607FE07138F903AF801FE07C048486C6CC7 -FCA2497F001F8149133FA56D137F000F92C7FC6D5BA26C6C485AEBFE0790B55A5D485C15 -C001DF5BD9C3FCC8FC01C0C9FCA37F7F6CB512F015FF6C15C04815F0488148813A3FE000 -1FFE0180130148C8127F007E8100FE168048151FA56C153F007FED7F006D5C6C6C495A01 -F013076CB4EB7FFC6C90B55A6C5D000115C06C6C91C7FC011F13FC010113C02B3E7DA730 ->I<EA3FFC487E12FFA2127F123F1200AAEC01FE91380FFF80023F13E091B57E90B67EA2 -9138FE07FCECF8039138E001FE14C0EC8000A291C7FCA25BB3A23B3FFFF81FFFF8486D48 -13FCB500FE14FEA26C01FC14FC6C496C13F82F3880B730>I<14E0EB03F8A2497EA36D5A -A2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C -15C023397AB830>I<EC01C0EC07F0A2EC0FF8A3EC07F0A2EC01C091C7FCA990B512F048 -14F8A47EEB0003B3B3A5EC07F0A2123C007EEB0FE0B4131FEC3FC0147F90B512806C1400 -5C6C5B000F13F0000313C01D4E7CB830>I<EA7FF8487EA4127F1200AB0203B512804A14 -C017E0A217C06E14809139001FE0004B5A4B5A4BC7FC4A5A4A5AEC0FF84A5A4A5A4A5A4A -5A01FD7F90B57E8114F7ECE3F8ECC1FCEC81FEEC00FF497F496D7E6F7E826F7E15076F7E -6F7E3B7FFFF81FFFE0B56C4813F017F8A217F06C496C13E02D387FB730>I<387FFFF8B5 -7EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB730>I<02FC137E3B7FC3FF -01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07EB03F801FC13FE90 -39F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80B548018F13C0A46C486C01 -071380322881A730>I<EC01FE3A3FFC0FFF80267FFE3F13E000FF90B57E90B67E7E6C90 -38FE07FCC6EBF8039138E001FE14C0EC8000A291C7FCA25BB3A23B3FFFF81FFFF8486D48 -13FCB500FE14FEA26C01FC14FC6C496C13F82F2880A730>I<49B4FC010F13E0013F13F8 -497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0FF0A24848EB07F849 -1303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D1303003F15F86D13076D13 -0F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B512806C15006C6C13FC6D5B010F -13E0010190C7FC272A7CA830>I<EC03FE3A3FFC1FFF80267FFE7F13E000FF90B57E90B6 -12FC6C816CEBFE07C69038F001FF4A6C13804A137F4AEB3FC091C7121F4915E0160FA217 -F01607A8160FA217E07F161F6EEB3FC0A26EEB7F806E13FFDAF00313009138FC0FFE91B5 -5A5E495C6E13C0021F90C7FCEC03FC91C9FCAD383FFFF8487FB57EA26C5B6C5B2C3C80A7 -30>I<49B413F8010FEBC1FC013F13F14913FD48B6FC5A481381390FFC007F49131F4848 -130F491307485A491303127F90C7FC15015A5AA77E7E15037FA26C6C1307150F6C6C131F -6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F13F1010F13C1903803FE01 -90C7FCAD92B512F84A14FCA46E14F82E3C7DA730>I<ED07F83A3FFF803FFF486DB51280 -B512C302CF14C06C13DF6C9038FFFC3FD8001F13E09238801F809238000F004A90C7FC5C -5C5CA25CA45CAF003FB512FC4880B7FCA26C5C6C5C2A287EA730>I<90381FFC1E48B512 -9F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E007F91C7FC13E06CB4FC6C -13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02001380007C147F00FEEC1F -C0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00FC14F0D8F83F13C0 -26780FFEC7FC222A79A830>I<EB0780497E131FA9003FB612E04815F0B7FCA36C15E026 -001FC0C7FCB216F8ED01FCA5ECE003010FEB07F814F09138FC1FF06DB512E06D14C01680 -6D14009038007FFCEC1FF026337EB130>I<D83FFCEB3FFC486C497E00FF14FFA2007F14 -7F003F143F00001400B3A41501A2150315076D130F903A7FC07FFFF891B612FC6D15FE7F -6D4913FC6D9038F87FF8010001C0C7FC2F2880A630>I<3B3FFFC07FFF80486DB512C0B5 -15E0A26C16C06C496C13803B01F80003F000A26D130700005DA26D130F017E5CA2017F13 -1F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0FE01075BA214F101035BA3903801 -FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFFC01FFFE0486D4813F0B515F8A26C -16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA56D14FE00015DEC0F80EC1FC0EC3F -E0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A3017E13FBA290393FF07FE0A3ECE03F -A2011F5C90390F800F802D277FA630>I<3A3FFF81FFFC4801C37FB580A26C5D6C01815B -C648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB0FE3ECE7F06DB45A6D5B7F6D5B92 -C8FC147E147F5C497F81903803F7E0EB07E790380FE3F0ECC1F890381F81FC90383F80FE -90387F007E017E137F01FE6D7E48486D7E267FFF80B5FCB500C1148014E3A214C16C0180 -140029277DA630>I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C496C13803B01FC -0003F000A2000014076D5C137E150F017F5C7F151FD91F805BA214C0010F49C7FCA214E0 -0107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFDF0147D147FA26E5AA36E5AA35DA2 -143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3F81387EB8FF0EBFFE06C5B5C6C90 -C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE5AA316FC90C7EA0FF8ED1FF0ED3F -E0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A5A4A5A4A5A4990C7FC495A495A49 -5A495A495A495A4948133E4890C7127F485A485A485A485A485A48B7FCB8FCA46C15FE28 -277DA630>I E /Fk 5 53 df<156015F0A24A7E4A7EA24A7E1406EC0E7F140C91381C3F -8014184A6C7E150F02607F150702C07F1503D901807F1501D903007F496D7E1306010E14 -7F130C011C6E7E131801386E7E1330496E7E160749811603484881160148C87F486F7E12 -06000E167F120C001CEE3F801218003FB812C0A24817E0A2B912F0342F7DAE3B>1 -D<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23>49 -D<EB7F803801FFF0380780FC380E003F48EB1F8048EB0FC05A0060EB07E012F000FC14F0 -7E1403A3007C1307C7FCA215E0140F15C0141F1580EC3F00147E147C5C495A495A495A49 -5A011EC7FC5B5B4913305B485A4848136048C7FC000E14E0001FB5FC5A4814C0B6FCA21C -2C7DAB23>I<EB3FC03801FFF03807C0FC380E007E487FEC1F80003F14C0A2EB800F1300 -A2000C131FC7FC1580A2EC3F00143E5C5CEB03F0EBFFC014F0EB00FC143FEC1F8015C014 -0F15E0A2EC07F0A21238127C12FEA3EC0FE012F8006014C00070131F6C1480001EEB3F00 -380780FC3801FFF038007FC01C2D7DAB23>I<140EA2141E143EA2147E14FEA2EB01BE13 -03143E1306130E130C131813381330136013E013C0EA0180120313001206120E120C5A12 -3812305A12E0B612FCA2C7EA3E00A9147F90381FFFFCA21E2D7EAC23>I -E /Fl 13 121 df<007FB812FEBAFCA26C17FE3804799847>0 D<121EEA7F80A2EAFFC0 -A4EA7F80A2EA1E000A0A799B19>I<0060166000F816F06C1501007E15036CED07E06C6C -EC0FC06C6CEC1F806C6CEC3F006C6C147E6C6C5C6C6C495A017E495A6D495A6D6C485A6D -6C485A6D6C48C7FC903803F07E6D6C5A903800FDF8EC7FF06E5A6E5AA24A7E4A7EECFDF8 -903801F8FC903803F07E49487E49486C7E49486C7E49486C7E017E6D7E496D7E48486D7E -4848147E4848804848EC1F804848EC0FC048C8EA07E0007EED03F0481501481500006016 -602C2C73AC47>I<D91FE01620D9FFFC16704813FF000714C04814F048809026E01FFE15 -F0273F0003FFEC01E0007E010013C00078DA3FF01307DB0FFCEB0FC048913A07FF807F80 -48020190B5FC6F1500043F5B040F13F804035B00409238007F80CDFCA4D91FE01620D9FF -FC16704813FF000714C04814F048809026E01FFE15F0273F0003FFEC01E0007E010013C0 -0078DA3FF01307DB0FFCEB0FC048913A07FF807F8048020190B5FC6F1500043F5B040F13 -F804035B00409238007F803C287BAB47>25 D<19301978A2197C193CA2193E191EA2191F -737EA2737E737EA2737E737E1A7C1A7EF21F80F20FC0F207F0007FBB12FCBDFCA26C1AFC -CDEA07F0F20FC0F21F80F27E001A7C624F5A4F5AA24F5A4F5AA24FC7FC191EA2193E193C -A2197C1978A2193050307BAE5B>33 D<0203B512F8023F14FC91B6FC010315F8D90FFEC8 -FCEB1FE0EB7F8001FEC9FCEA01F8485A485A485A5B48CAFCA2123EA25AA21278A212F8A2 -5AA2B812F817FCA217F800F0CAFCA27EA21278A2127CA27EA27EA26C7E7F6C7E6C7E6C7E -EA00FEEB7F80EB1FE0EB0FFE0103B612F8010015FC143F020314F82E3679B13D>50 -D<1718173C177CA217F8A2EE01F0A2EE03E0A2EE07C0160F1780EE1F00A2163EA25EA25E -A24B5AA24B5AA24B5AA24B5AA24BC7FCA2153E157E157C5DA24A5AA24A5AA24A5AA24A5A -A24AC8FCA2143EA25CA25C13015C495AA2495AA2495AA249C9FCA2133EA25BA25BA2485A -A2485AA2485A120F5B48CAFCA2123EA25AA25AA25A12602E5474C000>54 -D<146014F01301A214E01303A214C01307A2EB0F80A214005BA2131E133EA25BA2137813 -F8A25B1201A25B1203A2485AA25B120FA290C7FC5AA2123EA2123C127CA2127812F8A412 -78127CA2123C123EA27EA27E7FA212077FA26C7EA212017FA212007FA21378137CA27FA2 -131E131FA27F1480A2EB07C0A2130314E0A2130114F0A213001460145A77C323>104 -D<126012F07EA21278127CA2123C123EA27EA27E7FA212077FA26C7EA212017FA212007F -A21378137CA27FA2131E131FA27F1480A2EB07C0A2130314E0A2130114F0A414E01303A2 -14C01307A2EB0F80A214005BA2131E133EA25BA2137813F8A25B1201A25B1203A2485AA2 -5B120FA290C7FC5AA2123EA2123C127CA2127812F8A25A1260145A7BC323>I<126012F0 -B3B3B3B3B11260045B76C319>I<0060131800F0133CB3B3B3B3B000601318165A75C32D> -I<1A061A0F1A1FA21A3EA21A7CA21AF8A2F101F0A2F103E0A2F107C0A2F10F80A2F11F00 -A2193EA261A261A24E5AA24E5AA24E5AA24E5AA24EC7FCA2183EA260A260A24D5AA24D5A -133801F85E486C15071203D80FFE4B5A121D00394CC8FCEAF1FF00C0163EC67F017F5D80 -013F5D80011F4A5A80010F4A5A8001074A5AA26E495A13036E49C9FC13016E133E7F6F5A -147F6F5A143FEDE1F0141FEDE3E015F391380FF7C015FF6E5BA26E90CAFCA26E5AA26E5A -A215781570485B7A834C>112 D<EB3F80EBFFF03803E078380F801E48487E80003EEB03 -805A15C0140F5AA3EC078091C7FCA37E127CA27E121E121F6C7EEA03C06C7EEA00F8133E -EBFF803803E3E0380F80F0381F0078143E003E7F487F1580EC07C05A15E01403A57E127C -EC07C07E121E001FEB0F80390F801F00EA03C03801E03E3800F8F8EB3FE0EB0F80EB03E0 -EB00F01478143E80801580EC07C0A215E01403A3123C127EA3EC07C012781238EC0F806C -EB1F00121E6C133E3803C0F83801FFE038003F801B537ABF28>120 -D E /Fm 29 119 df<ED0FFF4AB512C0020F14F0027F80903A01FFF803FC499038C000FE -010FEB00034948497E49485B5C495A4C138001FF6E13005CA3705AEE01F893C8FCA74BB5 -1280B9FCA5C69038E00003B3B0007FD9FFC1B6FCA538467EC53E>12 -D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA7FFCEA3FF8EA1FF0EA07C00F0F788E1F>46 -D<EC03C01407141F147FEB03FF133FB6FCA413C3EA0003B3B3ADB712FCA5264177C038> -49 D<ECFFE0010F13FE013F6D7E90B612E0000315F82607FC0313FE3A0FE0007FFFD81F -806D138048C7000F13C0488001C015E001F07F00FF6E13F07F17F881A46C5A6C5A6C5AC9 -FC17F05DA217E05D17C04B13804B1300A2ED1FFC4B5A5E4B5A4B5A4A90C7FC4A5A4A5AEC -0FF04A5AEC3F804AC7127814FE495A494814F8D907E014F0495A495A49C8FC017C140149 -140348B7FC4816E05A5A5A5A5AB8FC17C0A42D417BC038>I<ECFFF0010713FF011F14C0 -017F14F049C66C7ED803F8EB3FFED807E06D7E81D80FF86D138013FE001F16C07FA66C5A -6C4815806C485BC814005D5E4B5A4B5A4B5A4A5B020F1380902607FFFEC7FC15F815FF16 -C090C713F0ED3FFCED0FFEEEFF80816F13C017E0A26F13F0A217F8A3EA0FC0EA3FF0487E -A2487EA217F0A25D17E06C5A494913C05BD83F80491380D81FF0491300D80FFEEBFFFE6C -B612F800015D6C6C14C0011F49C7FC010113E02D427BC038>I<163FA25E5E5D5DA25D5D -5D5DA25D92B5FCEC01F7EC03E7140715C7EC0F87EC1F07143E147E147C14F8EB01F0EB03 -E0130714C0EB0F80EB1F00133E5BA25B485A485A485A120F5B48C7FC123E5A12FCB91280 -A5C8000F90C7FCAC027FB61280A531417DC038>I<0007150301E0143F01FFEB07FF91B6 -FC5E5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1B5FC01C714C001DF14 -F09039FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C4815E0C8FC6F13F0A3 -17F8A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC74813C0123E003F4A13 -80D81FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F1480010F01FCC7FC0101 -13C02D427BC038>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F03 -1F80161F82033F80ED3E07037E80157C8203FC804B7E02018115F0820203814B137F0207 -815D173F020F814B7F021F8292C77EA24A82023E80027E82027FB7FCA291B87EA2498302 -F0C8FCA20103834A157F0107834A153FA249488284011F8491C97E4984133E017E82B602 -0FB612F0A54C457CC455>65 D<B9FC18F018FE727E19E026003FFEC7001F13F805017F94 -38003FFF060F7F727F727F727F84737E737EA2737EA2737EA21B80A2851BC0A51BE0AD1B -C0A51B8061A21B006162193F624F5A19FF624E5B06075B4E5B063F90C7FC4DB45A050F13 -F8BA5A19C04EC8FC18F095C9FC4B447CC356>68 D<B500FE067FB512806E95B6FCA26F5E -A2D8003F50C7FC013D6DEE03DFA2013C6DEE079FA26E6CEE0F1FA26E6C161EA26E6C163C -A36E6C1678A26E6C16F0A26E6DEC01E0A26E6DEC03C0A36E6DEC0780A26F6CEC0F00A26F -6C141EA26F6C5CA36F6C5CA26F6C5CA26F6D485AA26F6D485AA26F6D485AA3706C48C7FC -A293383FF81EA2706C5AA2706C5AA3706C5AA2705BA2705BA2705BA2B6057FB6128071C7 -FCA2173E171C61447CC36A>77 D<923807FFC092B512FE0207ECFFC0021F15F091267FFE -0013FC902601FFF0EB1FFF010701C0010713C04990C700017F49486E7F49486F7E49486F -7E49486F7E48496F7E48496F1380A248496F13C0A24819E091C97E4819F0A248487013F8 -A3007F19FCA249177FA300FF19FEAD007F19FCA36D17FF003F19F8A3001F19F06D5EA26C -19E06E01FE5B6C912603FF8014C06C6D486D4813804B13E06C9028E01F83F00F13006C90 -3BF01E00F81FFE90267FF83E90387C3FFC90263FFC3C6D485AD91FFE91381EFFF0D90FFF -021F5B6D01FE5D010194C7FC6D6D6CB45A023F90B512F8020703E0130202006F13070307 -13C792C7EA07F8716C130F72131F9538FF80FF96B5FC7114FEA3831AFCA27213F81AF084 -7213E07213C0721300F001FC48587AC454>81 D<003FBA12E0A59026FE000FEB8003D87F -E09338003FF049171F90C71607A2007E1803007C1801A300781800A400F819F8481978A5 -C81700B3B3A20107B8FCA545437CC24E>84 D<903801FFE0011F13FE017F6D7E48B612E0 -3A03FE007FF84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA402 -03B5FC91B6FC1307013F13F19038FFFC01000313E0000F1380381FFE00485A5B127F5B12 -FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF86CECE01F -C66CEB8007D90FFCC9FC322F7DAD36>97 D<EC3FFC49B512C0010F14F0013F14FC90397F -F003FE9039FFC001FF0003495A48494813805B120F485AA2485A6F1300007F6E5AED0078 -4991C7FCA212FFAC6C7EA3123F6DEC03C0A26C6C1407000F16806D140F6C6DEB1F006C6D -133E6C01F05B3A007FFC03F86DB55A010F14C0010391C7FC9038003FF82A2F7CAD32>99 -D<EE03FEED07FFA5ED001F160FB1EC3FE0903803FFFC010FEBFF8F013F14CF9039FFF807 -FF48EBC00148903880007F4890C7123F4848141F49140F121F485AA3127F5BA212FFAC12 -7FA37F123FA26C6C141FA26C6C143F0007157F6C6C91B5FC6CD9C00314FC6C9038F01FEF -6DB5128F011FEBFE0F010713F89026007FC0EBF80036467CC43E>I<EC3FF80103B57E01 -0F14E0013F8090397FF83FF89039FFC007FC48496C7E48496C7E48486D1380485A001FED -7FC05B003FED3FE0A2127F5B17F0161F12FFA290B7FCA401F0C9FCA5127FA27FA2123F17 -F06C7E16016C6C15E06C6C14036C6DEB07C06C6DEB0F806C01F0EB3F0090397FFE01FE01 -1FB55A010714F0010114C09026001FFEC7FC2C2F7DAD33>I<EDFF80020F13E0027F13F0 -49B512F849EB8FFC90390FFE0FFE90381FFC1F14F8133FEB7FF0A2ED0FFCEBFFE0ED03F0 -ED00C01600ABB612F8A5C601E0C7FCB3B0007FEBFFE0A527467DC522>I<137C48B4FC48 -13804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFFA51203 -7EB3AFB6FCA518467CC520>105 D<EB7FC0B5FCA512037EB3B3B3A3B61280A519457CC4 -20>108 D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E002816E -4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E -6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D -7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F801F -000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E ->I<EC1FFC49B512C0010714F0011F14FC90397FF80FFF9026FFC0017F48496C7F4848C7 -EA3FE000078248486E7E49140F001F82A2003F82491407007F82A400FF1780AA007F1700 -A46C6C4A5AA2001F5E6D141F000F5E6C6C4A5AA26C6C6CEBFFE06C6D485B27007FF80F90 -C7FC6DB55A010F14F8010114C09026001FFCC8FC312F7DAD38>I<90397FC00FF8B590B5 -7E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15C0 -4A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E49 -13806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FCAD -B67EA536407DAC3E>I<DA3FE0131E902603FFFC133E010F01FF137E013F1480903AFFF8 -0FE0FE489038E003F148EBC0014890388000FB4890C7127F49143F001F151F485A160F5B -127FA3485AAC6C7EA46C7EA26C6C141F163F6C6C147F6C15FF6C6D5A6C9038E003EF6C90 -38F01FCF6DB5128F011FEBFE0F010313F89038007FC091C7FCAD0307B512FCA536407CAC -3B>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC -14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>I<9039 -1FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE140FA2 -15077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15806C7E -010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA26DEB3F -8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C>I<EB -01E0A51303A41307A2130FA2131FA2133F137F13FF1203000F90B51280B7FCA4C601E0C7 -FCB3A3ED01E0A9150302F013C0137F150790393FF80F8090391FFC1F006DB5FC6D13FC01 -015B9038003FE023407EBE2C>I<D97FC049B4FCB50103B5FCA50003EC000F6C81B3A85E -A25EA25E7E6E491380017FD901F713FE9138F807E76DB512C7010F1407010313FE902600 -7FF0EBFC00372E7CAC3E>I<B6903803FFFCA5000101E09038003E006C163C80017F5D80 -17F8013F5D6E1301011F5D6E1303010F5D6E13076D5DED800F6D92C7FC15C05E6DEBE01E -163E6D143CEDF07C027F1378EDF8F8023F5B15FD021F5B15FF6E5BA36E5BA26E90C8FCA2 -6E5AA26E5AA21578362C7EAB3B>I E /Fn 24 118 df<1530157015E0EC03C0EC0780EC -0F00141E5C147C5C5C495A1303495A5C130F49C7FCA2133E137E137C13FC5B1201A2485A -A25B1207A2485AA3485AA448C8FCA45A127EA512FE5AA95AA87EA2127CA5123C123EA212 -1EA2121F7EA26C7EA26C7EA26C7E120013707FA213181C5A74C323>40 -D<497E806D7E1470147880A280A280A2EC0780A215C01403A215E0A3EC01F0A615F8AF14 -0315F0A5140715E0A4140F15C0A3141F1580A3EC3F00A2143E147EA2147C14FC5C13015C -13035C13075C495AA249C7FC131E133E5B13785B485A485A12075B000EC8FC5A5A12F05A -1D5A7FC323>I<121EEA3F80EA7FC012FFA41380EA7F00123C0A0A788919>46 -D<157015F014011407143F903803FFE0137FEBFFCFEBF80F1300141F15C0A5143F1580A5 -147F1500A55C5CA513015CA513035CA513075CA5130F5CA3131F497EB612F8A31D3D78BC -2D>49 D<EC03FC91381FFF8091387C07E0903901F001F0903903C000F84948137C49C712 -3E131E013E141F133C137C137813F8A3163F486C143E167E6D147C6C6C14FC6E13F89138 -C001F09138F003E090397FF807C09138FC0F0090383FFF3E6D13F86D13E06D7F01017F81 -01077F90391F1FFF80D93E0F13C0EBF8072601F00113E048486C13F04848137F4848131F -001FEC0FF890C71207003E1403A2481401A300FC15F05AA3ED03E0A26CEC07C0007C1580 -007E140F003EEC1F00003F143E6C6C5B6C6C485A3907F00FE00001B512806C6C48C7FCEB -0FF0283F7ABC2D>56 D<EC07F8EC3FFE9138FC0F80903901F007C0903907E003E0D90FC0 -13F090381F8001013F14F8EB7F004914FC48481300A24848EB01FEA21207A3485AA41503 -121F5BA31507A2000F15FC150FA2151F1207153F000315F86C6C137F000014EF90387C01 -CF90393E078FF090380FFE1FEB03F890C713E0A2ED3FC0A3ED7F8016005D003F5C487E4A -5A00FF495A5D4A5A49485A48495A007049C7FC0078137E383E03FC381FFFF06C13C0D801 -FEC8FC273F79BC2D>I<13F0EA01FC1203EA07FEA313FCA2EA03F8EA01E0C7FCB3121EEA -3F80EA7FC012FFA41380EA7F00123C0F2778A619>I<17E016011603831607A2160FA216 -1F83163FA2167F167716F7EEE7FCED01E316C3150316831507EE03FEED0F01150E151E15 -1C153C03387FED7800157015F05D4A4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC -5CA20270C7EA3FE0171F5CA2495AA2494881170F49C8FCA2130EA24982013C1507A2137C -D801FE4B7E2607FF80EC3FFEB500F00107B512FC19F85E3E417DC044>65 -D<013FB5D8F807B6FC04F015FEA29026007FF0C7380FFE006E486E5AA24B5DA4180F147F -4B5DA4181F14FF92C85BA4183F5B4A5EA491B8FC5B6102FCC8127FA318FF13074A93C7FC -A45F130F4A5DA41703131F4A5DA41707133F4A5DA3017F150F496C4A7EB6D8E01FB512FC -6115C0483E7DBD44>72 D<011FB512FC5BA29039003FF8006E5AA25DA5143F5DA5147F5D -A514FF92C7FCA55B5CA513035CA513075CA5130F5CA5131F5CA3133F497E007FB512F0A2 -B6FC263E7EBD21>I<923803FF80031F13F09238FE01FE913903F8003FDA0FE0EB1FC0DA -3F806D7E4AC7EA03F0D901FC8149486E7E49486E7E010F82494881494816804948ED3FC0 -13FF91C9FC484817E00003171F5B000718F0A2485AA2485A19F8123FA25B127FA219F048 -48163FA519E0187F5BA219C018FF1980A24D1300A24D5A6C7E4D5A60003F160F037C5C6C -6C48B4495A913A0783803FC0000F90260E01C05B9026F00C0049C7FC0007011CEBE0FE26 -03F818EB61FCD801FCEC73F8D800FEEC77F0017FEC7FC0D93F985CD90FFC01FEC8FC9027 -03FE07F813030100B5FC91260FFC3C5B91C7FC180E163E181E043F137CEF81FC17FF60A2 -60A2705B60705B7048C7FCEE01F83D5276BF47>81 D<9239FF8003800207EBF007021F90 -38FC0F0091387F00FE02FCEB1F1FD903F0EB07BF49486DB4FC49487F4A6D5A49C8FC4915 -7E133E137E173E49153CA57F1738A26D92C7FC808080EB7FFEECFFE06D13FEEDFFC06D14 -F06D14FC010380010080143F020380DA003F7F15031500707E163F161FA2160F121CA316 -07160F003C5EA35F003E151F94C7FC007E5D007F153E6D5C16FC01E0495AD87DF0495AD8 -FCFCEB0FC03AF87F803F8027F01FFFFEC8FCD8E00713F839C0007FC031427BBF33>83 -D<EC7FC0903803FFF890380FC07E90383E003F496D7E01FF6D7E82A248140782A26C5A13 -7890C7120FA25EA2EC03FF147F903807FF1FEB1FE0D97F805B3801FE00EA03F8485A4848 -133F485A003F5D49EC81C048C7FCA2157F48ED03804814FFA2007F5B913903BF07009038 -80073F3A3FC00E1F8E260FE03C13FC3A03FFF00FF83A007FC003E02A2A7CA82D>97 -D<EC1FF0ECFFFE903903F01F8090390FC003C0D93F0013E0017E130F49131F000115F048 -48EB3FE0485AA24848EB1FC0001FEC0F004990C7FC123FA2485AA412FF90C9FCA96CEC03 -80150716006C6C5B151E001F5C6C6C5B6C6C5B6C6C485A3901F80F8026007FFEC7FCEB0F -F0242A7AA828>99 D<EE03F8ED01FFA3ED000F1607A217F0A4160FA217E0A4161FA217C0 -A491380FF03FECFFFC902603F81F138090390FC007BF90391F8003FF90387E0001497F00 -01157F48481500485A120F5B001F5D485A5E5B127FA2150112FF90C75BA41503A25EA37E -1507A26C4A5A7F001F141F6C6C133F6C6CEBFFF83B03F001EFFFC03900F80F8F90383FFE -0FD90FF0EBE0002D407ABE33>I<EC3FE0903801FFF8903807E07E90380F801F90393F00 -0F80017E14C049EB07E0485A12034848EB03F0485AA2121F5B123FA248481307A290B6FC -A2D8FF80C8FC90C9FCA87EED01C015036C15806D1307001FEC0F006D131E000F5C6C6C5B -6C6C485A3900FC07C0D93FFFC7FCEB07F8242A7BA828>I<1478EB01FE130314FFA25B14 -FE130314FCEB00F01400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0A5133F -1480A5137F1400A55B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>105 -D<143FEB1FFF5BA213017FA214FEA5130114FCA5130314F8A5130714F0A5130F14E0A513 -1F14C0A5133F1480A5137F1400A55B5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 -D<903907F007F8D803FFEB1FFF9139E0781FC09138E1E00F3B001FE38007E090380FE700 -02EE14F014FC14D814F85CA24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C713 -80A4167F5B491500A300015D486C491380B5D8F87F13FCA32E287DA733>110 -D<EC0FF0ECFFFE903903F01F8090390FC007C049C66C7E013E6D7E01FC6D7E4848804914 -7C0003157E485A000F157F5B121FA2485AA2007F1680A2170048C85AA54B5AA25E5A6C4A -5A7E4B5A5E6C140F6C6C5C4B5A6C6C013EC7FC6C6C5B6C6C485A3900FC0FE090383FFF80 -D90FF8C8FC292A7BA82D>I<903907F01F80D803FFEB7FE09138E1E1F09138E387F83900 -1FE707EB0FE614EE02FC13F002D813E09138F801804AC7FCA25C131FA25CA4133F5CA513 -7F91C8FCA55B5BA31201487EB512FEA325287EA724>114 D<9138FF81C0010713E39038 -1F807F90397C003F8049131F4848130F5B00031407A248481400A27FA27F6D90C7FCEBFF -8014FC6C13FF6C14C015F06C6C7F011F7F13079038007FFE1403140100381300157EA212 -3C153E157E007C147CA2007E147815F8007F495A4A5A486C485A26F9E01FC7FC38E0FFFC -38C01FE0222A7DA824>I<EB0380A4130791C7FCA25BA25BA2133EA2137E13FE12011207 -001FB512C0B6FCA2D801FCC7FCA312035BA512075BA5120F5BA41407001F130E13C0A414 -1E141C1380A26D5AA2000F5B14F03807E1E03801FF80D8007EC7FC1A3978B723>I<01FE -147F00FFEC7FFF4914FEA20007140300031401A34914FCA4150312074914F8A41507120F -4914F0A4150F121F4914E0A2151FA3153F4914C0157F15FFEC01DF3A0FC003BFE0913807 -3FFF3803F01E3801FFF826003FE01380282977A733>I E /Fo 27 -123 df<15FCEC03FF91380F87C091383E03E0EC7C0102F813F01301903903F000F8495A -010F14FC5C495A133F91C7FC4914FE13FEA212015B12034913011207A25B000F15FC1503 -121F5BA21507003F15F890B6FCA33A7FC0000FF05BA2151F16E048C7FCA2ED3FC0A24815 -80157F1600A215FEA24A5AA24A5A007E5C14075D4A5A003E5C141F4AC7FC6C137E5C380F -81F03807C3E03801FF80D8007EC8FC27417DBF2B>18 D<EE01C0A21603A25FA21607A294 -C7FCA25EA2160EA2161EA2161CA2163CA21638A21678017C167048B491387001FC2603C7 -C0EC03FED8070314F0000F7F000E15E0121C010701011301003816004C137ED8780F163E -0070EBC003181ED8F01F5C0280151C00001407133F020090C7123C1838495B137E030E14 -7801FE167049011E14F018E0031C13010001EE03C049013C148017070338EB0F006C6C15 -1E03785B5F017E01705B4C5A6D9038F003C0D91F80010FC7FC90390FE0E03E903903FCE1 -F89039007FFFE0020790C8FCEC01C0A21403A25DA21407A292C9FCA25CA2140EA2141EA2 -141CA237527EBE3B>32 D<18E00130ED03F80170ED07FC13F0485A5B1203491503000716 -0148CAFC187C120E121E001C173C003C021C14380038147EA20078177803FE147000705C -A218F04A4814E000F01601A24BEB03C0A24BEB07800203140F6C0107EC1F00173E6CD91F -F0137E007C013F5C007E90397FF803F83B7F83FFFE1FF0263FFFFCB5FC4A14C06C496C5B -6C01C091C7FC6C9038001FFCD801FCEB07E036297FA739>I<EE03F801E0EC0FFE0001ED -3FFF4991B5128000034A14C04848903903F80FE090C73807E0034891390FC001F0000E15 -00001E021E1300001C5C003C177000385C1570007814F000705C140100F04A14F018E048 -495A17014AC7FC18C01703020EEC07807EEF0F006C011E141E0078163E007C011C5C6C5E -003F013CEB03F0D81F804A5AD80FE0EC1FC02607FC78EBFF802803FFF807FEC7FC6C90B5 -5A6C6C14F0011F14C0010749C8FC010013F0D901F0C9FCA3495AA31307A25CA2130FA349 -5AA491CAFC130E343C7CA73B>39 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A7989 -19>58 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3120113801203 -13005A120E5A1218123812300B1C798919>I<ED0180ED03C01507A21680150FA216005D -A2151E153EA2153C157CA2157815F8A25D1401A25D1403A25D1407A25D140FA24AC7FCA2 -141E143EA2143C147CA2147814F8A25C1301A25C1303A25C1307A25C130FA291C8FC5BA2 -131E133EA25BA2137813F8A25B1201A25B1203A25B1207A25B120FA290C9FC5AA2121E12 -3EA2123C127CA2127812F8A25A1260225B7BC32D>61 D<49B612C05BA2D90001EB800093 -C7FC5DA314035DA314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C8FCA35B5C -A313035CA313075CA3130F5CA3131F5CA2133FA25CEBFFE0B612E0A32A3E7DBD28>73 -D<49B77E18F818FFD90001D900017F9438003FE04BEC0FF0727E727E14034B6E7EA30207 -825DA3020F4B5A5DA24E5A141F4B4A5A614E5A023F4B5A4B4A5A06FEC7FCEF03FC027FEC -0FF04BEBFF8092B500FCC8FC5F9139FF8001FE92C7EA7F80EF1FC084496F7E4A1407A284 -13035CA2170F13075C60171F130F5CA3011F033F5B4AEE038018E0013F17071A004A021F -5B496C160EB600E090380FF01E05075B716C5ACBEAFFE0F03F8041407DBD45>82 -D<EC1F80ECFFE0903903F0707090390FC039F890381F801D90383F000F017E5C5B000114 -07485A48485CA2485A001F140F5E485AA2151F007F5D5BA2153F00FF92C7FC90C7FCA25D -92387E03805AA215FEEDFC07007E0101140014035E6C0107130E140E3A1F801C7C1C000F -13783A07C1F03E383A01FFC01FF03A007F0007C029297DA730>97 -D<EB1FC0EA0FFF5CA2EA003FA291C8FCA25BA2137EA213FEA25BA21201A25BA21203A25B -EC3F800007EBFFE09038F3C1F849C67E01FE137E4848133E49133F5B491480001F141F5B -5BED3FC0123FA290C7FCA248147F1680127EA215FF00FE15005AA24A5AA25D1403485C14 -07007C5C4A5A5D003C495A003E49C7FC001E137E6C13F8380783F03803FFC0C648C8FC22 -407CBE27>I<EC07F0EC7FFE903801FC0F903907E0038090390FC001C0D93F8013E09038 -7F000701FE131F485A485A16C0485A000F15804990C7FC121F485AA3127F5BA312FF90C9 -FCA6007E1560007F15E01501ED03C06CEC07806DEB0F00001F141E6C6C137C3907E001F0 -3901F01FC06CB5C7FCEB1FF023297DA727>I<EE07F0ED03FF17E0A2ED000FA217C0A216 -1FA21780A2163FA21700A25EA2167EA216FEA25EEC1F80ECFFE1903803F07190390FC039 -F890381F801D90383F000F137E495C00011407485A485A5E485A001F140FA248485CA215 -1F127F495CA2153F12FF90C790C7FCA25DEE038048147EA215FE1607007ED901FC130014 -035E6C0107130E140E3A1F801C7C1C000F13783A07C1F03E383A01FFC01FF03A007F0007 -C02C407DBE2F>I<EC1FE0ECFFFC903803F01E90380FC00F90393F800780D97E0013C049 -1303EA03F8120749130748481480121F49130F003FEC1F00153E397F8001FCEC1FF0B612 -8002F8C7FC90C9FCA45AA616C01501007E1403ED07806CEC0F00151E6C5C6C6C13F83907 -C003E03903E03F802600FFFEC7FCEB3FE022297CA72A>I<143C14FEA21301A314FCEB00 -701400AD137E3801FF803803C7C0EA0703000F13E0120E121C13071238A2EA780F007013 -C0A2EAF01F14801200133F14005B137EA213FE5BA212015B0003130E13F0A20007131EEB -E01CA2143CEBC0381478147014E013C13803E3C03801FF00EA007C173E7EBC1F>105 -D<ED01C0ED07F0A2150FA316E0ED038092C7FCADEC03E0EC0FF8EC3C3EEC701EECE01FEB -01C001031480EB0780140049133F010E1400131E131C013C5BA290C7127EA215FEA25DA2 -1401A25DA21403A25DA21407A25DA2140FA25DA2141FA25DA2143FA292C7FCA25C147EA2 -001C13FE007F5BEAFF015C495A495A48485A38F81F80D8783EC8FCEA3FF8EA0FE0245081 -BC25>I<EB01FC13FF5CA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA291C9 -FC16FC49EB03FE92380F0780017EEB3C0FED703F01FE13E0913801C07F9038FC0380EC07 -000001010E14004A131C494890C7FC5C00035BEBF9C0495A01FFC9FC5A14F0EBE3FE9038 -E07F80000FEB1FC06E7EEBC00781001F1303160E1380A2003F151E0207131C010013E0A2 -485DA2007E01031378167000FE01015B15F1489038007F800038023EC7FC29407CBE2F> -I<D801F0EB0FF0D807FCEB3FFED80F1FEBF01F000E903903C00F80271E0F87007F001C01 -8E1307003C01DC80003813F85CEA781F00705B5CA200F049130F013F5D000090C7FCA216 -1F495D137E163F94C7FC13FE495C167EA200019238FE03804914FCA203011307000303F8 -13005B5FEEF00E0007161E49151C5F1778000F6E6C5A49EC7FC0D80380021FC7FC31297E -A737>110 D<EC07F8EC7FFE903901FC0F80903907E007E090390FC003F090393F8001F8 -EB7F0001FEEB00FC485A484814FEA2485A120F5B001F15FF485AA2ED01FE127F5BA21503 -00FF15FC90C7FCA2ED07F8A2ED0FF0A2007E15E0007FEC1FC0ED3F80A26CEC7F006C6C13 -FC4A5A6C6C485A3907E00FC02601F03FC7FC3800FFFCEB1FE028297DA72C>I<91381F80 -0C9138FFE01C903903F0707C90390FC0387890391F801CF890383F000F137E4914F00001 -1407485A485A16E0485A121F150F484814C0A3007F141F491480A300FF143F90C71300A3 -5D48147EA315FE007E495A1403A26C13074A5A381F801D000F13793807C1F33901FFC3F0 -38007F03130014075DA3140F5DA3141F5DA2143F147F90381FFFFE5BA2263A7DA729> -113 D<D801F0EB3F80D807FCEBFFE03A0F1F03C0F0000E90380F00F8391E0F9E03001C13 -BC003CEBF807003813F0A226781FE013F000709038C001C092C7FC5C12F0133F000090C8 -FCA35B137EA313FE5BA312015BA312035BA312075BA3120F5BEA038025297EA729>I<EC -1FC0ECFFF8903803E03C903807800E90381E0007168049130F49131F153FA201F81400A2 -151C6D90C7FC7FEBFFE014FE90387FFFC06D7F6D13F86D7F13039038001FFE1403140015 -7E000C143E123F487EA248C7123CA25D12FC00F05C0070495A0078495A6C495A260F803E -C7FC3803FFF838007FC021297CA72B>I<147014FC1301A25CA21303A25CA21307A25CA2 -130FA25CA2007FB512F0B6FC15E039001F8000133FA291C7FCA25BA2137EA213FEA25BA2 -1201A25BA21203A25BA21207EC01C013E01403000F1480A2EBC0071500140E141E5C0007 -13385C3803E1E03801FF80D8003EC7FC1C3A7EB821>I<017E147848B4EB01FC2603C7C0 -13FED807031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEA -F01F4A131C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2 -ED0380A2ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC -27297EA72C>118 D<D901F8133FD907FEEBFFE0903A1E0F83C0F0903A3807C780F89039 -7003CF0301E013FED801C0EBFC071203018013F8D8070015F0EE01C0000E4AC7FCA2001E -1307A2C75BA2140F5DA3141F5DA3143F92380001C0A34A1303001E1680003F017E130726 -7F80FE14005ED8FF81141ED901DF131CD8FE035C3A7C078F80F03A3C0F07C1E03A1FFC03 -FF802707F0007EC7FC2D297EA734>120 D<137C48B4EC03802603C7C0EB0FC0EA070300 -0F7F000E151F001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F -91C712FE5E5B137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F -017C137F017E13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137E -D80FE013FE001F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C3807 -81F03803FFC0C648C9FC2A3B7EA72D>I<02F8130ED903FE131ED90FFF131C49EB803C49 -EBC0784914F090397E07F1E09038F800FF49EB1FC049EB07800001EC0F006C48131E90C7 -5A5D5D4A5A4A5A4A5A4AC7FC143E14785C495A495A495A49C8FC011E14E05B5B49130148 -48EB03C0485AD807F8EB078048B4131F3A1F87E07F00391E03FFFE486C5B00785CD87000 -5B00F0EB7FC048011FC7FC27297DA72A>I E /Fp 18 121 df<157815FC14031407141F -14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43> -49 D<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F92B8EA803F -0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC -4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F485B481A3F -A24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C7FA21B0F6C -6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D6D4C5A6D6D -4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1FF80203903A -FFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC525479D261 ->67 D<B812C0A5D8000701F8C7FCB3B3B3B2B812C0A52A527CD132>73 -D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 -C7000313F0DA7FFC02007F902601FFF0ED3FFE49496F7E49496F7F49496F7F4990C96C7F -4948707F4948707F01FF854A177F48864849717EA24849711380A2481BC04A83481BE0A2 -4A83481BF0A3481BF8A291CB7EA3B51AFCAF6C1BF8A26E5FA36C1BF0A36C6D4D13E0A36C -1BC06E5F6C1B806E5F6CDB01FE16006C6D902607FF80495A4C13E06C6D013F6D495A017F -91267F03F85C6D6C90277C00FC015B6D6C49D97E035B6D01806E485B6D6D48D91F8F5B6D -01E0039F90C7FC6D01F06EB45A6DD9FCF85DDA3FFF6E13F0020F6D4913C0020301FF90B5 -C8FC020091B512FC031F180C0303181EDB001FEBE3FE93C7EA01FF74133E74137E7413FE -F2F8077290B5FC1CFCA285A21CF8A2851CF07314E0A27314C0731480731400735B963800 -7FF8F21FE0576A79D265>81 D<B912F0F0FF8019F819FF1AC0D8000701F0C714F0060F7F -060113FE727F737F737F85737F87A2737FA387A863A2616363A24F5B4F5B4F90C8FC4F5A -06035B060F13F095B512C092B8C9FC19F819E019F89226F0000313FE9439007FFF80727F -727F727F727F727F8684A28684A787A71D1C75133EA38575137E73157C7513FC731401B8 -6C6D9038F803F807039038FE07F07390B512E0736C14C0080F1400CEEA7FFC5F537CD164 ->I<EC7FFF0107B512F0013F14FE90B77E48D9E00F7F2703FE000113F0486C6D7F6EEB3F -FC48826E131F83707FA36C496D7FA26C90C7FC6C5AC9FCA6037FB5FC020FB6FC91B7FC01 -071487013FEBF0074913803901FFFC004813F0485B485B485B4890C7FC5A5BA2485AA45E -A26D5C007F151D163D6C6C02797F6C6D01F113F86C9026C003E1EBFFE06C9026F81FC014 -F06C90B5487EC6ED001F011F01FC010713E0010101E090C8FC3C387CB641>97 -D<913801FFF8021FEBFF8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC -491380D9FFF05B4817C048495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5B -A312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D -147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01001580023F49C7FC020113E0 -33387CB63C>99 D<4DB47E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC01 -0315C7010F9038E03FE74990380007F7D97FFC0101B5FC49487F4849143F484980485B83 -485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5 -FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13 -F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F90 -3A3FFC007FF849486D7E49486D7E4849130F48496D7E48178048497F18C0488191C7FC48 -17E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14 -037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0F -FFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D>I<ED3FFC0203B5FC -020F14C0023F14E09139FFF81FF0499038C03FF849EB807F49903800FFFC495A495AA249 -5AA2EE7FF8495AEE3FF0EE0FC093C7FCAEB712E0A526007FF8C8FCB3B3A7007FB512FEA5 -2E547CD329>I<137F497E000313E0487FA2487FA76C5BA26C5BC613806DC7FC90C8FCAD -EB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>105 D<D93FF0EB1FFCB591B512C0 -030314F0030F8092391FE07FFC92393F001FFE0003027C80C602F07FDAF1E081ECF3C0DA -F7807F8502FFC7FC5CA25CA45CB3ACB6D8F807B612C0A542367BB54B>110 -D<913801FFE0021F13FE91B612C0010315F0010F9038807FFC903A1FFC000FFED97FF86D -6C7E49486D7F48496D7F48496D7F4A147F48834890C86C7EA24883A248486F7EA3007F18 -80A400FF18C0AC007F1880A3003F18006D5DA26C5FA26C5F6E147F6C5F6C6D4A5A6C6D49 -5B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF807FFC6D90B55A010015C0023F91C8 -FC020113E03A387CB643>I<90397FE003FEB590380FFF80033F13E04B13F09238FE1FF8 -9139E1F83FFC0003D9E3E013FEC6ECC07FECE78014EF150014EE02FEEB3FFC5CEE1FF8EE -0FF04A90C7FCA55CB3AAB612FCA52F367CB537>114 D<903903FFF00F013FEBFE1F90B7 -FC120348EB003FD80FF81307D81FE0130148487F4980127F90C87EA24881A27FA27F01F0 -91C7FC13FCEBFFC06C13FF15F86C14FF16C06C15F06C816C816C81C681013F1580010F15 -C01300020714E0EC003F030713F015010078EC007F00F8153F161F7E160FA27E17E07E6D -141F17C07F6DEC3F8001F8EC7F0001FEEB01FE9039FFC00FFC6DB55AD8FC1F14E0D8F807 -148048C601F8C7FC2C387CB635>I<143EA6147EA414FEA21301A313031307A2130F131F -133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3A9EE07C0AB011FEC0F8080A26DEC1F00 -15806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B020313802A4D7ECB34>I<D93FF89138 -01FFC0B50207B5FCA50003ED001FC61607B3AE5FA35FA2017F5D173B177B6D6C14F3DC01 -E313F06D6CD907C3EBFFC0903A0FFFC03F836D90B51203010114FE6D6C13F8020701E091 -C7FC42377BB54B>I<007FB500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D -5C6D6D495A6D4B5A6F495A6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB -8FE06EEBCFC06EEBFF806E91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01 -FD7F03F87F4A486C7E4A486C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F49 -5A49486D7F01076F7E49486E7E49486E7FEBFFF0B500FE49B612C0A542357EB447>120 -D E /Fq 78 122 df<16E04B7EA24B7EA24B7EA24B7EA2ED1DFFA203387FA29238787FC0 -15709238F03FE015E002016D7E15C002036D7E158002076D7E15004A6D7E140E021E6D7E -141C023C6D7F143802786E7E147002F06E7E5C01016F7E5C01036F7E5C01076F7E91C8FC -496F7E130E011E6F7E131C013C6F7F13380178707E137001F0707E5B0001717E5B000371 -7E5B0007717E90CAFC48717E120E001E717E001FBAFC481980A24819C0A2BB12E0A24341 -7CC04C>1 D<913801FFC0021F13FC9139FF007F80D903F8EB0FE0D90FF0EB07F8D91FC0 -EB01FCD97F806DB4FC49C86C7E48486F7E00038348486F7E000F8349150F001F83491507 -003F83A348486F7EAA6C6C4B5AA3001F5FA26C6C4B5AA200075F6D151F00035FA26C6C4B -5A00005FA2017F4BC7FC6D157EA26D6C5C010F5DA26D6C495A00E0EF0380010315E0D870 -019238C007006E130301001580A36C0160EC000E003C017049131E263FFFF0ECFFFEA36C -5FA339407CBF42>10 D<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF0 -3FD907F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE -6D91C7FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35> -I<4AB4FC021F13C091387F01F0903901FC0078D907F0131C4948133E494813FF49485A13 -7F1400A213FE6F5A163893C7FCAA167FB8FCA33900FE00018182B3AC486CECFF80007FD9 -FC3F13FEA32F407FBF33>I<4AB47E021F13F791387F00FFEB01F8903807F001EB0FE0EB -1FC0EB3F80137F14008101FE80AEB8FCA3C648C77EB3AE486CECFF80007FD9FC3F13FEA3 -2F407FBF33>I<4AB4ECFF80021FD9C00F13E0913B7F01F03F80F8903C01F80078FE003C -D907F0D93FF8130E49484948131F49484948EB7F804948484913FF137F02005CA201FE92 -C7FC6FED7F0070141C96C7FCAAF13F80BBFCA3C648C76CC7FC197F193FB3AC486C4A6CEB -7FC0007FD9FC3FD9FE1FB5FCA348407FBF4C>I<EA01FC127FA3120712031201B3AC487E -B512F0A314287DA71A>16 D<B7FCA320037AB52D>22 D<121EEA7F8012FF13C0A213E0A3 -127FEA1E601200A413E013C0A312011380120313005A120E5A1218123812300B1C79BE19 ->39 D<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B12015B1203A2 -485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E123FA37E -A27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB01C0EB00 -E014701430145A77C323>I<12C07E12707E7E121E7E6C7E7F12036C7E7F12007F137813 -7CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A614C0130FA3 -1480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC121E121C5A5A -5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9FCB3A91506 -3C3C7BB447>43 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A31201 -1380120313005A120E5A1218123812300B1C798919>I<B512FEA617067F961E>I<121EEA -7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>I<ED0180ED03C01507A21680150FA216 -005DA2151E153EA2153C157CA2157815F8A25D1401A25D1403A25D1407A25D140FA24AC7 -FCA2141E143EA2143C147CA2147814F8A25C1301A25C1303A25C1307A25C130FA291C8FC -5BA2131E133EA25BA2137813F8A25B1201A25B1203A25B1207A25B120FA290C9FC5AA212 -1E123EA2123C127CA2127812F8A25A1260225B7BC32D>I<EB01FE90380FFFC090383F03 -F090387C00F849137C48487F48487F4848EB0F80A2000F15C04848EB07E0A3003F15F0A2 -90C712034815F8A64815FCB3A26C15F8A56C6CEB07F0A3001F15E0A36C6CEB0FC0A26C6C -EB1F80000315006C6C133E6C6C5B017C5B90383F03F090380FFFC0D901FEC7FC263F7DBC -2D>I<EB01C013031307131F137FEA07FFB5FC139FEAF81F1200B3B3ACEB7FF0B612F8A3 -1D3D78BC2D>I<EB07FC90383FFF8090B512E03903F01FF83907C007FC390F0001FE001E -6D7E001C1580003CEC7FC05AED3FE01270B4FC6DEB1FF07FA56C5A6CC7FC120CC813E015 -3FA216C0157F168015FF16004A5A5D4A5A4A5A5D4A5A4A5A4AC7FC147E147C5C495A495A -495A495A49C71270133E133C5B4914E0485A485A485A48C7120148B6FCA25A4815C0B7FC -A3243D7CBC2D>I<EB07FC90383FFF809038F80FE03901E003F839078001FCD80F007F00 -0E6D7E001E1580D81F80137F486C14C07FA27F5BA2121F6C5AC8138015FF1600A24A5AA2 -4A5A5DEC07E04A5A023FC7FCEB1FFCECFF809038000FE0EC07F86E7E6E7E6E7E1680ED7F -C0A216E0153FA216F0A2120C123F487E487EA316E0A249137F6CC713C01278EDFF807E6C -4913006C495A3907C007FC3903F80FF0C6B55A013F1380D907F8C7FC243F7CBC2D>I<15 -0E151E153EA2157EA215FE1401A21403EC077E1406140E141CA214381470A214E0EB01C0 -A2EB0380EB0700A2130E5BA25B5BA25B5B1201485A90C7FC5A120E120C121C5AA25A5AB8 -FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00061403D80780131F01F813FE90B5FC -5D5D5D15C092C7FC14FCEB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F849 -6C7E49137E497F90C713800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416 -E090C7121F12FC007015C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A -3903F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D>I<EC1FE0ECFFF8903803F03E9038 -0FC00F90391F000780133E017EEB1FC049133F4848137F12035B12074848EB3F80ED1F00 -001F91C7FC5BA2123FA3485AA214FE903887FF8039FF8F07E090389C01F09038B800FC01 -B0137E13F0497F16804914C0A2ED1FE0A34914F0A5127FA6123F6D14E0A2121FED3FC0A2 -6C6C1480A20007EC7F006C6C137E6C6C5B6C6C485A90387E07F06DB45A010F1380D903FC -C7FC243F7CBC2D>I<1238123C123F90B612FCA316F85A16F016E00078C712010070EC03 -C0ED078016005D48141E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2 -147C147814F8A213015C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD -2D>I<EB03FC90381FFF8090387C07E09038F001F83901E0007C48487F48487F48C7FCED -0F80121E16C0003E1407A4123FA26DEB0F807F6C6C131F6D140001FC133E6C6C5B9038FF -80786C6D5A6CEBF3E06CEBFF806C91C7FC133F6D13C06D7F013F13F801787F48486C7E39 -03E01FFF48486C1380260F800313C048487E489038007FE0003E143F007E141F007CEC0F -F01507481403A31501A46C15E0007C1403A2007E15C06C14076CEC0F806DEB1F006C6C13 -3ED807F05B3901FC03F86CB512E0011F1380D903FCC7FC243F7CBC2D>I<EB03FCEB1FFF -90387E07C09038FC03F048486C7E48486C7E4848137C000F147E4848137F81003F15805B -007F15C0A2151F12FF16E0A516F0A5127F153FA36C7EA2001F147F120F6C6C13FF6D13DF -000313013900F8039F90387E0F1FD91FFE13E0EB07F090C7FCA2ED3FC0A41680157FD80F -801400487E486C13FEA24A5A5D49485AEB8007391E000FE0001F495A260FC07FC7FC3803 -FFFE6C13F838003FC0243F7CBC2D>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3 -121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619>I<121EEA7F80A2EAFFC0A4EA7F -80A2EA1E00C7FCB3121E127FEAFF80A213C0A4127F121E1200A412011380A3120313005A -1206120E120C121C5A1230A20A3979A619>I<007FB912E0BA12F0A26C18E0CDFCAE007F -B912E0BA12F0A26C18E03C167BA147>61 D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7 -A2913801C7FC15C3A291380381FEA34AC67EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA3 -4A6D7EA349486D7E91B6FCA249819138800001A249C87EA24982010E157FA2011E82011C -153FA2013C820138151FA2017882170F13FC00034C7ED80FFF4B7EB500F0010FB512F8A3 -3D417DC044>65 D<B712FCEEFF8017F00001903980000FF86C6CC7EA03FE707E701380EF -7FC0EF3FE0A2EF1FF0A218F8A3170F171FA318F0A2EF3FE0177F18C0EFFF804C1300EE03 -FCEE0FF8EE7FE091B6C7FC17E091C7EA07FCEE01FE933800FF80EF7FC0EF3FE0EF1FF018 -F8170F18FC1707A218FEA718FC170FA2EF1FF818F0173FEF7FE0EFFFC00403138048486C -90380FFE00B85A17E094C7FC373E7DBD40>I<DB3FF01306912603FFFE130E020F9038FF -801E913A3FF007E03E9139FF8000F8D903FEC7EA7C7ED907F8EC1EFE4948140FD93FE014 -0749481403495A91C812014848150012034848167E5B000F173EA24848161EA2123F5B18 -0E127FA349160012FFAC127F7F180EA2123FA27F001F171E181C6C7EA20007173C6D1638 -6C6C1678000117706C6C16F06EEC01E06D6C15C06D6C1403D90FF0EC07806D6CEC1F00D9 -03FE143E902600FF8013F891393FF007F0020FB512C0020391C7FC9138003FF037427BBF -42>I<B712FCEEFF8017E000019039C0001FF86C6C48EB03FEEE00FF717E717EEF0FE084 -717E717E170184717EA21980187F19C0A3F03FE0A519F0AB19E0A5F07FC0A21980A218FF -19004D5AA24D5A6017074D5A4D5AEF7FC04DC7FCEE03FE48486CEB1FF8B85A178004FCC8 -FC3C3E7DBD45>I<B912E0A300019038C000016C6C48EB001FEF0FF01703A217011700A3 -1870A41838161CA41800A2163CA2167C16FC150391B5FCA3EC80031500167C163CA2161C -A21807A3180E93C7FCA4181E181CA2183CA2187CA218F8170117031707171F48486CEB01 -FFB912F0A3383E7DBD3E>I<B91280A300019038C000036C6C48EB007FEF1FC0170F1707 -A21703A31701A4EF00E0A21638A31800A31678A216F81501150791B5FCA3EC8007150115 -001678A21638A693C8FCAF3801FFE0B612F0A3333E7DBD3B>I<DB3FE0130C912603FFFE -131C021F9038FF803C913A7FF00FC07C9139FF0001F0D903FC90380078FC4948143DD91F -E0141F4948140F4948140701FF15034890C8FC491501485A000716005B000F177C5B001F -173CA2485AA2181C127FA25B95C7FC12FFAB041FB512F0127FA26D9139000FFE00EF03FC -123FA27F121FA26C7EA212077F12036C7E7F6C7F6D6C14076D7E6D6C140FD907F8141ED9 -03FEEC3C7C902600FF80EBF83C913A7FF007F01C021FB5EAC00C020391C8FC9138003FF0 -3C427BBF47>I<B6D8C01FB512F8A3000101E0C7383FFC0026007F80EC0FF0B3A691B7FC -A30280C7120FB3A92601FFE0EC3FFCB6D8C01FB512F8A33D3E7DBD44>I<B612F0A3C6EB -F000EB3FC0B3B3B2EBFFF0B612F0A31C3E7EBD21>I<B612F8A3000101E0C9FC38007F80 -B3B0EF0380A517071800A45FA35FA25F5F5F4C5A160748486C133FB8FCA3313E7DBD39> -76 D<B500C093383FFFF0A300016D93387FF800D8007F18E0D977F016EFA3D973F8ED01 -CFA2D971FCED038FA3D970FEED070FA26E150E80A26E6C141CA36E6C1438A26E6C1470A3 -6E6C14E0A26E6CEB01C0A36E6CEB0380A36E6CEB0700A2037F130EA36F6C5AA26F6C5AA3 -6F6C5AA25FED07F0A2923803F9C0A36FB45AA26F90C7FCA213F8486C147ED807FFEF3FF8 -B500F8013C011FB512F0A34C3E7DBD53>I<B56C91B512F88080D8007F030713006EEC01 -FC6E6E5A1870EB77FCEB73FEA2EB71FF01707FA26E7E6E7EA26E7E6E7EA26E7E6E7EA26E -7E6E7FA26F7E6F7EA26F7E6F7EA26F7E6F7EA26F7E6F1380A2EE7FC0EE3FE0A2EE1FF0EE -0FF8A2EE07FCEE03FEA2EE01FF7013F0A2177F173FA2171F170FA2170701F81503487ED8 -07FF1501B500F81400A218703D3E7DBD44>I<ED7FE0913807FFFE91391FC03F8091397E -0007E04948EB03F8D907F0EB00FE4948147F49486E7E49486E7E49C86C7E01FE6F7E0001 -8349150300038348486F7EA248486F7EA2001F188049167F003F18C0A3007F18E049163F -A300FF18F0AC007F18E06D167FA4003F18C0A26C6CEEFF80A36C6C4B1300A26C6C4B5A00 -035F6D150700015F6C6C4B5A6D5E6D6C4A5A6D6C4A5A6D6C4AC7FC6D6C14FED901FCEB03 -F8D9007FEB0FE091391FC03F80912607FFFEC8FC9138007FE03C427BBF47>I<B712F8EE -FF8017E000019039C0003FF86C6C48EB07FCEE01FE707EEF7F80EF3FC018E0A2EF1FF0A2 -18F8A818F0A2EF3FE0A218C0EF7F80EFFF004C5AEE07FCEE3FF091B612C04CC7FC0280C9 -FCB3A73801FFE0B612C0A3353E7DBD3E>I<ED7FE0913807FFFE91391FC03F8091397F00 -0FE0D901FCEB03F8D907F0EB00FE4948147F49486E7E49486E7E49C86C7E498248486F7E -49150300038348486F7EA2000F834981001F1880A24848EE7FC0A3007F18E0A249163FA2 -00FF18F0AC007F18E0A26D167FA3003F18C0A26C6CEEFF80A3000F18006D5D0007DA0F80 -5B6C6C90393FE003FCED70706C6C496C485A6C6C48486C485A017FD9800E5BD93F819038 -061FC0D91FC19038073F80D90FE14AC7FCD907F1EB03FE902601FDC013F8903A007EE007 -E091271FF03FC013180207B5FC9139007FE1E0DB0001143883711378A2706C13F0EFFF03 -18FFA27113E0A37113C0711380711300715AEF01F83D527BBF47>I<B712C016FCEEFF80 -0001D9C00013E06C6C48EB1FF0EE07FCEE01FE707E84717EA2717EA284A760177F606017 -FF95C7FCEE01FCEE07F8EE1FE0EEFF8091B500FCC8FC16F091388001FCED003FEE1FC070 -7E707E83160383160183A383A484A4F0C004190EA28218E0057F131E2601FFE0161CB600 -C0EB3FF094381FF83805071370CA3801FFE09438003F803F407DBD43>I<D907FC130C90 -391FFF801C017FEBF03C3901FC03F83A03F0007E7CD807C0EB1FFC4848130F001F140748 -C71203003E1401007E1400A2007C157C12FCA2163CA36C151CA27EA26C6C14007F7FEA3F -F8EBFF806C13F86CEBFF806C14F06C14FC6C14FF6C15C0013F14E0010714F0EB007F0207 -13F89138007FFC150FED07FE15031501ED00FFA200E0157FA3163FA27EA3163E7E167E6C -157C6C15FC6C15F86D13016DEB03F06DEB07E0D8F9FCEB0FC03AF07F803F8090391FFFFE -00D8E00713F839C0007FC028427BBF33>I<003FB91280A3903AF0007FE001018090393F -C0003F48C7ED1FC0007E1707127C00781703A300701701A548EF00E0A5C81600B3B14B7E -4B7E0107B612FEA33B3D7DBC42>I<B600C090B512F8A3000101E0C70007130026007F80 -EC01FC715A1870B3B3A4013F16F06E5DA21701011F5E80010F15036E4A5A010793C7FC6D -6C5C6D6C141E6D6C5C027F14F86E6C485A91390FF00FE00203B51280020049C8FCED1FF0 -3D407DBD44>I<B500FE017FB5D88007B5FCA3000301C0010101E0C713F86C90C849EC3F -E07148EC0F807E7215006E143F017F190E84A26D6C60A24D7E6D6C60A2EFE7F86D6C60A2 -933801C3FC6E18F001076104037F6E0281140101036104077F17006D6C4D5AA2040EEB7F -806D6C4DC7FCA24CEB3FC0DA7F80160EA24CEB1FE003C0161E023F171C047814F0DBE070 -010F133C021F173804F014F84C1307DA0FF05EA2DBF1C0EB03FCDA07F95EA2DBFB80EB01 -FEDA03FF6F5AA293C8FCA26E5FA24B157F020094C8FCA24B81037C153EA20378151E0338 -151C58407EBD5D>87 D<EAFFFCA4EAF000B3B3B3B3ABEAFFFCA40E5B77C319>91 -D<EAFFFCA4EA003CB3B3B3B3ABEAFFFCA40E5B7FC319>93 D<1318133C137E13FF3801E7 -803803C3C0380781E0380F00F0001E137848133C48131E48130F00601306180D76BD2D> -I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A79BD19>I<EB0FF8EBFFFE3903F01F80 -39078007E0000F6D7E9038E001F8D81FF07F6E7EA3157F6C5AEA0380C8FCA4EC1FFF0103 -B5FC90381FF87FEB7F803801FC00EA07F8EA0FE0485A485AA248C7FCEE038012FEA315FF -A3007F5BEC03BF3B3F80071F8700261FC00E13CF3A07F03C0FFE3A01FFF807FC3A003FC0 -01F0292A7DA82D>97 D<EA01FC12FFA3120712031201B1EC03FC91381FFF8091387C07E0 -9039FDE001F09039FFC000FC4A137E91C77E49158049141F17C0EE0FE0A217F0A2160717 -F8AA17F0A2160FA217E0161F17C06D1580EE3F006D5C6E13FE9039F3C001F89039F1E003 -F09039E0780FC09026C03FFFC7FCC7EA07F82D407EBE33>I<49B4FC010F13E090383F00 -F8017C131E4848131F4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FC -A290C9FC5AAB6C7EA3003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C13 -1E6C6C137890383F01F090380FFFC0D901FEC7FC222A7DA828>I<ED01FC15FFA3150715 -031501B114FF010713E190381F80F990387E003D49131FD803F81307485A491303484813 -01121F123F5B127FA290C7FCA25AAA7E7FA2123FA26C7E000F14037F000714076C6C497E -6C6C497ED8007C017913F890383F01F190380FFFC1903A01FE01FC002D407DBE33>I<EB -01FE90380FFFC090383F03F09038FC01F848486C7E4848137E48487F000F158049131F00 -1F15C04848130FA2127F16E090C7FCA25AA290B6FCA290C9FCA67EA27F123F16E06C7E15 -01000F15C06C6C13036DEB07806C6C1400C66C131E017E5B90381F80F8903807FFE00100 -90C7FC232A7EA828>I<EC1FC0EC7FF8903801F83C903807E07E90380FC0FFEB1FC1EB3F -811401137FEC00FE01FE137C1500AEB6FCA3C648C7FCB3AE487E007F13FFA320407EBF1C ->I<167C903903F801FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E0 -00FC0600000F6EC7FC49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803 -E03903FE0FC026071FFFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E -6C15E06C810003813A0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E -007E157E6C5D6C6C495A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0 -293D7EA82D>I<EA01FC12FFA3120712031201B1EC01FE913807FFC091381E07E0913878 -03F09138E001F8D9FDC07F148001FF6D7E91C7FCA25BA25BB3A6486C497EB5D8F87F13FC -A32E3F7DBE33>I<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCACEA01FC127FA3120712 -031201B3AC487EB512F0A3143E7DBD1A>I<1478EB01FEA2EB03FFA4EB01FEA2EB007814 -00AC147FEB7FFFA313017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F0138 -7C03F0381E07C0380FFF803801FC00185185BD1C>I<EA01FC12FFA3120712031201B292 -B51280A392383FFC0016E0168093C7FC153C5D5D4A5AEC07C04A5A4AC8FC143E147F4A7E -13FD9038FFDFC0EC9FE0140F496C7E01FC7F496C7E1401816E7E81826F7E151F826F7EA2 -82486C14FEB539F07FFFE0A32B3F7EBE30>I<EA01FC12FFA3120712031201B3B3B1487E -B512F8A3153F7DBE1A>I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0 -913B7803F03C01F80007903BE001F87000FC2603F9C06D487F000101805C01FBD900FF14 -7F91C75B13FF4992C7FCA2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA7 -4C>I<3901F801FE00FF903807FFC091381E07E091387803F000079038E001F82603F9C0 -7F0001138001FB6D7E91C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733> -I<14FF010713E090381F81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0 -000F15F04848EB01F8A2003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F -15F86C6CEB03F0A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC9038 -0FFFF0010090C7FC282A7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE0 -03F03A03FFC001FC6C496C7E91C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE -0FF0A4EE1FE0A2EE3FC06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780F -C0DA3FFFC7FCEC07F891C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90 -381F80F090397F00387C01FC131CD803F8130E4848EB0FFC150748481303121F485A1501 -485AA448C7FCAA6C7EA36C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E1379 -90383F81F190380FFFC1903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F8 -07E000FFEB1FF8EC787CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300 -A35BB3A5487EB512FEA31F287EA724>I<90383FC0603901FFF8E03807C03F381F000F00 -3E1307003C1303127C0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE -6C7F6C1480000114C0D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E -15F07E14016C14E06CEB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824> -I<131CA6133CA4137CA213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0 -A912009038FE01C0A2EB7F03013F138090381F8700EB07FEEB01F81B397EB723>I<D801 -FC14FE00FF147FA3000714030003140100011400B3A51501A31503120015076DEB06FF01 -7E010E13806D4913FC90381FC078903807FFE00100903880FE002E297DA733>I<B539E0 -0FFFE0A32707FE000313006C48EB00FC5E00015D7F00005DA26D13016D5CA26D6C485AA2 -ECC007011F91C7FCA290380FE00EA2ECF01E0107131CA26D6C5AA2ECFC7801011370A2EC -FEF001005BA2EC7FC0A36E5AA26EC8FCA3140E2B287EA630>I<B53BC3FFFE03FFF8A329 -0FFE003FE00013C06C486D48EB3F806C4817006D010F141E00016F131C15076D163C0000 -4A6C1338A2017F5E4B7E151DD93F805DED3DFC1538D91FC04A5AED78FE9238707E03D90F -E0017F5BEDE03F02F0140701070387C7FC9138F1C01F02F9148F010315CE9138FB800F02 -FF14DE6D15FCED00076D5DA24A1303027E5CA2027C1301023C5C023813003D287EA642> -I<B539F01FFFE0A30003D9C00F1300C690388007F8D97F0013E002805BD93FC05B011F49 -C7FC90380FE00EECF01E6D6C5A01035B6D6C5A6E5AEB00FF6E5A6E5A81141F814A7E8114 -7BECF1FC903801E1FEECC0FF01037F49486C7ED90F007F011E6D7E013E130F496D7E01FC -80486C80000F4A7EB539803FFFF8A32D277FA630>I<B539E00FFFE0A32707FE00031300 -6C48EB01FC6F5A00015D7F00005DA2017F495AA2EC8003013F5CA26D6C48C7FCA26E5A01 -0F130EA26D6C5AA2ECF83C01031338A26D6C5AA2ECFEF001005BA2EC7FC0A36E5AA36EC8 -FCA2140EA2141E141C143C1438A2147800181370127EB45BA2495AA248485AD87E07C9FC -EA780EEA3C3CEA1FF8EA07E02B3A7EA630>I E /Fr 35 121 df<EDFFF8020F13FF027F -8049B612E001079038C01FF090390FFE0007D91FF8497ED93FE0131F4948497E13FF5C5A -91C7FCA2705A705AEE03C093C8FCA6EE03FCB8FCA50001903880001F160FB3AB007FD9FE -03B512F0A534407EBF3A>12 D<B612E0A91B097F9823>45 D<EA0FC0EA1FE0EA3FF0EA7F -F8EAFFFCA6EA7FF8EA3FF0EA1FE0EA0FC00E0E798D1D>I<140F143F5C495A130F48B5FC -B6FCA313F7EAFE071200B3B3A8B712F0A5243C78BB34>49 D<903803FF80013F13F890B5 -12FE00036E7E4881260FF80F7F261FC0037F4848C67F486C6D7E6D6D7E487E6D6D7EA26F -1380A46C5A6C5A6C5A0007C7FCC8FC4B1300A25E153F5E4B5AA24B5A5E4A5B4A5B4A48C7 -FC5D4A5AEC1FE04A5A4A5A9139FF000F80EB01FC495A4948EB1F00495AEB1F8049C7FC01 -7E5C5B48B7FC485D5A5A5A5A5AB7FC5EA4293C7BBB34>I<903801FFE0010F13FE013F6D -7E90B612E04801817F3A03FC007FF8D807F06D7E82D80FFC131F6D80121F7FA56C5A5E6C -48133FD801F05CC8FC4B5A5E4B5A4A5B020F5B902607FFFEC7FC15F815FEEDFFC0D90001 -13F06E6C7E6F7E6F7E6F7E1780A26F13C0A217E0EA0FC0487E487E487E487EA317C0A25D -491580127F49491300D83FC0495A6C6C495A3A0FFE01FFF86CB65A6C5DC61580013F49C7 -FC010313E02B3D7CBB34>I<ED01F815031507A2150F151F153FA2157F15FF5C5CA25C5C -EC1FBFEC3F3F143E147C14FCEB01F814F0EB03E01307EB0FC0EB1F801400133E137E5B48 -5A5B485A1207485A5B48C7FC5A127E5AB812F8A5C8387FF800AA49B612F8A52D3C7DBB34 ->I<16FCA24B7EA24B7EA34B7FA24B7FA34B7FA24B7FA34B7F157C03FC7FEDF87FA20201 -80EDF03F0203804B7E02078115C082020F814B7E021F811500824A81023E7F027E81027C -7FA202FC814A147F49B77EA34982A2D907E0C7001F7F4A80010F835C83011F8391C87E49 -83133E83017E83017C81B500FC91B612FCA5463F7CBE4F>65 D<922607FFC0130E92B500 -FC131E020702FF133E023FEDC07E91B7EAE1FE01039138803FFB499039F80003FF4901C0 -1300013F90C8127F4948151FD9FFF8150F48491507485B4A1503481701485B18004890CA -FC197E5A5B193E127FA349170012FFAC127F7F193EA2123FA27F6C187E197C6C7F19FC6C -6D16F86C6D150119F06C6D15036C6DED07E0D97FFEED0FC06D6CED3F80010F01C0ECFF00 -6D01F8EB03FE6D9039FF801FFC010091B55A023F15E002071580020002FCC7FC030713C0 -3F407ABE4C>67 D<B812F8EFFF8018F018FC18FF26003FFCC76C13C005077F05017F716C -7E727E727E727E721380A27213C0A27213E0A21AF084A21AF8A41AFCA5197FA319FFA51A -F8A41AF0A2601AE0A24E13C0A24E13804E1300604E5A4E5A4D485A050713E0057F5BBA5A -4EC7FC18F818C005F8C8FC463E7DBD50>I<BAFCA4198026003FFEC7123F170717018318 -3FA2181FF00FC0A31807EE07C0A3F003E0A3160F95C7FC161F163F16FF91B6FCA54AC6FC -163F161F040F147CA2160719F8A593C71201A219F01803A21807A2180FF01FE0183F18FF -1703173FBAFCA219C0A33E3D7DBC45>I<B6051FB512C06F5EA26F5EA2D8003F97C7FC6F -16F7A26E6CED01E7A26E6CED03C7A36E6CED0787A26E6CED0F07A26E6C151EA36E6D143C -A26E6D1478A26E6D14F0A26F6CEB01E0A36F6CEB03C0A26F6CEB0780A26F6CEB0F00A36F -6C131EA26F6D5AA26F6D5AA26F6D5AA393387FF1E0A293383FFBC0A270B45AA37090C7FC -A2705AA2705AB600C0031FB612C0A2705AA2705A5A3E7CBD63>77 -D<ED3FFF0203B512F0021F14FE027F6E7E902701FFF80713E00107903980007FF84948C7 -EA1FFCD93FFC6EB4FC49486E7F49486E7F48496E7F4A8048496F7E488491C9123F488448 -48707EA34848707EA3007F1980A24982A200FF19C0AD007F1980A26D5EA2003F1900A36C -6C4C5AA26C6C4C5AED07F06C9026801FFC495A6C4AB45C6E48EB80FF6C9027E07E0FC15B -6C9126F807E15B90287FF0F003E35BD93FFC6DB5C7FCD91FFE6D5B902607FFF814F80101 -D9FE0313E06D90B65A021F4AC7124002036E14E0DA003FEB3F8092C77FF0E001F0F80F71 -B5FCA21AC083A21A8083A271140061715B715B725AF01FC043517ABE4F>81 -D<B87E17FCEFFF8018F08428003FFC000113FE9338003FFF050F7F717F717FA2858385A7 -61A25F61614D5B4D90C8FCEF3FFE4CB45A91B712F018C04DC9FC717E9126FC000F7F0401 -13F0707F717EA2717EA2717EA685A6F207C019C0A271140F07E01380B76DEBF01F719038 -FC3F007190B5FC716C5B061F13F8CB000113E04A3F7DBD4E>I<903807FFC0013F13F848 -B6FC48812607FE037F260FF8007F6DEB3FF0486C806F7EA36F7EA26C5A6C5AEA01E0C8FC -153F91B5FC130F137F3901FFFE0F4813E0000F1380381FFE00485A5B485A12FF5BA4151F -7F007F143F6D90387BFF806C6C01FB13FE391FFF07F36CEBFFE100031480C6EC003FD91F -F890C7FC2F2B7DA933>97 D<13FFB5FCA512077EAFEDFFE0020713FC021FEBFF80027F80 -DAFF8113F09139FC003FF802F06D7E4A6D7E4A13074A80701380A218C082A318E0AA18C0 -A25E1880A218005E6E5C6E495A6E495A02FCEB7FF0903AFCFF01FFE0496CB55AD9F01F91 -C7FCD9E00713FCC7000113C033407DBE3A>I<EC7FF00107B5FC011F14C0017F14E09039 -FFF01FF0489038800FF848EB001F4848EB3FFC120F485AA2485AA2007FEC1FF849EB0FF0 -ED03C000FF91C7FCAB127F7FA3003F153E7F001F157E6C6C147C6C6C14FC91388001F86C -9038C003F0C69038F81FE06DB512C0011F14800107EBFE009038007FF0272B7DA92E>I< -EE07F8ED07FFA5ED003F161FAFEC7FF0903807FFFE011FEBFF9F017F14DF9039FFF01FFF -48EBC00348EB00014848EB007F485A001F153F5B123FA2127F5BA212FFAA127FA37F123F -A26C6C147F120F6D14FF6C6C01037F6C6D48EBFFE06CEBF03F6C6CB512BF6D143F010713 -FC010001E0EBE00033407DBE3A>I<ECFFF0010713FE011F6D7E017F809039FFE07FE048 -9038801FF048496C7E48486D7E48486D7E121F491301003F81A2485A6F1380A212FFA290 -B7FCA401F0C9FCA5127FA27F123FEE0F806C7E161F6C6C15006C6C5C6C6D137E6C9038E0 -01FC6C9038F80FF8013FB55A6D14C0010391C7FC9038007FF8292B7DA930>I<EC07FE91 -387FFF8049B512C0010714E090390FFE3FF0EB1FF090393FE07FF8EB7FC013FF1480A248 -9038003FF0ED1FE0ED0FC092C7FCAAB612E0A500010180C7FCB3AC007FEBFF80A525407D -BF20>I<903A03FF8007F0013F9038F83FF8499038FCFFFC48B712FE48018313F93A07FC -007FC34848EB3FE1001FEDF1FC4990381FF0F81700003F81A7001F5DA26D133F000F5D6C -6C495A3A03FF83FF8091B5C7FC4814FC01BF5BD80F03138090CAFCA2487EA27F13F06CB6 -FC16F016FC6C15FF17806C16C06C16E01207001F16F0393FE000034848EB003F49EC1FF8 -00FF150F90C81207A56C6CEC0FF06D141F003F16E001F0147FD81FFC903801FFC02707FF -800F13006C90B55AC615F8013F14E0010101FCC7FC2F3D7DA834>I<EA01F8487E487E48 -7E481380A66C13006C5A6C5A6C5AC8FCA913FFB5FCA512077EB3ABB512F8A515407CBF1D ->105 D<13FFB5FCA512077EB092380FFFFEA5DB01FEC7FC4B5AED07F0ED1FE04B5A4B5A -4BC8FCEC03FC4A5A4A5A141FEC7FF84A7EA2818102E77F02C37F148102007F826F7E6F7E -151F6F7E826F7F6F7F816F7FB5D8FC07EBFFC0A5323F7DBE37>107 -D<13FFB5FCA512077EB3B3AFB512FCA5163F7CBE1D>I<01FFD91FF8ECFFC0B590B50107 -13F80203DAC01F13FE4A6E487FDA0FE09026F07F077F91261F003FEBF8010007013EDAF9 -F0806C0178ECFBC04A6DB4486C7FA24A92C7FC4A5CA34A5CB3A4B5D8FE07B5D8F03FEBFF -80A551297CA858>I<01FFEB1FF8B5EBFFFE02036D7E4A80DA0FE07F91381F007F000701 -3C806C5B4A6D7E5CA25CA35CB3A4B5D8FE0FB512E0A533297CA83A>I<EC7FF0903803FF -FE011FEBFFC0017F14F09039FFE03FF8489038800FFC3A03FE0003FE48486D7E000F1680 -48486D13C0A2003F16E049147F007F16F0A400FF16F8AA007F16F0A46C6CECFFE0A2001F -16C06C6C491380A26C6C4913003A03FF800FFE6C9038E03FFC6C6CB512F0011F14C00107 -91C7FC9038007FF02D2B7DA934>I<01FFEBFFE0B5000713FC021FEBFF80027F80DAFF81 -13F09139FC007FF8000301F06D7E4A6D7E4A130F4A6D7E1880A27013C0A38218E0AA4C13 -C0A318805E18005E6E5C6E495A6E495A02FCEBFFF0DAFF035B92B55A029F91C7FC028713 -FC028113C00280C9FCACB512FEA5333B7DA83A>I<DA7FE01378902607FFFC13F8011FEB -FF01017F14819039FFF81FC3489038E007E74890388003F74890380001FF48487F001F15 -7F5B003F153F5B127F161FA2485AAA127F7FA36C6C143F167F121F6C6C14FF6D5B6C6D5A -6CEBC00F6CEBF03F6C6CB512BF6DEBFE3F010713F8010013C091C7FCAC030FB512E0A533 -3B7DA837>I<3901FE01FE00FF903807FF804A13E04A13F0EC3F1F91387C3FF8000713F8 -000313F0EBFFE0A29138C01FF0ED0FE091388007C092C7FCA391C8FCB3A2B6FCA525297D -A82B>I<90383FFC1E48B512BE000714FE5A381FF00F383F800148C7FC007E147EA200FE -143EA27E7F6D90C7FC13F8EBFFE06C13FF15C06C14F06C806C806C806C80C61580131F13 -00020713C014000078147F00F8143F151F7EA27E16806C143F6D140001E013FF9038F803 -FE90B55A15F0D8F87F13C026E00FFEC7FC222B7DA929>I<EB07C0A5130FA4131FA3133F -137FA213FF5A1207001FEBFFFEB6FCA40001EBC000B3151FA96CEBE03EA2017F137EECF8 -FC90383FFFF86D13F0010713E001001380203B7EB929>I<D9FF80EB0FF8B5EB0FFFA500 -07EC007F6C153FB3A5167FA316FF6C5C4B7F6C903AC007DFFFE09138F01F9F6DB5121F6D -13FE010F13F8010101E0EBE000332A7CA83A>I<B53CFC3FFFFC03FFFEA50003D9800090 -39C0000F806E161F6C037F15006E496C5B6C183E836E48157E017F177C6E486D13FC013F -02EF5C83DAFC071401011F02C75CDAFE0FEBFE03010F02835C17FFDAFF1F14076D02015C -03BF148F6DD9BE005C18CF03FE14DF6D49017F90C7FC18FF6D496D5AA36E486D5AA26E48 -6D5AA36E486D5AA26E486D5A47287EA74C>119 D<B5D8FC03B51280A5C69026E0007FC7 -FC6E13FE6D6C5B6D6C485A6D6C485A010F13076D6C485AED9FC06DEBFF806D91C8FC6D5B -6E5AA2143F6E7E140F814A7F4A7F4A7F02FE7F903801FC7F49486C7E02F07F49486C7E49 -486C7E011F7F49486C7FD97F008001FE6D7FB5D8C007EBFFC0A532287EA737>I -E /Fs 8 119 df<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A78891B>58 -D<91B712F018FF19E002009039C0003FF86F48EB07FC03FFEC01FEF0007F93C8EA3F801A -C0F11FE05C5D1AF0A214035DA30207EE3FE05DA2F17FC0020F17804B15FF1A004E5A021F -4B5A4B4A5AF00FE04E5A023F037FC7FC4BEB03FCEF1FF092B612804A4AC8FC923980007F -80EF0FC0EF07F002FF6E7E92C77F1701845B4A1400A2170113035CA2170313075CA24D5A -130F5CA3011F18185CA2013F4C13381A304A6F1370D9FFE0020314E0B600E0ED01C00501 -EB0380943900FE0F00CBEA3FFEF007F045467CC34A>82 D<EC07F8EC3FFE903901FC0780 -903903F003C090390FC001E090381F8000017FC7FC01FE1470485A484814F0000715E05B -000F1401484814C015034848EB0780ED1F0015FC007FEB1FF090B5128002F0C7FC0180C8 -FC12FF90C9FCA55AA41618007E15381670007F15E06CEC01C0ED03806CEC07006C6C131E -6D13383907E001F03901F00FC026007FFEC7FCEB1FF0252D7CAB2D>101 -D<141E143F5C5CA3147E143891C7FCAE133EEBFF803801C3C0380781E0380601F0120E12 -1CEA180312381230A2EA700700605BA2EAE00F00C05BEA001F5CA2133F91C7FCA25B137E -13FE5BA212015BEC03800003140013F01207495A1406140E140CEBC01C141814385C0003 -5BEBE1C0C6B45A013EC7FC19437DC121>105 D<01F8EB03FCD803FEEB1FFFD8071F9038 -7C0FC03B0E0F80E007E03A0C07C3C003001CD9C7007F001801CE1301003801DC80003013 -D8EB0FF800705B00605BA200E0491303D8C01F5D5C12001607013F5D91C7FCA2160F495D -137E161F5F13FE49143F94C7FC187000014B136049147E16FE4C13E0000317C049150104 -F81380170300071700495D170EEE781C000FED7C3849EC1FF0D80380EC07C0342D7DAB3A ->110 D<EC03FCEC3FFF9138FE07C0903903F003F049486C7E90391FC000FC49C7127C49 -147E01FE147F484880485A000716805B120F485AA2485A167F127F5BA216FF00FF160090 -C8FCA25D5E5A4B5AA25E15075E4B5A151F007E5D4B5A6C4AC7FC15FE391F8001F86C6C48 -5A3907E00FC03901F03F802600FFFCC8FCEB1FE0292D7CAB2F>I<EC0FF0EC7FFE903901 -F00F809039078001C049C712E0011E14605BED01F0491307A201F8EB0FE05B7FED03806D -90C7FC7F7F14F86DB47E15E06D13F86D7F01077F1300EC07FF140081ED3F80151F120E00 -3FEC0F00487EA25D48C7121EA200FC5C12605D00705C6C495A6CEB07C0260F803FC7FC38 -03FFFC38007FE0242D7BAB2E>115 D<013E140ED9FF80EB3F802603C3C0137F380703E0 -380601F0120E121CD81803143F0038151F0030150FA2D87007140700605BA2D8E00F1500 -00C0497FEA001F4A5B1606133F91C7FC160E49140C137EA2161C01FE14185B1638163016 -704848146016E05E150100005D15036D49C7FC1506017C130E017E5B6D137890380F81E0 -6DB45AD900FEC8FC292D7DAB2F>118 D E /Ft 14 118 df<121FEA3F80EA7FC0EAFFE0 -A5EA7FC0EA3F80EA1F000B0B6C8A33>46 D<EC07F8EC3FFF91B57E010314E0010F804980 -90383FFC0F90397FE003FC9038FF80014890C77ED803FC147E49EB7E7F0007903801FFBF -D9F00713FF4848481480495A001F5B018013C3003FEB7F810100010013C002FE137F4849 -133FEA7E014A131FA212FEEAFC034A130FA96E131FD8FE011580127EA26E133FD87F0015 -006C6D5B027F13FE01801381001F90383FC3FC01C013FF000F6D5B6D6C5B6C6C6C5BD9F8 -0113800003D9007EC7FC6D9038000F806CB4EC1FC06C6D133FD97FE013FF90263FFC0713 -806DB612006D5C010314F801005C023F1380DA07FCC7FC2A3F7CBD33>64 -D<EB1FFC90B57E000314E048804814FC48809038F007FFEBE0016E7F153F6C48806C4813 -1FC87F150FA5EC0FFF49B5FC131F137F48B6FC0007140F4813C0381FFC00EA3FF0EA7FC0 -5B48C7FC5AA56C141F7E6D137FD83FE0497ED9F807EBFFF06CB712F87E6C14F36C14C1C6 -9138003FF0D91FF090C7FC2D2E7BAC33>97 D<EA3FFC487E12FFA2127F123F1200ABEC01 -FE91380FFFC04A13F0027F7F91B512FE90B7FCECFE07DAF800138002E0EB7FC04AEB3FE0 -4A131FEE0FF091C7FC16074915F81603A217FC1601A9160317F8A26D140717F06E130F17 -E06E131FEE3FC06E137F9139F801FF80DAFE07130091B55A495C6E5BD97E3F13E0D93C0F -138090260003FEC7FC2E3E7FBC33>I<ED7FF84B7E5CA280157F1501ABEB01FF010713C1 -011F13F1017F13F990B6FC5A4813813907FE003FD80FF8131F49130F4848130749130312 -3F491301127F90C7FCA25A5AA97E7E15037F123F6D1307A26C6C130F6D131F6C6C133F6C -6C137F2603FF81B512F091B612F8C602FD13FC6D13F96D01E113F8010F018013F0D901FE -C8FC2E3E7DBC33>100 D<ECFF80010713F0011F13FC497F90B6FC48158048018013C03A -07FE003FE001F8EB0FF048481307484814F8491303003F15FC491301127F90C7FC16FE15 -005A5AB7FCA516FC48C9FC7E7EA36C7E167C6C6C14FE7F6C7E6D13016C6CEB03FC6CB413 -0F6C9038C03FF86C90B512F06D14E06D14C0010F1400010313FC9038007FE0272E7BAC33 ->I<D901FEEB1FE0903A0FFFC0FFF0013F01F313F84990B512FC90B7FC5A48010313E126 -07FC00EB80F849017F1360484890383FC00049131FA2001F8149130FA66D131F000F5DA2 -6D133F6C6C495A6D13FF2603FF0390C7FCECFFFE485C5D5DD80FCF13C0D981FEC8FC0180 -C9FCA27FA26C7E7F90B512FC6CECFFC06C15F0000715FC4815FF4816809038E000074848 -9038007FC090C8EA1FE048150F007E150700FE16F0481503A56C1507007E16E0007F150F -6C6CEC1FC001E0147FD81FF8903801FF80270FFF801F13006C90B55A6C5DC615F0013F14 -C0010F91C7FC010013F02E447DAB33>103 D<EA3FFC487E12FFA2127F123F1200AB4AB4 -FC020713C0021F13F0027F7F91B5FC90B67EED07FEECF801ECF0004A7F4A7F5CA291C7FC -A35BB3A43B3FFFF80FFFFC486D4813FEB56C4813FFA26C496C13FE6C496C13FC303D7FBC -33>I<383FFFFC487FB5FCA27E7EC7FCB3B3AD003FB612F84815FCB712FEA26C15FC6C15 -F8273D7ABC33>108 D<4AB4FC263FFC0713C0267FFE1F13F000FF017F7F91B5FC6CB67E -6CEC07FEC6EBF801ECF0004A7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813FE -B56C4813FFA26C496C13FE6C496C13FC302C7FAB33>110 D<EB01FE90380FFFC0013F13 -F0497F90B57E488048EB03FF2607FC0013804848EB7FC049133F4848EB1FE049130F4848 -EB07F0A2007F15F890C71203A300FEEC01FCAA6C14036C15F8A26D1307003F15F06D130F -A26C6CEB1FE06D133F6C6CEB7FC06C6CEBFF802603FF0313006CEBFFFE6C5C6D5B6D5B01 -0F13C0D901FEC7FC262E7AAC33>I<ED03FE3B7FFF801FFF80B5D8C07F13E002C1B5FC02 -C314F014C76C9038CFFE0F39001FDFF09139FFC007E092388003C092C8FC5C5C5CA25CA2 -5CA35CB2007FB512FEB7FCA46C5C2C2C7DAB33>114 D<90381FFE0F90B5EA8F80000314 -FF120F5A5AEBF007387F800190C7FC00FE147F5A153FA37E007FEC1F0001C090C7FCEA3F -F8EBFFC06C13FF6C14E0000314F8C680011F13FF01001480020713C0EC007FED1FE0007C -140F00FEEC07F01503A27EA27F15076D14E06D130F6DEB3FC09038FE01FF90B612801600 -00FD5C00FC14F8D8F83F13E0D8780790C7FC242E79AC33>I<D83FFCEB1FFE486C497E00 -FF5CA2007F80003F800000EC007FB3A75EA25DA26D5B90387F800FDAE03F13FC6DB612FE -17FF6D806D01FE13FE01039038F83FFC010001C0C7FC302C7FAA33>117 -D E /Fu 15 112 df<140C141C1438147014E0EB01C01303EB0780EB0F00A2131E5BA25B -13F85B12015B1203A2485AA3485AA348C7FCA35AA2123EA2127EA4127CA312FCB3A2127C -A3127EA4123EA2123FA27EA36C7EA36C7EA36C7EA212017F12007F13787FA27F7FA2EB07 -80EB03C01301EB00E014701438141C140C166476CA26>40 D<12C07E12707E7E7E120F6C -7E6C7EA26C7E6C7EA21378137C133C133E131E131FA2EB0F80A3EB07C0A3EB03E0A314F0 -A21301A214F8A41300A314FCB3A214F8A31301A414F0A21303A214E0A3EB07C0A3EB0F80 -A3EB1F00A2131E133E133C137C13785BA2485A485AA2485A48C7FC120E5A5A5A5A5A1664 -7BCA26>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A78891B>46 -D<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007FB6FCA3204278 -C131>49 D<14FF010713E0011F13F890387F00FE01FC133FD801F0EB1F804848EB0FC049 -EB07E00007EC03F048481301A290C713F8481400A47FA26D130116F07F6C6CEB03E013FC -6C6CEB07C09039FF800F806C9038C01F006CEBF03EECF87839007FFEF090383FFFC07F01 -077F6D13F8497F90381E7FFFD97C1F1380496C13C02601E00313E048486C13F000079038 -007FF84848EB3FFC48C7120F003EEC07FE150148140016FF167F48153FA2161FA56C151E -007C153EA2007E153C003E157C6C15F86DEB01F06C6CEB03E06C6CEB07C0D803F8EB1F80 -C6B4EBFF0090383FFFFC010F13F00101138028447CC131>56 D<14FF010713E0011F13F8 -90387F80FC9038FC007E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A16 -F8007F140190C713FCA25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C1306 -150E6C6C5B6C6C5BD8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116FCA4 -ED03F8A216F0D80F801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001EC75A -001C495A000F495A3907E01FE06CB51280C649C7FCEB1FF028447CC131>I<121EEA7F80 -A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2B78 -AA1B>I<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30FFA203707FED607FA203E07F -EDC03FA2020180ED801FA2DA03007F160FA20206801607A24A6D7EA34A6D7EA34A6D7EA2 -0270810260147FA202E08191B7FCA249820280C7121FA249C87F170FA20106821707A249 -6F7EA3496F7EA3496F7EA201788313F8486C83D80FFF03037FB500E0027FEBFFC0A34247 -7DC649>65 D<B6D8C003B6FCA3000101E0C70007138026007F80913801FE00B3A991B7FC -A30280C71201B3AC2601FFE0913807FF80B6D8C003B6FCA340447CC349>72 -D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0EB079F49EB03DF48 -486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA26C6C91C7FC7F7FEA -3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0010F80010180D900 -1F7F14019138001FFF03031380816F13C0167F163F161F17E000C0150FA31607A37EA36C -16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8F07C495A90393FC0 -0FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>83 D<EC7F80903803FFF09038 -0FC07C90383F000F01FCEB03804848EB01C00003140F4848EB1FE049133F120F485AA248 -5AED1FC0007FEC070092C7FCA290C9FC5AAB7E7FA2123F16307F001F15706C6C146016E0 -6C6C14C06C6C13010001EC03806C6CEB0700013F131E90381FC078903807FFF001001380 -242E7DAC2B>99 D<167FED3FFFA315018182B3EC7F80903803FFF090380FC07C90383F00 -0E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2127FA290C8FC5AAB7E7FA2 -123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C010E13C0013F011C13FE90 -380FC0F8903803FFE09026007F0013002F467DC436>I<EB01FE903807FFC090381F03F0 -90387E00FC49137E48487F485A4848EB1F80000F15C049130F121F484814E01507A2007F -15F090C7FCA25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F15606D14E06C -6C14C0000314016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE0010090C7FC -242E7DAC2B>I<EA01FC12FFA3120712031201B3B3B3A5487EB512F8A315457DC41C>108 -D<EC7F80903803FFF090380FC0FC90383E001F496D7E496D7E48486D7E48486D7E48486D -7E000F81A24848147E003F157FA290C87E481680A44816C0AA6C1680A26D147F003F1600 -A2001F157E6D14FE000F5D6D130100075D6C6C495A6C6C495A6C6C495A013E49C7FC9038 -1FC0FE903807FFF89038007F802A2E7DAC31>111 D E /Fv 25 121 -df<EE3FF0923803FFFE031F6D7E92397FC01FC0913A01FE0003E0DA07F8EB00F04A4814 -784A48804A48EB01FC4A48EB07FE4AC7FC4948140F13035C13075C715A010F6F5A4AEC00 -E095C8FCB3EF03FEB9FCA426000FF0C7120F1703A21701B3B3AD496C4A7E496C4A7F003F -B5D8FC07B61280A441657EE448>12 D<B712F0A7240780A12B>45 -D<120FEA3FC0EA7FE0EAFFF0A6EA7FE0EA3FC0EA0F00C7FCB3B3A2120FEA3FC0EA7FE0EA -FFF0A6EA7FE0EA3FC0EA0F000C3E74BD24>58 D<170FA34D7EA24D7EA34D7EA34D7EA34C -7F17DFA29338039FFC178FA29338070FFE1707040F7FEE0E03A2041E80EE1C01A2043C80 -EE3800A24C80187FA24C80183FA24B4880181F0303814C130FA203078193C71207A24B81 -030E80A24B8284A24B8284A24B82197F03F0824B153FA20201834B151FA202038392B8FC -A24A83A292C91207020E8385A24A8485023C84023882A20278840270177FA202F0844A17 -3FA24948841A1FA24948841A0FA249CB7F1A074985865B496C85497E48486C4D7F000F01 -F8051F13F0B60407B612F0A45C657DE463>65 D<B712C0A4C66CEB8000D91FFEC7FC6D5A -B3B3B3B3AE497E90387FFF80B712C0A422627AE12F>73 D<933801FFE0043F13FF4BB612 -E003079038003FF8DB1FF0EB03FEDB7FC0903800FF804A48C8EA3FE0DA03FCED0FF0DA0F -F0ED03FC4A486F7E4A486F7E4A48707E4ACA6C7E4948717E4948717E4948717E4948717E -4948717E013F854A83017F864948727EA24890CC6C7EA24848737EA24848737EA2000F87 -491907001F87A34848737EA4007F1C80A24985A400FF1CC0AF6C6C4F1380A5003F1C006D -61A3001F63A26D190F000F63A26C6C4F5AA36C6C4F5AA26C6D4E5A6C636E18FF017F626D -6C4D90C7FC6E5F011F616D6C4D5A6D6C4D5A0103616E171F6D6C4D5A6D6D4C5ADA3FC04C -C8FCDA1FF0ED03FE6E6C4B5A6E6C4B5ADA01FFED3FE09126007FC0ECFF80DB1FF0D903FE -C9FCDB07FFEB3FF8030190B512E0DB003F91CAFC040113E05A667AE367>79 -D<933801FFE0043F13FF4BB612E003079038003FF8DB1FF0EB03FEDB7FC0903800FF804A -48C8EA3FE0DA03FCED0FF0DA0FF8ED07FCDA1FE0ED01FE4A486F7E4A48707E4ACA6C7E49 -48717E4948717E4948717E010F854948717E4948717EA24948717F01FF864A187F4890CC -6C7EA2488749191F00078749190F000F87A2001F87491907A2003F87A24985A2007F1C80 -A44985A200FF1CC0AF007F1C806D61A4003F1C00A36D61001F63A36C6C4F5AA20007636D -191FA26C6C4F5AA26C636C6DDA3F804A5AEFFFE06D6C010301F84A5A6D6C902607C07C49 -90C7FC93380F001E6D6C011E6D495A6D6C6F495A0107021CD903805B6D6C013C6D6C485A -6E0138151F6D6C0300495A6D01806F485ADA3FC04CC8FCDA1FE0ED71FE91260FF83CEC77 -FC912607FC1CEC7FF8912601FF1EEC3FE09126007FDEECFF80DB1FFFD903FEC9FC030790 -38C03FF8030190B56C1560DB003F143C0401EBE01C93C8121EA21DE0191FA3736C13011D -C0741303A274130774130F736CEB1F8074133F9738FF01FF7390B51200A264856485745B -745B745B08071380E001FEC7FC5B807AE367>81 D<EC3FF0903803FFFE010F6D7E90393F -C03FE090397E0007F801F86D7ED801E06D7E48486D7E48486E7E48C86C7E7F01F06E7E48 -7E6D6E7EA3707EA36C5AEA03E0C9FCA6167FED7FFF020FB5FC91387FF807903801FF8090 -3807FC00EB1FF0EB7FC0495AD803FEC7FC485A120F5B485A485AA2484817E0A312FF5BA2 -160FA3161F6D141B007F153B16736D913971FC01C06C6C14E1001FEC01C1D80FFC903A07 -80FE03806C6C903A0F00FF07002701FF807E6DB4FC27007FFFF86D5A011F01E0EB1FF801 -0190C7EA07E03B417ABF42>97 D<4AB47E020F13F8023F13FE9139FF007F80D903FCEB07 -E0D907F0EB01F0D91FE0EB007849488049488049C87E48485D4915FF00034B138048485C -A2485AA2485AA2003F6F130049EC007C94C7FC127FA35B12FFAD127F7FA4123F7FA2001F -EE01C07F000F16036D168012076C6C15076D160000015E6C6C151E6D6C5C6D6C5C6D6C5C -D90FF8495AD903FCEB07C0903A00FF803F8091263FFFFEC7FC020F13F80201138032417C -BF3A>99 D<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE91 -39FF803F81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F48 -48150F491507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA312 -3FA27F121FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D -6CEB01F1D90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E0 -0201010091C7FC41657CE349>I<EC03FE91381FFFE091B512F8903901FE03FE903A07F0 -007F8049486D7ED93FC06D7E49C76C7E496E7E4914034848814848140100078249140000 -0F8283485A1880123F49153FA2007F17C0A35BA212FF90B8FCA30180CAFCA9127F7FA312 -3FA27F121FEF01C06C7E17036C6C1680A26C6C15070001EE0F006D150E6C6C151E6D6C5C -6D6C5C6D6C5CD907F0EB03E0D903FC495A902700FF803FC7FC91383FFFFC020F13F00201 -138032417CBF3A>I<EB03C0EA07FFB5FCA41201EA007FA2133FB3AAEE7FE0923803FFFC -030F13FFDB3F0013C00378EB1FE04B6D7EDAC1C06D7EDAC3808002C7C7120302CE811701 -14DC14D802F86E7E5CA35CA35CB3B3496C4A7F496C4A7FB6D8F003B612C0A442647DE349 ->104 D<133C13FF487F487FA66C5B6C90C7FC133C90C8FCB3A2EB03C0EA07FF127FA412 -01EA007FA2133FB3B3AC497E497EB612E0A41B5F7DDE23>I<EB03C0EA07FFB5FCA41201 -EA007FA2133FB3B3B3B3AD497E497EB612F0A41C647DE323>108 -D<D903C0D9FFC0EC07FED807FF010301F891381FFFC0B5010F01FE027F13F0923D3F00FF -8001F807FC0378903B3FC003C001FEDAC1E090261FE00FC77E0001D9C3C090260FF01E6E -7ED8007F49902607F81C6E7E02C7C75CD93FCE6E6C486E7E02CC166002DC16E002D85E02 -F8DA01FF6F7E4A5EA24A93C8FCA44A5DB3B3496C4A6C4B7E496C4A6D4A7EB6D8F007B6D8 -803FB512FCA4663F7CBE6F>I<D903C0EB7FE0D807FF903803FFFCB5010F13FFDB3F0013 -C00378EB1FE04B6D7E0001D9C1C06D7E27007FC3808002C7C71203D93FCE81170114DC14 -D802F86E7E5CA35CA35CB3B3496C4A7F496C4A7FB6D8F003B612C0A4423F7DBE49>I<ED -FF80020F13F8023F13FE9139FF007F80D903FCEB1FE0D907F0EB07F0D90FC0EB01F8D93F -80EB00FE49C8127F017E81496F7E48486F7E00038349150700078348486F7EA2001F8349 -1501A2003F83A348486F7EA400FF1880AC007F1800A26D5DA2003F5FA36C6C4B5AA36C6C -4B5A00075FA26C6C4B5A6C6C4B5AA26C6C4B5A017F4BC7FC6D6C14FE6D6C495AD90FF0EB -07F8D903FCEB1FE0D900FFEB7F806EB5C8FC020F13F8020113C039417CBF42>I<D903C0 -EB7FC0D807FF903807FFFCB5011F13FFDB7F0013C003F8EB1FF0DAC3E0EB07F80001D9C7 -806D7E26007FCFC76C7E02DE6E7ED93FFC6F7E4A6F7E4A82181F4A82727E5C727EA2727E -A3727EA41A8084AC4E1300A54E5AA2611807A24E5A6E5E181F6E4B5A6E5E187F6E4B5A02 -DE4A90C7FC02CF4A5ADAC780495ADAC3C0EB0FF0DAC1F0EB3FE0913AC07E01FF806FB448 -C8FC030F13F80300138093CAFCB3A3497E497EB612F0A4415B7DBE49>I<9039078003F8 -D807FFEB0FFFB5013F13C092387C0FE0913881F01F9238E03FF00001EB838039007F8700 -148FEB3F8E029CEB1FE0EE0FC00298EB030002B890C7FCA214B014F0A25CA55CB3B0497E -EBFFF8B612FCA42C3F7CBE33>114 D<9139FFE00180010FEBFC03017FEBFF073A01FF00 -1FCFD803F8EB03EFD807E0EB01FF48487F4848147F48C8123F003E151F007E150F127CA2 -00FC1507A316037EA27E7F6C7E6D91C7FC13F8EA3FFE381FFFF06CEBFF806C14F86C14FF -6C15C06C6C14F0011F80010714FED9007F7F02031480DA003F13C01503030013E0167F00 -E0ED1FF0160F17F86C15071603A36C1501A37EA26C16F016037E17E06D14076DEC0FC06D -1580D8FDF0141FD8F8F8EC7F00013E14FC3AF01FC00FF80107B512E0D8E001148027C000 -3FF8C7FC2D417DBF34>I<1438A71478A414F8A31301A31303A21307130F131FA2137F13 -FF1203000F90B6FCB8FCA3260007F8C8FCB3AE17E0AE6D6CEB01C0A316036D6C14801607 -6D6C14006E6C5A91383FC01E91381FF07C6EB45A020313E09138007F802B597FD733>I< -D903C0150FD807FFED1FFFB50203B5FCA40001ED0007D8007F1501A2013F81B3B25FA35F -A35F011F15066E140E5F130F6E4A7F01075D6D6C494813E0D901FE4948EBFFC0903A00FF -C01F8091393FFFFE00020F13F8020001C0EC800042407DBE49>I<B66C49B512E0A40001 -01F8C8387FFE0026007FE0ED1FF819E0013F705A61131F6E93C7FC130F180E6E151E0107 -161C8001035EA26E157801011670806D5EA26F1301027F5DA26E6C495AA26F1307021F92 -C8FCA26E6C130EA26F131E0207141CA26F133C020314388102015CA26F13F06E5C168092 -387F81C0A216C3033F5B16E3DB1FE7C9FCA216FF6F5AA26F5AA36F5AA26F5AA36F5A433F -7FBD46>I<B6D8801FB500E090B512F8A4000301F0C7D87FFCC7001F1380C601C0DA3FF0 -913807FE00051F6F5A017F030F6F5A64133F05075E6E81011F030F5EA26E6F1403010F03 -1F5E171D6E6F14070107033D93C7FC17386E6F5C01030378150EEF707F6E70131E010103 -F0151CEFE03F6E70133C6D02011638EFC01F03806F1378027F01031670EF800F03C06F13 -F0023F01075EEF000703E0EDF801021F495E040E130303F0EDFC03020F011E5E041C1301 -03F8EDFE070207013C93C8FC0438130003FC6F5A02030178150E0470147F03FE169E0201 -01F0159C4C143F03FF16FC6E5F4C141FA2037F5E4C140FA2033F5E93C81207A26F5E031E -1503030E5E5D3F7FBD60>I<007FB500C0010FB512E0A4C691C70003EBFC00D93FFE6E13 -E0D90FFC16807148C7FC01075E6D6C4A5A6D6C5D6D6D495A606E6C495A6E6C49C8FC6E6C -130E171E6E6C5B6E6C5B6E6C5B5F913801FF016EEB83C092387FC780033F90C9FC16EFED -1FFE6F5A6F5A826F7E6F7E5D834B7F92380F3FE0ED1E1F033C7F9238380FF892387807FC -EDF003DA01E07F4A486C7E707F4A486D7E4AC7FC021E6E7E021C6E7E023C6E7E5C4A6E7E -01016F7E49486E7E1307010F6F7F013F83D9FFF04A7F00076D4A13FCB56C020FEBFFF8A4 -453E80BD46>I E end -TeXDict begin - -1 0 bop 249 763 a Fv(Quaternions:)60 b(An)44 b(In)l(tro)t(duction)g -(with)g(Octa)l(v)l(e)g(m-\014le)g(examples)1071 1016 -y Fu(A.)32 b(S.)h(Ho)s(del)f Ft(a.s.hodel@eng.auburn.edu)1462 -1219 y Fs(R)q(ev)t(ision)d Fu(:)f(1)p Fs(:)p Fu(1)k(\(c\))g(1998)1537 -1568 y Fr(Ac)m(kno)m(wledgemen)m(t)0 1781 y Fq(The)g(author)g -(gratefully)f(thanks)h(the)h(Fligh)m(t)f(Con)m(trols)g(and)f(Dynamics)h -(Branc)m(h)h(at)g(Marshall)e(Space)h(Fligh)m(t)0 1894 -y(Cen)m(ter)h(for)f(their)g(useful)f(discussions)f(that)j(led)f(to)h -(this)f(do)s(cumen)m(t)g(and)g(m-\014le)g(suite.)47 b(Citations)32 -b(are)h(giv)m(en)0 2007 y(where)28 b(they)g(w)m(ere)h(a)m(v)-5 -b(ailable)28 b(to)h(me.)40 b(I)28 b(w)m(elcome)h(an)m(y)g(suggestions)f -(for)g(additional)e(reference)j(material)f(to)h(b)s(e)0 -2120 y(placed)h(in)f(the)h(bibliograph)m(y)-8 b(.)0 2406 -y Fp(Con)l(ten)l(ts)0 2610 y Fr(1)84 b(Quaternions)3154 -b(2)136 2723 y Fq(1.1)94 b(De\014nition)61 b Fo(:)46 -b(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)f(:)h -(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:) -h(:)g(:)f(:)h(:)g(:)f(:)131 b Fq(2)136 2836 y(1.2)94 -b(Multiplication)28 b(of)i(quaternions)72 b Fo(:)46 b(:)g(:)f(:)h(:)g -(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:) -g(:)f(:)h(:)g(:)f(:)h(:)g(:)f(:)131 b Fq(2)136 2949 y(1.3)94 -b(Quaternions)29 b(as)i(rotations)39 b Fo(:)46 b(:)g(:)f(:)h(:)g(:)f(:) -h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h -(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)f(:)131 b Fq(3)136 -3061 y(1.4)94 b(Application)29 b(of)h(quaternions)g(in)f(co)s(ordinate) -h(frame)g(transformations)53 b Fo(:)45 b(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:) -h(:)g(:)f(:)131 b Fq(6)345 3174 y(1.4.1)106 b(Euler)29 -b(angles)i Fo(:)46 b(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)f(:)h(:) -g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h -(:)g(:)f(:)h(:)g(:)f(:)131 b Fq(6)345 3287 y(1.4.2)106 -b(Co)s(ordinate)30 b(transformation)g(matrices)g(and)g(quaternions)46 -b Fo(:)g(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)f(:)131 -b Fq(6)136 3400 y(1.5)94 b(Time)30 b(deriv)-5 b(ativ)m(e)30 -b(of)g(a)h(quaternion)42 b Fo(:)k(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h -(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:)g(:)g(:)f(:)h(:)g(:)f(:)h(:) -g(:)f(:)85 b Fq(12)1927 5656 y(1)p eop -2 1 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(2)0 399 -y Fp(1)135 b(Quaternions)0 601 y Fq(A)32 b(con)m(v)m(enien)m(t)g(w)m(a) -m(y)h(to)f(represen)m(t)f(the)h(relativ)m(e)g(orien)m(tation)f(of)h(t)m -(w)m(o)g(frames)g(is)e(through)h(the)h(use)f(of)g(quater-)0 -714 y(nions.)0 958 y Fm(1.1)112 b(De\014nition)0 1129 -y Fr(De\014nition)35 b(1.1)46 b Fq(A)31 b(quaternion)e(is)g(a)i(4-v)m -(ector)i(de\014ned)c(b)m(y)1268 1334 y Fo(q)f Fq(=)d -Fo(a)1474 1313 y Fq(^)1481 1334 y Fo(i)c Fq(+)f Fo(b)1662 -1313 y Fq(^)1663 1334 y Fo(j)26 b Fq(+)19 b Fo(c)1857 -1310 y Fq(^)1855 1334 y Fo(k)24 b Fq(+)c Fo(d;)46 b(a;)15 -b(b;)g(c;)g(d)27 b Fl(2)e Fq(I)-9 b(R)0 1538 y(where)256 -1517 y(^)263 1538 y Fo(i)p Fq(,)348 1517 y(^)350 1538 -y Fo(j)5 b Fq(,)450 1514 y(^)448 1538 y Fo(k)33 b Fq(are)e(quan)m -(tities)f(satisfying)1498 1517 y(^)1505 1538 y Fo(i)1536 -1505 y Fk(2)1601 1538 y Fq(=)1696 1517 y(^)1697 1538 -y Fo(j)1739 1505 y Fk(2)1804 1538 y Fq(=)1903 1514 y(^)1900 -1538 y Fo(k)1950 1505 y Fk(2)2015 1538 y Fq(=)25 b Fl(\000)p -Fq(1)31 b(and)1476 1721 y(^)1483 1742 y Fo(i)1513 1721 -y Fq(^)1515 1742 y Fo(j)f Fq(=)1681 1718 y(^)1678 1742 -y Fo(k)1846 1721 y Fq(^)1847 1742 y Fo(j)1892 1718 y -Fq(^)1890 1742 y Fo(k)e Fq(=)2054 1721 y(^)2061 1742 -y Fo(i)2213 1718 y Fq(^)2211 1742 y Fo(k)2254 1721 y -Fq(^)2261 1742 y Fo(i)e Fq(=)2412 1721 y(^)2413 1742 -y Fo(j)1372 1859 y Fq(^)1373 1880 y Fo(j)6 b Fq(\0201)25 -b(=)g Fl(\000)1681 1856 y Fq(^)1679 1880 y Fo(k)1814 -1856 y Fq(^)1812 1880 y Fo(k)1860 1859 y Fq(^)1862 1880 -y Fo(j)31 b Fq(=)25 b Fl(\000)2090 1859 y Fq(^)2097 1880 -y Fo(i)2204 1859 y Fq(^)2211 1880 y Fo(i)2244 1856 y -Fq(^)2242 1880 y Fo(k)k Fq(=)24 b Fl(\000)2483 1859 y -Fq(^)2484 1880 y Fo(j)0 2092 y Fr(Remark)34 b(1.1)46 -b Fq(Notice)35 b(that)1058 2072 y(^)1065 2092 y Fo(i)p -Fq(,)1154 2072 y(^)1156 2092 y Fo(j)5 b Fq(,)35 b(and)1440 -2068 y(^)1438 2092 y Fo(k)h Fq(are)e(scalar)g(quan)m(tities)e(equal)h -(to)2718 2021 y Fl(p)p 2793 2021 117 4 v 2793 2092 a(\000)p -Fq(1)q(;)i(ho)m(w)m(ev)m(er,)3341 2072 y(^)3348 2092 -y Fo(i)p Fq(,)3437 2072 y(^)3438 2092 y Fo(j)6 b Fq(,)35 -b(and)3723 2068 y(^)3720 2092 y Fo(k)i Fq(do)0 2205 y(not)g(comm)m(ute) -h(under)d(m)m(ultiplication.)56 b(Therefore)36 b(quaternions)g(do)g -(not)h(comm)m(ute)h(under)d(m)m(ultiplication)0 2318 -y(\()p Fo(q)76 2332 y Fk(1)115 2318 y Fo(q)156 2332 y -Fk(2)221 2318 y Fl(6)p Fq(=)25 b Fo(q)358 2332 y Fk(2)397 -2318 y Fo(q)438 2332 y Fk(1)497 2318 y Fq(in)20 b(general\).)38 -b(This)19 b(is)h(consisten)m(t)h(with)f(the)h(in)m(terpretation)f(of)h -(quaternions)f(as)h(spatial)f(rotations)0 2431 y(\(to)31 -b(b)s(e)f(discussed)f(in)g Fl(x)p Fq(1.4.2.)0 2644 y -Fr(M-\014le)46 b Fj(quaternion)57 b Fq(Create/extract)34 -b(quaternion)29 b(information:)227 2869 y Fj(quaternion:)45 -b(construct)g(or)i(extract)f(a)i(quaternion)227 2982 -y(w)g(=)f(a*i)g(+)h(b*j)e(+)i(c*k)f(+)g(d)h(from)e(given)h(data.)227 -3207 y(calling)f(formats:)227 3320 y([a,b,c,d])141 b(=)47 -b(quaternion\(w\))570 b(-or-)227 3433 y([vv,theta])45 -b(=)j(quaternion\(w\))227 3546 y(w)525 b(=)47 b(quaternion\(a,b,c,d\)) -227 3659 y(w)525 b(=)47 b(quaternion\(vv,theta\))227 -3884 y Fq(\()p Fj(vv,theta)29 b Fq(format)h(to)i(b)s(e)d(explained)g -(later\))0 4128 y Fm(1.2)112 b(Multiplication)34 b(of)k(quaternions)0 -4299 y Fq(F)-8 b(rom)31 b(De\014nition)e(1.1,)j(w)m(e)e(ha)m(v)m(e)533 -4503 y Fo(q)574 4517 y Fk(1)613 4503 y Fo(q)654 4517 -y Fk(2)776 4503 y Fq(=)83 b(\()p Fo(a)1013 4517 y Fk(1)1046 -4483 y Fq(^)1053 4503 y Fo(i)20 b Fq(+)g Fo(b)1234 4517 -y Fk(1)1272 4483 y Fq(^)1274 4503 y Fo(j)26 b Fq(+)20 -b Fo(c)1467 4517 y Fk(1)1509 4479 y Fq(^)1506 4503 y -Fo(k)k Fq(+)c Fo(d)1715 4517 y Fk(1)1754 4503 y Fq(\)\()p -Fo(a)1872 4517 y Fk(2)1905 4483 y Fq(^)1913 4503 y Fo(i)g -Fq(+)g Fo(b)2094 4517 y Fk(2)2132 4483 y Fq(^)2133 4503 -y Fo(j)26 b Fq(+)20 b Fo(c)2326 4517 y Fk(2)2368 4479 -y Fq(^)2366 4503 y Fo(k)j Fq(+)d Fo(d)2574 4517 y Fk(2)2614 -4503 y Fq(\))776 4641 y(=)83 b(\()p Fo(a)1013 4655 y -Fk(1)1053 4641 y Fo(d)1100 4655 y Fk(2)1160 4641 y Fq(+)20 -b Fo(b)1290 4655 y Fk(1)1329 4641 y Fo(c)1368 4655 y -Fk(2)1428 4641 y Fl(\000)g Fo(c)1558 4655 y Fk(1)1598 -4641 y Fo(b)1637 4655 y Fk(2)1697 4641 y Fq(+)f Fo(d)1834 -4655 y Fk(1)1874 4641 y Fo(a)1922 4655 y Fk(2)1962 4641 -y Fq(\))p Fo(i)i Fq(+)e(\()p Fo(c)2213 4655 y Fk(1)2254 -4641 y Fo(a)2302 4655 y Fk(2)2361 4641 y Fl(\000)h Fo(a)2500 -4655 y Fk(1)2540 4641 y Fo(c)2579 4655 y Fk(2)2639 4641 -y Fq(+)g Fo(b)2769 4655 y Fk(1)2808 4641 y Fo(d)2855 -4655 y Fk(2)2915 4641 y Fq(+)g Fo(d)3053 4655 y Fk(1)3093 -4641 y Fo(b)3132 4655 y Fk(2)3171 4641 y Fq(\))3205 4620 -y(^)3206 4641 y Fo(j)930 4779 y Fq(+\()p Fo(a)1084 4793 -y Fk(1)1124 4779 y Fo(b)1163 4793 y Fk(2)1222 4779 y -Fl(\000)g Fo(b)1352 4793 y Fk(1)1392 4779 y Fo(a)1440 -4793 y Fk(2)1499 4779 y Fq(+)g Fo(c)1629 4793 y Fk(1)1669 -4779 y Fo(d)1716 4793 y Fk(2)1776 4779 y Fq(+)g Fo(d)1914 -4793 y Fk(1)1954 4779 y Fo(c)1993 4793 y Fk(2)2032 4779 -y Fq(\))2069 4755 y(^)2067 4779 y Fo(k)k Fq(+)c(\()p -Fl(\000)p Fo(a)2383 4793 y Fk(1)2423 4779 y Fo(a)2471 -4793 y Fk(2)2530 4779 y Fl(\000)g Fo(b)2660 4793 y Fk(1)2700 -4779 y Fo(b)2739 4793 y Fk(2)2798 4779 y Fl(\000)g Fo(c)2928 -4793 y Fk(1)2968 4779 y Fo(c)3007 4793 y Fk(2)3067 4779 -y Fq(+)g Fo(d)3205 4793 y Fk(1)3245 4779 y Fo(d)3292 -4793 y Fk(2)3331 4779 y Fq(\))347 b(\(1.1\))21 5018 y(De\014ne)21 -b Fo(v)337 5032 y Fk(1)401 5018 y Fq(=)497 4924 y Fi(h)578 -5018 y Fo(a)626 5032 y Fk(1)749 5018 y Fo(b)788 5032 -y Fk(1)910 5018 y Fo(c)949 5032 y Fk(1)1030 4924 y Fi(i)1070 -4947 y Fh(T)1145 5018 y Fq(and)g Fo(v)1357 5032 y Fk(2)1421 -5018 y Fq(=)1517 4924 y Fi(h)1598 5018 y Fo(a)1646 5032 -y Fk(2)1769 5018 y Fo(b)1808 5032 y Fk(2)1930 5018 y -Fo(c)1969 5032 y Fk(2)2050 4924 y Fi(i)2089 4947 y Fh(T)2145 -5018 y Fq(.)37 b(Then)20 b([Mul)o(])h(equation)g(\(1.1\))h(ma)m(y)g(b)s -(e)e(rewritten)0 5131 y(as)1017 5244 y Fo(q)1058 5258 -y Fk(1)1097 5244 y Fo(q)1138 5258 y Fk(2)1202 5244 y -Fq(=)25 b Fo(d)1345 5258 y Fk(1)1385 5244 y Fo(d)1432 -5258 y Fk(2)1492 5244 y Fq(+)20 b Fo(d)1630 5258 y Fk(1)1669 -5244 y Fo(v)1713 5258 y Fk(2)1773 5244 y Fq(+)g Fo(d)1911 -5258 y Fk(2)1951 5244 y Fo(v)1995 5258 y Fk(1)2054 5244 -y Fl(\000)g(h)q Fo(v)2225 5258 y Fk(1)2264 5244 y Fo(;)15 -b(v)2348 5258 y Fk(2)2388 5244 y Fl(i)21 b Fq(+)f(\()p -Fo(v)2614 5258 y Fk(1)2674 5244 y Fl(\002)f Fo(v)2808 -5258 y Fk(2)2848 5244 y Fq(\))830 b(\(1.2\))p eop -3 2 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(3)0 399 -y(where)30 b(the)g(cross)h(pro)s(duct)1385 622 y(\()p -Fo(v)1464 636 y Fk(1)1524 622 y Fl(\002)20 b Fo(v)1659 -636 y Fk(2)1699 622 y Fq(\))1765 572 y Fk(\001)1759 622 -y Fq(=)1855 424 y Fi(\014)1855 474 y(\014)1855 524 y(\014)1855 -574 y(\014)1855 624 y(\014)1855 674 y(\014)1855 723 y(\014)1883 -428 y(2)1883 574 y(6)1883 627 y(4)2001 492 y Fq(^)2008 -513 y Fo(i)2167 492 y Fq(^)2168 513 y Fo(j)2328 489 y -Fq(^)2326 513 y Fo(k)1980 625 y(a)2028 639 y Fk(1)2150 -625 y Fo(b)2189 639 y Fk(1)2312 625 y Fo(c)2351 639 y -Fk(1)1980 738 y Fo(a)2028 752 y Fk(2)2150 738 y Fo(b)2189 -752 y Fk(2)2312 738 y Fo(c)2351 752 y Fk(2)2432 428 y -Fi(3)2432 574 y(7)2432 627 y(5)2487 424 y(\014)2487 474 -y(\014)2487 524 y(\014)2487 574 y(\014)2487 624 y(\014)2487 -674 y(\014)2487 723 y(\014)0 881 y Fq(This)29 b(v)m(ector-based)j(in)m -(terpretation)d(will)f(b)s(ecome)j(more)f(imp)s(ortan)m(t)g(in)f -Fl(x)p Fq(1.4.2.)0 1040 y Fr(M-\014le)46 b Fj(qmult)227 -1231 y(function)g(c)h(=)h(qmult\(a,b\))227 1344 y(multiply)e(two)h -(quaternions)0 1534 y Fr(De\014nition)35 b(1.2)46 b Fq(The)26 -b Fg(c)-5 b(onjugate)26 b Fq(of)g(a)h(quaternion)e Fo(q)j -Fq(=)d Fo(a)2077 1514 y Fq(^)2084 1534 y Fo(i)12 b Fq(+)f -Fo(b)2247 1514 y Fq(^)2248 1534 y Fo(j)17 b Fq(+)11 b -Fo(c)2425 1510 y Fq(^)2423 1534 y Fo(k)k Fq(+)c Fo(d)26 -b Fq(is)f Fo(q)2771 1501 y Ff(\003)2836 1534 y Fq(=)g -Fl(\000)p Fo(a)3044 1514 y Fq(^)3051 1534 y Fo(i)11 b -Fl(\000)g Fo(b)3213 1514 y Fq(^)3214 1534 y Fo(j)17 b -Fl(\000)11 b Fo(c)3391 1510 y Fq(^)3389 1534 y Fo(k)k -Fq(+)c Fo(d)p Fq(.)40 b(Notice)0 1664 y(that)35 b Fo(q)s(q)289 -1631 y Ff(\003)361 1664 y Fq(=)d Fo(q)508 1631 y Ff(\003)547 -1664 y Fo(q)k Fq(=)c Fo(a)775 1631 y Fk(2)837 1664 y -Fq(+)23 b Fo(b)970 1631 y Fk(2)1033 1664 y Fq(+)f Fo(c)1165 -1631 y Fk(2)1228 1664 y Fq(+)h Fo(d)1369 1631 y Fk(2)1447 -1614 y(\001)1441 1664 y Fq(=)32 b Fl(j)p Fo(q)s Fl(j)1639 -1622 y Fk(2)1678 1664 y Fq(.)54 b(F)-8 b(or)35 b(quaternions)f -Fo(q)j Fq(with)c Fo(q)s(q)2799 1631 y Ff(\003)2871 1664 -y Fl(6)p Fq(=)f(0)j(w)m(e)g(de\014ne)f(the)h Fg(inverse)0 -1821 y(quaternion)c Fo(q)498 1783 y Ff(\000)p Fk(1)618 -1821 y Fq(=)746 1759 y Fo(q)790 1726 y Ff(\003)p 724 -1799 128 4 v 724 1883 a Fo(q)s(q)812 1857 y Ff(\003)861 -1821 y Fq(.)40 b(Notice)32 b(that)f Fo(q)s(q)1497 1788 -y Ff(\000)p Fk(1)1616 1821 y Fq(=)25 b Fo(q)1756 1788 -y Ff(\000)p Fk(1)1850 1821 y Fo(q)j Fq(=)d(1.)0 2037 -y Fr(M-\014le)46 b Fj(qinv)59 b Fq(Compute)30 b(the)h(in)m(v)m(erse)f -(of)g(a)h(quaternion)227 2228 y Fj(function)46 b(b)h(=)h(qinv\(a\))227 -2341 y(return)e(the)h(inverse)f(of)h(a)h(quaternion)227 -2454 y(a)g(=)95 b([w,x,y,z])45 b(=)j(w*i)f(+)g(x*j)g(+)g(y*k)g(+)h(z) -227 2567 y(qmult\(a,qinv\(a\)\))c(=)j(1)h(=)f([0)g(0)h(0)f(1])0 -2757 y Fr(Example)34 b(1.1)46 b Fq(Compute)30 b(and)f(m)m(ultiply)f -(the)j(in)m(v)m(erse)f(quaternion:)0 2916 y Fj(octave:1>)45 -b(q)j(=)f(quaternion\(1,2,3,4\);)42 b(qi)48 b(=)f(qinv\(q\))0 -3029 y(qi)g(=)h(-0.033333)93 b(-0.066667)g(-0.100000)140 -b(0.133333)0 3142 y(octave:2>)45 b(qmult\(qi,q\))0 3255 -y(ans)i(=)g(0)96 b(0)f(0)g(1)0 3368 y(octave:3>)45 b(qmult\(q,qi\))0 -3481 y(ans)i(=)g(0)96 b(0)f(0)g(1)0 3640 y Fq(In)30 b(b)s(oth)f(cases)j -(the)e(pro)s(duct)f(is)h(the)g(iden)m(tiy)f(quaternion)h(0)2101 -3619 y(^)2108 3640 y Fo(i)21 b Fq(+)f(0)2295 3619 y(^)2296 -3640 y Fo(j)26 b Fq(+)20 b(0)2497 3616 y(^)2495 3640 -y Fo(k)k Fq(+)19 b(1)26 b(=)f(1.)0 3878 y Fm(1.3)112 -b(Quaternions)38 b(as)g(rotations)0 4062 y Fr(De\014nition)d(1.3)46 -b Fq(A)31 b Fg(unit)h(quaternion)g Fo(q)c Fq(=)d Fo(a)1617 -4041 y Fq(^)1624 4062 y Fo(i)20 b Fq(+)g Fo(b)1804 4041 -y Fq(^)1805 4062 y Fo(j)26 b Fq(+)20 b Fo(c)2000 4038 -y Fq(^)1998 4062 y Fo(k)k Fq(+)19 b Fo(d)31 b Fq(satis\014es)2572 -3964 y Fi(\015)2572 4014 y(\015)2572 4064 y(\015)2618 -3967 y(h)2699 4062 y Fo(a)83 b(b)g(c)g(d)3163 3967 y -Fi(i)3202 3964 y(\015)3202 4014 y(\015)3202 4064 y(\015)3248 -4118 y Fk(2)3313 4062 y Fq(=)25 b(1.)0 4254 y Fr(Remark)34 -b(1.2)46 b Fq(Unit)40 b(quaternions)f(ma)m(y)h(b)s(e)g(considered)f(as) -h(represen)m(tations)g(of)h(a)f(rotation)h(of)f Fo(\022)i -Fq(degrees)0 4367 y(ab)s(out)f(a)g(giv)m(en)g(unit)f(v)m(ector)j -Fo(v)h Fq(\(see)e(routine)e Fj(quaternion)p Fq(\).)70 -b(The)41 b(transformation)f(is)g(accomplished)g(b)m(y)0 -4496 y(m)m(ultiplying)27 b Fo(v)529 4510 y Fh(r)592 4496 -y Fq(=)e Fo(q)s(v)s(q)823 4463 y Ff(\000)p Fk(1)917 4496 -y Fq(,)31 b(where)f Fo(v)e Fq(=)1404 4402 y Fi(h)1485 -4496 y Fo(x)83 b(y)j(z)h Fq(0)1967 4402 y Fi(i)2006 4496 -y Fq(.)0 4684 y(With)30 b(this)f(in)m(terpretation,)h(unit)f -(quaternions)g(ma)m(y)i(b)s(e)f(written)f(as)890 4964 -y Fo(q)f Fq(=)1055 4870 y Fi(\020)1105 4964 y Fo(ai)21 -b Fq(+)e Fo(b)1333 4944 y Fq(^)1334 4964 y Fo(j)26 b -Fq(+)20 b Fo(c)1529 4940 y Fq(^)1527 4964 y Fo(k)1578 -4870 y Fi(\021)1643 4964 y Fq(sin)n(\()p Fo(\022)s(=)p -Fq(2\))h(+)f(cos)q(\()p Fo(\022)s(=)p Fq(2\))2432 4914 -y Fk(\001)2426 4964 y Fq(=)2522 4771 y Fi(0)2522 4917 -y(B)2522 4970 y(@)2594 4771 y(2)2594 4917 y(6)2594 4970 -y(4)2691 4851 y Fo(a)2696 4964 y(b)2696 5077 y(c)2781 -4771 y Fi(3)2781 4917 y(7)2781 4970 y(5)2851 4964 y Fo(;)15 -b(\022)2937 4771 y Fi(1)2937 4917 y(C)2937 4970 y(A)3713 -4964 y Fq(\(1.3\))0 5279 y(Notice)26 b(that)f(this)f(implies)e(that) -1137 5185 y Fi(h)1218 5279 y Fo(a)83 b(b)g(c)1552 5185 -y Fi(i)1615 5279 y Fq(is)24 b(also)h(a)g(unit)e(v)m(ector.)41 -b(This)23 b(is)g(consisten)m(t)j(with)d(m)m(ultiplication)0 -5407 y(b)m(y)30 b(the)h(iden)m(tit)m(y)f(quaterion)g -Fo(q)e Fq(=)d(1,)31 b(since)e(cos)q(\(0\))d(=)f(1)31 -b(and)f(sin)o(\(0\))c(=)f(0.)p eop -4 3 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)g(Quaternions)f(\(In)m(tro)s -(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p Fo(:)p Fq(1)439 -b Fn(\(c\))32 b(1998)908 b Fq(4)0 399 y Fr(Example)34 -b(1.2)46 b Fq(Unit)33 b(quaternions)g(ma)m(y)h(b)s(e)g(m)m(ultiplied)c -(to)35 b(obtain)e(a)i(single)e(equiv)-5 b(alen)m(t)33 -b(co)s(ordinate)h(rota-)0 511 y(tion.)47 b(Let)33 b Fo(q)435 -525 y Fk(3)506 511 y Fq(b)s(e)f(a)h(90)800 478 y Ff(\016)872 -511 y Fq(rotation)g(ab)s(out)f(the)h Fo(x)p Fl(\000)p -Fq(axis.)46 b(F)-8 b(ollo)m(w)33 b(this)e(rotation)i(b)m(y)g -Fo(q)2982 525 y Fk(2)3021 511 y Fq(,)g(a)g(90)3247 478 -y Ff(\016)3319 511 y Fq(rotation)g(ab)s(out)0 624 y(the)k(\(new\))g -Fo(y)i Fq(axis.)60 b(Finally)-8 b(,)37 b(follo)m(w)f(this)g(rotation)h -(b)m(y)f Fo(q)2067 638 y Fk(1)2106 624 y Fq(,)j(a)e(90)2342 -591 y Ff(\016)2419 624 y Fq(rotation)g(ab)s(out)g(the)g(\(newly)f -(revised\))g Fo(z)0 737 y Fq(axis.)k(Then)30 b Fo(q)e -Fq(=)d Fo(q)664 751 y Fk(1)703 737 y Fo(q)744 751 y Fk(2)783 -737 y Fo(q)824 751 y Fk(3)893 737 y Fq(is)k(a)i(90)g(degree)g(rotation) -g(ab)s(out)f(the)h(original)d Fo(y)s Fq(-axis.)0 925 -y Fj(octave:1>)45 b(degrees)h(=)i(pi/180;)0 1038 y(octave:2>)d(q1)i(=)h -(quaternion\([0,0,1],90*de)o(gree)o(s\);)0 1151 y(octave:3>)d(q2)i(=)h -(quaternion\([0,1,0],90*de)o(gree)o(s\);)0 1264 y(octave:4>)d(q3)i(=)h -(quaternion\([1,0,0],90*de)o(gree)o(s\);)0 1377 y(octave:5>)d(q)j(=)f -(qmult\(q1,qmult\(q2,q3\)\);)0 1489 y(octave:6>)e([vv,th])h(=)i -(quaternion\(q\))0 1602 y(vv)f(=)h(0)f(1)h(0)0 1715 y(th)f(=)h(1.5708)0 -1828 y(octave:7>)d(th/degrees)0 1941 y(ans)i(=)g(90.000)118 -2154 y Fq(The)26 b(rotation)g(ab)s(out)g(a)h(v)m(ector)h(axis)e(in)m -(terpretation)f(of)i(quaternions)e(requires)g(care:)39 -b(the)26 b(axis)g(of)h(rotation)0 2267 y(is)40 b(tak)m(en)j(based)e(on) -h(the)f(co)s(ordinate)g(frame)h(for)f(whic)m(h)f(the)i(quaternion)e(w)m -(as)i(written.)73 b(F)-8 b(or)42 b(example,)j(a)0 2379 -y(rotation)30 b(around)e(the)i(inertial)d Fo(y)s Fq(-axis)i(follo)m(w)m -(ed)g(b)m(y)g(a)h(rotation)g(around)e(the)i(inertial)d -Fo(x)j Fq(axis)e(can)i(b)s(e)f(written)0 2492 y(as)949 -2623 y Fo(q)f Fq(=)d Fo(q)1155 2637 y Fh(x)1199 2623 -y Fo(q)1240 2637 y Fh(y)1306 2623 y Fq(=)1402 2504 y -Fi(\022)1463 2529 y(h)1544 2623 y Fq(1)83 b(0)h(0)1888 -2529 y Fi(i)1927 2552 y Fh(T)1982 2623 y Fo(;)15 b(\022)2065 -2637 y Fh(x)2109 2504 y Fi(\023)g(\022)2246 2529 y(h)2327 -2623 y Fq(0)83 b(1)h(0)2671 2529 y Fi(i)2710 2552 y Fh(T)2765 -2623 y Fo(;)15 b(\022)2848 2637 y Fh(y)2890 2504 y Fi(\023)0 -2825 y Fq(This)31 b(is)i(inconsisten)m(t)f(with)g(the)h(de\014nition)e -(of)j(Euler)d(angles,)k(in)c(whic)m(h)h(eac)m(h)j(angle)e(is)f -(de\014ned)g(b)m(y)h(a)h(frame)0 2938 y(based)41 b(up)s(on)f(the)i -(previous)e(rotation.)75 b(This)40 b(problem)g(is)h(addressed)f(b)m(y)i -(co)s(ordinate)f(transformation)g(b)m(y)0 3051 y(quaternions:)0 -3264 y Fr(M-\014le)46 b Fj(qtrans)59 b Fq(T)-8 b(ransform)29 -b(a)i(quaternion)e(in)g(one)i(frame)f(to)h(the)g(co)s(ordinate)f(basis) -f(of)i(another)f(frame.)275 3489 y Fj(function)46 b(v)h(=)g -(qtrans\(v,q\))275 3602 y(transform)e(the)i(vector)f(v)i(\(in)f -(quaternion)e(form\))h(by)h(the)g(quaternion)e(q;)275 -3714 y(v)i(=)h([x)f(y)h(z)f(0],)g(q)g(=)h(transformation)c(quaternion) -275 3827 y(returns)i(v)h(=)h(q*v/q)0 4052 y Fr(Remark)34 -b(1.3)46 b Fq(Giv)m(en)34 b(a)h(quaternion)e Fo(q)1425 -4067 y Fh(f)1504 4052 y Fq(describing)f(the)j(rotation)f(from)g(an)g -(inertial)e(frame)i(\()p Fo(x)3463 4066 y Fk(1)3503 4052 -y Fo(;)15 b(y)3588 4066 y Fk(1)3628 4052 y Fo(;)g(z)3710 -4066 y Fk(1)3750 4052 y Fq(\))34 b(to)0 4165 y(second)24 -b(frame)f(\()p Fo(x)622 4179 y Fk(2)662 4165 y Fo(;)15 -b(y)747 4179 y Fk(2)787 4165 y Fo(;)g(z)869 4179 y Fk(2)909 -4165 y Fq(\),)25 b(a)f(quaternion)f Fo(q)1555 4179 y -Fh(r)1616 4165 y Fq(de\014ned)f(in)h(the)h(second)f(frame)h(ma)m(y)g(b) -s(e)f(applied)f(b)m(y)h(m)m(ultiplying)0 4278 y Fo(q)41 -4293 y Fh(f)86 4278 y Fo(q)127 4292 y Fh(r)164 4278 y -Fo(q)205 4293 y Fh(f)250 4245 y Ff(\000)p Fk(1)345 4278 -y Fq(:)111 4466 y(1.)46 b(T)-8 b(ransform)30 b(\(rotate\))i(frame)f(2)f -(\()p Fo(x)1424 4480 y Fk(2)1464 4466 y Fo(;)15 b(y)1549 -4480 y Fk(2)1589 4466 y Fo(;)g(z)1671 4480 y Fk(2)1711 -4466 y Fq(\))30 b(bac)m(k)h(to)h(the)e(inertial)e(frame.)111 -4653 y(2.)46 b(P)m(erform)31 b(the)f(rotation)h Fo(q)1124 -4667 y Fh(r)1161 4653 y Fq(.)111 4841 y(3.)46 b(Rotate)33 -b(bac)m(k)e(to)g(the)f(second)h(frame)f(via)g Fo(q)1745 -4856 y Fh(f)1790 4841 y Fq(.)0 5074 y(That)40 b(is,)h(if)e -Fo(q)499 5088 y Fh(r)577 5074 y Fq(=)689 4955 y Fi(\022)750 -4980 y(h)831 5074 y Fq(0)83 b(1)h(0)1175 4980 y Fi(i)1214 -5003 y Fh(T)1269 5074 y Fo(;)15 b(\022)1352 5088 y Fh(r)1390 -4955 y Fi(\023)1491 5074 y Fq(is)38 b(a)i(rotation)h(ab)s(out)e(the)h -Fo(y)j Fq(axis)c(in)f(the)i(frame)g(\()p Fo(x)3385 5088 -y Fk(2)3425 5074 y Fo(;)15 b(y)3510 5088 y Fk(2)3549 -5074 y Fo(;)g(z)3631 5088 y Fk(2)3671 5074 y Fq(\),)43 -b(the)0 5235 y(quaternion)29 b Fo(q)498 5250 y Fh(f)543 -5235 y Fo(q)584 5249 y Fh(r)622 5235 y Fo(q)663 5250 -y Fh(f)708 5202 y Ff(\000)p Fk(1)832 5235 y Fq(is)h(the)g(equiv)-5 -b(alen)m(t)30 b(rotation)h(in)e(the)i(frame)f(\()p Fo(x)2466 -5249 y Fk(1)2506 5235 y Fo(;)15 b(y)2591 5249 y Fk(1)2630 -5235 y Fo(;)g(z)2712 5249 y Fk(1)2752 5235 y Fq(\).)p -eop -5 4 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(5)0 399 -y Fr(Example)34 b(1.3)46 b(Quaternion)27 b(algebra)d -Fl(\000)p Fq(90)1672 366 y Ff(\016)1736 399 y Fq(rotation)h(ab)s(out)e -Fo(x)h Fq(follo)m(w)m(ed)g(b)m(y)g(90)2963 366 y Ff(\016)3028 -399 y Fq(rotation)g(ab)s(out)g(revised)0 522 y Fo(y)33 -b Fq(and)d Fo(z)k Fq(axes)d(is)f(equiv)-5 b(alen)m(t)30 -b(to)h(a)g(rotation)f(ab)s(out)g(the)2007 428 y Fi(h)2088 -522 y Fq(1)83 b(1)h(1)2432 428 y Fi(i)2501 522 y Fq(v)m(ector.)0 -711 y Fj(qx)95 b(=)47 b(quaternion\([1,0,0],-pi/2\);)184 -b(#)48 b(elementary)d(rotations)0 824 y(qy1)i(=)g -(quaternion\([0,1,0],pi/2\);)0 936 y(qz2)g(=)g -(quaternion\([0,0,1],pi/2\);)0 1162 y(qyi)g(=)g(qtrans\(qy1,qx\);)712 -b(#)48 b(transform)d(back)i(to)g(original)e(coordinates)0 -1275 y(qzi)i(=)g(qtrans\(qtrans\(qz2,qy1\),qx\))o(;)0 -1388 y(qzi2=)f(qtrans\(qz2,qyi\);)664 b(#)48 b(NOT)f(THE)f(SAME)h(as)g -(qzi!)0 1501 y(qzi3=)f(qtrans\(qz2,qmult\(qyi,qx\)\);)184 -b(#)48 b(This)e(matches)94 b(qzi)0 1727 y([qyiv,thyi])45 -b(=)i(quaternion\(qyi\))330 b(#)48 b(check)e(vectors,)g(angles)0 -1840 y([qziv,thzi])f(=)i(quaternion\(qzi\))0 1953 y([qzi2v,thz2i])d(=)k -(quaternion\(qzi2\))0 2066 y([qzi3v,thz3i])c(=)k(quaternion\(qzi3\))0 -2291 y(qtot)f(=)g(qmult\(qzi,qmult\(qyi,qx\)\))0 2404 -y(qtotchk)f(=)h(qmult\(qx,)f(qmult\(qy1,qz2\)\))118 2582 -y Fq(Output:)0 2741 y Fj(qyiv)h(=)g(0.00000)141 b(0.00000)94 -b(-1.00000)0 2854 y(thyi)47 b(=)g(1.5708)0 3013 y Fo(q)41 -3027 y Fh(y)76 3036 y Fe(1)145 3013 y Fq(in)29 b(the)h -Fo(q)448 3027 y Fh(x)522 3013 y Fq(frame)g(is)g(equiv)-5 -b(alen)m(t)29 b(to)j(a)e(rotation)h(ab)s(out)f(the)h(original)d -Fl(\000)p Fo(z)35 b Fq(axis.)0 3172 y Fj(qziv)47 b(=)g(1.0000e+00)141 -b(1.5701e-16)f(3.4863e-32)0 3285 y(thzi)47 b(=)g(1.5708)0 -3398 y(qzi2v)f(=)i(1.5701e-16)140 b(-1.5701e-16)188 b(1.0000e+00)0 -3511 y(thz2i)46 b(=)i(1.5708)0 3624 y(qzi3v)e(=)i(1.0000e+00)140 -b(1.9626e-16)h(3.9252e-17)0 3737 y(thz3i)46 b(=)i(1.5708)0 -3896 y Fq(One)29 b(ma)m(y)h(b)s(e)f(tempted)g(to)h(view)f -Fo(q)1227 3910 y Fh(y)1262 3920 y Fd(i)1321 3896 y Fq(as)h(the)g -(rotation)f(to)i(the)e(basis)f(frame)i(of)f Fo(q)2821 -3910 y Fh(z)2854 3919 y Fe(2)2892 3896 y Fq(,)h(but)f(this)f(is)h -(incorrect.)40 b Fo(q)3835 3910 y Fh(y)3870 3920 y Fd(i)0 -4009 y Fq(merely)33 b(represen)m(ts)g(the)g(rotation)h -Fo(q)1282 4023 y Fh(y)1317 4032 y Fe(1)1388 4009 y Fq(in)e(the)i -(reference)f(frame;)i(b)s(oth)e(rotations)g Fo(q)2972 -4023 y Fh(x)3049 4009 y Fq(and)g Fo(q)3270 4023 y Fh(y)3305 -4033 y Fd(i)3368 4009 y Fq(m)m(ust)g(b)s(e)g(used)0 4122 -y(to)e(bac)m(k-transform)g Fo(q)782 4136 y Fh(z)815 4145 -y Fe(2)883 4122 y Fq(in)m(to)g(the)f(reference)h(frame.)41 -b(This)28 b(is)i(sho)m(wn)f(as)i(follo)m(ws:)611 4292 -y Fo(q)652 4306 y Fh(y)687 4316 y Fd(i)800 4292 y Fq(=)83 -b Fo(q)995 4306 y Fh(x)1038 4292 y Fo(q)1079 4306 y Fh(y)1114 -4315 y Fe(1)1153 4292 y Fo(q)1194 4306 y Fh(x)1237 4254 -y Ff(\000)p Fk(1)613 4449 y Fo(q)654 4463 y Fh(z)687 -4473 y Fd(i)800 4449 y Fq(=)g Fo(q)995 4463 y Fh(x)1053 -4355 y Fi(\020)1103 4449 y Fo(q)1144 4463 y Fh(y)1179 -4472 y Fe(1)1217 4449 y Fo(q)1258 4463 y Fh(z)1291 4472 -y Fe(2)1329 4449 y Fo(q)1370 4463 y Fh(y)1405 4472 y -Fe(1)1444 4411 y Ff(\000)p Fk(1)1538 4355 y Fi(\021)1603 -4449 y Fo(q)1644 4463 y Fh(x)1687 4411 y Ff(\000)p Fk(1)578 -4614 y Fo(q)619 4628 y Fh(z)652 4638 y Fd(i)678 4628 -y Fk(2)800 4614 y Fq(=)g Fo(q)995 4628 y Fh(y)1030 4638 -y Fd(i)1060 4614 y Fo(q)1101 4628 y Fh(z)1134 4637 y -Fe(2)1172 4614 y Fo(q)1213 4628 y Fh(y)1248 4638 y Fd(i)1278 -4577 y Ff(\000)p Fk(1)800 4788 y Fq(=)g Fo(q)995 4802 -y Fh(x)1038 4788 y Fo(q)1079 4802 y Fh(y)1114 4811 y -Fe(1)1153 4788 y Fo(q)1194 4802 y Fh(x)1237 4751 y Ff(\000)p -Fk(1)1331 4788 y Fo(q)1372 4802 y Fh(z)1405 4811 y Fe(2)1443 -4694 y Fi(\020)1493 4788 y Fo(q)1534 4802 y Fh(x)1577 -4788 y Fo(q)1618 4802 y Fh(y)1653 4811 y Fe(1)1692 4788 -y Fo(q)1733 4802 y Fh(x)1776 4751 y Ff(\000)p Fk(1)1870 -4694 y Fi(\021)1920 4717 y Ff(\000)p Fk(1)2040 4788 y -Fq(=)25 b Fo(q)2177 4802 y Fh(x)2220 4788 y Fo(q)2261 -4802 y Fh(y)2296 4811 y Fe(1)2334 4788 y Fo(q)2375 4802 -y Fh(x)2419 4751 y Ff(\000)p Fk(1)2513 4788 y Fo(q)2554 -4802 y Fh(z)2587 4811 y Fe(2)2625 4788 y Fo(q)2666 4802 -y Fh(x)2710 4788 y Fo(q)2751 4802 y Fh(y)2786 4811 y -Fe(1)2824 4751 y Ff(\000)p Fk(1)2918 4788 y Fo(q)2959 -4802 y Fh(x)3003 4751 y Ff(\000)p Fk(1)3122 4788 y Fl(6)p -Fq(=)g Fo(q)3259 4802 y Fh(z)3292 4812 y Fd(i)578 4958 -y Fo(q)619 4972 y Fh(z)652 4982 y Fd(i)678 4972 y Fk(3)800 -4958 y Fq(=)83 b(\()p Fo(q)1030 4972 y Fh(y)1065 4982 -y Fd(i)1095 4958 y Fo(q)1136 4972 y Fh(x)1180 4958 y -Fq(\))15 b Fo(q)1271 4972 y Fh(z)1304 4981 y Fe(2)1342 -4958 y Fq(\()q Fo(q)1419 4972 y Fh(y)1454 4982 y Fd(i)1484 -4958 y Fo(q)1525 4972 y Fh(x)1568 4958 y Fq(\))1603 4916 -y Ff(\000)p Fk(1)1723 4958 y Fq(=)25 b Fo(q)1860 4972 -y Fh(y)1895 4981 y Fe(1)1933 4958 y Fo(q)1974 4972 y -Fh(x)2018 4958 y Fo(q)2059 4972 y Fh(z)2092 4981 y Fe(2)2130 -4958 y Fo(q)2171 4972 y Fh(x)2214 4921 y Ff(\000)p Fk(1)2309 -4958 y Fo(q)2350 4972 y Fh(y)2385 4981 y Fe(1)2423 4921 -y Ff(\000)p Fk(1)2542 4958 y Fq(=)g Fo(q)2679 4972 y -Fh(z)2712 4982 y Fd(i)0 5274 y Fj(qtot)47 b(=)g(-5.5511e-17)188 -b(7.0711e-01)g(1.2326e-32)g(7.0711e-01)0 5387 y(qtotchk)46 -b(=)h(-5.5511e-17)188 b(7.0711e-01)g(5.5511e-17)h(7.0711e-01)p -eop -6 5 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(6)0 399 -y Fm(1.4)112 b(Application)35 b(of)j(quaternions)g(in)e(co)s(ordinate)i -(frame)f(transformations)0 570 y Fq(In)m(terpretations)30 -b(of)h(quaternions.)0 810 y Fr(1.4.1)105 b(Euler)35 b(angles)0 -982 y Fq(\(y)m(a)m(w-pitc)m(h-roll\))71 b(ma)m(y)36 b(b)s(e)f(used)g -(to)h(construct)g(an)f(inertial-to-b)s(o)s(dy)e(quaterion)i -Fo(q)2995 997 y Fh(bi)3088 982 y Fq(as)h(follo)m(ws.)55 -b(The)35 b(y)m(a)m(w)0 1095 y(rotation)c(is)e(ab)s(out)h(the)h -Fo(z)j Fq(axis)c(in)f(the)i(inertial)d(frame)1508 1299 -y Fo(q)1549 1313 y Fh(y)1615 1299 y Fq(=)1711 1205 y -Fi(\020h)1841 1299 y Fq(0)84 b(0)f(1)2185 1205 y Fi(i)2240 -1299 y Fo(;)15 b( )2342 1205 y Fi(\021)0 1519 y Fq(The)30 -b(pitc)m(h)g(rotation)g(is)g(ab)s(out)g(the)g Fo(y)k -Fq(axis)29 b(in)h(frame)g(1)h(\()p Fo(y)s Fq(-axis)f(after)h(the)f(y)m -(a)m(w)i(rotation)e(is)g(made\))1500 1739 y Fo(q)1541 -1753 y Fh(p)1577 1762 y Fe(1)1640 1739 y Fq(=)1736 1644 -y Fi(\020h)1866 1739 y Fq(0)84 b(1)f(0)2210 1644 y Fi(i)2265 -1739 y Fo(;)15 b(\022)2351 1644 y Fi(\021)0 1953 y Fq(The)30 -b(roll)f(rotation)h(is)g(made)g(ab)s(out)g(the)h Fo(x)f -Fq(axis)g(in)f(frame)h(2)1495 2158 y Fo(q)1536 2172 y -Fh(r)1568 2181 y Fe(2)1631 2158 y Fq(=)1727 2063 y Fi(\020h)1857 -2158 y Fq(1)84 b(0)f(0)2201 2063 y Fi(i)2256 2158 y Fo(;)15 -b(')2355 2063 y Fi(\021)0 2372 y Fq(In)28 b(order)g(to)h(construct)g(a) -g(single)e(quaterion)h Fo(q)1626 2387 y Fh(bi)1712 2372 -y Fq(relating)g(the)g(inertial)f(to)i(b)s(o)s(dy)e(axis)h(rotation,)h -(rotations)g Fo(q)3826 2386 y Fh(p)3862 2395 y Fe(1)0 -2485 y Fq(and)h Fo(q)218 2499 y Fh(r)250 2508 y Fe(2)318 -2485 y Fq(m)m(ust)g(b)s(e)g(expressed)g(in)f(the)i(inertial)d(frame:) -1199 2689 y Fo(q)1240 2703 y Fh(p)1363 2689 y Fq(=)82 -b Fo(q)1557 2703 y Fh(y)1598 2689 y Fo(q)1639 2703 y -Fh(p)1675 2712 y Fe(1)1713 2689 y Fo(q)1754 2703 y Fh(y)1795 -2652 y Ff(\000)p Fk(1)1201 2827 y Fo(q)1242 2841 y Fh(r)1363 -2827 y Fq(=)g Fo(q)1557 2841 y Fh(y)1598 2827 y Fo(q)1639 -2841 y Fh(r)1671 2850 y Fe(1)1710 2827 y Fo(q)1751 2841 -y Fh(y)1792 2790 y Ff(\000)p Fk(1)1911 2827 y Fq(=)25 -b Fo(q)2048 2841 y Fh(y)2089 2827 y Fo(q)2130 2841 y -Fh(p)2166 2850 y Fe(1)2204 2827 y Fo(q)2245 2841 y Fh(r)2277 -2850 y Fe(2)2315 2827 y Fo(q)2356 2841 y Fh(p)2392 2850 -y Fe(1)2430 2790 y Ff(\000)p Fk(1)2524 2827 y Fo(q)2565 -2841 y Fh(y)2606 2790 y Ff(\000)p Fk(1)0 3032 y Fq(and)30 -b(so)756 3144 y Fo(q)797 3159 y Fh(bi)881 3144 y Fq(=)24 -b Fo(q)1017 3158 y Fh(r)1055 3144 y Fo(q)1096 3159 y -Fh(b)1130 3144 y Fo(q)1171 3158 y Fh(y)1237 3144 y Fq(=)1333 -3050 y Fi(\020)1383 3144 y Fo(q)1424 3158 y Fh(y)1465 -3144 y Fo(q)1506 3158 y Fh(p)1542 3167 y Fe(1)1580 3144 -y Fo(q)1621 3158 y Fh(r)1653 3167 y Fe(2)1691 3144 y -Fo(q)1732 3158 y Fh(p)1768 3167 y Fe(1)1806 3107 y Ff(\000)p -Fk(1)1900 3144 y Fo(q)1941 3158 y Fh(y)1982 3107 y Ff(\000)p -Fk(1)2076 3050 y Fi(\021)15 b(\020)2191 3144 y Fo(q)2232 -3158 y Fh(y)2273 3144 y Fo(q)2314 3158 y Fh(p)2350 3167 -y Fe(1)2387 3144 y Fo(q)2428 3158 y Fh(y)2469 3107 y -Ff(\000)p Fk(1)2564 3050 y Fi(\021)2628 3144 y Fo(y)2673 -3158 y Fh(y)2740 3144 y Fq(=)25 b Fo(q)2877 3158 y Fh(y)2918 -3144 y Fo(q)2959 3158 y Fh(p)2995 3167 y Fe(1)3033 3144 -y Fo(q)3074 3158 y Fh(r)3106 3167 y Fe(2)0 3322 y Fq(Notice)30 -b(that)f(the)g(order)g(of)g(the)g(rotations)g(is)f(rev)m(ersed)h(when)e -(the)i(un)m(transformed)f(rotations)h Fo(q)3374 3336 -y Fh(y)3415 3322 y Fq(,)g Fo(q)3510 3336 y Fh(p)3546 -3345 y Fe(1)3584 3322 y Fq(,)h Fo(q)3680 3336 y Fh(r)3712 -3345 y Fe(2)3779 3322 y Fq(are)0 3435 y(used)g(instead)f(of)i -(quaternions)e(transformed)h(to)h(the)f(inertial)f(frame)h -Fo(q)2504 3449 y Fh(r)2541 3435 y Fq(,)h Fo(q)2638 3450 -y Fh(b)2672 3435 y Fq(,)f Fo(q)2768 3449 y Fh(y)2809 -3435 y Fq(.)0 3675 y Fr(1.4.2)105 b(Co)s(ordinate)35 -b(transformation)f(matrices)g(and)h(quaternions)0 3846 -y Fq(A)26 b(unit)e(quaternion)g(\()p Fo(v)s(;)15 b(\022)s -Fq(\))26 b(ma)m(y)g(b)s(e)f(in)m(terpreted)f(as)i(a)g(rotation)g(of)f -Fo(\022)j Fq(degrees)e(ab)s(out)f(the)h(axis)f Fo(v)s -Fq(.)39 b(Application)0 3959 y(of)31 b(this)e(rotation)i(to)g(a)f(v)m -(ector)i Fo(x)f Fq(is)e(illustrated)f(b)s(elo)m(w:)903 -4721 y Fo(v)23 b Fl(\002)d Fo(x)p 3 setlinewidth np 1604 -4343 453 151 0.00 360.00 ellipse st 3 setlinewidth np -1604 5250 a 1604 4344 li st 3 setlinewidth np 1619 4404 -a 1604 4344 li 1588 4404 li st 3 setlinewidth np 1604 -5250 a 1604 4948 li st 3 setlinewidth np 1619 5009 a -1604 4948 li 1588 5009 li st 3 setlinewidth np 1604 5250 -a 1150 4344 li st 3 setlinewidth np 1191 4391 a 1150 -4344 li 1164 4405 li st 3 setlinewidth np 1151 4343 a -1177 4343 li st 3 setlinewidth np 1204 4343 a 1230 4343 -li st 3 setlinewidth np 1257 4343 a 1283 4343 li st 3 -setlinewidth np 1311 4343 a 1337 4343 li st 3 setlinewidth -np 1364 4343 a 1390 4343 li st 3 setlinewidth np 1417 -4343 a 1443 4343 li st 3 setlinewidth np 1471 4343 a -1497 4343 li st 3 setlinewidth np 1524 4343 a 1550 4343 -li st 3 setlinewidth np 1577 4343 a 1603 4343 li st 3 -setlinewidth np 1604 4343 a 1586 4357 li st 3 setlinewidth -np 1570 4371 a 1552 4385 li st 3 setlinewidth np 1536 -4398 a 1518 4412 li st 3 setlinewidth np 1502 4425 a -1484 4439 li st 3 setlinewidth np 1468 4452 a 1450 4466 -li st 3 setlinewidth np 1434 4479 a 1416 4493 li st 3 -setlinewidth np 1452 4446 a 1415 4495 li 1471 4469 li -st 3 setlinewidth np 1604 5250 a 1452 4495 li st 3 setlinewidth -np 1479 4551 a 1452 4495 li 1449 4557 li st 3 setlinewidth -np 2207 4722 a 1641 4571 li st 3 setlinewidth np 1703 -4572 a 1641 4571 li 1695 4601 li st 3 setlinewidth np -1868 4118 a 1377 4382 li st 3 setlinewidth np 1423 4340 -a 1377 4382 li 1437 4367 li st 3 setlinewidth np 1151 -4343 a 1151 4370 li st 3 setlinewidth np 1151 4398 a -1151 4425 li st 3 setlinewidth np 1151 4453 a 1151 4480 -li st 3 setlinewidth np 1151 4508 a 1151 4535 li st 3 -setlinewidth np 1151 4563 a 1151 4590 li st 3 setlinewidth -np 1151 4618 a 1151 4645 li st 3 setlinewidth np 1135 -4586 a 1150 4646 li 1165 4586 li st 1642 5061 a(v)1113 -4343 y(x)1257 4532 y(\022)2246 4759 y Fl(h)p Fo(x;)15 -b(v)s Fl(i)p Fo(v)2246 4872 y Fq(pro)5 b(jection)30 b(of)g -Fo(x)h Fq(on)m(to)g Fo(v)1906 4117 y Fq(pro)5 b(jection)30 -b(of)h Fo(x)f Fq(o\013)h(of)f Fo(v)1906 4230 y(x)20 b -Fl(\000)g(h)p Fo(x;)15 b(v)s Fl(i)p Fo(v)p 3 setlinewidth -np 1481 4060 435 93.73 139.40 arc st 3 setlinewidth np -1391 4506 a 1452 4495 li 1393 4476 li st eop -7 6 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(7)0 399 -y(The)28 b(v)m(ector)h Fo(x)507 413 y Fh(e)569 399 y -Fq(=)c Fl(h)q Fo(x;)15 b(v)s Fl(i)h Fo(v)31 b Fq(is)c(the)h(pro)5 -b(jection)28 b(of)g Fo(x)g Fq(on)m(to)i Fo(v)h Fq(and)c(is)h(unc)m -(hanged)f(b)m(y)h(the)g(rotation.)41 b(The)27 b(v)m(ector)0 -511 y Fo(x)52 526 y Fh(e)p Ff(?)171 511 y Fq(=)g Fo(x)22 -b Fl(\000)e Fo(x)486 525 y Fh(e)555 511 y Fq(is)31 b(orthogonal)h(to)g -Fo(v)j Fq(and)c(is)g(rotated)i(b)m(y)f Fo(\022)h Fq(degrees)g(ab)s(out) -e Fo(x)p Fq(.)45 b(The)31 b(plane)g(of)h(the)g(rotation)g(is)0 -624 y(spanned)d(b)m(y)h Fo(x)532 639 y Fh(e)p Ff(?)654 -624 y Fq(and)g Fo(v)24 b Fl(\002)c Fo(x)30 b Fq(Th)m(us)f(the)i -(rotated)g(v)m(ector)h Fo(x)20 b Fl(\000)g Fo(r)33 b -Fq(ma)m(y)e(b)s(e)f(written)f(as)1127 782 y Fo(x)1179 -796 y Fh(r)1242 782 y Fq(=)c Fo(x)1390 796 y Fh(e)1447 -782 y Fq(+)20 b(\()p Fo(x)g Fl(\000)g Fo(x)1788 796 y -Fh(e)1825 782 y Fq(\))15 b(cos)q(\()p Fo(\022)s Fq(\))20 -b(+)g(\()p Fo(v)k Fl(\002)c Fo(x)p Fq(\))15 b(sin)o(\()p -Fo(\022)s Fq(\))p Fo(:)940 b Fq(\(1.4\))0 941 y(where)41 -b(the)h(\014rst)f(term)h(re\015ects)g(the)g(unc)m(hanged)f(p)s(ortion)f -(of)i Fo(x)f Fq(and)g(the)h(second)g(t)m(w)m(o)h(terms)f(denote)g(the)0 -1054 y(rotation)31 b(in)e(the)h(plane)g(normal)f(to)i -Fo(v)s Fq(.)118 1166 y(The)c(co)s(ordinate)g(transformation)f(applied)f -(to)j Fo(x)e Fq(ma)m(y)i(b)s(e)f(computed)f(b)m(y)h(applying)e -(equation)i(\(1.4\))i(to)f(the)0 1279 y Fo(x)p Fq(,)j -Fo(y)s Fq(,)f Fo(z)k Fq(unit)29 b(v)m(ectors.)43 b(The)29 -b(ab)s(o)m(v)m(e)j(application)d(in)m(v)m(olv)m(es)h(the)h(rotation)f -(of)h(a)g(v)m(ector)h(ab)s(out)e(an)g(axis.)40 b(Since)730 -1354 y Fi(2)730 1500 y(6)730 1553 y(4)827 1435 y Fo(v)871 -1449 y Fk(1)827 1548 y Fo(v)871 1562 y Fk(2)827 1660 -y Fo(v)871 1674 y Fk(3)952 1354 y Fi(3)952 1500 y(7)952 -1553 y(5)1027 1548 y Fl(\002)1118 1354 y Fi(2)1118 1500 -y(6)1118 1553 y(4)1215 1435 y Fo(x)1217 1548 y(y)1215 -1660 y(x)1309 1354 y Fi(3)1309 1500 y(7)1309 1553 y(5)1389 -1548 y Fq(=)25 b(\()p Fo(v)1564 1562 y Fk(2)1604 1548 -y Fo(z)f Fl(\000)c Fo(v)1805 1562 y Fk(3)1845 1548 y -Fo(y)s Fq(\))1921 1527 y(^)1928 1548 y Fo(i)h Fq(+)e(\()p -Fo(v)2149 1562 y Fk(3)2189 1548 y Fo(x)h Fl(\000)g Fo(v)2396 -1562 y Fk(1)2436 1548 y Fo(z)t Fq(\))2516 1527 y(^)2517 -1548 y Fo(j)26 b Fq(+)20 b(\()p Fo(v)2750 1562 y Fk(1)2790 -1548 y Fo(y)j Fl(\000)d Fo(v)2993 1562 y Fk(2)3033 1548 -y Fo(x)p Fq(\))p Fo(k)0 1814 y Fq(w)m(e)31 b(ma)m(y)g(write)1062 -2082 y Fo(x)1114 2096 y Fh(r)1235 2082 y Fq(=)82 b Fo(v)1432 -2096 y Fk(1)1472 2082 y Fo(v)23 b Fq(+)d(\()p Fo(x)h -Fl(\000)f Fo(v)1873 2096 y Fk(1)1912 2082 y Fo(v)s Fq(\))15 -b(cos)i Fo(\022)22 b Fq(+)2303 1888 y Fi(2)2303 2034 -y(6)2303 2087 y(4)2454 1969 y Fq(0)2435 2082 y Fo(v)2479 -2096 y Fk(3)2400 2195 y Fl(\000)p Fo(v)2515 2209 y Fk(2)2596 -1888 y Fi(3)2596 2034 y(7)2596 2087 y(5)2666 2082 y Fq(sin)14 -b Fo(\022)1069 2464 y(y)1114 2478 y Fh(r)1235 2464 y -Fq(=)82 b Fo(v)1432 2478 y Fk(2)1472 2464 y Fo(v)23 b -Fq(+)d(\()p Fo(x)h Fl(\000)f Fo(v)1873 2478 y Fk(2)1912 -2464 y Fo(v)s Fq(\))15 b(cos)i Fo(\022)22 b Fq(+)2303 -2270 y Fi(2)2303 2416 y(6)2303 2469 y(4)2400 2351 y Fl(\000)p -Fo(v)2515 2365 y Fk(3)2454 2464 y Fq(0)2435 2577 y Fo(v)2479 -2591 y Fk(1)2596 2270 y Fi(3)2596 2416 y(7)2596 2469 -y(5)2666 2464 y Fq(sin)14 b Fo(\022)1071 2846 y(z)1113 -2860 y Fh(r)1235 2846 y Fq(=)82 b Fo(v)1432 2860 y Fk(3)1472 -2846 y Fo(v)23 b Fq(+)d(\()p Fo(x)h Fl(\000)f Fo(v)1873 -2860 y Fk(3)1912 2846 y Fo(v)s Fq(\))15 b(cos)i Fo(\022)22 -b Fq(+)2303 2652 y Fi(2)2303 2798 y(6)2303 2851 y(4)2435 -2733 y Fo(v)2479 2747 y Fk(2)2400 2846 y Fl(\000)p Fo(v)2515 -2860 y Fk(1)2454 2958 y Fq(0)2596 2652 y Fi(3)2596 2798 -y(7)2596 2851 y(5)2666 2846 y Fq(sin)14 b Fo(\022)0 3119 -y Fq(\(The)30 b(signs)f(are)i(rev)m(ersed)g(since)e(w)m(e're)j(mo)m -(ving)e(the)g(co)s(ordinate)h(axes,)g(not)f(the)h(v)m(ector.\))118 -3232 y(An)26 b(alternativ)m(e)h(deriv)-5 b(ation)24 b(for)i(the)h -(transformation)e(matrix)h(from)g(equation)g(\(1.4\))i(is)d(as)h(follo) -m(ws.)39 b(De\014ne)7 3379 y(\026)-52 b Fo(q)28 b Fq(=)d(imag)q(\()p -Fo(q)s Fq(\))h(=)594 3285 y Fi(h)675 3379 y Fo(q)716 -3393 y Fk(1)838 3379 y Fo(q)879 3393 y Fk(2)1001 3379 -y Fo(q)1042 3393 y Fk(3)1122 3285 y Fi(i)1162 3308 y -Fh(T)1242 3379 y Fq(=)f Fo(v)18 b Fq(sin)o(\()p Fo(\022)s(=)p -Fq(2\),)31 b Fl(k)q Fo(v)s Fl(k)26 b Fq(=)f(1.)41 b(Then)359 -3568 y Fo(x)411 3582 y Fh(r)532 3568 y Fq(=)83 b Fo(v)s(v)780 -3530 y Fh(T)836 3568 y Fo(x)20 b Fq(+)g(\()p Fo(x)g Fl(\000)g -Fo(v)s(v)1291 3530 y Fh(T)1347 3568 y Fo(x)p Fq(\))15 -b(cos)q(\()p Fo(\022)s Fq(\))20 b Fl(\000)g Fq(\(\()p -Fo(v)k Fl(\002)c Fo(e)2069 3582 y Fk(1)2109 3568 y Fq(\))p -Fo(x)2196 3582 y Fk(1)2256 3568 y Fq(+)g(\()p Fo(v)k -Fl(\002)c Fo(e)2583 3582 y Fk(2)2622 3568 y Fq(\))p Fo(x)2709 -3582 y Fk(2)2769 3568 y Fq(+)g(\()p Fo(v)k Fl(\002)c -Fo(e)3096 3582 y Fk(3)3136 3568 y Fq(\))p Fo(x)3223 3582 -y Fk(3)3263 3568 y Fq(\))15 b(sin)o(\()p Fo(\022)s Fq(\))532 -3721 y(=)686 3627 y Fi(\020)736 3721 y Fo(I)22 b Fq(cos)16 -b Fo(\022)22 b Fq(+)e Fo(v)s(v)1185 3684 y Fh(T)1241 -3721 y Fq(\(1)h Fl(\000)f Fq(cos)c Fo(\022)s Fq(\))j(+)h(\()p -Fo(v)k Fl(\002)c Fo(I)7 b Fq(\))15 b(sin)f Fo(\022)2225 -3627 y Fi(\021)2289 3721 y Fo(x)0 3890 y Fq(where)31 -b Fo(v)24 b Fl(\002)d Fo(I)38 b Fq(is)31 b(de\014ned)f(b)m(y)h(the)h -(column-b)m(y-column)e(v)m(ector)j(cross)e(pro)s(duct.)43 -b(F)-8 b(rom)32 b(equation)f(1.3)i(and)e(the)0 4003 y(trigonometric)f -(half-angle)g(form)m(ulae)g(w)m(e)h(ha)m(v)m(e)519 4172 -y(cos)16 b Fo(\022)85 b Fq(=)e(cos)1060 4134 y Fk(2)1099 -4172 y Fq(\()p Fo(\022)s(=)p Fq(2\))21 b Fl(\000)f Fq(sin)1529 -4134 y Fk(2)1568 4172 y Fq(\()p Fo(\022)s(=)p Fq(2\))26 -b(=)f(1)c Fl(\000)f Fq(2)15 b(sin)2225 4134 y Fk(2)2264 -4172 y Fq(\()p Fo(\022)s(=)p Fq(2\))26 b(=)f(1)c Fl(\000)f -Fq(2)2809 4077 y Fi(\020)2859 4172 y Fq(1)h Fl(\000)f -Fq(real)o(\()p Fo(q)s Fq(\))3276 4134 y Fk(2)3316 4077 -y Fi(\021)529 4325 y Fq(sin)14 b Fo(\022)85 b Fq(=)e(2)15 -b(cos)q(\()p Fo(\022)s(=)p Fq(2\))g(sin\()p Fo(\022)s(=)p -Fq(2\))26 b(=)f(2real\()p Fo(q)s Fq(\))15 b(sin)o(\()p -Fo(\022)s(=)p Fq(2\))26 b(=)f(2)p Fo(q)2629 4339 y Fk(4)2684 -4325 y Fq(sin)o(\()p Fo(\022)s(=)p Fq(2\))p Fo(:)0 4483 -y Fq(Substituting)j(the)i(ab)s(o)m(v)m(e)i(in)m(to)e -Fo(x)1171 4497 y Fh(r)1239 4483 y Fq(w)m(e)h(obtain)530 -4702 y Fo(x)582 4716 y Fh(r)702 4702 y Fq(=)856 4558 -y Fi(")905 4702 y Fo(I)7 b Fq(\(2)p Fo(q)1076 4664 y -Fk(2)1073 4724 y(4)1136 4702 y Fl(\000)20 b Fq(1\))h(+)f(2)p -Fo(v)s(v)1558 4664 y Fh(T)1629 4558 y Fi( )1705 4640 -y Fq(sin)1816 4606 y Fk(2)1856 4640 y Fq(\()p Fo(\022)s(=)p -Fq(2\))p 1705 4681 358 4 v 1705 4768 a(sin)1816 4733 -y Fk(2)1856 4768 y Fq(\()p Fo(\022)s(=)p Fq(2\))2073 -4558 y Fi(!)2154 4702 y Fq(\(1)h Fl(\000)e Fo(q)2389 -4664 y Fk(2)2386 4724 y(4)2429 4702 y Fq(\))h(+)g(2\()p -Fo(v)25 b Fl(\002)19 b Fo(I)7 b Fq(\))p Fo(q)2937 4716 -y Fk(4)2992 4702 y Fq(sin)14 b Fo(\022)s(=)p Fq(2)3255 -4558 y Fi(#)3319 4702 y Fo(x)702 4984 y Fq(=)856 4840 -y Fi(")905 4984 y Fo(I)7 b Fq(\(2)p Fo(q)1076 4946 y -Fk(2)1073 5006 y(4)1136 4984 y Fl(\000)20 b Fq(1\))h(+)f(2)7 -b(\026)-52 b Fo(q)10 b Fq(\026)-52 b Fo(q)1552 4946 y -Fh(T)1742 4922 y Fq(1)20 b Fl(\000)g Fo(q)1942 4889 y -Fk(2)1939 4945 y(4)p 1617 4963 490 4 v 1617 5046 a Fq(1)h -Fl(\000)f Fq(cos)1895 5020 y Fk(2)1935 5046 y Fq(\()p -Fo(\022)s(=)p Fq(2)2136 4984 y(+)g(2\()7 b(\026)-52 b -Fo(q)24 b Fl(\002)c Fo(I)7 b Fq(\))p Fo(q)2586 4998 y -Fk(4)2625 4840 y Fi(#)2689 4984 y Fo(x)702 5216 y Fq(=)856 -5122 y Fi(h)895 5216 y Fo(I)g Fq(\(2)p Fo(q)1066 5179 -y Fk(2)1063 5239 y(4)1127 5216 y Fl(\000)20 b Fq(1\))h(+)f(2)7 -b(\026)-52 b Fo(q)10 b Fq(\026)-52 b Fo(q)1543 5179 y -Fh(T)1618 5216 y Fq(+)20 b(2\()7 b(\026)-52 b Fo(q)24 -b Fl(\002)c Fo(I)7 b Fq(\))p Fo(q)2068 5230 y Fk(4)2107 -5122 y Fi(i)2161 5216 y Fo(x)702 5384 y Fq(=)83 b(\(2)p -Fo(q)980 5347 y Fk(2)977 5407 y(4)1040 5384 y Fl(\000)20 -b Fq(1\))p Fo(x)h Fq(+)f(2)7 b(\026)-52 b Fo(q)10 b Fq(\026)-51 -b Fo(q)1509 5347 y Fh(T)1563 5384 y Fo(x)21 b Fq(+)f(2)p -Fo(q)1813 5398 y Fk(4)1852 5384 y Fq(\()7 b(\026)-52 -b Fo(q)23 b Fl(\002)d Fo(x)p Fq(\))p eop -8 7 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)g(Quaternions)f(\(In)m(tro)s -(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p Fo(:)p Fq(1)439 -b Fn(\(c\))32 b(1998)908 b Fq(8)0 399 y Fr(Remark)34 -b(1.4)46 b Fq(The)32 b(ab)s(o)m(v)m(e)i(deriv)-5 b(ation)31 -b(treats)i(a)f(quaternion)g(as)g(a)h(transformation)e(up)s(on)g(a)i(v)m -(ector)g(within)0 511 y(a)f(linear)d(space.)44 b(An)31 -b(alternativ)m(e)h(con)m(v)m(en)m(tion)g(is)f(used)f(in)g([R)-10 -b(W91)r(],)31 b(in)f(whic)m(h)g(the)i(quaternion)e(is)g(treated)j(as)0 -624 y(a)e(transformation)e(up)s(on)g(the)h(basis)g(v)m(ectors)h(of)g(a) -f(frame.)41 b(The)30 b(latter)g(con)m(v)m(en)m(tion)i(results)d(in)g(a) -i(sign)e(c)m(hange)0 737 y(of)i(the)f(angle)g(of)h(rotation,)g(i.e.,) -1150 941 y Fo(x)1202 955 y Fh(r)1323 941 y Fq(=)83 b(\(2)p -Fo(q)1601 904 y Fk(2)1598 964 y(4)1661 941 y Fl(\000)20 -b Fq(1\))p Fo(x)h Fq(+)f(2)7 b(\026)-52 b Fo(q)10 b Fq(\026)-52 -b Fo(q)2129 904 y Fh(T)2184 941 y Fo(x)20 b Fq(+)g(2)p -Fo(q)2433 955 y Fk(4)2472 941 y Fq(\()7 b(\026)-52 b -Fo(q)24 b Fl(\002)c Fo(x)p Fq(\))0 1146 y(Use)29 b(of)g(the)f(latter)h -(con)m(v)m(en)m(tion)h(results)d(in)g(a)i(similar)d(c)m(hange)k(in)d -(sign)h(in)f(the)i(time)f(deriv)-5 b(ativ)m(e)28 b(of)h(the)f(quater-)0 -1259 y(nion,)h(discussed)g(in)g(1.5.)0 1471 y Fr(M-\014le)46 -b Fj(qtransv)28 b Fq(Rotate)k(a)f(v)m(ector)227 1696 -y Fj(qtransv)46 b(is)h(the)g(function)f(defined)g(from:)g -(/home3/hodel/oct/quat/qt)o(rans)o(v.m)275 1922 y(vr)h(=)h -(qtransv\(vv,qr\))275 2035 y(rotate)e(a)i(3-vector)d(as)i(specified)f -(by)h(quaternion)e(qr)275 2148 y(q)i(=)h(\(ee,th\))93 -b(\(vector,)46 b(angle)g(notation\))275 2261 y(vr)h(=)h(\(vv)f(.)g -(ee\)*ee)f([projection)f(on)i(ee)g(unchanged)e(])514 -2374 y(+)i([vv)g(-)g(\(vv)g(.)h(ee\)*ee])e(cos\(th\))93 -b([what's)46 b(left)h(gets)f(scaled)g(by)i(cosine])514 -2487 y(+)f(\(vv)g(x)g(ee\))g(sin\(th\))571 b([and)47 -b(the)g(sine)f(term)h(completes)e(the)i(rotation])0 2711 -y Fr(M-\014le)f Fj(qtransvmat)57 b Fq(Obtain)30 b(3)20 -b Fl(\002)g Fq(3)31 b(rotation)g(matrix)e(from)h(a)h(quaternion)275 -2936 y Fj([xv,yv,zv])45 b(=)i(qtransvmat\(q\))275 3049 -y(xm)g(=)h(qtransvmat\(q\),)c(xm)j(=)g([xv)g(yv)g(zv])275 -3162 y(compute)f(x,y,z)g(axes)h(rotated)f(per)h(specified)e(quaternion) -g(q)0 3387 y Fr(Example)34 b(1.4)46 b Fq(Use)30 b(of)h(quaternions)e -(to)i(view)f(b)s(o)s(dy/inertial)d(frame)k(transformations:)0 -3575 y Fj(degrees)46 b(=)h(pi/180;)189 b(daz)47 b(=)h(30*degrees;)188 -b(del)46 b(=)i(-20*degrees;)0 3688 y(qazimuth)e(=)h -(quaternion\([0,0,1],daz\);)0 3801 y(qelevation)e(=)i -(quaternion\([cos\(daz\),sin\(d)o(az\),)o(0],)o(del\))o(;)0 -3914 y(qview)f(=)i(qmult\(qelevation,qazimut)o(h\);)0 -4139 y(th)f(=)h(0:5:20;)0 4252 y(ov)f(=)h(ones\(size\(th\)\);)0 -4365 y(myth)f(=)g([th,max\(th\)*ov)d(;)j(0*ov,th];)0 -4478 y(myth)g(=)g([[0:5:20])e(,)j(20*ones\(1,4\),20*ones\(1,4)o(\);)41 -b(...)382 4591 y(zeros\(1,5\),)k(5:5:20,)g(20*ones\(1,4\);)g(...)382 -4704 y(zeros\(1,5\),)g(zeros\(1,4\),)f([5:5:20]];)0 4930 -y(#)j(inertial)f(frame)g(quaternion)0 5043 y(qin)h(=)g(quaternion\([1)e -(0)i(0],180*degrees\);)0 5156 y(for)g(kk=1:length\(myth\(1,:\)\))95 -5269 y(figure\(kk\))95 5381 y(thy)g(=)h(myth\(1,kk\);)140 -b(thp)47 b(=)g(myth\(2,kk\);)141 b(thr)46 b(=)i(myth\(3,kk\);)p -eop -9 8 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)436 b Fn(\(c\))31 b(1998)902 b Fq(9)95 399 -y Fj(#)48 b(avoid)e(transformations)e(by)j(reversing)e(the)i(order)g -(of)g(multiplication!)95 511 y(qyi)g(=)h(quaternion\([0,0,1],thy*d)o -(egr)o(ees\))o(;)95 624 y(qp1)f(=)h(quaternion\([0,1,0],thp*d)o(egr)o -(ees\))o(;)95 737 y(qr2)f(=)h(quaternion\([1,0,0],thr*d)o(egr)o(ees\))o -(;)95 850 y(qbi)f(=)h(qmult\(qyi,qmult\(qp1,qr2\))o(\);)95 -1076 y(printf\("yaw=\0458.4f,)43 b(pitch=\0458.4f,)i(\\n)190 -b(qbi)47 b(=)g(\(\0458.4f\)i)f(+)h(\(\0458.4e\)j)f(+)h(\(\0458.4f\)k)f -(+)h(\()0 1189 y(\0458.4f\)\\n",thy,thp,)c(...)382 1302 -y(qbi\(1\),)j(qbi\(2\),)f(qbi\(3\),)h(qbi\(4\)\);)95 -1415 y([vv,th])g(=)i(quaternion\(qbi\);)95 1528 y(printf\(")285 -b(=)47 b(\(vector\))f(=)h([\0458.4f)f(\0458.4f)h(\0458.4f],)e -(th=\0455.2f)h(deg\\n",)g(...)382 1641 y(vv\(1\),)g(vv\(2\),)g -(vv\(3\),)g(th*180/pi\);)95 1866 y(#)i(transform)d(qbi)i(to)g -(reference)f(coordinates)95 1979 y(qb)i(=)f(qmult\(qin,qbi\);)95 -2092 y(title\(sprintf\("yaw=\0455.2f,)41 b(pitch=\0455.2f,)k -(roll=\0455.2f)g(\(deg\)",thy,thp,thr\)\))95 2205 y -(coordinate_plot\(qin,qb,qvi)o(ew\);)95 2318 y(gset)i(terminal)f -(postscript)f(eps)95 2431 y(eval\(sprintf\("gset)e(output)j -('fig\045d.eps'",kk\)\);)95 2544 y(replot)95 2657 y(gset)h(terminal)f -(x11)0 2770 y(endfor)0 2957 y Fq(Results:)316 2924 y -Fk(1)50 4816 y @beginspecial 50 @llx 50 @lly 410 @urx -302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 0.00 deg) Cshow -2737 4900 M -(reference coordinates) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3631 2625 M --894 0 V -3631 2625 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -2252 2272 L -2737 2625 Pls -2252 2272 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M --177 970 V -2737 2625 Crs -2560 3595 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3631 2625 M --894 0 V -3631 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -2252 2272 L -2737 2625 Star -2252 2272 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M --177 970 V -2737 2625 Box -2560 3595 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --177 970 V --89 0 V -1.000 UL -LT3 -3323 1302 M --1789 0 V -1181 3242 L -970 706 V -1789 0 V -4293 2008 L -3323 1302 L -970 706 V --1788 0 V -2151 3948 L -2505 2008 L -1534 1302 L -1.000 UL -LT4 -3940 3948 M -2969 3242 L --1788 0 V -1788 0 V -3323 1302 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 0.00 deg) Cshow -2737 4900 M -(yaw= 0.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Pls -3369 3141 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V --73 0 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 0 4911 1560 4 v 104 4965 a Fe(1)138 4997 -y Fc(due)28 b(to)g(details)h(of)g(visualization)h(soft)n(w)n(are,)h -(the)d Fb(x)18 b Fa(\000)g Fb(y)j Fa(\000)e Fb(z)31 b -Fc(axes)d(do)g(not)g(app)r(ear)h(as)g(a)f(righ)n(t-handed)f(co)r -(ordinate)j(system.)0 5088 y(Sorry)-6 b(.)p eop -10 9 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)421 b Fn(\(c\))31 b(1998)871 b Fq(10)50 2045 -y @beginspecial 50 @llx 50 @lly 410 @urx 302 @ury 2808 -@rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 5.00 deg) Cshow -2737 4900 M -(yaw= 5.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3409 2580 M --672 45 V -3409 2580 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -693 514 V -2737 2625 Pls -3430 3139 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V -78 5 V -10 10 V -6 10 V -3 9 V --3 7 V --6 6 V --10 3 V --14 2 V --16 -1 V --18 -3 V --20 -6 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 10.00 deg) Cshow -2737 4900 M -(yaw=10.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3346 2535 M --609 90 V -3346 2535 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -749 508 V -2737 2625 Pls -3486 3133 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V -83 9 V -8 11 V -5 9 V -0 8 V --4 7 V --8 5 V --11 2 V --15 1 V --17 -2 V --19 -4 V --21 -6 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 50 3833 a @beginspecial 50 @llx 50 @lly -410 @urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 15.00 deg) Cshow -2737 4900 M -(yaw=15.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3279 2491 M --542 134 V -3279 2491 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -800 499 V -2737 2625 Pls -3537 3124 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V -87 14 V -7 10 V -2 9 V --1 7 V --6 6 V --9 4 V --13 2 V --16 -1 V --18 -3 V --20 -5 V --20 -6 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 20.00 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3207 2448 M --470 177 V -3207 2448 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V -90 18 V -5 10 V -1 8 V --3 7 V --7 5 V --11 3 V --14 1 V --17 -2 V --19 -3 V --20 -6 V --20 -8 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial eop -11 10 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)421 b Fn(\(c\))31 b(1998)871 b Fq(11)50 2045 -y @beginspecial 50 @llx 50 @lly 410 @urx 302 @ury 2808 -@rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 20.00 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch= 0.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3207 2448 M --470 177 V -3207 2448 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Crs -3102 1731 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --365 894 V -90 18 V -5 10 V -1 8 V --3 7 V --7 5 V --11 3 V --14 1 V --17 -2 V --19 -3 V --20 -6 V --20 -8 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 20.61 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch= 5.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3173 2527 M --436 98 V -3173 2527 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -405 -906 V -2737 2625 Crs -3142 1719 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --375 886 V -90 18 V -5 10 V -1 9 V --3 7 V --7 5 V --11 3 V --15 1 V --17 -1 V --18 -4 V --20 -6 V --20 -8 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 50 3833 a @beginspecial 50 @llx 50 @lly -410 @urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 22.34 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch=10.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3136 2606 M --399 19 V -3136 2606 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -441 -911 V -2737 2625 Crs -3178 1714 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --384 878 V -89 18 V -6 11 V -0 9 V --3 7 V --7 5 V --11 3 V --15 1 V --16 -1 V --19 -4 V --20 -6 V --20 -8 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 24.95 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch=15.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3096 2686 M --359 -61 V -3096 2686 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -474 -909 V -2737 2625 Crs -3211 1716 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --394 870 V -90 18 V -5 11 V -1 9 V --4 8 V --7 5 V --11 3 V --14 1 V --17 -1 V --19 -4 V --20 -6 V --19 -8 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial eop -12 11 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)421 b Fn(\(c\))31 b(1998)871 b Fq(12)50 2045 -y @beginspecial 50 @llx 50 @lly 410 @urx 302 @ury 2808 -@rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 28.21 deg) Cshow -2737 4900 M -(yaw=20.00 deg, pitch=20.00 deg) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3054 2765 M -2737 2625 L -3054 2765 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -844 485 V -2737 2625 Pls -3581 3110 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -504 -901 V -2737 2625 Crs -3241 1724 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3467 2625 M --730 0 V -3467 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -632 516 V -2737 2625 Star -3369 3141 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -365 -894 V -2737 2625 Box -3102 1731 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --403 861 V -89 19 V -5 11 V -1 10 V --3 7 V --7 6 V --11 3 V --15 1 V --16 -1 V --19 -4 V --20 -6 V --19 -9 V -1.000 UL -LT3 -3200 1215 M --1460 0 V -1010 3003 L -2274 4035 L -1460 0 V -4464 2247 L -3200 1215 L -4464 2247 L --1460 0 V -2274 4035 L -3004 2247 L -1740 1215 L -1.000 UL -LT4 -3734 4035 M -2470 3003 L --1460 0 V -1460 0 V -3200 1215 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 28.71 deg) Cshow -2737 4900 M -(yaw=20.00, pitch=20.00, roll=10.00 \(deg\)) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3622 3070 M -2737 2625 L -3622 3070 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -236 176 V -2737 2625 Pls -2973 2801 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -476 -915 V -2737 2625 Crs -3213 1710 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3631 2625 M --894 0 V -3631 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -485 353 V -2737 2625 Star -3222 2978 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -177 -970 V -2737 2625 Box -2914 1655 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --140 990 V -100 8 V -2 6 V --2 5 V --7 4 V --11 3 V --14 2 V --18 1 V --19 0 V --21 -2 V --22 -3 V --21 -4 V -1.000 UL -LT3 -3323 1302 M --1789 0 V -1181 3242 L -970 706 V -1789 0 V -4293 2008 L -3323 1302 L -970 706 V --1788 0 V -2151 3948 L -2505 2008 L -1534 1302 L -1.000 UL -LT4 -3940 3948 M -2969 3242 L --1788 0 V -1788 0 V -3323 1302 L -stroke -grestore -end -showpage - @endspecial 50 3833 a @beginspecial 50 @llx 50 @lly -410 @urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 30.19 deg) Cshow -2737 4900 M -(yaw=20.00, pitch=20.00, roll=15.00 \(deg\)) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3622 3070 M -2737 2625 L -3622 3070 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M -277 95 V -2737 2625 Pls -3014 2720 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -454 -927 V -2737 2625 Crs -3191 1698 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3631 2625 M --894 0 V -3631 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -485 353 V -2737 2625 Star -3222 2978 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -177 -970 V -2737 2625 Box -2914 1655 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --129 990 V -100 6 V -3 6 V --2 5 V --7 5 V --10 3 V --15 3 V --17 1 V --19 0 V --21 -1 V --22 -3 V --21 -4 V -1.000 UL -LT3 -3323 1302 M --1789 0 V -1181 3242 L -970 706 V -1789 0 V -4293 2008 L -3323 1302 L -970 706 V --1788 0 V -2151 3948 L -2505 2008 L -1534 1302 L -1.000 UL -LT4 -3940 3948 M -2969 3242 L --1788 0 V -1788 0 V -3323 1302 L -stroke -grestore -end -showpage - @endspecial 2050 w @beginspecial 50 @llx 50 @lly 410 -@urx 302 @ury 2808 @rwi @setspecial -/gnudict 120 dict def -gnudict begin -/Color false def -/Solid false def -/gnulinewidth 5.000 def -/userlinewidth gnulinewidth def -/vshift -46 def -/dl {10 mul} def -/hpt_ 31.5 def -/vpt_ 31.5 def -/hpt hpt_ def -/vpt vpt_ def -/M {moveto} bind def -/L {lineto} bind def -/R {rmoveto} bind def -/V {rlineto} bind def -/vpt2 vpt 2 mul def -/hpt2 hpt 2 mul def -/Lshow { currentpoint stroke M - 0 vshift R show } def -/Rshow { currentpoint stroke M - dup stringwidth pop neg vshift R show } def -/Cshow { currentpoint stroke M - dup stringwidth pop -2 div vshift R show } def -/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def - /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def -/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } - {pop pop pop Solid {pop []} if 0 setdash} ifelse } def -/BL { stroke gnulinewidth 2 mul setlinewidth } def -/AL { stroke gnulinewidth 2 div setlinewidth } def -/UL { gnulinewidth mul /userlinewidth exch def } def -/PL { stroke userlinewidth setlinewidth } def -/LTb { BL [] 0 0 0 DL } def -/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def -/LT0 { PL [] 0 1 0 DL } def -/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def -/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def -/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def -/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def -/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def -/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def -/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def -/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def -/Pnt { stroke [] 0 setdash - gsave 1 setlinecap M 0 0 V stroke grestore } def -/Dia { stroke [] 0 setdash 2 copy vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke - Pnt } def -/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V - currentpoint stroke M - hpt neg vpt neg R hpt2 0 V stroke - } def -/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke - Pnt } def -/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M - hpt2 vpt2 neg V currentpoint stroke M - hpt2 neg 0 R hpt2 vpt2 V stroke } def -/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke - Pnt } def -/Star { 2 copy Pls Crs } def -/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath fill } def -/TriUF { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath fill } def -/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke - Pnt } def -/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath fill} def -/DiaF { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath fill } def -/Pent { stroke [] 0 setdash 2 copy gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore Pnt } def -/PentF { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath fill grestore } def -/Circle { stroke [] 0 setdash 2 copy - hpt 0 360 arc stroke Pnt } def -/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def -/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def -/C1 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - vpt 0 360 arc closepath } bind def -/C2 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C3 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C4 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C5 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc - 2 copy moveto - 2 copy vpt 180 270 arc closepath fill - vpt 0 360 arc } bind def -/C6 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C7 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 270 arc closepath fill - vpt 0 360 arc closepath } bind def -/C8 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C9 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 270 450 arc closepath fill - vpt 0 360 arc closepath } bind def -/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill - 2 copy moveto - 2 copy vpt 90 180 arc closepath fill - vpt 0 360 arc closepath } bind def -/C11 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 180 arc closepath fill - 2 copy moveto - 2 copy vpt 270 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C12 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C13 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 0 90 arc closepath fill - 2 copy moveto - 2 copy vpt 180 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/C14 { BL [] 0 setdash 2 copy moveto - 2 copy vpt 90 360 arc closepath fill - vpt 0 360 arc } bind def -/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill - vpt 0 360 arc closepath } bind def -/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto - neg 0 rlineto closepath } bind def -/Square { dup Rec } bind def -/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def -/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def -/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def -/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def -/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill - exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def -/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill - 2 copy vpt Square fill - Bsquare } bind def -/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def -/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def -/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill - Bsquare } bind def -/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill - Bsquare } bind def -/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def -/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy vpt Square fill Bsquare } bind def -/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill - 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def -/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def -/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def -/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def -/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def -/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def -/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def -/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def -/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def -/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def -/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def -/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def -/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def -/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def -/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def -/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def -/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def -/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def -/DiaE { stroke [] 0 setdash vpt add M - hpt neg vpt neg V hpt vpt neg V - hpt vpt V hpt neg vpt V closepath stroke } def -/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M - 0 vpt2 neg V hpt2 0 V 0 vpt2 V - hpt2 neg 0 V closepath stroke } def -/TriUE { stroke [] 0 setdash vpt 1.12 mul add M - hpt neg vpt -1.62 mul V - hpt 2 mul 0 V - hpt neg vpt 1.62 mul V closepath stroke } def -/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M - hpt neg vpt 1.62 mul V - hpt 2 mul 0 V - hpt neg vpt -1.62 mul V closepath stroke } def -/PentE { stroke [] 0 setdash gsave - translate 0 hpt M 4 {72 rotate 0 hpt L} repeat - closepath stroke grestore } def -/CircE { stroke [] 0 setdash - hpt 0 360 arc stroke } def -/BoxFill { gsave Rec 1 setgray fill grestore } def -end -gnudict begin -gsave -50 50 translate -0.050 0.050 scale -0 setgray -newpath -(Helvetica) findfont 140 scalefont setfont -LTb -672 560 M -63 0 V -4067 0 R --63 0 V -588 560 M -(-2) Rshow -672 1076 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1.5) Rshow -672 1593 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-1) Rshow -672 2109 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(-0.5) Rshow -672 2625 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0) Rshow -672 3141 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(0.5) Rshow -672 3658 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1) Rshow -672 4174 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(1.5) Rshow -672 4690 M -63 0 V -4067 0 R --63 0 V --4151 0 R -(2) Rshow -672 560 M -0 63 V -0 4067 R -0 -63 V -672 420 M -(-2) Cshow -1188 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1.5) Cshow -1705 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-1) Cshow -2221 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(-0.5) Cshow -2737 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0) Cshow -3253 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(0.5) Cshow -3770 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1) Cshow -4286 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(1.5) Cshow -4802 560 M -0 63 V -0 4067 R -0 -63 V -0 -4207 R -(2) Cshow -LTb -672 560 M -4130 0 V -0 4130 V --4130 0 V -672 560 L -2737 210 M -(rotate about eigenaxis 32.38 deg) Cshow -2737 4900 M -(yaw=20.00, pitch=20.00, roll=20.00 \(deg\)) Cshow -1.000 UP -1.000 UL -LT0 -4151 4557 M -(x \(body\)) Rshow -4235 4557 M -399 0 V -3769 2617 M --1032 8 V -3769 2617 Pls -2737 2625 Pls -4434 4557 Pls -1.000 UP -1.000 UL -LT1 -4151 4417 M -(y \(body\)) Rshow -4235 4417 M -399 0 V -2737 2625 M --12 55 V -2737 2625 Pls -2725 2680 Pls -4434 4417 Pls -1.000 UP -1.000 UL -LT2 -4151 4277 M -(z \(body\)) Rshow -4235 4277 M -399 0 V -2737 2625 M -9 1031 V -2737 2625 Crs -2746 3656 Crs -4434 4277 Crs -1.000 UP -1.000 UL -LT0 -4151 4137 M -(x \(inertial\)) Rshow -4235 4137 M -399 0 V -3631 2625 M --894 0 V -3631 2625 Star -2737 2625 Star -4434 4137 Star -1.000 UP -1.000 UL -LT1 -4151 3997 M -(y \(inertial\)) Rshow -4235 3997 M -399 0 V -2737 2625 M -485 353 V -2737 2625 Star -3222 2978 Star -4434 3997 Star -1.000 UP -1.000 UL -LT2 -4151 3857 M -(z \(inertial\)) Rshow -4235 3857 M -399 0 V -2737 2625 M -177 -970 V -2737 2625 Box -2914 1655 Box -4434 3857 Box -1.000 UL -LT5 -4151 3717 M -(eigenaxis) Rshow -4235 3717 M -399 0 V -2737 2625 M --119 989 V -100 5 V -2 6 V --1 6 V --7 4 V --10 4 V --14 3 V --17 2 V --19 0 V --21 -1 V --22 -3 V --21 -3 V -1.000 UL -LT3 -3323 1302 M --1789 0 V -1181 3242 L -970 706 V -1789 0 V -4293 2008 L -3323 1302 L -970 706 V --1788 0 V -2151 3948 L -2505 2008 L -1534 1302 L -1.000 UL -LT4 -3940 3948 M -2969 3242 L --1788 0 V -1788 0 V -3323 1302 L -stroke -grestore -end -showpage - @endspecial 0 4071 a Fm(1.5)112 b(Time)36 b(deriv)-6 -b(ativ)m(e)36 b(of)i(a)g(quaternion)0 4243 y Fq(In)28 -b(this)f(subsection)h(w)m(e)h(adopt)g(the)f(v)m(ector)j(notation)d(for) -h(quaternions,)f(i.e.)40 b(\(with)27 b(some)i(abuse)g(of)f(notation\))0 -4356 y Fo(q)46 b Fq(=)c(\()s(\026)-48 b Fo(v)t(;)15 b(\022)s -Fq(\))42 b(=)k(\026)-48 b Fo(v)30 b Fq(+)d Fo(\022)43 -b Fq(as)e(in)f(equation)h(\(1.3\).)74 b(Let)41 b Fo(q)1937 -4371 y Fh(b)1971 4356 y Fq(\()p Fo(t)p Fq(\))i(=)f(\()7 -b(\026)-52 b Fo(q)2306 4371 y Fh(b)2341 4356 y Fq(\()p -Fo(t)p Fq(\))p Fo(;)15 b(\022)2527 4371 y Fh(b)2562 4356 -y Fq(\()p Fo(t)p Fq(\)\))41 b(b)s(e)g(a)g(quaternion)f(relating)g(the)0 -4469 y(co)s(ordinates)k(of)h(a)f(b)s(o)s(dy)f(\(rotating\))j(frame)e -(to)h(a)g(\014xed)e(frame,)49 b(and)43 b(supp)s(ose)g(that)i(the)g(b)s -(o)s(dy)e(frame)h(is)0 4582 y(rotating)26 b(with)f(\014xed)g(angular)h -(v)m(elo)s(cit)m(y)g Fo(!)j Fq(ab)s(out)d(the)g(unit)e(v)m(ector)2378 -4559 y(\026)2368 4582 y(\012)h(=)g Fo(!)2612 4596 y Fk(1)2644 -4561 y Fq(^)2651 4582 y Fo(i)12 b Fq(+)f Fo(!)2833 4596 -y Fk(2)2871 4561 y Fq(^)2872 4582 y Fo(j)17 b Fq(+)11 -b Fo(!)3065 4596 y Fk(2)3107 4558 y Fq(^)3104 4582 y -Fo(k)29 b Fq(in)c(the)h(\014xed)g(frame.)0 4695 y(\()p -Fj(qtrans)j Fq(ma)m(y)i(b)s(e)f(used)f(to)i(p)s(erform)e(the)i -(deriviation)d(in)h(the)i(b)s(o)s(dy)e(frame.\))p eop -13 12 bop 0 100 a Fn(A.)31 b(S.)f(Ho)s(del:)40 b(Quaternions)29 -b(\(In)m(tro)s(duction\))g Fo(R)q(ev)s(ision)d Fq(:)f(1)p -Fo(:)p Fq(1)421 b Fn(\(c\))31 b(1998)871 b Fq(13)1829 -824 y Fo(!)p 3 setlinewidth np 1738 974 a 2342 974 li -st 3 setlinewidth np 2281 990 a 2342 974 li 2281 959 -li st 3 setlinewidth np 1738 974 a 1285 1277 li st 3 -setlinewidth np 1327 1231 a 1285 1277 li 1343 1256 li -st 3 setlinewidth np 1738 974 a 1738 371 li st 3 setlinewidth -np 1753 431 a 1738 371 li 1723 431 li st 3 setlinewidth -np 1738 975 a 1759 961 li st 3 setlinewidth np 1781 946 -a 1802 932 li st 3 setlinewidth np 1824 917 a 1845 903 -li st 3 setlinewidth np 1867 888 a 1888 874 li st 3 setlinewidth -np 1911 860 a 1932 846 li st 3 setlinewidth np 1954 831 -a 1975 817 li st 3 setlinewidth np 1997 802 a 2018 788 -li st 3 setlinewidth np 2040 773 a 2061 759 li st 3 setlinewidth -np 2083 745 a 2104 731 li st 3 setlinewidth np 2126 716 -a 2147 702 li st 3 setlinewidth np 2170 687 a 2191 673 -li st 3 setlinewidth np 2149 719 a 2191 673 li 2132 694 -li st 4 setlinewidth np [ 4 18.09 ] 0 setdash 2191 673 -a 2191 1163 li st [] 0 setdash [] 0 setdash 4 setlinewidth -np [ 4 18.13 ] 0 setdash 2191 1163 a 1738 974 li st [] 0 setdash -[] 0 setdash 2239 650 a Fq(\026)2229 673 y(\012)1323 -1352 y Fo(i)2342 975 y(j)1776 371 y(k)p 3 setlinewidth -np 2009 817 82 94.40 237.53 arc st 3 setlinewidth np -1940 910 a 2002 899 li 1943 880 li st 0 1548 a Fq(Then)28 -b(Euler's)g(appro)m(ximation)h(of)g(a)h(rotation)g(o)m(v)m(er)g(\001)p -Fo(t)f Fq(seconds)g(is)g Fo(q)2462 1562 y Fh(r)2525 1548 -y Fq(=)2631 1525 y(\026)2621 1548 y(\012)14 b(sin)o(\()p -Fo(!)s Fq(\001)p Fo(t=)p Fq(2\))19 b(+)f(cos)q(\()p Fo(!)s -Fq(\001)p Fo(t=)p Fq(2\).)41 b(F)-8 b(or)0 1661 y(\001)p -Fo(t)30 b Fq(su\016cien)m(tly)f(small,)g(cos)q(\()p Fo(!)s -Fq(\001)p Fo(t=)p Fq(2\))d Fl(\031)f Fq(1)31 b(and)f(sin)n(\()p -Fo(!)s Fq(\001)p Fo(t=)p Fq(2\))c Fl(\031)f Fo(!)s Fq(\001)p -Fo(t=)p Fq(2,)31 b(so)g Fo(q)2713 1675 y Fh(r)2781 1661 -y Fq(ma)m(y)g(b)s(e)f(appro)m(ximated)g(as)1576 1892 -y Fo(q)1617 1906 y Fh(r)1680 1892 y Fl(\031)25 b Fq(1)c(+)1932 -1773 y Fi(\022)2004 1830 y Fo(!)s Fq(\001)p Fo(t)p 2004 -1871 169 4 v 2065 1954 a Fq(2)2182 1773 y Fi(\023)2268 -1869 y Fq(\026)2258 1892 y(\012)0 2117 y(Th)m(us)1239 -2325 y Fo(q)1280 2340 y Fh(b)1314 2325 y Fq(\()p Fo(t)g -Fq(+)e(\001)p Fo(t)p Fq(\))83 b(=)g Fo(q)1915 2340 y -Fh(b)1949 2325 y Fq(\()p Fo(t)p Fq(\))2067 2206 y Fi(\022)2129 -2325 y Fq(1)21 b(+)2285 2206 y Fi(\022)2357 2264 y Fo(!)s -Fq(\001)p Fo(t)p 2357 2304 V 2418 2388 a Fq(2)2535 2206 -y Fi(\023)2621 2302 y Fq(\026)2611 2325 y(\012)f(+)g -Fl(\001)15 b(\001)g(\001)2894 2206 y Fi(\023)950 2559 -y Fo(q)991 2574 y Fh(b)1025 2559 y Fq(\()p Fo(t)20 b -Fq(+)g(\001)p Fo(t)p Fq(\))g Fl(\000)g Fo(q)1500 2574 -y Fh(b)1534 2559 y Fq(\()p Fo(t)p Fq(\))83 b(=)g Fo(q)1915 -2574 y Fh(b)1949 2559 y Fq(\()p Fo(t)p Fq(\))2067 2440 -y Fi(\022)2139 2497 y Fo(!)s Fq(\001)p Fo(t)p 2139 2538 -V 2200 2621 a Fq(2)2317 2440 y Fi(\023)2404 2536 y Fq(\026)2393 -2559 y(\012)20 b(+)g Fl(\001)15 b(\001)g(\001)940 2737 -y Fo(q)981 2752 y Fh(b)1015 2737 y Fq(\()p Fo(t)20 b -Fq(+)g(\001)p Fo(t)p Fq(\))g Fl(\000)g Fo(q)1490 2752 -y Fh(b)1524 2737 y Fq(\()p Fo(t)p Fq(\))p 940 2778 688 -4 v 1229 2861 a(\001)p Fo(t)1720 2799 y Fq(=)1874 2680 -y Fi(\022)1945 2737 y Fo(!)p 1945 2778 60 4 v 1952 2861 -a Fq(2)2015 2680 y Fi(\023)2091 2799 y Fo(q)2132 2814 -y Fh(b)2166 2799 y Fq(\()p Fo(t)p Fq(\))2279 2776 y(\026)2269 -2799 y(\012)h(+)f Fl(\001)15 b(\001)g(\001)0 3024 y Fq(W)-8 -b(e)32 b(tak)m(e)g(the)e(limit)e(at)j(\001)p Fo(t)25 -b Fl(!)g Fq(0)31 b(to)g(obtain)978 3171 y Fo(dq)1066 -3186 y Fh(b)p 978 3212 123 4 v 999 3295 a Fo(dt)1136 -3233 y Fq(=)1232 3114 y Fi(\022)1303 3171 y Fo(!)p 1303 -3212 60 4 v 1310 3295 a Fq(2)1373 3114 y Fi(\023)1449 -3233 y Fo(q)1490 3248 y Fh(b)1524 3233 y Fq(\()p Fo(t)p -Fq(\))1637 3210 y(\026)1627 3233 y(\012)25 b(=)1824 3171 -y Fo(!)p 1824 3212 V 1831 3295 a Fq(2)1909 3164 y Fi(\000)1947 -3233 y Fo(q)1988 3248 y Fh(b;)p Fk(4)2087 3210 y Fq(\026)2077 -3233 y(\012)20 b Fl(\000)g Fq(\()7 b(\026)-52 b Fo(q)2330 -3248 y Fh(b)2384 3233 y Fl(\001)2440 3210 y Fq(\026)2430 -3233 y(\012)o(\))21 b Fl(\000)2652 3210 y Fq(\026)2642 -3233 y(\012)f Fl(\002)26 b Fq(\026)-51 b Fo(q)2860 3248 -y Fh(b)2894 3164 y Fi(\001)0 3592 y Fq(where)30 b Fo(x)21 -b Fl(\001)f Fo(y)29 b Fq(=)552 3528 y Fi(P)655 3592 y -Fo(x)707 3607 y Fh(`)740 3592 y Fo(y)785 3607 y Fh(`)848 -3592 y Fq(is)h(the)h(v)m(ector)h(inner)d(\(dot\))j(pro)s(duct)d(and)h -Fo(x)21 b Fl(\002)f Fo(y)29 b Fq(=)2689 3395 y Fi(\014)2689 -3445 y(\014)2689 3494 y(\014)2689 3544 y(\014)2689 3594 -y(\014)2689 3644 y(\014)2689 3694 y(\014)2716 3398 y(2)2716 -3544 y(6)2716 3597 y(4)2836 3462 y Fq(^)2843 3483 y Fo(i)3010 -3462 y Fq(^)3012 3483 y Fo(j)3185 3459 y Fq(^)3182 3483 -y Fo(k)2813 3596 y(x)2865 3610 y Fk(1)2987 3596 y Fo(x)3039 -3610 y Fk(2)3162 3596 y Fo(x)3214 3610 y Fk(3)2817 3709 -y Fo(y)2862 3723 y Fk(1)2991 3709 y Fo(y)3036 3723 y -Fk(2)3166 3709 y Fo(y)3211 3723 y Fk(3)3295 3398 y Fi(3)3295 -3544 y(7)3295 3597 y(5)3350 3395 y(\014)3350 3445 y(\014)3350 -3494 y(\014)3350 3544 y(\014)3350 3594 y(\014)3350 3644 -y(\014)3350 3694 y(\014)3409 3592 y Fq(is)g(the)i(v)m(ector)0 -3815 y(cross)f(pro)s(duct.)40 b(In)30 b(matrix)f(form)h(this)g(is)1011 -3922 y Fi(2)1011 4068 y(6)1011 4118 y(6)1011 4168 y(6)1011 -4221 y(4)1125 3996 y Fq(_)-42 b Fo(q)1149 4011 y Fh(b)p -Fk(1)1125 4109 y Fq(_)g Fo(q)1149 4124 y Fh(b)p Fk(2)1125 -4222 y Fq(_)g Fo(q)1149 4237 y Fh(b)p Fk(3)1125 4335 -y Fq(_)g Fo(q)1149 4350 y Fh(b)p Fk(4)1260 3922 y Fi(3)1260 -4068 y(7)1260 4118 y(7)1260 4168 y(7)1260 4221 y(5)1340 -4166 y Fq(=)1446 4104 y Fo(!)p 1446 4145 V 1453 4228 -a Fq(2)1531 3922 y Fi(2)1531 4068 y(6)1531 4118 y(6)1531 -4168 y(6)1531 4221 y(4)1688 3996 y Fq(0)180 b Fo(!)1970 -4010 y Fk(3)2127 3996 y Fl(\000)p Fo(!)2255 4010 y Fk(2)2377 -3996 y Fo(!)2434 4010 y Fk(1)1628 4109 y Fl(\000)p Fo(!)1756 -4123 y Fk(3)1938 4109 y Fq(0)g Fo(!)2220 4123 y Fk(1)2377 -4109 y Fo(!)2434 4123 y Fk(2)1663 4222 y Fo(!)1720 4236 -y Fk(2)1878 4222 y Fl(\000)p Fo(!)2006 4236 y Fk(1)2188 -4222 y Fq(0)144 b Fo(!)2434 4236 y Fk(3)1628 4335 y Fl(\000)p -Fo(!)1756 4349 y Fk(1)1878 4335 y Fl(\000)p Fo(!)2006 -4349 y Fk(2)2127 4335 y Fl(\000)p Fo(!)2255 4349 y Fk(3)2402 -4335 y Fq(0)2515 3922 y Fi(3)2515 4068 y(7)2515 4118 -y(7)2515 4168 y(7)2515 4221 y(5)2585 3922 y(2)2585 4068 -y(6)2585 4118 y(6)2585 4168 y(6)2585 4221 y(4)2682 3996 -y Fo(q)2723 4011 y Fh(b)p Fk(1)2682 4109 y Fo(q)2723 -4124 y Fh(b)p Fk(2)2682 4222 y Fo(q)2723 4237 y Fh(b)p -Fk(3)2682 4335 y Fo(q)2723 4350 y Fh(b)p Fk(4)2834 3922 -y Fi(3)2834 4068 y(7)2834 4118 y(7)2834 4168 y(7)2834 -4221 y(5)0 4522 y Fq(Notice)31 b(that)g(the)g(4)21 b -Fl(\002)e Fq(4)31 b(matrix)f(is)f(sk)m(ew)i(symmetric)f(\(hence)h(its)e -(matrix)h(exp)s(onen)m(tial)f(is)h(orthogonal\).)0 4806 -y Fp(References)0 5009 y Fq([Mul])127 b(Larry)30 b(Mullins.)37 -b(Course)30 b(4160:)43 b(Quaternions.)c(Course)30 b(notes.)0 -5192 y([R)-10 b(W91])47 b(M.)41 b(H.)g(Rheinfurth)d(and)h(H.)i(B.)g -(Wilson.)70 b(Metho)s(ds)40 b(of)h(applied)d(dynamics.)69 -b(T)-8 b(ec)m(hnical)40 b(Rep)s(ort)337 5305 y(NASA)30 -b(RP-1262,)j(NASA,)e(George)h(C.)e(Marshall)f(Space)h(Fligh)m(t)g(Cen)m -(ter,)h(1991.)p eop -14 13 bop 0 527 a Fp(Index)0 709 y Fq(conjugate)166 821 -y(quaternion,)30 b(3)0 1017 y(Euler)f(angles)166 1130 -y(quaternions,)g(6)0 1326 y(Octa)m(v)m(e)166 1439 y Fj(qinv)p -Fq(,)h(3)166 1552 y Fj(qmult)p Fq(,)f(3)166 1665 y Fj(qtrans)p -Fq(,)g(4)166 1778 y(qtransv,)h(8)166 1891 y(qtransvmat,)h(8)166 -2004 y Fj(quaternion)p Fq(,)d(2)0 2200 y(quaternions)166 -2313 y(as)j(co)s(ordinate)f(rotations,)h(3)166 2425 y(co)s(ordinate)f -(transformation,)g(4)166 2538 y(co)s(ordinate)g(transformation)g -(matrices,)h(6)166 2651 y(cross)g(pro)s(ducts,)e(2)166 -2764 y(de\014nition,)f(2)166 2877 y(deriv)-5 b(ativ)m(es,)30 -b(12)166 2990 y(Euler)f(angles,)h(6)166 3103 y(m)m(ultiplication,)e(2) -166 3216 y(unit)h(quaternions,)g(3)1905 5656 y(14)p eop -end -userdict /end-hook known{end-hook}if