File Exchange

image thumbnail

Smooth Differentiation

version 1.0 (65.6 KB) by

A smoothed differentiation filter (digital differentiator).

34 Downloads

Updated

No License

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.

Usage:
h=smooth_diff(n)
n: filter length (positive integer larger no less than 2)
h: filter coefficients (anti-symmetry)

Examples:
smooth_demo

Author:
Jianwen Luo <luojw@bme.tsinghua.edu.cn, luojw@ieee.org> 2004-11-02
Department of Biomedical Engineering, Department of Electrical Engineering
Tsinghua University, Beijing 100084, P. R. China

References:
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.

Comments and Ratings (11)

A generalized framework called MaxPol has been recently published and made available here
https://www.mathworks.com/matlabcentral/fileexchange/63294-maxpol-smoothing-and-differentiation-package

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

Lucas Weber

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.

Lucas Weber

UMP

UMP (view profile)

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.

ridzan djafri

Hakan Demir

Can you also draw the bode plot of the differentiator as a transfer function.

figure;
grid;
[h, w] = freqz(h);
plot(w/pi*30, (abs(h)), 'r-');

This doesn't seem like a differentiator.

veera puthiran

Ho Hung-jung

Tomas Ward

Very useful

Martin Ferguson-Pell

This is a very handy tool for differentiating signals eliminating the common problem of spikey differentials due to suble noise fluctuations in the signal

MATLAB Release
MATLAB 6.5.1 (R13SP1)
Acknowledgements

Inspired: Generation of Random Variates

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today