Filter design differences between DSP System and Signal Processing toolboxes (fdesign/design)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tim Betzner
am 13 Sep. 2024
Kommentiert: Tim Betzner
am 17 Sep. 2024
The following two lines have different behavior depending on installed toolboxes:
d = fdesign.highpass('N,F3db',3,1,1000);
Hd = design(d);
Normally, I have BOTH DSP System and Signal Processing toolboxes installed. When I run these lines with both toolboxes installed I get the following error:
Error using fdesign.abstracttype/superdesign (line 90)
For symmetric FIR filters, only even orders are allowed.
Now, if I uninstall DSP System toolbox this pair of lines runs as I expect, and makes a 1Hz highpass filter through which I can run my data in lines following the fdesign/design pair of statements. I presume this means that fdesign/design are available in both toolboxes but for some reason only the one in the Signal Processing toolbox works as I expect, meanwhile if I have DSP System installed that version takes precedence and gives me errors.
Is this behavior correct or is it a bug to be reported to Mathworks? I inherited the code from which these lines are excerpted. I also inherited a Matlab license with several toolboxes I know little about (such as DSP System). Though I've been working with Matlab on and off for decades I've never encountered a case of a function with a "split personality" such as I'm describing with fdesign/design. So from my point of view (limited DSP knowledge) this looks like a bug, but it is possible in my lack of understanding these functions are working correctly with both toolboxes, and therefore I need to learn what I have done (or not done) to cause my errors.
0 Kommentare
Akzeptierte Antwort
Abhinav Aravindan
am 16 Sep. 2024
Hi Tim,
The behaviour you are observing seems to be due to the default filter design method selected for filter design. With the “DSP System Toolbox” installed, the default method is selected as “maxflat” while without the toolbox, the default design specification is selected as “butter”, due to which the error occurs. The following function can be used to identify the default design method.
designmethods(d,'default')
As a workaround, you may try to provide the “designSpecs” parameter in the “design” function as follows:
d = fdesign.highpass('N,F3db',3,1,1000);
Hd = design(d,'butter');
Please find below the related documentation for your reference.
I hope this helps resolve the issue you are facing!
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Filter Design and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!