Am I doing something wrong, or does fdesign.octave not actually work?

2 次查看(过去 30 天)
I'm trying to make a third-octave filter bank with specific features. As an introduction to the Matlab functions, I tried the example offered by the Matlab help for fdesign.octave. The self-generated code doesn't generate an ANSI-compliant filter at 1000 Hz (the filter response goes outside the skirts and they are shown in red). I've tried two other sampling rates and changed the filter order to 8, but still no success. What is up with this feature? Not fully functional?
%%Design an Octave Band Filter
% Design a sixth order, octave-band class 0 filter with a center frequency
% of 1000 Hz and, a sampling frequency of 44.1 kHz.
d = fdesign.octave(3,'Class 0','N,F0',6,1000,44100)
Hd = design(d)
fvtool(Hd)
The figure shows the magnitude response plot of the filter. The logarithmic scale for frequency is automatically set by FVTool for the octave filters.

采纳的回答

Puneet Rana
Puneet Rana 2017-2-23
Hi Jerome,
The red color on the mask does not mean that the ANSI compliance is not met. When fdesign.octave is used with fvtool, the mask is just plotted as a reference. fvtool does not indicate that the compliance is met through a change in the mask color. I can see how the color of the mask can be confusing.
fdesign.octave does not have a way to check ANSI compliance other than visually observing that the response is plotted between the upper and lower masks on fvtool. This, along with other improvements, is the reason why fdesign.octave has been superseded by the new octaveFilter System object. You can use isStandardCompliance method of octaveFilter to check ANSI compliance. It also plots the mask in green in those cases.
  1 个评论
Jerome
Jerome 2017-2-24
Thanks, I can see that it works under close inspection now. At some zoom settings, the curve seems to go outside the envelope, but it actually doesn't.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Measurements and Spatial Audio 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by