DSPRelated.com
Free Books

Digital Differentiator Design

We saw the ideal digital differentiator frequency response in Fig.8.1, where it was noted that the discontinuity in the response at $ \omega=\pm\pi$ made an ideal design unrealizable (infinite order). Fortunately, such a design is not even needed in practice, since there is invariably a guard band between the highest supported frequency $ f_{\mbox{\tiny max}}$ and half the sampling rate $ f_s/2$.

Figure 8.2: FIR differentiator designed by the matlab function invfreqz (Octave). Top: Overlay of the ideal amplitude response ($ \vert j2\pi f\vert$), fitted filter amplitude response, and guard-band limit (at 20 kHz). Bottom: Overlay of ideal phase response ($ \pi /2$ radians), fitted filter phase response, and guard-band limit (20 kHz).
\includegraphics[width=\twidth]{eps/iirdiff-mag-phs-N0-M10}

Figure 8.2 illustrates a more practical design specification for the digital differentiator as well as the performance of a tenth-order FIR fit using invfreqz (which minimizes equation error) in Octave.9.12 The weight function passed to invfreqz was 1 from 0 to 20 kHz, and zero from 20 kHz to half the sampling rate (24 kHz). Notice how, as a result, the amplitude response follows that of the ideal differentiator until 20 kHz, after which it rolls down to a gain of 0 at 24 kHz, as it must (see Fig.8.1). Higher order fits yield better results. Using poles can further improve the results, but the filter should be checked for stability since invfreqz designs filters in the frequency domain and does not enforce stability.9.13


Next Section:
Fitting Filters to Measured Amplitude Responses
Previous Section:
Digital Filter Design Overview