Compensate for FIR filter attenuation Is there a simple way to compensate for the reduction in amplitude of a low pass filter of a noisy sine wave signal that has been smoothed using a FIR filter so that the amplitude of the smoothed sine wave matches that of the approximately known amplitude of the noisy original signal? The approximate amplitude of the original data could be estimated empirically from the RMS value over one full (estimated) period. The FIR filter coefficients I am using are 

h = [ 1 2 3 3 2 1 ] / 12
FIR definition:

$$ y[n] = \sum_{k=0}^{N} { b_k x[n-k] }  $$

Sinusoid signal definition:

$$ x[n] = M \cos( \alpha n + \phi ) $$

A whole bunch of math:

$$ y[n] = M \sum_{k=0}^{N} { b_k \cos( \alpha (n-k) + \phi ) }  $$

$$ y[n] = M \sum_{k=0}^{N} { b_k [  \cos( \alpha n + \phi ) \cos( \alpha k ) + \sin( \alpha n + \phi ) \sin( \alpha k ) ] }  $$

$$ y[n] = M \cos( \alpha n + \phi ) \sum_{k=0}^{N} { b_k  \cos( \alpha k ) } + M \sin( \alpha n + \phi ) \sum_{k=0}^{N} { b_k \sin( \alpha k ) }  $$

$$ y[n] = A \cos( \alpha n + \phi ) + B  \sin( \alpha n + \phi )  $$

$$ A = M  \sum_{k=0}^{N} { b_k  \cos( \alpha k ) } $$

$$ B = M  \sum_{k=0}^{N} { b_k  \sin( \alpha k ) } $$

$$ y[n] = M_2 \cos( \alpha n + \phi + \theta ) $$

$$ y[n] = M_2 \cos( \theta ) \cos( \alpha n + \phi ) - M_2 \sin( \theta ) \sin( \alpha n  + \phi ) $$

$$ A = M_2 \cos( \theta ) $$

$$ B = -M_2 \sin( \theta ) $$

$$ A^2 + B^2 = M_2^2 = M^2 \left[ \left( \sum_{k=0}^{N} { b_k \cos( \alpha k ) } \right)^2 + \left( \sum_{k=0}^{N} { b_k \sin( \alpha k ) } \right)^2 \right] $$

Your desired equation:

$$ \frac{M}{M_2} = \frac{ 1 }{ \sqrt{ \left( \sum_{k=0}^{N} { b_k \cos( \alpha k ) } \right)^2 + \left( \sum_{k=0}^{N} { b_k \sin( \alpha k ) } \right)^2 } } $$

I think I've done the math right.  The $b_k$s are your FIR coefficients and $\alpha$ is your frequency in radians per sample.  $M_2$ is the amplitude of your smoothed sinusoid and $M$ is the original amplitude.

So you want multiply your smoothed results by $ \frac{M}{M_2} $.

Hope this helps.  I just did this and haven't tested it.

Ced