Sign in

Not a member? | Forgot your Password?

Search blogs

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction

Articles by category

IIR Filter Design Software

See Also

Embedded SystemsFPGA

Blogs > Rick Lyons > A Differentiator With a Difference

Rick Lyons (contact)
Richard Lyons is a Contracting Systems Engineer and Lecturer at Besser Associates, Mountain View, Calif. He has written over 30 articles and conference papers on DSP top...show full bio

Would you like to be notified by email when Rick Lyons publishes a new blog?

  




Pageviews: 2148

A Differentiator With a Difference

Posted by Rick Lyons on Nov 3 2007 under Tips and Tricks   

Some time ago I was studying various digital differentiating networks, i.e., networks that approximate the process of taking the derivative of a discrete time-domain sequence. By "studying" I mean that I was experimenting with various differentiating filter coefficients, and I discovered a computationally-efficient digital differentiator. A differentiator that, for low fequency signals, has the power of George Foreman's right hand! Before I describe this differentiator, let's review a few fundamentals of simple digital differentiators.

Digital Differentiation

While the idea of differentiation is well-defined in the world of continuous signals, the notion of differentiation is not well defined for discrete signals. However, fortunately we can approximate the calculus of a derivative operation in the domain of discrete signals. (While DSP purists prefer to use the terminology digital differencer, here I'll use the phrase differentiator.) To briefly review the notion of differentiation, think about a continuous sinewave, whose frequency is ω radians/second, represented by

(1)

The derivative of that sinewave is


(2)

So the derivative of a sinewave is a cosine wave whose amplitude is proportional to the original x(t) sinewave's frequency. Equation (2) tells us that an ideal differentiator's frequency magnitude response is a straight line increasing with frequency ω. With that thought in mind, I'll now mention two common discrete-time FIR (nonrecursive) differentiators: a first-difference and a central-difference differentiator. They are computationally simple schemes for estimating the derivative of a digital x(n) time-domain signal sequence with respect to time.

The first-difference differentiator, the simple process of computing the difference between successive x(n) signal samples, is defined in the time domain by


(3)

The frequency magnitude response of that differentiator is the dashed |Hfd(ω)| curve in Figure 1(a). (For comparison reasons, I also show an ideal differentiator's straight-line |Hideal(ω)| = ωmagnitude response in Figure 1(a). The frequency axis in that figure covers the positive frequency range 0 ≤ω≤ π samples/radian, corresponding to a cyclic frequency range of 0 to fs/2, where fs is the x(n) sample rate in Hz.) Equation (3) is sweet in its simplicity but unfortunately its |Hfd(ω)| tends to amplify high-frequency noise that often contaminates real-world signals. For that reason the central-difference differentiator is often used in practice.

The time-domain expression of the central-difference differentiator is

(4)

The central-difference differentiator's frequency magnitude response is the dotted |Hcd(ω)| curve in Figure 1(a). The price we pay for |Hcd(ω)|'s desirable high-frequency (noise) attenuation is that its frequency range of linear operation is only from zero to roughly ω = 0.16π samples/radian (0.08fs Hz) which is, unfortunately, less than the frequency range of linear operation of the first-difference differentiator.

Here's the Beef

Now, ... for the computationally-efficient differentiator that maintains the central-difference differentiator's beneficial high-frequency attenuation behavior, but extends its frequency range of linear operation. The differentiator that I'm promoting is defined by


(5)

This novel differentiator's normalized magnitude response is the solid |Hdif(ω)| curve in Figure 1(a), where we see that its frequency range of linear operation extends from zero to approximately ω= 0.34π samples/radian (0.17fs Hz). The ydif(n) differentiator is twice the usable frequency range of the central-difference differentiator.

The implementation of the ydif(n) differentiator is shown in Figure 1(b) where a delay block comprises two unit delays. The folded-FIR block diagram for this differentiator is presented in Figure 1(c) where only a single multiply need be performed per ydif(n) output sample. The really slick aspect of the ydif(n) differentiator is that its non-unity coefficients (±1/16) are integer powers of two. This means that a multiplication in Figure 1 can be implemented with an arithmetic right shift by four bits. Happily, such a binary right-shift implementation is a linear-phase multiplierless differentiator!

 

Efficient differentiator: (a) performance; (b) standard block diagram; (c) folded block diagram.


Figure 1: Efficient differentiator: (a) performance; (b) standard block diagram; (c) folded block diagram.

Another valuable feature of the Equation (5) ydif(n) differentiator is that its time delay (group delay) is exactly three sample periods (3/fs). Having a delay that's an integer number of samples makes this differentiator convenient when the differentiator's output must be synchronized with other time-domain sequences, such as for use with popular FM demodulation methods.

 

Copyright © 2007, Richard Lyons, All Rights Reserved



Rate this article:
4.715
Rating: 4.72 | Votes: 7
 
   
 
posted by Rick Lyons
Richard Lyons is a Contracting Systems Engineer and Lecturer at Besser Associates, Mountain View, Calif. He has written over 30 articles and conference papers on DSP topics, and authored Amazon.com's top selling DSP book "Understanding Digital Signal Processing, 3rd Ed.". He served as an Associate Editor at IEEE Signal Processing Magazine, for nine years, where he created and edited the "DSP Tips & Tricks" column. Lyons is the editor of, and contributor to, the book "Streamlining Digital Signal Processing-A Tricks of the Trade Guidebook, 2nd Ed." (Wiley & Sons, 2012).

Next post by Rick Lyons: Spectral Flipping Around Signal Center Frequency
all articles by Rick Lyons

Comments / Replies


nithinbaburaj
Said:
this is really simple to understand and i really apreciate the way you have put things...i think i almost grabbed most of it..
7 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
Sorry, you need javascript enabled to post any comments.