I have to subtract, from a signal x[n], its version filtered thorugh an LPF FIR filter, like this:
xf=filter(h_lpf,1,x); y=x-xf;
How can I remove the group delay introduced by the filter h_lpf into the signal xf?
I know it is equal to $\tau_{grp}=\frac{N-1}{2}$, where N is the number of taps.
In my case N is odd, so $\tau_{grp}$ is an integer.
In this page:
http://it.mathworks.com/help/signal/examples/practical-introduction-to-digital-filtering.html#zmw57dd0e2544
in the section (Compensating for Delay Introduced by Filtering) there's a method, which I here adapt for my case: (note: "x" is the input signal, and D is the group delay):
xf = filter(h_lpf,1,[x zeros(1,D)]); % Append D zeros to the input data xf = xf(D+1:end); % Shift data to compensate for delay y=x-xf;Could anyone explain it to me? Could I use it for my problem?