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

 
 

bug #60423: [octave forge] (signal) buttord incorrect result

Submitted by:  None
Submitted on:  Tue 20 Apr 2021 08:31:01 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Invalid Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  dev
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 05 May 2021 03:32:27 PM UTC, comment #5: 

@Charles

Thank you for the explanation.

Again this bug can be closed.

Anonymous
Tue 04 May 2021 04:37:31 PM UTC, comment #4: 

buttord calculates the minimum filter order to satisfy a specification.
In most cases, the theoretical minimum order is not an entire number and
must be rounded up.

This theoretical order would let the response touch both the pass band
corner and the stop band corner.
The filter with the rounded order will not touch both corners.

You have the choice to let the response touch the pass band corner, the
stop band corner or neither one, by choosing Wn (value passed to butter)
respectively as WC_P, WC_S or any value between WC_P and WC_S.

More generally, note that Matlab and Octave may deliver different results
which are both correct.
Some problems have several possible solutions, as the above example shows.
Another example is the way to pair zeros and poles in second order sections...

Charles Praplan <charprap>
Wed 28 Apr 2021 11:27:46 PM UTC, comment #3: 

Yes, please open individual bug reports for each function error or inaccuracy, unless there is a class of test that applies to a set of functions together.

Mike Miller <mtmiller>
Project Administrator
Wed 21 Apr 2021 09:21:59 PM UTC, comment #2: 

Thank you Wc_s is the value.

This octave function has more output options available, which is good.

The documentation states
Wc_p (Wc_n) is the value used to pass to butter.
Using the same source there is a test

[n,Wn]=buttord(wp,ws,Rp,Rs);
[B,A]=butter(N,Wn);

In this case wc_p would be used? Not sure how to make this more clear.

If you like this bug could be closed.

-----------
This IEEE source looks good for adding BIST (buttap, cheb1ap, zp2tf, etc).

The next test fails (p values in wrong order)

Would you like new bugs/patches for each of these? Or just add to this one?

Anonymous
Wed 21 Apr 2021 06:09:27 PM UTC, comment #1: 

I believe the result you are looking for can be found with

>> [N, ~, Wc] = buttord ...
N = 4
Wc = 11.261

The author of the overhauled buttord function can probably explain the reasons for the different output arguments.

An argument can definitely be made for making this more Matlab compatible.

Mike Miller <mtmiller>
Project Administrator
Tue 20 Apr 2021 08:31:01 AM UTC, original submission:  

From
https://ewh.ieee.org/r1/ct/sps/PDF/MATLAB/chapter5.pdf

Test case with signal v1.4.1

Wp = 10; Ws = 20; Rp = -2; Rs = -20;
[N,Wc] = buttord(Wp,Ws, -Rp, -Rs, 's')
N =  4
Wc =  10.693

The expected result is

N = 4
Wc = 11.2610

Anonymous

 

(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

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by charprap (Posted a comment)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-05 mmuetzel StatusConfirmed => Invalid
        Open/ClosedOpen => Closed
    2021-04-21 mtmiller Item GroupIncorrect Result => Inaccurate Result
        StatusNone => Confirmed
        Release4.2.2 => dev

    Back to the top


    Powered by Savane 3.6