Root_raised_cosine principle

Hi,
I get the source code of root_raised_cosine function in gr_firdes.cc,
but I can’t understand why it writes in that way, is there any paper can
give me more details about the principle of root_raised_cosine
Thank you

this is the source code of root_raised_cosine
vector gr_firdes::root_raised_cosine (double gain,
double sampling_freq,
double symbol_rate,
double alpha,
int ntaps)
{
ntaps |= 1; // ensure that ntaps is odd

double spb = sampling_freq/symbol_rate; // samples per bit/symbol
vector taps(ntaps);
double scale = 0;
for(int i=0;i<ntaps;i++)
{
double x1,x2,x3,num,den;
double xindx = i - ntaps/2;
x1 = M_PI * xindx/spb;
x2 = 4 * alpha * xindx / spb;
x3 = x2x2 - 1;
if( fabs(x3) >= 0.000001 ) // Avoid Rounding errors…
{
if( i != ntaps/2 )
num = cos((1+alpha)x1) + sin((1-alpha)x1)/(4alphaxindx/spb);
else
num = cos((1+alpha)x1) + (1-alpha) * M_PI / (4alpha);
den = x3 * M_PI;
}
else
{
if(alpha==1)
{
taps[i] = -1;
continue;
}
x3 = (1-alpha)x1;
x2 = (1+alpha)x1;
num = (sin(x2)
(1+alpha)M_PI
- cos(x3)
((1-alpha)M_PIspb)/(4
alpha
xindx)
+ sin(x3)spbspb/(4alphaxindx*xindx));
den = -32 * M_PI * alpha * alpha * xindx/spb;
}
taps[i] = 4 * alpha * num / den;
scale += taps[i];
}

for(int i=0;i<ntaps;i++)
taps[i] = taps[i] * gain / scale;

return taps;
}

On 09/01/2014 05:01 PM, adream wrote:

Hi,
I get the source code of root_raised_cosine function in gr_firdes.cc,
but I can’t understand why it writes in that way, is there any paper can
give me more details about the principle of root_raised_cosine

Any standard textbook on digital communications will explain this. You
might want to look out for keywords such as pulse shaping and Nyquist
criterion. Have a look at the wiki page for recommended reading.

M

Please stick to the list.

On 09/01/2014 05:35 PM, adream wrote:

Thanks for your reply
May be I should make my question more specifically,

den = -32 * M_PI * alpha * alpha * xindx/spb;

I can’t understand well why there is “-32”

That I don’t know. Of course, it’s just a gain change, so it won’t
affect the spectral shape.
Perhaps Tom can weigh in here.

M

On Mon, Sep 1, 2014 at 11:50 AM, Martin B. [email protected]
wrote:

That I don’t know. Of course, it’s just a gain change, so it won’t
affect the spectral shape.
Perhaps Tom can weigh in here.

M

I looked at that, and I’m not sure where that 32 came from. This code is
very old, probably back from the late 90’s even. I probably would have
written that a lot differently than the code that’s in there, but I will
say that this code does at least build an RRC filter. Though I’d be
curious
if you could point to the results being (significantly) different given
what you think the filter coefficients given the same parameters should
be.

Tom