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

 
 

bug #53497: [octave forge] (signal) Correct solution for single-/multi-band FIR.

Submitter:  Vlad <archbugaboo>
Submitted:  Wed 28 Mar 2018 10:11:02 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 28 Mar 2018 10:11:02 AM UTC, original submission:  

Hello

The current fir1.m creates FIRs through IFFT, which is only an approximation. One FIXME aimed to correct this, but the copyright is dated 2000 and there don't seem to be any updates. I thought I'd give it a try.

Initially, I wanted to modify fir1.m, but ended up making a new script. One reason is that I find the way the arguments are passed now to be cumbersome, with a need to specify 'low', or 'stop', or DC-0', etc, for various cases. There is no need for this as the information for any type/case can be extracted from the frequency vector, be it single- or multi-band:

[0, ...]     # types I & II with DC
[..., 1]     # types I & II without DC
[0, ..., 1]  # types III & IV with DC
[...]        # types III & IV without DC

In addition, the possibility for specifying different passband amplitudes exists, through the A vector. Its length should be the number of passbands.

Similar to fir1.m, it allows for windowing (default none), and for normalizing (default un-normalized, raw impulse response). The reason is to avoid assumptions. The options are there, use them as you see fit.

Also, any combination of FIR is possible. Type II highpass, multiband Hilbert transformer, type III bandstop, ... The reason is mainly educational. Saying that a type II highpass is not possible due to the inherent zero at Nyquist is fine, but showing the result of such a filter would mean so much more. As they say, a picture is a thousand words. But, mostly, it's about the difference between saying "You can't do that!" and "If you do that, this is what will happen.". The consequences of these two can go a long way.

I would have proposed this to be a replacement for fir1.m, but I understand there needs to be compatibility with Matlab, so I propose this to be a new script.

Vlad <archbugaboo>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #43702:  fir.m added by archbugaboo (30KiB - text/x-objcsrc - correct solution for any type of FIR, based on sum of sin/cos.)

 

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 archbugaboo (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-25 jwe SummaryCorrect solution for single-/multi-band FIR. [octave forge] (signal) Correct solution for single-/multi-band FIR.
    2018-03-28 archbugaboo Attached File- Added fir.m, #43702

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code