bugGNU Octave - Bugs: bug #49801, [octave forge] (control) dlyap...

 
 

bug #49801: [octave forge] (control) dlyap function does not work as expected

Submitter:  None
Submitted:  Thu 08 Dec 2016 03:00:58 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Hernan J. Gonzalez Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Jun 2021 10:00:30 PM UTC, comment #3: 

If D is not symmetric, the discrete Sylvester equation with B = A' gives the solution. This is implemented in changeset af66a06b3f3d in the repo and will be included in the next release.

Closing this report.

Torsten Lilge <ttl>
Group Member
Sat 19 Jun 2021 01:29:02 PM UTC, comment #2: 

I think, the matrix D in your discrete-time Lyapunov equation must be a Hermitian matrix, i.e., a complex square matrix that is equal to its own conjugate transpose. This is not the case and explains why the entries (3,1) and (3,2) exactly differ by the related entries in D which would be 0 for a Hermitian matrix.

When changing D to

D = [0 0 p;
     0 0 p;
     p p p];

the result is as expected.

Torsten Lilge <ttl>
Group Member
Thu 08 Dec 2016 03:02:22 AM UTC, comment #1: 

I forgot to add: tested with version 3.0.0 of control package

Anonymous
Thu 08 Dec 2016 03:00:58 AM UTC, original submission:  

 dlyap(C,D)

is supposed to solve

 C*X*C' + D = X

(doc: https://octave.sourceforge.io/control/function/dlyap.html)

But it doesn't.

Example:


 p=0.3, q=1-p;
 C=[ q p 0 ;  q 0 p ; q 0 0];
 D = [0 0 0; 0 0 0 ; p p p];

X1=dlyap(C,D)                                                                                                         
   0.034394   0.029959   0.023144
   0.029959   0.055090   0.021713
   0.023144   0.021713   0.316853

C*X1*C'+D  % this should coincide with X1

 0.034394   0.029959   0.023144
 0.029959   0.055090   0.021713
 0.323144   0.321713   0.316853

See the huge discrepancy in the last row.

In Matlab 2016b it returns the correct value:
X1 =
    0.5052    0.4708    0.3606
    0.5382    0.5083    0.3833
    0.6464    0.6232    0.5475

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by nrjank (listed control package maintainer.)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-25 ttl StatusNone Fixed
        Open/ClosedOpen Closed
    2017-08-13 jwe Summarydlyap function (control package) does not work as expected [octave forge] (control) dlyap function does not work as expected
    2016-12-08 nrjank Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code