A smoothed differentiation filter (digital differentiator).
Such a filter has the following advantages:
First, the filter involves both the smoothing operation and differentation operation. It can be regarded as a low-pass differention filter (digital differentiator). It is well known that the common differentiation operation amplifies the high-frequency noises.Therefore, the smoothded differentiation filter would be valuable in experimental (noisy) data processing.
Secondly, the filter coefficients are all convenient integers (simple units) except for an integer scaling factor, as may be especially significant in some applications such as those in some single-chip microcomputers or digital signal processors.
n: filter length (positive integer larger no less than 2)
h: filter coefficients (anti-symmetry)
Jianwen Luo <email@example.com, firstname.lastname@example.org> 2004-11-02
Department of Biomedical Engineering, Department of Electrical Engineering
Tsinghua University, Beijing 100084, P. R. China
Usui, S.; Amidror, I.,
Digital Low-Pass Differentiation for Biological Signal-Processing.
IEEE Transactions on Biomedical Engineering 1982, 29, (10), 686-693.
Luo, J. W.; Bai, J.; He, P.; Ying, K.,
Axial strain calculation using a low-pass digital differentiator in ultrasound elastography.
IEEE Transactions on Ultrasonics Ferroelectrics and Frequency Control 2004, 51, (9), 1119-1127.
A generalized framework called MaxPol has been recently published and made available here
MaxPol provides a framework to design variety of numerical differentiation kernels with properties like:
(1) Cutoff (lowpass) design with no side-lob artifacts (for noise-robust case)
(2) Arbitrary order of differentiation
(3) Arbitrary polynomial accuracy
(4) Derivative matrix design
(5) 2D Derivative Kernels with Steering moments
(6) Intuitive examples in Signal and Image processing
The only thing to be cautious about is that here a sample distance of one is assumed. To use this function with a different sample distance, you have to mutiply the result of the derivation with your sample rate. Apart from this little thing it's a perfect and very, very useful function.
Jianwen Luo: I have go through this m.file. This is a nice work and good reference to me but I really want to know how I can find the maximum and minimum peak from this graph?I want to use [pks locs]=peakfind() but I do not know how to manipulate it. I need your help.
Can you also draw the bode plot of the differentiator as a transfer function.
[h, w] = freqz(h);
plot(w/pi*30, (abs(h)), 'r-');
This doesn't seem like a differentiator.
This is a very handy tool for differentiating signals eliminating the common problem of spikey differentials due to suble noise fluctuations in the signal