From: <par...@us...> - 2011-09-03 21:01:24
|
Revision: 8490 http://octave.svn.sourceforge.net/octave/?rev=8490&view=rev Author: paramaniac Date: 2011-09-03 21:01:18 +0000 (Sat, 03 Sep 2011) Log Message: ----------- control: touch up conversion routines Modified Paths: -------------- trunk/octave-forge/main/control/doc/NEWS trunk/octave-forge/main/control/inst/@lti/c2d.m trunk/octave-forge/main/control/inst/@lti/d2c.m trunk/octave-forge/main/control/inst/@ss/__d2c__.m Modified: trunk/octave-forge/main/control/doc/NEWS =================================================================== --- trunk/octave-forge/main/control/doc/NEWS 2011-09-03 19:42:05 UTC (rev 8489) +++ trunk/octave-forge/main/control/doc/NEWS 2011-09-03 21:01:18 UTC (rev 8490) @@ -1,6 +1,18 @@ Summary of important user-visible changes for releases of the control package =============================================================================== +control-2.1.55 Release Date: 2011-xx-yy Release Manager: Lukas Reichlin +=============================================================================== + +** @lti/c2d + -- Support for "tustin" method added. + -- Improved Texinfo string. + +** @lti/d2c + -- INDEX + + +=============================================================================== control-2.1.54 Release Date: 2011-08-22 Release Manager: Lukas Reichlin =============================================================================== Modified: trunk/octave-forge/main/control/inst/@lti/c2d.m =================================================================== --- trunk/octave-forge/main/control/inst/@lti/c2d.m 2011-09-03 19:42:05 UTC (rev 8489) +++ trunk/octave-forge/main/control/inst/@lti/c2d.m 2011-09-03 21:01:18 UTC (rev 8490) @@ -1,4 +1,4 @@ -## Copyright (C) 2009 Lukas F. Reichlin +## Copyright (C) 2009, 2011 Lukas F. Reichlin ## ## This file is part of LTI Syncope. ## @@ -18,12 +18,35 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{sys} =} c2d (@var{sys}, @var{tsam}) ## @deftypefnx {Function File} {@var{sys} =} c2d (@var{sys}, @var{tsam}, @var{method}) -## Convert the continuous lti model into its discrete time equivalent. +## Convert the continuous lti model into its discrete-time equivalent. +## +## @strong{Inputs} +## @table @var +## @item sys +## Continuous-time LTI model. +## @item tsam +## Sampling time in seconds. +## @item method +## Optional conversion method. If not specified, default method @var{"zoh"} +## is taken. +## @table @code +## @item "zoh" +## Zero-order hold or matrix exponential. +## @item "tustin", "bilin" +## Bilinear transformation or Tustin approximation. +## @end table +## @end table +## +## @strong{Outputs} +## @table @var +## @item sys +## Discrete-time LTI model. +## @end table ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> ## Created: October 2009 -## Version: 0.1 +## Version: 0.2 function sys = c2d (sys, tsam, method = "std") @@ -35,6 +58,10 @@ error ("c2d: first argument is not an lti model"); endif + if (isdt (sys)) + error ("c2d: system is already discrete-time"); + endif + if (! issample (tsam)) error ("c2d: second argument is not a valid sample time"); endif Modified: trunk/octave-forge/main/control/inst/@lti/d2c.m =================================================================== --- trunk/octave-forge/main/control/inst/@lti/d2c.m 2011-09-03 19:42:05 UTC (rev 8489) +++ trunk/octave-forge/main/control/inst/@lti/d2c.m 2011-09-03 21:01:18 UTC (rev 8490) @@ -19,6 +19,27 @@ ## @deftypefn {Function File} {@var{sys} =} d2c (@var{sys}) ## @deftypefnx {Function File} {@var{sys} =} d2c (@var{sys}, @var{method}) ## Convert the discrete lti model into its continuous-time equivalent. +## +## @strong{Inputs} +## @table @var +## @item sys +## Discrete-time LTI model. +## @item method +## Optional conversion method. If not specified, default method @var{"zoh"} +## is taken. +## @table @code +## @item "zoh" +## Zero-order hold or matrix logarithm. +## @item "tustin", "bilin" +## Bilinear transformation or Tustin approximation. +## @end table +## @end table +## +## @strong{Outputs} +## @table @var +## @item sys +## Continuous-time LTI model. +## @end table ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -35,6 +56,10 @@ error ("d2c: first argument is not an lti model"); endif + if (isct (sys)) + error ("d2c: system is already continuous-time"); + endif + if (! ischar (method)) error ("c2d: second argument is not a string"); endif Modified: trunk/octave-forge/main/control/inst/@ss/__d2c__.m =================================================================== --- trunk/octave-forge/main/control/inst/@ss/__d2c__.m 2011-09-03 19:42:05 UTC (rev 8489) +++ trunk/octave-forge/main/control/inst/@ss/__d2c__.m 2011-09-03 21:01:18 UTC (rev 8490) @@ -36,6 +36,7 @@ endif endif + error ("ss: d2c: zoh method not implemented yet"); [n, m] = size (sys.b); # n: states, m: inputs ## TODO: use SLICOT MB05OD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |