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

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

[Octave-bug-tracker] [bug #53497] Correct solution for single-/multi-ban


From: Vlad
Subject: [Octave-bug-tracker] [bug #53497] Correct solution for single-/multi-band FIR.
Date: Wed, 28 Mar 2018 06:11:03 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.gnu.org/bugs/?53497>

                 Summary: Correct solution for single-/multi-band FIR.
                 Project: GNU Octave
            Submitted by: archbugaboo
            Submitted on: Wed 28 Mar 2018 10:11:02 AM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 28 Mar 2018 10:11:02 AM UTC  Name: fir.m  Size: 30KiB   By:
archbugaboo
correct solution for any type of FIR, based on sum of sin/cos.
<http://savannah.gnu.org/bugs/download.php?file_id=43702>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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