# Raised-Cosine Filter - calculating phase response

I want to compute phase response of an raised-cosine FIR filter. I have trouble finding the complex transfer function of the filter in literature (there is a real valued transfer function of frequency).

I have found formula for magnitude for raised-cosine filter (paper “Raised Cosine Equalization Utilizing Log Scale Filter Synthesis”, D. McGrath, J. Baird, B. Jackson) but there is no mention of phase response. I have read the IEEE paper “Generalized Raised-Cosine Filters” by N. S. Alagha, P. Kabal, but did not find the clear way how to calculate the phase response. In the first mentioned paper the phase is not linear and it's said that it is minimum phase filter. Here is the plot from McGrath at al. paper, page 8:

What is the way to calculate phase response for an raised-cosine FIR filter? I don't want to use MATLAB, I need to implement the solution in C++.

• At the risk of stating the obvious, whether you are working with an IIR or FIR filter, you can compute the filter's phase reponse by simply running an impulse through the filter and doing an FFT of the output. Of course, with an FIR filter, the output will simply be the FIR coefficients. – user5108_Dan Jun 21 '15 at 11:16
• @Nebojsa: If MBaz's answer is good, please accept it. If it's not, please add more information about what you're looking for. – Peter K. Oct 21 '15 at 15:25
• @PeterK.I answered the question. The phase is calculated via Hilbert transform of magnitude. – Nebojsa Oct 22 '15 at 11:55

## 2 Answers

Just like the sinc pulse, a raised cosine pulse with zero delay (centered around $t=0$) has a real Fourier transform. You can find its expression in section 11.4 of "Telecommunications Breakdown" by Johnson and Sethares (a free draft version is available here).

For a time-shifted pulse, you can apply the time-shift property of the Fourier Transform.

• In the book you suggested (section 11.4) I have found the expression for transfer function H(f). But it looks to me it's a real and not complex function, of f. How I can compute phase if there is only a real part of transfer function? Maybe I am missing something. – Nebojsa Jun 19 '15 at 15:20
• @Nebojsa: The phase is zero in that case. If you shift the pulse to make it causal, you effectively add a linear phase $\phi(\omega)=-\omega T$, where $T$ is the delay. – Matt L. Jun 19 '15 at 15:51
• @MattL. What is the relationship between order of the filter and group delay T? If magnitude formula does not depend on order of the filter, how the order enters filter design? – Nebojsa Jun 22 '15 at 18:24
• @Nebojsa: For a linear phase filter with filter order $N$, the delay equals $N/2$. Note that the filter length (number of coefficients) is $N+1$. – Matt L. Jun 22 '15 at 18:48
• @MattL.Thanks. I know the role of number of taps when designing FIR filter using Parks-McClellan or frequency sampling method. But, how I use the number of taps (or filter order) when designing Raised-Cosine filter? I am aware of magnitude formula, it does not depend on order, so where the order figures in RC filter design? – Nebojsa Jun 22 '15 at 19:05

Phase of raised-cosine filter is calculated by taking Hilbert transform of magnitude as defined in this question: Hilbert Transform, filters - two different phase graphs