fdesign.highpass

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Highpass filter specification object

Syntax

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)

Description

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.

The string entries are defined as follows:

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

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.

Examples

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: 1

This 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: 1

Now 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.5000

Create 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: 9600

Finally, 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: 80

To 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.

See Also

fdesign, fdesign.bandpass, fdesign.bandstop, fdesign.lowpass

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here