1
$\begingroup$

Let's say this is the FFT of my measurements:

enter image description here

You can see that there is a clear peak and the rest is noise. I want to reduce noise, so I square the FFT and normalize it:

enter image description here

The peaks are now more clear, so the (relative) noise has been reduced, at the cost of changing the non-noise signal too. It's now easier to identify the frequency peaks, and of course we can use powers larger than 2 to increase this effect.

Is there a trickery? Is this commonly used? I guess the main problem is that the signal is affected.

$\endgroup$
2
$\begingroup$

Squaring your signal is multiplying it with itself.

Multiplication in frequency domain is convolution in time domain.

So you're correlating the signal in time domain with its time-inverse. I don't think this has beneficial effects aside from a very specific class of signals (namely, the signals which are their own time-inverse).

You forget why you're interested in SNR in the first place. It's not for the sake of SNR itself. It comes from the assumption that your signal is essentially unharmed but overlaid with additive noise. You're breaking that assumption.

Also, the effect is purely optical; you know, squaring positive numbers is a monotonous operation. So if you need to find something "clearly larger" than something else, you can do this with the original graph just as well.

Adapting the Y-axis to be able to spot signals of very different magnitudes is a very common thing to do, however: for PSD-style plots you typically don't look at abs(spectrum) in a linear scale, but convert it to dB, which is a logarithmic scale; in fact, it hence does quite the opposite of your polynomial scale, but it's much more useful for real-world signals.

There's a few cases where you'd square the time signal (e.g. to allow for easy timing recovery of BPSK signals), but from the top of my head, I can't think of anything where you'd work with the squared DFT; might be useful if we know that a signal has a time-inverse part and were looking for that.

Note that Laurent correctly pointed out that "squaring" is a bit of an imprecise term, and in the complex sense you'd normally use it as "multiplying with the complex conjugate", but that doesn't make much of a difference here.

$\endgroup$
  • $\begingroup$ With you interest in complex signals, I am surprised you don't "square" by multiplying with the conjugate :) $\endgroup$ – Laurent Duval Aug 22 '16 at 15:55
  • 1
    $\begingroup$ ha, got me :) yeah, but OP only said "square", so I put no thought in what would make mathematical sense (as this approach doesn't, in general). $\endgroup$ – Marcus Müller Aug 22 '16 at 15:56
  • $\begingroup$ I meant squaring real numbers (the modulus of Fourier coefficients). $\endgroup$ – anderstood Aug 22 '16 at 17:49
  • $\begingroup$ @anderstood but then you really don't operate on anything that can be used further on – reducing the the fourier transform to its amplitude throws away half of the information. So that would make your operation even more cosmetical and harmful! $\endgroup$ – Marcus Müller Aug 22 '16 at 17:53
2
$\begingroup$

In addition to what @Marcus Müller wrote, one might want to separate signal from noise, or reduce noise, with some form of threshold $\tau$. So, applying any strictly monotonous function $f$ will result in a bijection, with a novel threshold $f(\tau)$, uniquely defined, because you will have a bijection. Since it is uniquely defined, in theory this does not help you much. You just "dilate" your $y$-axis in a reversible fashion.

Plus, from an SNR point-of-view, you are not dealing with the same signals and noises. Hence, you will not be able to compare SNRs. As you said: "the signal is affected".

In practice, such transformations can help a little, for visualization as already said, or when the relative scales between coefficients is not handy. But you should take care about when $f(x)>x$ or $f(x)<x$, which you do not see in your case, because of the function $x\to x^2$ taken with $x\in [0\,,1]$ (as answered by @Gilles).

Remember that signal processing techniques become all the more useful as the signal level is somehow lower than the noise. Then, a mere squaring could do a lot of harm.

However, the square function can help to derive some calculations (estimators), because the result is homogenous to an energy, preserved under orthogonal transformations, and some signal or noise estimators are sometimes designed in this domain, often with additional assumptions of distributions. See for instance MMSE estimation of magnitude-squared DFT coefficients with supergaussian priors (abstract):

We present two minimum mean square error (MMSE) frequency domain estimators of the squared magnitude of a clean speech signal that is degraded by additive noise. These estimators are derived under the assumption that the DFT (discrete Fourier transform) coefficients of the clean speech are best modelled by the Gamma probability distribution function (pdf) instead of the common Gaussian pdf. The statistics of the perturbing noise is the Gaussian pdf in one case and the Laplacian pdf in the other. The estimators are used as noise reduction filters in the experimental evaluation. We give a comparison with a previously derived estimator which uses the Gaussian pdf as the pdf for speech and noise coefficients.

$\endgroup$
  • $\begingroup$ "Squaring" was just an example, but I could have chosen any positive dilating Lipschitz-continous function if signal>noise, and contracting Lipschitz-continuous if signal<noise. So not too much attention should be paid to the "square". But your two first paragraphs answer my questions, thank you. $\endgroup$ – anderstood Aug 22 '16 at 18:02
  • 1
    $\begingroup$ The idea of a mixed Lipschitz is nice. However, it requires you to locally know whether $s>n$ or the converse. Indeed, you have these kinds of ideas in the shrinkage functions used in wavelet denoising, but they are more local than a Fourier basis $\endgroup$ – Laurent Duval Aug 22 '16 at 18:07
1
$\begingroup$

To add on to what's been said by @Marcus Müller; see that your FFT amplitudes are $\approx 1$ while your noise values are less than $1$. Squaring your results does indeed square those values. The square of values less than $1$ is even smaller than the values themselves. Which gives you the visual impression on mitigating the noise. Mathematically:

$$x^2 < x \quad \forall \quad 0<x<1$$

And your noise values are under this case. Your signal values are normalized to close to one, and squaring one gives you $1$, ($x^2 = x$ only for $x=0$ and $x=1$). But if you had values greater than $1$ for the signal and noise, the visual impression would be different after squaring.

$\endgroup$
  • $\begingroup$ Yes what matters is that the signal level $s$ is larger that then noise level $n$. Then $s/n>1$ and $(s/n)^2>s/n$, that's all the purpose of squaring. $\endgroup$ – anderstood Aug 22 '16 at 16:26
  • $\begingroup$ Yes, I would say for noise $n$ amplitudes less than $1$ (and signal amplitudes $\ge 1$), that ratio is even greater, i.e. $(s/n)^2\gg s/n$. $\endgroup$ – Gilles Aug 22 '16 at 16:40

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.