bugGNU Octave - Bugs: bug #51936, [octave forge] (signal) zp2sos...

 
 

bug #51936: [octave forge] (signal) zp2sos wrong results for single zero

Submitted by:  fietew <fietew>
Submitted on:  Mon 04 Sep 2017 04:30:20 PM UTC  
 
Category: Octave Forge PackageSeverity: 1 - Wish
Priority: 3 - LowItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.0.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 05 Sep 2017 05:48:22 PM UTC, comment #3:

Thanks. This is a case that is currently not supported in the sos2{tf,zp} and {tf,zp}2sos functions, as mentioned in the doc strings for these functions. Any patches to support this in these four functions is welcome.

Mike Miller <mtmiller>
Project Administrator
Mon 04 Sep 2017 05:21:26 PM UTC, comment #2:

Matlab's output is imho the correct one:

fietew <fietew>
Mon 04 Sep 2017 04:52:51 PM UTC, comment #1:

Well let's look at the inverse operation:

This matches your third line. This implies that the zeros array may have been padded.

And if you look into zp2sos.m, if the number of real zeros is not even, the z array is padded by a single 0. This makes the first the same as the third.

What does Matlab do with these examples? What do you think the results should be?

Mike Miller <mtmiller>
Project Administrator
Mon 04 Sep 2017 04:30:20 PM UTC, original submission:

Try:

The input describes the following Systems:
1st Line: H(z) = (z-1)/((z-1)*(z+1)) = (z^(-1) - z^(-2))/(1-(z^-2))
2nd Line: H(z) = ((z-1)(z+1))/((z-1)(z+1)) = (1-z^(-2))/(1-z^(-2))
3rd Line: H(z) = ((z-1)z)/((z-1)(z+1)) = (1 - z^(-1))/(1-z^(-2))

Output:

The third output is equal to the first one, which should not be the case, since the systems are not the same. The documentation (https://octave.sourceforge.io/signal/function/zp2sos.html) says "The b0 entry must be nonzero for each section.", which explains the behavior, but does not preserve the properties of the first system.

fietew <fietew>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by fietew (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
    Tue 05 Sep 2017 05:48:22 PM UTCmtmillerSeverity2 - Minor=>1 - Wish
      Priority5 - Normal=>3 - Low
      Item GroupIncorrect Result=>Matlab Compatibility
      StatusNeed Info=>Confirmed
    Mon 04 Sep 2017 04:52:51 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      StatusNone=>Need Info
      Summaryzp2sos wrong results for single zero=>[octave forge] (signal) zp2sos wrong results for single zero

    Back to the top


    Powered by Savane 3.1-cleanup1