Filter design differences between DSP System and Signal Processing toolboxes (fdesign/design)
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Abhinav Aravindan
2024-9-16
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!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Design and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!