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

 
 

bug #45336: [octave forge] (control) version 2.8.2 - error on MIMO tf multiply

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 17 Jun 2015 02:38:23 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 26 Feb 2019 09:57:48 PM UTC, comment #6: 

This looks fixed for me in the current control 3.1.0.

Mike Miller <mtmiller>
Group Member
Mon 22 Jun 2015 11:18:01 AM UTC, comment #5: 

The mpower operator for LTI models computes a1^n as n-1 multiplications (mtimes operator). For MIMO transfer functions, mtimes converts both factors to state-space, computes the multiplication and then converts the product back to transfer function. Therefore, mpower computes a3 = a1 (a1 a1).


Previously, the conversion of the transfer function to state-space and back took place during each multiplication:


a3 = tf (ss (a1) * ss (tf (ss (a1) * ss (a1))))


With the patch, the tf -> ss conversion is the first step and the ss -> tf conversion the last step.


a3 = tf (ss (a1) * (ss (a1) * ss (a1)))


Obviously, the patch doesn't help if you write a1*a1*a1 instead of a1**3 because no tf -> ss -> tf conversion is saved.

Lukas Reichlin <paramaniac>
Sat 20 Jun 2015 07:54:46 PM UTC, comment #4: 

just grabbed the revised mpower.m file.  the code below in the original error report works. I noticed all the warnings about SS conversion disappeared. a1**n seemed well behaved out through n=200

I did try a1*a1, a1*a1*a1... since only mpower changed, that still gave the same warnings and odd results at n=3, error at n=4.  so it doesn't seem restricted to mpower



>> a1**4

Transfer function 'ans' from input 'u1' to output ...

      97 s^4 + 6816 s^3 + 1.279e+005 s^2 + 6.083e+005 s + 3.318e+005
 y1:  --------------------------------------------------------------
            s^4 - 96 s^3 + 3456 s^2 - 5.53e+004 s + 3.318e+005

      14 s^5 + 1320 s^4 + 3.802e+004 s^3 + 3.456e+005 s^2 + 6.636e+005 s - 3.969e-005
 y2:  -------------------------------------------------------------------------------
                    s^4 - 96 s^3 + 3456 s^2 - 5.53e+004 s + 3.318e+005

Transfer function 'ans' from input 'u2' to output ...

      672 s^3 + 3.11e+004 s^2 + 3.318e+005 s + 6.636e+005
 y1:  ---------------------------------------------------
      s^4 - 96 s^3 + 3456 s^2 - 5.53e+004 s + 3.318e+005

      97 s^4 + 6816 s^3 + 1.279e+005 s^2 + 6.083e+005 s + 3.318e+005
 y2:  --------------------------------------------------------------
            s^4 - 96 s^3 + 3456 s^2 - 5.53e+004 s + 3.318e+005

Continuous-time model.


>> a1*a1*a1*a1
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: called from
    __sys_connect__ at line 115 column 5
    mtimes at line 58 column 7
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: tf: converting to minimal state-space for MIMO TF interconnections
error: subscript indices must be either positive integers less than 2^31 or logicals
error: called from
    __sys2ss__> at line -1 column -1
    __sys2ss__ at line 50 column 10
    ss at line 175 column 17
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7
error: evaluating argument list element number 1
error: called from
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7
error: evaluating argument list element number 1
error: called from
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7


Nicholas Jankowski <nrjank>
Group Member
Sat 20 Jun 2015 06:36:30 PM UTC, comment #3: 
Lukas Reichlin <paramaniac>
Sat 20 Jun 2015 06:39:12 AM UTC, comment #2: 

in addition on 2.8.2  there are 2 warnings in the test area

Testing: /usr/share/octave/packages/control-2.8.2/@iddata/ifft.m
warning: iddata: more outputs than samples - matrice 'y' should probably be tran
sposed
warning: iddata: more inputs than samples - matrice 'u' should probably be trans
posed

marco atzeri <matzeri>
Fri 19 Jun 2015 01:45:35 PM UTC, comment #1: 

Ccing the control package maintainer.

Mike Miller <mtmiller>
Group Member
Wed 17 Jun 2015 02:38:23 AM UTC, original submission:  

after upgrading to 2.8.2, a script that worked under 2.8.1 started throwing an error. here's a simpler version that produces the same error:



>> a1 = tf({[2 24],[12];[1 48 0],[2 24]},{[-1 24],[-1 24];[-4 96],[-1 24]});
>> a1**2;
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: called from
    __sys_connect__ at line 115 column 5
    mtimes at line 58 column 7
    mpower at line 56 column 12

>> a1**3;
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: called from
    __sys_connect__ at line 115 column 5
    mtimes at line 58 column 7
    mpower at line 56 column 12
warning: tf: converting to minimal state-space for MIMO TF interconnections

>> a1**4;
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: called from
    __sys_connect__ at line 115 column 5
    mtimes at line 58 column 7
    mpower at line 56 column 12
warning: tf: converting to minimal state-space for MIMO TF interconnections
warning: tf: converting to minimal state-space for MIMO TF interconnections
error: subscript indices must be either positive integers less than 2^31 or logicals
error: called from
    __sys2ss__> at line -1 column -1
    __sys2ss__ at line 50 column 10
    ss at line 175 column 17
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7
    mpower at line 56 column 12
error: evaluating argument list element number 1
error: called from
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7
    mpower at line 56 column 12
error: evaluating argument list element number 1
error: called from
    __sys_connect__ at line 116 column 9
    mtimes at line 58 column 7
    mpower at line 56 column 12


don't know if this is related to Bug #45334, which relates to odd outputs from multiple tf multiplies. But this error above is new to 2.8.2, and the case described in #45334 does not create this error in 2.8.1 or 2.8.2.

Nicholas Jankowski <nrjank>
Group Member

 

(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 jwe (Updated the item)
  • -email is unavailable- added by paramaniac (Posted a comment)
  • -email is unavailable- added by matzeri (Posted a comment)
  • -email is unavailable- added by mtmiller
  • -email is unavailable- added by nrjank (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 -
    2017-08-13 jwe Summarycontrol 2.8.2 - error on MIMO tf multiply [octave forge] (control) version 2.8.2 - error on MIMO tf multiply
    2015-06-19 mtmiller Carbon-Copy- Added paramaniac

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code