Main Content

fdesign.peak

Peak filter specification

Syntax

d = fdesign.peak(specstring, value1, value2, ...)
d = fdesign.peak(n,f0,q)
d = fdesign.peak(...,Fs)
d = fdesign.peak(...,MAGUNITS)

Description

d = fdesign.peak(specstring, value1, value2, ...) constructs a peaking filter specification object d, with specification set to specstring and values provided for all members of the specstring. The possible specification options, which are not case sensitive, are listed as follows:

  • 'N,F0,Q' (default)

  • 'N,F0,Q,Ap'

  • 'N,F0,Q,Ast'

  • 'N,F0,Q,Ap,Ast'

  • 'N,F0,BW'

  • 'N,F0,BW,Ap'

  • 'N,F0,BW,Ast'

  • 'N,F0,BW,Ap,Ast'

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 options, 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.

Examples

collapse all

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',SystemObject=true);

View the frequency response of the filter.

filterAnalyzer(Hd)

Version History

Introduced in R2011a