How to calculate power of a signal at one specific frequency?

Given a signal, $$s(t)$$, sampled at frequency $$f_s$$, how does one calculate the power of the signal at one specific frequency $$f_q$$? Since I am only interested in the power at $$f_q$$, computing the FFT seems like over kill.

I can identify the following pre-existing content on stackexchange:

1. This post effectively suggests Goetzel's algorithm. There is a pre-existing MATLAB function which appears to provide what's needed.

2. This post suggest band-pass filtering the signal then taking the sum of the squared signal. This seems to make sense to me but I wonder how selective the band-pass filter can actually be given the sync-like frequency content of the windowing function.

3. This post deals with power in a specific signal band with suggestions of using MUSIC, goertzel, etc.

My interest is not in a frequency band but the power at one specific frequency. My thought is to convolve a sinusoid whose frequency is fq with the signal and then summing the power in the resultant signal (a matched filter).

I would have thought there would be a more straightforward solution but I struggle to find the words to start an effective literature review.

• Computing the power at a single frequency means that you assume that the signal has a sinusoidal component at that frequency. For a continuous frequency spectrum (without impulses, i.e, without pure tones), the concept of "power at a given frequency" is meaningless. Jul 27 '20 at 19:12
• I don't understand why you say the concept of "power at a given frequency" is meaningless for a signal with a continuous spectrum. I would take the continuous spectrum and look at the specific frequency in question fq. That has plenty of meaning in my mind? Jul 27 '20 at 19:17
• If you measure the power spectrum of a signal, the total power is given by the integral of the power spectrum over the whole frequency range. The power in a certain frequency band is the integral over that band. If the width of that frequency band goes to zero, so does the power, unless you have a pure tone at that frequency, in which case the power spectrum doesn't have a finite value at that frequency. Jul 27 '20 at 20:32
• That is some interesting insight. I don't think convolving the signal with a sinusoid at the frequency in question will produce zero. Perhaps the result I am thinking of is intensity rather than power. Jul 27 '20 at 22:48

Ultimately if your noise is white then the matched filter would be the best approach (multiply by one frequency and sum-- if it is complex you would multiply by the complex conjugate- both a form of correlation). This is equivalent to computing a single bin in the DFT (assuming your frequency is on bin center, otherwise equivalently the operations in the DFT can be modified to be centered on your particular frequency). This approach has bandwidth which for white noise will have the equivalent power of a similar brickwall filter with a bandwidth of $$1/T$$ where $$T$$ is the duration of your correlation; but importantly the frequency response is a Sinc function (or Dirichlet Kernel if discrete as a sampled Sinc) in frequency which means this approach is sensitive to non-white noise at other frequency locations (a strong tone very relatively far away would show up in your power measurement); the main lobes of the Sinc only roll-off at 6 dB per octave in frequency. So for white noise, this approach is optimum, for other applications with colored noise, applying a properly designed filter to the signal to attenuate "out of band" noise before measuring the power would be recommended.