Differentiator Filter Design

Differentiators separate the frequency components of a signal into magnitude and phase and shift the phase by a constant 90 degrees while modifying the magnitude by a variable gain proportional to the frequency. They are commonly used in motion control systems. Differentiators ideally treat the entire spectrum as a single ramp band, although adding unspecified transition bands at the low or high end of the spectrum may improve fit. Differentiators are characterized by the limits and characteristics of the ramp band and by a few overall characteristics.

A ramp band is a special kind of pass band over which the magnitude of the gain varies linearly. A ramp band is characterized by its frequency limits, the desired gain at each limit and the ripple value. The ripple measures the maximum desired deviation from the desired gain; it is a constant percentage of the desired gain (i.e., a constant in dB referenced to the gain) but of course its magnitude varies as the desired gain increases or decreases. For a full-spectrum differentiator, the ramp band begins at DC (0 Hz); its left gain should be 0 and the right gain and ripple are specified according to application requirements.

In addition to the limits and characteristics of each band, an FIR filter design depends on the sampling frequency of the input data. In fact, the usable frequency range is between DC (0 Hz) and half the sampling frequency, which is called the folding frequency. A filter designed for data sampled at one frequency will not behave the same with data sampled at a different rate: the band characteristics remain the same, but the band limits change proportionally with the change in sampling frequency.

Two additional characteristics of an FIR filter are its length and symmetry. The length refers to the number of “taps” or coefficients; increasing the length generally improves the fit at the expense of design speed, execution speed and sample delay. Even length and odd length filters display significantly different behavior. Filter symmetry (even, odd or none) refers to the symmetry of the coefficients and is independent of the evenness or oddness of filter length, although there is some interplay between the two characteristics.

Differentiators are typically designed to have odd symmetry and even length. Odd symmetry is required to produce the 90 degree phase shift. Even length is generally preferred since the folding frequency response can have a non-zero gain, although odd length may be preferred to guarantee integer sample delays.

As an example, consider the following differentiator designed with odd symmetry and a sampling frequency of 10 KHz:

Type Start Freq Stop Freq Left Gain Right Gain Ripple
Ramp 0 KHz 5 KHz 0 1 0.1

When this filter is generated with 4 taps, the coefficients and frequency response amplitude graph are as follows:

Taps:

-0.0416407
0.416727
-0.416727
0.0416407
App7.jpg

If you need to design a differentiator filter, please contact us today!