bugGNU Octave - Bugs: bug #44930, signal package: zplane shows...

 
 

bug #44930: signal package: zplane shows non-existent poles and zeros

Submitted by:  None
Submitted on:  Sun 26 Apr 2015 02:40:47 PM UTC  
 
Category: Octave Forge PackageSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: InvalidAssigned to: None
Originator Name: Robert JenssenOriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 27 Apr 2015 04:48:06 PM UTC, comment #5:

Doug is correct, and it does belong in the zplane function because that it what the function is intended to do. It is used to show the poles and zeros of a filter when the arguments are row vectors.

I think you are expecting that the vectors of coefficients you pass to the zplane function are for positive powers of z. If that were the case, you would be right. But

is not working on the polynomial H(z) = z^2 + 2z + 3, it is the polynomial H(z) = 1 + 2z^-1 + 3z^-2.

If you want to plot only zeros with no poles, you will have to calculate the zeros yourself with the roots function and pass the column vector of zeros to zplane. Sorry if you find that wrong, but that is the documented interface of the zplane function.

Mike Miller <mtmiller>
Project Administrator
Mon 27 Apr 2015 01:09:51 AM UTC, comment #4:

OK, but IMHO you should put all this Laplace conversion stuff in your function that converts from s-plane to z-plane. It doesn't belong in the zplane() function.

Anonymous
Mon 27 Apr 2015 12:49:10 AM UTC, comment #3:

No it is not incorrect.

If we start with Laplace space and draw a root Locus we see that the poles move to zeros. And if there are not enough zeroes then the extra poles move out radially to Infinity. ( I am giving you the short version of my lectures) so we can say that there are zeroes out at infinity that these poles are moving to.

Now when we move all this to the Z plane then we can show that infinity in Laplace space maps to zero in Z Space. So now all the missing zeroes in laplace space show up in Z space.

Of course we can make Z space filters that are not realizable in Laplace space.
So what is correct or incorrect is relative to what the objective is.

The padding is actually making the zeroes from infinity, show up at the origin.

Just my 2C worth.

Doug Stewart <dastew>
Sun 26 Apr 2015 11:29:58 PM UTC, comment #2:

No, I'm afraid I don't have Matlab. Using a default denominator of 1 is fine; roots([1]) returns []. My criticism is that zplane pads the zero or pole column vectors with 0, implying poles or zeros at z=0 that are not in the input polynomial.

This is not a Matlab compatibility bug. It is an incorrect result.

Anonymous
Sun 26 Apr 2015 03:31:27 PM UTC, comment #1:

Thanks for your bug report. Do you have access to Matlab to test this for compatibility? What does Matlab display for an empty denominator argument? Since it is intended to be used with filter coefficients, an implied denominator of 1 makes sense as it behaves now.

As a workaround, you can do what you want with:

Mike Miller <mtmiller>
Project Administrator
Sun 26 Apr 2015 02:40:47 PM UTC, original submission:

zplane() is a pole/zero plotter from the signal-1.3.1 package. I sometimes want to plot the zeros of a single polynomial, not a transfer function. For example, zplane([1 2 3]) plots a pole at the origin implying a factor of 1/(z^(-1)-0). The example of a transfer function, H(z), is incorrect. The two transfer functions shown on the right of the "="s are not equal. They differ by a power of z^(-1).

Also the "N-M" or "M-N" triggers the "Octave:neg-dim-as-zero" warning.

Here is a diff showing my proposed change to the Octave code in signal/zplane.m:

Anonymous

 

(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 dastew (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 27 Apr 2015 04:48:49 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Mon 27 Apr 2015 04:48:06 PM UTCmtmillerStatusNeed Info=>Invalid
    Sun 26 Apr 2015 03:31:27 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      Item GroupIncorrect Result=>Matlab Compatibility
      StatusNone=>Need Info
      Release4.0.0-rc3=>other
      Operating SystemGNU/Linux=>Any
      Summarysignal/zplane.m shows non-existent poles and zeros=>signal package: zplane shows non-existent poles and zeros

    Back to the top


    Powered by Savane 3.1-cleanup1