fdesign.differentiator - Differentiator filter specification object

Syntax

d = fdesign.differentiator
d = fdesign.differentiator(spec)
d = fdesign.differentiator(spec,specvalue1,specvalue2, ...)
d = fdesign.differentiator(specvalue1)
d = fdesign.differentiator(...,fs)
d = fdesign.differentiator(...,magunits)

Description

d = fdesign.differentiator constructs a default differentiator filter designer d with the filter order set to 31.

d = fdesign.differentiator(spec) initializes the filter designer Specification property to spec. You provide one of the following strings as input to replace spec. The string you provide is not case sensitive:

The string entries are defined as follows:

By default, fdesign.differentiator assumes that all frequency specifications are provided in normalized frequency units. Also, decibels is the default for all magnitude specifications.

Different specification strings may have different design methods available. Use designmethods(d) to get a list of the design methods available for a given specification string.

d = fdesign.differentiator(spec,specvalue1,specvalue2, ...) initializes the filter designer specifications in spec with specvalue1, specvalue2, and so on. To get a description of the specifications specvalue1, specvalue2, and more, enter

get(d,'description')

at the Command prompt.

d = fdesign.differentiator(specvalue1) assumes the default specification string n, setting the filter order to the value you provide.

d = fdesign.differentiator(...,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.differentiator(...,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

The toolbox lets you design a range of differentiators. These examples present a few possible designs. The first example designs a 33rd-order full band differentiator. The FVTool plot following the code shows the resulting 33rd-order filter.

d = fdesign.differentiator(33); % Filter order is 33.
designmethods(d);

hd = design(d,'firls');
fvtool(hd,'magnitudedisplay','zero-phase',...
'frequencyrange','[-pi, pi)')

Design Methods for class fdesign.differentiator (N):

equiripple
firls

For the second example, design a narrow band differentiator. Differentiate the first 25 percent of the frequencies in the Nyquist range and filter the higher frequencies.

d = fdesign.differentiator('n,fp,fst',54,.25,.3);
designmethods(d);
hd = design(d,'equiripple'); 
fvtool(hd,'magnitudedisplay','zero-phase');
set(hf,'frequencyrange','[-fs/2, fs/2)')

Here is the view from FVTool.

Finally, design a minimum-order, wide-band differentiator.

d = fdesign.differentiator('fp,fst,ap,ast',.8,.9,1,80);
designmethods(d);
hd = design(d,'equiripple'); 
fvtool(hd,'magnitudedisplay','zero-phase','frequencyrange')

FVTool returns this plot.

See Also

design, fdesign, setspecs

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS