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

 
 

bug #51844: [octave forge] (control) Plotting system responses doesn't work anymore

Submitter:  Alexander Wilms <alexanderw>
Submitted:  Fri 25 Aug 2017 11:53:51 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 06 Mar 2018 02:27:17 PM UTC, comment #4: 

This can be closed as fixed.
It works fine now.

Doug Stewart <dastew>
Sat 26 Aug 2017 09:27:37 PM UTC, comment #3: 

I see this has been addressed in the dev sources:

https://sourceforge.net/p/octave/control/ci/bd6548d8d0068e99f3f312658137397f298187fb/

(essentially by changing var type from octave_idx_type to F77_INT)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Aug 2017 07:59:06 PM UTC, comment #2: 

I looked at some other files in control package and sometimes info is initialized and sometimes it is not. The code needs some clean up.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Aug 2017 07:55:00 PM UTC, comment #1: 

I think the problem is that "octave_idx_type" has changed.
In sl_td04ad.cc ( around line 154) one can see:




 // error indicator
        octave_idx_type info;


        // SLICOT routine TD04AD
        F77_XFCN (td04ad, TD04AD,
                 (rowcol,
                  m, p,
                  index,
                  dcoeff.fortran_vec (), lddcoe,
                  ucoeff.fortran_vec (), lduco1, lduco2,
                  nr,
                  a.fortran_vec (), lda,
                  b.fortran_vec (), ldb,
                  c.fortran_vec (), ldc,
                  d.fortran_vec (), ldd,
                  tol,
                  iwork,
                  dwork, ldwork,
                  info));

        if (f77_exception_encountered)
            error ("tf2ss: __sl_td04ad__: exception in SLICOT subroutine TD04AD");

        if (info != 0)
            error ("tf2ss: __sl_td04ad__: TD04AD returned info = %d", info);


"info" in TD04AD is integer, and "info" in sl_td04ad.cc
is octave_idx_type is long int (?), so it contains some trailing garbage. The quick (and, most likely, improper) fix is to
initialize info to 0L in sl_td04ad.cc.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 25 Aug 2017 11:53:51 AM UTC, original submission:  

Output of development version:


>> s = tf('s')

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

 y1:  s

Continuous-time model.
>> g = 1/(1+s)

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

        1
 y1:  -----
      s + 1

Continuous-time model.
>> step(g)
error: tf2ss: __sl_td04ad__: TD04AD returned info = 0
error: called from
    __sys2ss__>__proper_tf2ss__ at line 121 column 12
    __sys2ss__ at line 69 column 14
    ss at line 181 column 16
    __c2d__ at line 70 column 13
    c2d at line 82 column 7
    __time_response__ at line 116 column 7
    step at line 74 column 10
>> impulse(g)
error: tf2ss: __sl_td04ad__: TD04AD returned info = 0
error: called from
    __sys2ss__>__proper_tf2ss__ at line 121 column 12
    __sys2ss__ at line 69 column 14
    ss at line 181 column 16
    __c2d__ at line 70 column 13
    c2d at line 82 column 7
    __time_response__ at line 116 column 7
    impulse at line 74 column 10


Output of version 4.2.1:


>> s = tf('s')

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

 y1:  s

Continuous-time model.
>> g = 1/(1+s)

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

        1
 y1:  -----
      s + 1

Continuous-time model.
>> step(g)
>> impulse(g)


In version 4.2.1, the two plots are shown, in the development version that's not the case.

Alexander Wilms <alexanderw>

 

(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 dastew (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by alexanderw (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-06 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2017-08-29 jwe Summary[control package] Plotting system responses doesn't work anymore [octave forge] (control) Plotting system responses doesn't work anymore

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code