Peak filter specification
d = fdesign.peak(specstring, value1, value2,
d = fdesign.peak(n,f0,q)
d = fdesign.peak(...,Fs)
d = fdesign.peak(...,MAGUNITS)
d = fdesign.peak(specstring, value1, value2, ...) constructs a peaking filter specification object d, with a specification string set to specstring and values provided for all members of the specstring. The possible specification strings, which are not case sensitive, are listed as follows:
where the variables are defined as follows:
N - Filter Order (must be even)
F0 - Center Frequency
Q - Quality Factor
BW - 3-dB Bandwidth
Ap - Passband Ripple (decibels)
Ast - Stopband Attenuation (decibels)
Different specification strings, resulting in different specification objects, may have different design methods available. Use the function designmethods to get a list of design methods available for a given specification. For example:
>> d = fdesign.peak('N,F0,Q,Ap',6,0.5,10,1); >> designmethods(d) Design Methods for class fdesign.peak (N,F0,Q,Ap): cheby1
d = fdesign.peak(n,f0,q) constructs a peaking filter specification object using the default specstring ('N,F0,Q') and setting the corresponding values to n, f0, and q.
By default, all frequency specifications are assumed to be in normalized frequency units. All magnitude specifications are assumed to be in decibels.
d = fdesign.peak(...,Fs) constructs a peak filter specification object while providing the sampling frequency of the signal to be filtered. Fs must be specified as a scalar trailing the other values provided. If you specify an Fs, it is assumed to be in Hz, as all the other frequency values provided.
d = fdesign.peak(...,MAGUNITS) constructs a notch filter specification while providing the units for any magnitude specification given. MAGUNITS can be one of the following: 'linear', 'dB', or 'squared'. If this argument is omitted, 'dB' is assumed. The magnitude specifications are always converted and stored in decibels regardless of how they were specified. If Fs is provided, MAGUNITS must follow Fs in the input argument list.
Design a Chebyshev Type II peaking filter with a stopband attenuation of 80 dB:
d = fdesign.peak('N,F0,BW,Ast',8,.65,.02,80); Hd = design(d,'cheby2'); fvtool(Hd)
This design produces a filter with the magnitude response shown in the following figure.