Hello Vu & Paul,
< I took a brief look at the Vaidyanathan.paper and although the decimation process seems clear enough, the 'interpolation' and recombination might differ from straight addition of the three components, in which case the conclusion here about the need for an exra term might not apply. >
I believe I have the result corresponding to the expression containing sinc functions shown in Vu's last comment. (the OP expression). And I believe that for N = 3 and larger, that expression is incorrect, hence Paul's result. I use cap Delta --> ts (sampling time) , N*delta --> Nts and f(t) --> y(t) below.
All sums over n run from -inf to inf.
The expression is, for known sample values of y,y',y''.
[ y(n*Nts) + y'(n*Nts)*(t-n*Nts) + ( z + y''(n*Nts) )*(t-n*Nts)^2/2 ]
but z represents a missing term which is
and involves known values of y, not of y''. Once that is included the results look fairly good.
To simplify things, for both the signal and all sinc functions I used functions all of whose fourier transfoms are in the same interval, -f0<=f<=f0, which I will call condition F. Using different frequency intervals for the signal and for the sinc functions probably works in some circumstances but could be an additional complication.
Hand waving here, but If
transform of t^p*sinc(a*t) is in -f0<=f<=f0 condition F
transform of (t^p*sinc(a*t))^q is in -q*f0<=f<=q*f0
transform of (t^p*sinc(a*t/q))^q is in -f0<=f<=f0 back to condition F
So the arguments of sinc() are adjusted accordingly to compensate. (This happens automatically in the OP expression by having Nts in the denominator of the sinc argument).
I didn't really doubt Paul's results with symbolics but I wanted to do things differently for comparison so the calculation is strictly numeric, including calculation of y' and y'' for the input signal.
If lots of terms are used in the summation (nmax below) then eventually the sampling points extend beyond the time window. When that happens the results go bad, probably due to an aliasing effect that I have not tried to figure out. The code keeps the o's within the window.
A derivation of the z term is shown below the plots, with code after that. I don't want to write an essay here, but since people have been referring to published results I'll take up more space than usual.
To start, for N=1 let ts be the sampling interval, and let u0(t) be a continuous function whose transform satisfies condition F above and for which
u0(0) = 1 u0(n*ts) = 0 n ~=0
or which is the same thing, u0 has the orthogonality property
u0((m-n)*ts) = delta(m,n) (1)
Create a continuous function using known values at the sampling points
y(t) = sum{n} y(n*ts)*u0(t-n*ts)
Evaluate this @ t = m*ts, and with (1) show that y(m*ts) = y(m*ts), equal on both sides, which proves the sampling theorem. Here
u0(t) = sin(pi*t/ts)/(pi*t/ts) = sinc(t/ts)
works, with the Nyquist condition
(I wish that the nomenclature sinc(x) = sin(pi*x)/(pi*x) had not taken over because the mathematical definition sinc(x) = sin(x)/x predates the signal processing definition, but that's the way it goes).
Now for N = 3, denote
N*ts = Nts
and suppose there are three functions (shown on the right) that all meet condition F and for which
u0((m-n)*Nts) = delta(m,n) u0(t) = sinc(t/Nts)^3
u1'((m-n)*Nts) = delta(m,n) u1(t) = t*sinc(t/Nts)^3
u2''((m-n)*Nts) = delta(m,n) u2(t) = (t^2/2)*sinc(t/Nts)^3
As mentioned before, in order to to stay with condition F, sinc(t/Nts)^3 undersamples the signal by a factor N=3. But this is made up by the conditions on y and y'.
for u0 , evaluating @ t = m*Nts similarly to what was done before,
y(t) = sum{n} y(n*Nts)*u0(t-n*Nts) --> y(m*Nts) = y(m*Nts)
since u0 meets the orthogonality property
For the others,take derivatives, evaluate @ t = m*Nts
y(t) = sum{n} y'(n*Nts)* u1(t-n*Nts)
y'(t) = sum{n} y'(n*Nts)*u1'(t-n*Nts) --> y'(m*Nts) = y'(m*Nts)
since u1' meets the orthogonality property
y(t) = sum{n} y''(n*Nts)* u2(t-n*Nts)
y''(t) = sum{n} y''(n*Nts)*u2''(t-n*Nts) --> y''(m*Nts) = y''(m*Nts)
since u2'' meets the orthogonality property
These all match up, so the function that is the sum of these three,
y(t) = sum{n} [ (y(n*Nts)*u0(t-n*Nts) + y'(n*Nts)*u1(t-n*Nts) + y''(n*Nts)*u2(t-n*Nts) ]
as in the OP expression, works. Except that it doesn't. The problem is that you have to look at y and its derivatives etc. after the sum of the three is done. For example,
y''(t) = sum{n} [(y(n*Nts)*u0''(t-n*Nts)+ y'(n*Nts)*u1''(t-n*Nts) + y''(n*Nts)*u2''(t-n*Nts)]
and this will only work if u0'' = u1'' = 0 for all sample points. The same considerations apply to the y(t) and y'(t) equations, and overall what is needed is for all the 'nondiagonal' contributions
u0' = u0'' = u1 = u1'' = u2 = u2' = 0
for all sample points. As it turns out all of these are 0 except for u0'' which as you can check is
u0''(0) = -A u0''(n*Nts) = 0 n ~=0 where A has the value (pi/Nts)^2
which is the same thing as the orthogonality relation
u0''((m-n)*Nts) = -A*delta(m,n)
Therefore evaluating (5) @ t = m*Nts gives an extra unwanted term:
y''(m*Nts) = -A*y(m*Tns) + y''(m*Nts) ?
However this can be canceled out by introducing an extra term into (4) of
z*u2(t-n*Nts) = [A*y(n*Tns)]*u2(t-n*Nts)
(which does not interfere with anything else since u2 = u2' = 0 at at all sampling points). This is the z term which gives the correct result for y''. Since
u2(t-n*Nts) = ((t-n*Nts)^2/2)*sinc((t-n*Nts)/Nts)^3,
this jibes with the rewrite of the OP expression at the top of this answer.
[tmat nNmat] = meshgrid(t,n*Nts);
u0 = sinc((tmat-nNmat)/Nts);
figure(14); subplot(2,1,1)
plot(n*Nts,yn0,'o',t,y,t,yr)
legend('sample points', 'y','yr')
title(['N = ' num2str(N)])
precis = [precis; max(abs(y-yr))];
yn1 = spline(t,y1,n*Nts);
[tmat nNmat] = meshgrid(t,n*Nts);
u0 = sinc((tmat-nNmat)/Nts).^2;
u1 = (tmat-nNmat).*sinc((tmat-nNmat)/Nts).^2;
yr = sum(yn0.*u0 + yn1.*u1);
figure(14); subplot(2,1,2)
plot(n*Nts,yn0,'o',t,y,t,yr)
legend('sample points', 'y','yr')
title(['N = ' num2str(N)])
precis = [precis; max(abs(y-yr))];
yn1 = spline(t,y1,n*Nts);
yn2 = spline(t,y2,n*Nts);
[tmat nNmat] = meshgrid(t,n*Nts);
u0 = sinc((tmat-nNmat)/Nts).^3;
u1 = (tmat-nNmat).*sinc((tmat-nNmat)/Nts).^3;
u2 = ((tmat-nNmat).^2/2).*sinc((tmat-nNmat)/Nts).^3;
yrwith = sum(yn0.*u0 + yn1.*u1 +(yn2 + (pi/Nts)^2*yn0).*u2);
yrwithout = sum(yn0.*u0 + yn1.*u1 +(yn2 + 0 ).*u2);
figure(16); subplot(2,1,1)
plot(n*Nts,yn0,'o',t,y,t,yrwith)
legend('sample points', 'y','yr')
title(['N = ' num2str(N) ' wih ''z'' term'])
figure(16); subplot(2,1,2)
plot(n*Nts,yn0,'o',t,y,t,yrwithout)
legend('sample points', 'y','yr')
title(['N = ' num2str(N) ' without ''z'' term'])
precis = [precis; max(abs(y-yr))]
function dydx = splinder(x,y,x1)
if nargin == 2; x1 = x; end;
[brk,c] = unmkpp(spline(x,y));
c(:,k) = (ncol-k)*c(:,k);
if nargin == 2 & length(x) >=4
lastone = polyval(c(end,:),brk(end)-brk(end-1));
dydx = [c(:,end); lastone] ;
dydx = ppval(mkpp(brk,c),x1);