| Filter Design Toolbox Reference Guide | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Highpass filter specification object
d = fdesign.highpass
d = fdesign.highpass(spec)
d = fdesign.highpass(spec,specvalue1,specvalue2,...)
d = fdesign.highpass(specvalue1,specvalue2,specvalue3,
specvalue4)
d = fdesign.highpass(...,fs)
d = fdesign.highpass(...,magunits)
d = fdesign.highpass constructs a highpass filter specification object d, applying default values for the properties fst, fp, ast and ap.
Using fdesign.highpass with a design method generates a dfilt object.
d = fdesign.highpass(spec) constructs object d and sets its 'Specification' to spec. Entries in the spec string represent various filter response features, such as the filter order, that govern the filter design. Valid entries for spec are shown below. The strings are not case sensitive.
fst,fp,ast,ap (default spec)
n,f3db
n,f3db,ap
n,f3db,ast
n,f3db,ast,ap
n,f3db,fp
n,fc
n,fc,ast,ap
n,fp,ap
n,fp,ast,ap
n,fst,ast
n,fst,ast,ap
n,fst,f3db
n,fst,fp
n,fst,fp,ap
n,fst,fp,ast
nb,na,fst,fp
The string entries are defined as follows:
ap — amount of ripple allowed in the pass band in decibels (the default units). Also called Apass.
ast — attenuation in the stop band in decibels (the default units). Also called Astop.
f3db — cutoff frequency for the point 3 dB point below the passband value. Specified in normalized frequency units.
fc — cutoff frequency for the point 3 dB point below the passband value. Specified in normalized frequency units.
fp — frequency at the start of the pass band. Specified in normalized frequency units. Also called Fpass.
fst — frequency at the end of the stop band. Specified in normalized frequency units. Also called Fstop.
n — filter order.
na and nb are the order of the denominator and numerator.
Graphically, the filter specifications look similar to those shown in the following figure.

Regions between specification values like fst1 and fp are transition regions where the filter response is not explicitly defined.
The filter design methods that apply to a highpass filter specification object change depending on the Specification string. Use designmethods to determine which design method applies to an object and its specification string.
d = fdesign.highpass(spec,specvalue1,specvalue2,...) constructs an object d and sets its specification values at construction time.
d = fdesign.highpass(specvalue1,specvalue2,specvalue3,
specvalue4)
constructs an object d with the values for the default Specification property
string, using the specifications you provide as input arguments specvalue1,specvalue2,specvalue3,specvalue4.
d = fdesign.highpass(...,fs) adds the argument fs, specified in Hz to define the sampling frequency to use. In this case, all frequencies in the specifications are in Hz as well.
d = fdesign.highpass(...,magunits) specifies the units for any magnitude specification you provide in the input arguments. magunits can be one of
linear — specify the magnitude in linear units
dB — specify the magnitude in dB (decibels)
squared — specify the magnitude in power units
When you omit the magunits argument, fdesign assumes that all magnitudes are in decibels. Note that fdesign stores all magnitude specifications in decibels (converting to decibels when necessary) regardless of how you specify the magnitudes.
These examples how to construct a highpass filter specification object. First, create a default specifications object without using input arguments.
d=fdesign.highpass
d =
Response: 'Minimum-order highpass'
Specification: 'Fst,Fp,Ast,Ap'
Description: {4x1 cell}
NormalizedFrequency: true
Fstop: 0.4500
Fpass: 0.5500
Astop: 60
Apass: 1This time, pass the specifications that correspond to the default Specification string.
hs = fdesign.highpass(.4,.5,80,1);
hs =
Response: 'Minimum-order highpass'
Specification: 'Fst,Fp,Ast,Ap'
Description: {4x1 cell}
NormalizedFrequency: true
Fstop: 0.4000
Fpass: 0.5000
Astop: 80
Apass: 1Now create an object by passing a specification type string 'n,fc' — the resulting object uses default values for n and fc.
d=fdesign.highpass('n,fc')
d =
Response: 'Highpass with cutoff'
Specification: 'N,Fc'
Description: {2x1 cell}
NormalizedFrequency: true
FilterOrder: 10
Fcutoff: 0.5000Create the same filter, passing the values for n and fc rather than accepting the default values. Notice that you can add include the sampling frequency fs as the final input argument. Adding fs puts all the frequency specifications into linear frequency format, rather than normalized frequency.
d=fdesign.highpass('n,fc',10,9600,48000)
d =
Response: 'Highpass with cutoff'
Specification: 'N,Fc'
Description: {2x1 cell}
NormalizedFrequency: false
Fs: 48000
FilterOrder: 10
Fcutoff: 9600Finally, pass values for the filter specifications that match the default Specification string — fp = 10, fst = 12, ast = 80 and ap = 0.5. Add the sampling frequency on the end.
d=fdesign.highpass(10,12,80,0.5,48000)
d =
Response: 'Minimum-order highpass'
Specification: 'Fst,Fp,Ast,Ap'
Description: {4x1 cell}
NormalizedFrequency: false
Fs: 48000
Fstop: 10
Fpass: 12
Astop: 80To demonstrate the magunits input option, pass the magnitude specifications in squared units and include the squared input argument for magunits.
hs = fdesign.highpass(.4, .5, .02, .98, 'squared'); hd = cheby1(hs); fvtool(hd,'MagnitudeDisplay','Magnitude Squared');
The following figure shows the filter response.

fdesign, fdesign.bandpass, fdesign.bandstop, fdesign.lowpass
| fdesign.halfband | fdesign.hilbert | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments