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

 
 

bug #49318: [octave forge] (signal) butter/cheby1/cheby2/ellip return zeros and poles as row vectors

Submitted by:  Yuzhou Cheng <yc2986>
Submitted on:  Tue 11 Oct 2016 09:27:51 PM UTC  
 
Category:  Octave Forge Package Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 04 Apr 2018 01:16:23 AM UTC, comment #4: 

This is fixed in the signal repository

https://hg.mtmxr.com/octave-signal/rev/88e8c154dcdb

Mike Miller <mtmiller>
Project Administrator
Thu 05 Jan 2017 08:42:46 PM UTC, comment #3: 

patches posted to bug #49990 make outputs of butter, cheby1, cheby2 and ellip follow matlab convention. That should address the ellip issue mentioned in comment #2.

Nicholas Jankowski <nrjank>
Wed 12 Oct 2016 02:38:57 AM UTC, comment #2: 

Thanks for your bug report. The bug actually appears to be in the way the zeros and poles are returned from the ellip function, not in the zplane function.

Please try zplane again with the vectors transposed, as in:

zplane (z.', p.');

An easy workaround is to ensure that your zeros and poles vectors are always column vectors.

The unfortunate interface for the zplane function is that if it is given two row vectors, they are taken to be numerator and denominator filter coefficients, column vectors are taken to be zeros and poles. So in this case, ellip appears to be returning row vectors when the user asks for zeros and poles.

Mike Miller <mtmiller>
Project Administrator
Tue 11 Oct 2016 09:49:19 PM UTC, comment #1: 

zplane is in the Octave Forge package signal.  Changing the Category to Octave Forge Package.

Rik <rik5>
Project Administrator
Tue 11 Oct 2016 09:27:51 PM UTC, original submission:  

Matlab version of zplane: https://www.mathworks.com/help/signal/ref/zplane.html

Tested in Octave 4.0.3 using Matlab's example of ellip filter

[z,p,k] = ellip(4,3,30,200/500);
zplane(z,p);

zplane in Octave generate pole out of unit circle...

According to this thread: http://octave.1599824.n4.nabble.com/Stable-poles-handed-to-quot-filter-quot-can-result-in-unstable-filter-td4634447.html

Probably Octave is calculating Poles using:

poles = abs(roots(b))

Which generate this bug. The correct pole should be just:

poles = abs(b)

By the way, the freqz function plot unstable filter magnitude response for butter. I think maybe it is due to this issue as well.

Yuzhou Cheng <yc2986>

 

(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

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by yc2986 (Submitted the item)
  • -email is unavailable- added by yc2986
  •  

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

    Only project members can vote.

     

     

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-04 mtmiller StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2017-08-13 jwe Summarysignal package: butter/cheby1/cheby2/ellip return zeros and poles as row vectors => [octave forge] (signal) butter/cheby1/cheby2/ellip return zeros and poles as row vectors
    2017-01-05 mtmiller Summarysignal package: ellip returns zeros and poles as row vectors => signal package: butter/cheby1/cheby2/ellip return zeros and poles as row vectors
    2017-01-05 mtmiller Dependencies- => bugs #49989 is dependent
    2016-10-12 mtmiller Severity3 - Normal => 2 - Minor
        StatusNone => Confirmed
        Release4.0.3 => dev
        Operating SystemMicrosoft Windows => Any
        SummarySignal Pack zplane generate wrong zero-pole plot => signal package: ellip returns zeros and poles as row vectors
    2016-10-11 rik5 Carbon-CopyRemoved 72865 => -
    2016-10-11 rik5 CategoryOctave Function => Octave Forge Package
    2016-10-11 yc2986 Carbon-Copy- => Added chengyuzhou1992@gmail.com

    Back to the top


    Powered by Savane 3.5