[Nota: I have validated the only answer so far, yet more explicit versions are still welcome]

The following question is detailed in 1D, with time as the ordinal variable. Similar questions could apply in other dimensions.

In several signal processing techniques, such as blind source separation (BSS), filter banks, or deconvolution, one may wish to estimate a signal $x(t)$ and only recovers $s.x(t+d)$, a scaled and delayed estimate. Rotations and shears can be added in higher dimensions, and many other more. $s$ is a scale factor, $d$ a delay. One might even stumble with warped data ($x_{s,d,w} = s.x(t/w+d)$), as in super-resolution for instance.

In theory, one can estimate continuously $s$ and $d$ with local correlation or Fourier transforms (How to match 2 signals that have same information, though shifted and scaled). The warping $w$ might be estimated with the scale-transform or wavelet representations. I have read several BSS papers and books, asked people, been in conferences, and was not able to find a standard, or at least a usable metric.

Delayed, scaled- and warped waveforms

In image (it works on signals as well), the Structural Similarity index somehow compensates offset and variance.

  1. Are there practical error metrics to compare the original $x(t)$ with the transformed $x_{s,d,w}(t)$ in the context of sampled signals and noise conditions? Indeed, the discretization induced by sampling complicates the comparison task (imagine for instance a $1$-sample spike on the sampling grid that would be delayed by a non-integer time), as well as the noise.
  2. Should one resort to asymmetric quantities such as divergences?
  3. Can other signal properties help (bandpass, sparse, positive, etc.)?

Forgetting about the warping, I have tried to minimize a standard $\ell_p$ norm, with $s$, $d$, and $w$ as parameters, and to smooth both signals. I am not satisfied with the complexity and the outcomes, and this is a bit tedious.

  • $\begingroup$ I am still a bit confused about what you want to do - you already have a lot of suggestions in your question what can be done, but I did not find a clear goal of the comparison. Is your goal to find $s$ and $d$? Or do you already have those variables and would like to compare the signal to its reference, e.g. for SNR calculations, or quantify how well the unscaled and unshifted signal resembles the reference signal? $\endgroup$ – M529 Mar 21 '16 at 15:21
  • 1
    $\begingroup$ @M529 I would like a metric capable of some shift, scale and dilation invariance. Scale can be estimated based on amplitude, delay-invariant can be obtained via Fourier, warping via the scale transform. So far, I find there is an identifiability issue for the estimation of the three parameters, before computing a traditional SNR measure $\endgroup$ – Laurent Duval Mar 21 '16 at 18:41
  • $\begingroup$ @M529 take for instance two sparse signals, almost similar except for a global delay and a scale factor. One can easily have troubles if peaks are, apart from the gross delay, offset in the two sets by minor $\pm 1$ time-sample shifts, randomly. How should one measure the difference between two peaks at the same amplitude, but with an offset, or two peaks with a different height completely phased. And I did not see satisfactory measures in the source separation literature $\endgroup$ – Laurent Duval Mar 22 '16 at 10:55
  • $\begingroup$ I absolutely see your point! I do not know if there is an established measure for that. Probably not. I am just playing around with a few ideas how that might be done. But right now this is just a few ideas that probably won't fit those general requirements and are therefore not satisfactory either. $\endgroup$ – M529 Mar 22 '16 at 11:35
  • 1
    $\begingroup$ Maybe relevant (metric 3). $\endgroup$ – OverLordGoldDragon Apr 8 at 3:40

I'm answering the question the way I understood it - How can one find a similarity measure which isn't sensitive to scaling and shifting.

An approach could be borrowed from the Computer Vision world by comparing Shift and Scale Invariant features between the two signals.

I'm not sure it will work for measuring the quality of recovering signals but it certainly will tell two signals are similar given the hierarchy between their features is similar and the features themselves are similar.

  • $\begingroup$ I have validated this answer, yet more explicit versions are still welcome $\endgroup$ – Laurent Duval Apr 7 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.