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

 
 

bug #45811: [octave forge] (signal) ellipord returns complex for band-stop filter

Submitter:  Charles Praplan <charprap>
Submitted:  Sun 23 Aug 2015 10:55:34 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  mtmiller
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 30 Apr 2018 08:29:27 PM UTC, comment #9: 

This work has now been merged into the signal package, thank you very much for your contribution and for helping to improve the demos and adding tests.

Mike Miller <mtmiller>
Group Member
Fri 13 Apr 2018 08:15:58 AM UTC, comment #8: 

Thank you for doing the work and taking the time to add all of those test cases. I think I will be busy for the next few days, but hopefully by next week I can review both of these bugs and get all of these improvements added for the next signal release, which will be part of Octave 4.4. You have done some really great work here.

Mike Miller <mtmiller>
Group Member
Thu 12 Apr 2018 12:21:08 PM UTC, comment #7: 

I propose some changes in the appended ellipord function concerning:

1) your demo:

- improvement of responsivity. In new octave version, the 'qt' graphic toolkit seems to be slow with a large number of points (at least with W10).

- improvement of the frequency ranges in the plots

2) other things

- I added a copyright notice
- I added tests


(file #43893)

Charles Praplan <charprap>
Tue 10 Apr 2018 09:40:42 PM UTC, comment #6: 

And here is the work that I've done to convert the test scripts you provided into Octave compatible demos. I'm only attaching the demo portion, but this is simply appended as-is onto the end of ellipord.m.

I added some y-axis limits to get consistent plots and reworded the titles a little.

(file #43877)

Mike Miller <mtmiller>
Group Member
Tue 10 Apr 2018 07:58:22 PM UTC, comment #5: 

I'm attaching the current status of my integration work on ellipord.m and validate_filter_bands.m so you can have a look at it. I have not gone through all of the demos yet but am planning on doing that next.

(file #43875, file #43876)

Mike Miller <mtmiller>
Group Member
Sun 08 Apr 2018 10:05:30 AM UTC, comment #4: 

If you want, I can do the job for the ellipord function too, because I'm almost finished with the buttord, cheb1ord and cheb2ord functions.

Let me know if this is convenient for you.

Charles Praplan <charprap>
Tue 03 Apr 2018 07:35:24 PM UTC, comment #3: 

I am reviewing this submission now. This is an excellent contribution to the signal package, thank you.

The demos are very useful, I will try to adapt them into %!demo blocks for use with the demo function.

Instead of adding a new function 'validate_filter_bandss', I will probably add a 's' option to the existing 'validate_filter_bands' function.

I expect I will be able to add this soon, with some integration effort, and some followup work to use Octave coding style consistently and to add the demonstrations as %!demo scripts.

Mike Miller <mtmiller>
Group Member
Thu 15 Oct 2015 04:04:25 PM UTC, comment #2: 

Hi,

I worked a little bit on the ellipord function and found some
corrections and improvements that I have implemented and tested:

1) Correction for complex order for notch filter

2) Correction for minimum order in case of not symetrical
   requirements (notch)

     In case of not symmetrical requirements, the symmetry was
     always done by preserving the passband and modifying the
     stopband. This could lead to non minimum order for notch
     filters. Note that Matlab also has this problem.

3) Implementation of functionality for analog filters as in
   Matlab (this includes a new 'validate_filter_bandss.m'
   function for analog filters).


I append the file ellipord_case_2015_10_15.zip containing
the corrected files, 8 test cases and 2 plots to compare
matlab to octave:

- ellipord.m
- validate_filter_bandss.m

- ellipord_test_ana_LP.m
- ellipord_test_ana_HP.m
- ellipord_test_ana_BP.m
- ellipord_test_ana_notch.m
- ellipord_test_dig_LP.m
- ellipord_test_dig_HP.m
- ellipord_test_dig_BP.m
- ellipord_test_dig_notch.m

- result_ellipord_test_ana_notch_with_matlab.png
- result_ellipord_test_ana_notch_with_new_ellipord_octave.pdf

One can run the two notch test cases on matlab to see non
optimal order.

If you find this contribution usefull, please integrate them
into the next release.

Ch. Praplan

(file #35202)

Charles Praplan <charprap>
Sun 23 Aug 2015 07:26:09 PM UTC, comment #1: 

Confirmed, thanks for reporting.

Mike Miller <mtmiller>
Group Member
Sun 23 Aug 2015 10:55:34 AM UTC, original submission:  

Hi,

The function ellipord used for the bandstop filter below delivers a complex order. The same kind of bug (38528) has already been submitted and corrected, but the fix does not help in this case.

Thank you



pkg load signal
Wpass=[0.14000   0.44643];
Wstop=[0.24750   0.25253];

Rpass = 3;
Rstop = 80;

[N, Wn] = ellipord(Wpass, Wstop, Rpass, Rstop);
N


Charles Praplan <charprap>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #43893:  ellipord.m added by charprap (33KiB - application/octet-stream)
file #43877:  ellipord.demo added by mtmiller (23KiB - application/octet-stream)
file #43875:  ellipord.m added by mtmiller (5KiB - text/x-objcsrc)
file #43876:  validate_filter_bands.m added by mtmiller (3KiB - text/x-objcsrc)
file #35202:  ellipord_case_2015_10_15.zip added by charprap (51KiB - application/x-zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 19 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 jwe Summary[octave-forge] (signal) ellipord returns complex for band-stop filter [octave forge] (signal) ellipord returns complex for band-stop filter
    2018-04-30 mtmiller StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2018-04-12 charprap Attached File- Added ellipord.m, #43893
    2018-04-10 mtmiller Attached File- Added ellipord.demo, #43877
    2018-04-10 mtmiller Attached File- Added ellipord.m, #43875
        Attached File- Added validate_filter_bands.m, #43876
        StatusPatch Reviewed In Progress
    2018-04-03 mtmiller StatusPatch Submitted Patch Reviewed
    2017-08-11 jwe Summarysignal package: ellipord returns complex for band-stop filter [octave-forge] (signal) ellipord returns complex for band-stop filter
    2015-12-22 mtmiller StatusConfirmed Patch Submitted
    2015-10-15 charprap Attached File- Added ellipord_case_2015_10_15.zip, #35202
    2015-10-15 charprap Carbon-CopyRemoved ch -
    2015-08-23 mtmiller StatusNone Confirmed
        Assigned toNone mtmiller
        Release4.0.0 other
        Operating SystemMicrosoft Windows Any
        Summaryellipord: complex result signal package: ellipord returns complex for band-stop filter
    2015-08-23 charprap Carbon-Copy- Added ch

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code