From: <par...@us...> - 2011-11-24 19:56:17
|
Revision: 9176 http://octave.svn.sourceforge.net/octave/?rev=9176&view=rev Author: paramaniac Date: 2011-11-24 19:56:11 +0000 (Thu, 24 Nov 2011) Log Message: ----------- control-devel: quicksave work on bstmodred Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/bstmodred.m Added Paths: ----------- trunk/octave-forge/extra/control-devel/inst/__modred_check_equil__.m Added: trunk/octave-forge/extra/control-devel/inst/__modred_check_equil__.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/__modred_check_equil__.m (rev 0) +++ trunk/octave-forge/extra/control-devel/inst/__modred_check_equil__.m 2011-11-24 19:56:11 UTC (rev 9176) @@ -0,0 +1,33 @@ +## Copyright (C) 2011 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope 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. +## +## LTI Syncope 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 LTI Syncope. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## check equilibration for model reduction commands + +## Author: Lukas Reichlin <luk...@gm...> +## Created: November 2011 +## Version: 0.1 + +function scaled = __modred_check_order__ (equil) + + if (isscalar (equil)) + scaled = ! logical (equil); + else + error ("modred: property ""equil"" must be a logical value"); + endif + +endfunction \ No newline at end of file Modified: trunk/octave-forge/extra/control-devel/inst/bstmodred.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/bstmodred.m 2011-11-24 18:25:12 UTC (rev 9175) +++ trunk/octave-forge/extra/control-devel/inst/bstmodred.m 2011-11-24 19:56:11 UTC (rev 9176) @@ -66,12 +66,40 @@ ## Hankel singular values greater than @code{MAX(TOL1,NS*EPS)}; ## @var{nr} can be further reduced to ensure that ## @code{HSV(NR-NU) > HSV(NR+1-NU)}. +## @item "equil", "scale" +## Boolean indicating whether equilibration (scaling) should be +## performed on system @var{G} prior to order reduction. +## Default value is true if @code{G.scaled == false} and +## false if @code{G.scaled == true}. +## @item "tol1" +## If @var{"order"} is not specified, @var{tol1} contains the tolerance for +## determining the order of reduced system. +## For model reduction, the recommended value of @var{tol1} lies +## in the interval [0.00001, 0.001]. @var{tol1} < 1. +## If @var{tol1} <= 0 on entry, the used default value is +## @var{tol1} = NS*EPS, where NS is the number of +## ALPHA-stable eigenvalues of A and EPS is the machine +## precision. +## If @var{"order"} is specified, the value of @var{tol1} is ignored. +## @item "tol2" +## The tolerance for determining the order of a minimal +## realization of the phase system (see METHOD) corresponding +## to the ALPHA-stable part of the given system. +## The recommended value is TOL2 = NS*EPS. TOL2 <= TOL1 < 1. +## This value is used by default if @var{"tol2"} is not specified +## or if TOL2 <= 0 on entry. +## @item "approx", "approach" +## The order of the obtained system @var{Gr}. ## @item nr ## The order of the obtained system @var{Gr}. ## @item nr ## The order of the obtained system @var{Gr}. ## @item nr ## The order of the obtained system @var{Gr}. +## @item nr +## The order of the obtained system @var{Gr}. +## @item nr +## The order of the obtained system @var{Gr}. ## @end table ## ## @strong{Algorithm}@* @@ -148,6 +176,9 @@ error ("bstmodred: ""%s"" is an invalid approximation method", val); endswitch + case {"equil", "equilibrate", "equilibration", "scale", "scaling"} + scaled = __modred_check_equil__ (val); + otherwise warning ("bstmodred: invalid property name ""%s"" ignored", prop); endswitch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |