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

 
 

bug #45834: [octave forge] (signal) grpdelay with a vector of frequencies is not correct

Submitter:  None
Submitted:  Thu 27 Aug 2015 12:21:49 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Robert Jenssen Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 26 Apr 2022 04:54:54 AM UTC, comment #4: 

See attached revised version of grpdelay.m

(file #53149)

Robert Jenssen <morgawr>
Tue 31 Dec 2019 01:29:35 AM UTC, comment #3: 

I also discovered this bug today with signal-1.4.1.

Using the form of:

[gd,wd]=grpdelay(b,a,[0 w])

wd is given by:

wd = 2*2*pi*pi*[0 w]


Kelvin Bidwell <kelvin_bidwell>
Tue 03 Apr 2018 06:42:21 PM UTC, comment #2: 

After looking at this again, the entire approach that grpdelay currently uses requires that the frequency points be equally spaced. If the function is called with an array of frequencies in Hz or radians, only the length of the array is used to determine at which points to evaluate the delay.

Mike Miller <mtmiller>
Group Member
Thu 27 Aug 2015 12:48:16 PM UTC, comment #1: 

Confirmed, thanks for testing and reporting. It seems to only use the number of points of the input array rather than the actual frequencies given.

Mike Miller <mtmiller>
Group Member
Thu 27 Aug 2015 12:21:49 PM UTC, original submission:  

I am using signal-1.3.2. The Octave code

pkg load signal
[b,a]=butter(5,0.3);
[H,w]=freqz(b,a,256);
[Hp,wp]=freqz(b,a,w(1:128));

behaves as expected from the help description. wp=w(1:128).

The Octave code

pkg load signal
[b,a]=butter(5,0.3);
[T,w]=grpdelay(b,a,256);
[Tp,wp]=grpdelay(b,a,w(1:128));

does not behave as expected. Tp is calculated over 128 points across [0,pi] (where pi corresponds to Fs/2). I expected 128 points across [0,pi/2]. In addition, wp is scaled strangely.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53149:  grpdelay.m added by morgawr (15KiB - text/x-objcsrc - Revised version of grpdelay.m)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by morgawr (Updated the item)
  • -email is unavailable- added by kelvin_bidwell (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by None (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-26 morgawr Attached File- Added grpdelay.m, #53149
    2019-02-27 mtmiller Assigned tomtmiller None
        Releaseother dev
    2019-02-27 mtmiller Carbon-CopyRemoved 80942 -
    2018-04-03 mtmiller Summary[octave forge] (signal) [T,wr]=grpdelay(b,a,w) does not use or return w [octave forge] (signal) grpdelay with a vector of frequencies is not correct
    2017-08-13 jwe Summarysignal package: [T,wr]=grpdelay(b,a,w) does not use or return w [octave forge] (signal) [T,wr]=grpdelay(b,a,w) does not use or return w
    2015-08-27 mtmiller StatusNone Confirmed
        Assigned toNone mtmiller
        Release4.0.0 other
        Operating SystemGNU/Linux Any
    2015-08-27 carandraug Summary[T,wr]=grpdelay(b,a,w) does not use or return w signal package: [T,wr]=grpdelay(b,a,w) does not use or return w

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code