# Hilbert transform too large to store (out of core processing)

I have a signal (saved on disk) that I would like to take the Hilbert transform of, but it's too large to fit in memory (all at once). I would like to cut it into blocks and take the transform of each block. I'm not super familiar with the Hilbert transform and I was wondering if there was some sort of padding or windowing that needed to be done / take overlapping chunks.

## 2 Answers

I would use a linear phase FIR Hilbert transformer, and use block processing, such as the overlap-add method. That means that you partition the input signal into contiguous non-overlapping blocks and compute the convolution of each block with your filter impulse response. The results are then overlapped and added. Overlap occurs because the result of the convolution is longer than the input block. E.g., if the impulse response has length $N$ and the blocks have length $L$, the result of the convolution is $N+L-1$, and the last $N-1$ output samples must be added to the first $N-1$ samples of the next output block (assuming that $N<L$, i.e., the output block only overlaps with the next block).

In short:

$$y[n]=\sum_ky_k[n-kL],\qquad y_k[n]=(x_k\star h)[n]$$

where $h[n]$ is the impulse response, $x_k[n]$ is the $k^{th}$ input block, $y_k[n]$ is the convolution of $h[n]$ with $x_k[n]$, and, finally, $y[n]$ is the output signal.

• I didn't know this was what I was looking for, but that's exactly it. Thanks. – Aaron Shifman Feb 28 '17 at 18:03

I am not aware of a block version for a direct implementation. One option could be to have a recursive implementation, from page 245 in Theory and implementation of the discrete Hilbert transform, B. Gold, 1969. It can give you an approximate version of the Hilbert transform, or via FIR approximations, as in On the behavior of minimax FIR digital Hilbert transformers. Related answers could be found on SE.DSP.