Filters - Hilbert Transform and Absolute Value of Magnitude Response Following relationship between magnitude response and phase response for minimum phase:



I have implemented in C++ code using the Hilbert Transform C code from file found online ht.c. However, I am not getting the phase response as expected. My magnitude response follows raised cosine formula:


Essentially I provide $|H(j\omega)| = \text{Gain}(f)$ to be all real values as per this cosine formula. The phase response is not as expected. Also, how am I suppose to handle $\log(|H(i\omega)|)$ when $|H(i\omega)| = 0$? Am I missing any steps to obtain phase response in this process?

Here is how phase and magnitude response should look like:
Neb, i dunno where you got that frequency response expression from, but it's flawed.  from the description (of parameters like $W$ in "octaves"), it should be like this:

$$ Gain(f) = \begin{cases}
10^{Boost/20} \times \frac{1}{2}\left\{1 + \cos\left(\pi \frac{\log_2(f/F_c)}{W} \right) \right\}, &amp; \text{if }|\log_2(f/F_c)|&lt;W \\
0, &amp; \text{otherwise } \end{cases} $$