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

 
 

bug #45334: [octave forge] (control) version 2.8.1 - incorrect results on repeated MIMO tf multiplies

Submitted by:  Nicholas Jankowski <nrjank>
Submitted on:  Tue 16 Jun 2015 09:26:08 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.0.0Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 18 Jun 2015 06:21:08 AM UTC, comment #4:

I had a quick look at the problem and noticed the following:

- the transfer function matrix from Maxima is the transpose of the one from Matlab/Octave. (you can use a1.' in Octave, note the dot)

- the tolerance on line 120 of the file @tf/__sys2ss__.m has a huge impact on the results.

Lukas Reichlin <paramaniac>
Wed 17 Jun 2015 09:55:50 AM UTC, comment #3:

Adding package maintainer to cc list

Carnë Draug <carandraug>
Project Member
Wed 17 Jun 2015 02:11:42 AM UTC, comment #2:

confirmed this behavior also exists in control-2.8.2. The output is almost identical, except for the 'minreal' case, where many of the polynomial constants go to inf instead of zero on the 5th multiply.

Nicholas Jankowski <nrjank>
Tue 16 Jun 2015 09:27:13 PM UTC, comment #1:

forgot the Maxima output. attached.

(file #34241)

Nicholas Jankowski <nrjank>
Tue 16 Jun 2015 09:26:08 PM UTC, original submission:

using control-2.8.1. performing a multiple MIMO tf multiplication produces erroneous output. (haven't checked this under 2.8.2, as that version produces a different error)

using a simple 2x2 tf, the following commands reproduce the problem:

a2 calculates as expected, and a minreal(a2) produces the expected minimized form. the a3 and a4 results get huge, and then the a5 result drops and zeros out almost all of the numerator coefficients. using minreal between multiplies for a3, a4 and a5 make little difference.

As the output gets messy, I attached a text file of the Octave output with and without minreal.

Note that the order of multiplication (whether it's a1* or *a1) in the definition of a2-a5 seems to matter on whether the coefficients match the expected analytical result, but it produces zeros on a5.

Checking Matlab output for the same (ML 2015a) produces sensible results, although as expected they don't minimize as nicely as Maxima. A minreal between multiply steps gets it fairly close through a4.

I attached a png of a maxima output showing what the minimized output of those should be. granted I expect Maxima to be better at handling the higher order polynomials.

Nicholas Jankowski <nrjank>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34241:  maximaoutput.png added by nrjank (105KiB - image/png)
file #34237:  Octave_output.txt added by nrjank (32KiB - text/plain - outputs from Octave (txt), Maxima (png) and Matlab (txt files))
file #34238:  MLoutput-withminreal.txt added by nrjank (17KiB - text/plain - outputs from Octave (txt), Maxima (png) and Matlab (txt files))
file #34239:  MLoutput.txt added by nrjank (29KiB - text/plain - outputs from Octave (txt), Maxima (png) and Matlab (txt files))
file #34240:  Octave_output_withminreal.txt added by nrjank (21KiB - text/plain - outputs from Octave (txt), Maxima (png) and Matlab (txt files))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by paramaniac (Posted a comment)
  • -unavailable- added by carandraug (Lukas Reichlin - maintainer of the control package)
  • -unavailable- added by nrjank (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Aug 2017 01:42:44 PM UTCjweSummarycontrol package 2.8.1 - incorrect results on repeated MIMO tf multiplies=>[octave forge] (control) version 2.8.1 - incorrect results on repeated MIMO tf multiplies
    Wed 17 Jun 2015 09:55:50 AM UTCcarandraugCarbon-Copy-=>Added -unavailable-
    Tue 16 Jun 2015 09:27:13 PM UTCnrjankAttached File-=>Added maximaoutput.png, #34241
    Tue 16 Jun 2015 09:26:08 PM UTCnrjankAttached File-=>Added Octave_output.txt, #34237
      Attached File-=>Added MLoutput-withminreal.txt, #34238
      Attached File-=>Added MLoutput.txt, #34239
      Attached File-=>Added Octave_output_withminreal.txt, #34240

    Back to the top


    Powered by Savane 3.1-cleanup1