# determine two signals with a scale factor

Suppose I have 2 signals from function $f_1(x)$ and $f_2(x)$, respectively, and assume the sampling rate is above Nyquist frequency, so we can restore the underlying functions $f_1(x)$ and $f_2(x)$. But my question is, from the 2 signals, how to tell if the underlying functions $f_2(x)$ is scaled from $f_1(x)$, i.e. to determine if $f_2(x)=f_1(ax)$, where $a$ is a non-zero real number.

Thanks!

A necessary (but not sufficient) conditions for $f_2$ to be a temporally scaled version of $f_1$ is that a spectral representation with a logarithmic frequency scale (such as the constant-Q transform) of $f_1$ is a translation of a log-frequency spectral representation of $f_2$.

Practically, given two signals, you can perform the test and evaluate $a$ by computing the CQT of $f_1$ and $f_2$, cross-correlating them and looking at the location of the peak. The strength of the peak might give you an idea of the spectral similarity of the two signals irrespectively of their temporal scale; and the position of the peak will give you the temporal scaling factor. This type of representation robust to temporal scaling is useful in music signal modeling, where the different notes produced by a music instrument are - in a very rough approximation - temporally scaled versions of themselves.

• How strong the cross-correlation peak need to be to declare $f_2(x)$ is scaled from $f_1(x)$? Also, in the title of the third figure, why 36.2^(36/20)=3.5? Thanks! – chaohuang Jul 11 '12 at 2:07
• The peak is at 36, indicating that one signal is a shift of the other by 36 CQT channels. Since the CQT has 20 channels by octave, the shift corresponds to a ratio of 2^(36 / 20) which gives you the shift (3.48) up to a small error due to the relatively resolution of the CQT - something which can be addressed by increasing the resolution (number of channels per octave). – pichenettes Jul 11 '12 at 7:32
• As for the value of the peak, you can normalize both CQTs so they have a total energy of 1 ; and check the value of the peak. It must be close to 1. – pichenettes Jul 11 '12 at 7:41
• But if $f_2$ is NOT scaled from $f_1$, and I normalize their CQTs, the cross-correlation peak will still be 1, right? Then how can I use the peak value to tell the relation between $f_1$ and $f_2$? – chaohuang Jul 11 '12 at 15:39
• The cross-correlation peak won't be at 1 if the two CQTs are not a translation of one another. – pichenettes Jul 11 '12 at 17:01

The Mellin transform can also be used to determine such signals, because "the magnitude of the Mellin transform of a scaled function is identical to the magnitude of the original function. This scale invariance property is analogous to the Fourier Transform's shift invariance property. The magnitude of a Fourier transform of a time-shifted function is identical to the original function." (cited from wikipedia)