# how to normalize DCT (or FFT) coefficients to compare different signals

I have signals that have a broad range of values. I want to compare them in a meaningful way. Just as an example, two of those signals might be: $$f(t)=100\cos(50t)+40\cos(60t) \quad g(t)=2\cos(50t)+0.8\cos(60t)$$

The coefficients of $$f(t)$$ will be much higher than the coefficients of $$g(t)$$, however, for the purpose of my comparison, those two signals are "equivalent", in that the dynamics are the same, and the difference is just in scaling coefficients.

In my problem I have a discrete signal, but I can compute the DCT (of FFT). The question is: how to normalize the coefficients, so that I can compare signals the way it was done above. What I thought of is this:

Let $$a_n$$ be the n coefficients obtained from applying DCT, then one simply normalize by $$\dfrac{a_n}{\sum_n |a_n|}$$. Is this mathematically sound? is there some theory on how to normalize the coefficients to capture the signal dynamics (meaning the relation of certain frequencies with respect to others)?

I'd appreciate if any can share some resources or can provide some insight.

• This related question and answer that discusses various scaling and how to properly account for windowing etc may be helpful to you: dsp.stackexchange.com/questions/75817/… Jun 18 at 23:32

## 1 Answer

Is this mathematically sound?

Yes. It's a common normalization in ML. The idea's to not change relative values, i.e. ratios between any two coefficients (of same transform/signal).

However, one might want to narrow it further, in case there's e.g. noise of different intensities in the two signals - then noise affects norm, which isn't desired. Then noise levels should be estimated and excluded from the normalizing factor (or simply signals denoised first).

For more complicated behaviors, with e.g. amplitude or frequency that varies over time, FFT and DCT are ill suited, and time-frequency transforms should be preferred, like CWT & STFT. Then independent "components" can be extracted and compared. Example with A.M.