I have noticed that all filter taps from the firdes class are normalized by dividing them over the sum of all taps magnitude, as shown in the example below for Gaussian Filter. Is this normalization meant to keep the filter unit energy (or power)? and if that is the case, what is the mathematical justification for doing so in this way?

vector<float> firdes::gaussian(double gain, double spb, double bt, int ntaps)
{
vector<float> taps(ntaps);
double scale = 0;
double dt = 1.0 / spb;
double s = 1.0 / (sqrt(log(2.0)) / (2 * GR_M_PI * bt));
double t0 = -0.5 * ntaps;
double ts;
for (int i = 0; i < ntaps; i++) {
t0++;
ts = s * dt * t0;
taps[i] = exp(-0.5 * ts * ts);
scale += taps[i];
}
for (int i = 0; i < ntaps; i++)
taps[i] = taps[i] / scale * gain;

return taps;
}

• Looks like $0$ dB gain at DC to me. Commented Jul 30, 2021 at 0:43

I have noticed that all filter taps from the firdes class are normalized by dividing them over the sum of all taps magnitude

Not strictly:

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


is not summing over the magnitude, but over the taps.

(doesn't make a difference here, all these taps are positive real numbers, but for other filters it would.)

So, @AndyWalls is right, this is the DC gain, and you're normalizing this low-pass filter to have gain 1 at 0 Hz.

Think about this for a moment: when you feed in a constant streams of "1", what value do you want to get?

• One additional question. I take it the 0 dB gain at DC keeps the amplitude constant? What happens to the output energy per sample? For example, what will be the output power through an SRRC filter (0 dB gain at DC) when the signal is upsampled by a factor of Q? How about downsampling by a factor of P? Commented Aug 4, 2021 at 9:49
• I don't get the question, sorry. If the amplitude is the same, so is the power, since power = amplitude² Commented Aug 4, 2021 at 10:03
• Sorry. I meant energy per symbol. What happens when you insert Q - 1 zero (upsampling) or retaining Pth samples (downsampling)? Commented Aug 4, 2021 at 10:39