octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49996] signal package: cheby2 produces zeros


From: Bill Lash
Subject: [Octave-bug-tracker] [bug #49996] signal package: cheby2 produces zeros that are not quite complex conjugate pairs
Date: Sat, 7 Jan 2017 03:58:27 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #6, bug #49996 (project octave):

The filter needs to have all the zeros in complex conjugate pairs, which is
why zp2sos was complaining.  The zeros are calculated by getting equally
spaced values of theta in the range of 0 to pi (not inclusive), spaced apart
by pi/n (where n is the order of the filter). 

The zeros are then calculated by dividing 1i by the cos(theta).  In the case
where n is odd, the purely imaginary zero (at theta=pi/2) is excluded.  This
should produce complex conjugate pairs.

I think the issue is that with the small numerical differences between the
values of theta that produce conjugate pairs, produce small numerical
differences in the cos(), which in turn produce small numerical differences in
the conjugate zeros.

It is possible that it would be better that does some sort of average of the
values in the conjugate pairs instead of arbitrarily choosing one of the zeros
and conjugating it.

Other methods I could think of to get conjugate zeros would be to ensure that
the positive and negative values of cos(theta) are of the same magnitude but
opposite sign, or perhaps ensuring that the smallest value of
theta(1)=pi-theta(n), theta(2)=pi-theta(n-1) ...


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49996>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]