Root Raised Cosine Filter

From GNU Radio
Revision as of 16:11, 4 March 2021 by Duggabe (talk | contribs) (add example flowgraph)
Jump to: navigation, search

The most common usage documented in the tutorials and examples is:

firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), 0.35, 11*sps*nfilts)

       self.rrc_taps = filter.firdes.root_raised_cosine(
           nfilts,          # gain
           nfilts,          # sampling rate based on 32 filters in resampler
           1.0,             # symbol rate
           self._excess_bw, # excess bandwidth (roll-off factor)


Note the sampling rate is not the sample_rate in the .grc file

Numerous block diagrams in this wiki use this block, unfortunately none of those examples include a .grc file so their usage is a mystery. However, the above form us used in the PSK tutorial and several other tutorials and examples. I could not find nor create a working example that conforms to the next section. Discussion from someone else's attempt:

Another common usage is:

taps = filter.firdes.root_raised_cosine(nfilts, nfilts * sps, 1.0, excess_bw, 11*sps*nfilts)

as in

This filter is a convenience wrapper for an fir filter and a firdes taps generating function.


(R): Run-time adjustable

Description of parameter, provide any tips or recommended values. Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
Gain (R)
Overall gain of filter (typically 1.0)
Sample Rate (R)
Sample rate in Hertz.
Symbol Rate (R)
Symbol rate, must be a factor of sample rate
Alpha (R)
Excess bandwidth factor
Num Taps (R)
Number of taps

Example Flowgraph

This flowgraph can be found at [1]. Two Root Raised Cosine Filters in series produce a Raised Cosine Filter which is used for keying waveform shaping, thereby reducing key clicks.

MorseGen xmt fg.png

Source Files

C++ files
Header files
Public header files
Taps creation
Filter definition
Block definition