For discrete time series $Y$, first differentiation ($D_i=Y_i-Y_{i+1}$) and integrator ($S_i=Y_i+Y_{i+1}$) can be defined as two highpass and lowpass LTI digital filters. Where, transfer function for the first difference is: $$ H(z)=1-z^{-1} $$ and for the first integrator is: $$ H(z)=1+z^{-1} $$ These two transfer function corresponds to $\text{Conv}(Y,[1,-1])$ and $\text{Conv}(Y,[1,1])$ for differentiator and integrator, respectively.
I was wondering what the power transfer function of these two filters should be.
I have to add, in terms of implementation in Matlab, I can get $S_i$ and $D_i$ of a white noise by:
Y = randn(1,100);
D = diff(Y);
S = Y(1:end-1)+Y(2:end);
By filter
in Matlab:
S_Filt = filter([1 1],1,Y);
D_Filt = filter([1 -1],1,Y);
Or by convolving conv
the corresponding windows:
S_Conv = conv(Y,[1 1]);
D_Conv = conv(Y,[1 -1]);
Note, all D*
and S*
variables should be identical (regardless of head and tail of time series, of course).
Thanks in advance.
Y=randn(1,100); D=diff(Y); S=Y(1:end-1)+Y(2:end);
and their equivalent filter isS_Filt=filter([1 1],1,Y); D_Filt=filter([1 -1],1,Y);
$\endgroup$x=[-4:0.1:4]; y=x; d=diff(y); s = zeros(1,length(y)); s(1)=y(1); for i=[2:length(y)]; s(i)=s(i-1)+y(i); end; plot(x,s);
Generating s like that, gives me a parabola, as expected. $\endgroup$