Wave Walker DSP

DSP Algorithms for RF Systems

Buy the Book!

Foundations of Digital Signal Processing: Complex Numbers is available Amazon now! Great for young engineers looking for a simple explanation of complex numbers.

Square Root Raised Cosine Filter in Python
November 10, 2021

Table of Contents

Introduction

The square root raised cosine (SRRC) filter is used as a pulse shaping filter [harris2021, p.87] in many linear modulations such as BPSK, QPSK, and 16-QAM. Frustratingly neither SciPy or NumPy have a square-root raised cosine (SRRC) filter. Mathuranathan Viswanathan at GaussianWaves.com has a great post on how to build a square-root raised cosine filter. You can also find the design equations in [johnson2004, p.225, harris2021, p. 95].

I’ve written my own SRRC design script in Python which you can download from the WaveWalkerDSP GitHub page in the Blog Downloads repository.

Check out these other posts on filter design:

Example Square Root Raised Cosine Plots

Figure 1 gives the impulse response for multiple SRRC filters with different SPS (samples per symbol), span (proxy for filter length) and \beta (roll-off factor) values where Figure 2 gives the corresponding frequency response. The figures show that increasing the span for consistent SPS value reduces the sidelobes at the cost of a longer filter, however increasing the SPS reduces the cut-off frequency.

Figure 1: The impulse response for the square root raised cosine filter with different SPS, span and beta values.
Figure 1: The impulse response for the square root raised cosine filter with different SPS, span and beta values.
Figure 2: The frequency responses for three different square root raised cosine filters.
Figure 2: The frequency responses for three different square root raised cosine filters.

Conclusion

The srrcDesign.py file can be downloaded here.

Wondering about how and why the SPS, span and \beta parameters effect the frequency response of the SRRC filters? Be sure to check out the post on low-pass filter design to understand the relationships between filter length, transition bandwidth and sidelobe attenuation.

Check out these other posts on filter design:

Leave a Reply