z^-1
is a single (one sample) delay, z
is a single sample in the future. Thus, the filter output on sample i
depends on the input samples at i-1
and i+1
. (In general, you might think that z^-n
is the delay for fetching n.)
If you have samples in the time domain in the input buffer x[]
, and you want to filter these samples in the output buffer y[]
, then you implement this transfer function as follows:
y[i] = x[i+1] - x[i-1]
eg. in C, you can process a buffer of N samples as follows:
for (i = 1; i < N - 1; ++i) { y[i] = x[i + 1] - x[i - 1]; }
This is a very simple non-recursive high-pass filter of the first order - it has zeros at +1 and -1, so the amplitude response is zero at DC (0) and in Nyquist (Fs / 2), and these are peaks at Fs / 4. Thus, it is a very wide bandpass filter.
source share