From: <par...@us...> - 2012-06-05 06:48:13
|
Revision: 10563 http://octave.svn.sourceforge.net/octave/?rev=10563&view=rev Author: paramaniac Date: 2012-06-05 06:48:07 +0000 (Tue, 05 Jun 2012) Log Message: ----------- control: touch up lqe doc Modified Paths: -------------- trunk/octave-forge/main/control/devel/dlqe.m trunk/octave-forge/main/control/devel/lqe.m Modified: trunk/octave-forge/main/control/devel/dlqe.m =================================================================== --- trunk/octave-forge/main/control/devel/dlqe.m 2012-06-04 20:12:13 UTC (rev 10562) +++ trunk/octave-forge/main/control/devel/dlqe.m 2012-06-05 06:48:07 UTC (rev 10563) @@ -16,13 +16,11 @@ ## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{sys}, @var{q}, @var{r}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{sys}, @var{q}, @var{r}, @var{s}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{s}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{[]}, @var{e}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqr (@var{a}, @var{b}, @var{q}, @var{r}, @var{s}, @var{e}) -## Linear-quadratic regulator. +## @deftypefn {Function File} {[@var{l}, @var{p}, @var{z}, @var{e}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{z}, @var{e}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}, @var{s}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{z}, @var{e}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{z}, @var{e}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}, @var{s}) +## Linear-quadratic estimator for discrete-time systems. ## ## @strong{Inputs} ## @table @var @@ -78,7 +76,9 @@ print_usage (); endif - if (isempty (s)) + if (isempty (g)) + [~, p, e] = dlqr (a.', c.', q, r, s); # dlqe (a, [], c, q, r, s), g=I + elseif (isempty (s)) [~, p, e] = dlqr (a.', c.', g*q*g.', r); else [~, p, e] = dlqr (a.', c.', g*q*g.', r, g*s); Modified: trunk/octave-forge/main/control/devel/lqe.m =================================================================== --- trunk/octave-forge/main/control/devel/lqe.m 2012-06-04 20:12:13 UTC (rev 10562) +++ trunk/octave-forge/main/control/devel/lqe.m 2012-06-05 06:48:07 UTC (rev 10563) @@ -16,12 +16,12 @@ ## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{sys}, @var{q}, @var{r}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{sys}, @var{q}, @var{r}, @var{s}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}, @var{s}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}) -## @deftypefnx {Function File} {[@var{g}, @var{x}, @var{l}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}, @var{s}) +## @deftypefn {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{sys}, @var{q}, @var{r}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{sys}, @var{q}, @var{r}, @var{s}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{a}, @var{g}, @var{c}, @var{q}, @var{r}, @var{s}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}) +## @deftypefnx {Function File} {[@var{l}, @var{p}, @var{e}] =} lqe (@var{a}, @var{[]}, @var{c}, @var{q}, @var{r}, @var{s}) ## Linear-quadratic estimator. ## ## @strong{Inputs} @@ -79,7 +79,7 @@ endif if (isa (a, "lti")) - [l, p, e] = lqr (a.', g, c, q); # lqe (sys.', q, r, s), g=I, works like lqr (sys.', q, r, s).' + [l, p, e] = lqr (a.', g, c, q); # lqe (sys, q, r, s), g=I, works like lqr (sys.', q, r, s).' elseif (isempty (g)) [l, p, e] = lqr (a.', c.', q, r, s); # lqe (a, [], c, q, r, s), g=I, works like lqr (a.', c.', q, r, s).' elseif (isempty (s)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |