Re: matrix exponential used by the control package

Torsten Lilge <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <[email protected]>
On Mon, 2020-07-20 at 17:22 -0400, Doug Stewart wrote:
> 
> 
> On Mon, Jul 20, 2020 at 4:38 PM Torsten Lilge1960 Blue Heron Drive, <
> [email protected]> wrote:
> > Hi everyone,
> > 
> > the control package uses the SLICOT function mb05nd [1]
> > (__sl_mb05nd__()) instead of the octave function expm() for the
> > matrix
> > exponential. The problem with mb05nd is that when discretizing a
> > static
> > gain in state space results in 
> > 
> > >> [a,b,c,d] = ssdata (c2d (ss (tf (1,1)),1))
> > a = [](1x0)
> > b = 0
> > c = [](1x0)
> > d = 1
> > 
> > Instead, using expm() leads to the correct result
> > 
> > >> [a,b,c,d] = ssdata (c2d (ss (tf (1,1)),1))
> > a = [](0x0)
> > b = [](0x1)
> > c =
> > [](1x0)
> > d = 1
> > 
> > Are there any reasons against using expm()?
> > 
> > Torsten
> > 
> > 
> > [1] http://slicot.org/objects/software/shared/doc/MB05ND.html
> > 
> > 
> 
> Is there a difference in speed?
> If it is slower then we should look and see where the '0" is coming
> from.


__sl_mb05nd__ is a compiled function and - at least on my system -
approx. 20 times faster.

Torsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.