[PD] derivative function
Charles Henry
czhenry at gmail.com
Wed Jun 28 01:48:01 CEST 2006
> > is there an "ideal" derivator? or I am say something totally wrong?
> Nope, there's not an "ideal" differentiator.
I take that back....I wrote too hastily. There is an ideal
differentiator, related to the ideal interpolator.
For ideal interpolation, we have to have an infinitely long signal.
We have a function defined on the set of real numbers to the set of
real numbers, for instance.
The Whittaker Cardinal function is the ideal interpolator. If we have
a signal that is band-limited in the frequency domain, we can choose a
sinc(k*t) for some k, that contains the frequency bands, we have in
our function. sinc(x) = sin(pi*x)/pi*x
For simplicity sake, we'll assume that our frequency spectrum is
limited to (-1/2,1/2)...Then, we choose k=1 (this is a related bit to
the sampling theorem, just replace k with fs, and (-fs/2,fs/2).
And we sample our function at the integers, -inf, ... -2, -1, 0, 1, 2, ..., inf
The Whittaker Cardinal function is
f(t) = sum( i= -inf to inf, f(i)*sinc(i-t) )
Also, this can be written as a convolution
f(t) = sinc(t) -conv-with- sum( i= -inf to inf, f(i)*delta(t-i))
and the result is *exactly* the function we started with!
and we can differentiate this function:
d/dt (sin (pi*t) / (pi*t)) = ((pi*t)*cos(pi*t) - sin(pi*t) )/ (pi*t^2)
and, when we take this function and convolve it with our sampled
function values, we get the derivative of the sampled function. There
is a problem, here, namely that the sequence we need to convolve by is
infinitely long....so, there's a problem....
but, we can truncate the series to as many samples as we need. For
example, a length 11 sequence is:
(-1/5 1/4 -1/3 1/2 -1 0 1 -1/2 1/3 -1/4 1/5)*fs
I'm not sure if I've done something wrong here, yet. Anyway, all of
your great mathematicians just made it up as they went along, right?
Chuck
More information about the Pd-list
mailing list