Hilbert Transform from FFT? For a school project, I'm working on a software-defined radio transmitter intended for the HF amateur radio bands. I'm planning to support SSB transmission with the formula

$$f(t) = m(t) \cos(2\pi f_\text{carrier}t) \pm \hat m(t)\sin(2\pi f_\text {carrier}t)$$

where $f_\text{carrier}$ is the IF carrier and $\hat m$ is the Hilbert transform of $m(t)$. Of course, I will use a discrete form of this equation for my implementation, which means I need to calculate the discrete Hilbert transform of $m(t)$.

I've looked around online but can't seem to find a decent C/C++ implementation of the discrete Hilbert transform that would be suitable for my purposes. However, there are plenty of libraries to calculate FFTs.

From my understanding, a discrete Hilbert transform can be calculated by taking the FFT of the signal and multiplying by j to achieve the 90° shift. It suffers from Gibbs' phenomenon, it seems, and might need a wide bandpass filter.

Can anyone tell me if my understanding is correct (or of a good discrete Hilbert transform function)?
I've looked around online but can't seem to find a decent C/C++ implementation of the discrete Hilbert transform that would be suitable for my purposes.


Can't completely agree to that, see links below.

 
So, a hilbert filter generates the analytical signal out of a real signal.

In fact, it's but a complex bandpass filter: It cancels out all the negative frequencies.

There's a lot of ways you can implement that (including GNU Radio's hilbert filter, source code, filter generation code), but you can imagine taking a symmetrical half-band low pass filter, and shifting it up for half the sampling rate, so that its passband now covers the positive frequencies. 

Luckily, half-band filters are easy to produce and to implement; what is often done is that you take a prototype window, interpolate it by a factor 2 (adding zeros between the window taps), and weigh it, for example with 1/n (n=tap distance from center tap). The result works quite fine: