# Absolute value vs. power (to make a signal positive-only)

In order to make a signal positive-only, I have the choice between taking the absolute value and multiplying the signal by itself (i.e. taking the signal to the power of two).

Obviously, multiplying the signal by itself requires more circuitry (a multiplier) and the result has a larger dynamic range. Are there other aspects that I need to consider when chosing between the two methods?

Edit: the application is to detect negative and/or positive signal peaks just above the noise level.

• There might another method: Adding a bias to the signal, calculated by the maximum negative peak. Could you add a bit more information as to what exactly are you trying to achieve by making a signal positive? Then we can recommend the more suitable method for your purposes. – bone Oct 12 '15 at 10:56
• I think you should review "Threshold" detection. The wikipedia article, en.wikipedia.org/wiki/Detection_theory, seems to concentrate mostly on your problem. As they say there are a number of factors that bear on the choice; that depend upon the signal and noise characteristics. Although I don't remember exactly; squaring introduces some distortion into the noise spectrum that can distort the noise PDF/spectrum and throw simple optimizations in calculations off. – rrogers Oct 13 '15 at 22:07
• In addition I think "convex optimaization" has an application on threshold detection. Boyd has a free online class on convex optimization; but it's fairly long. Try: web.stanford.edu/~boyd/cvxbook . no Guarantee though – rrogers Oct 13 '15 at 22:09
• Thanks @rrogers for pointing me into the right direction. It looks like squaring the signal changes the noise amplitude PDF from Rayleigh to Exponential. – geschema Oct 15 '15 at 12:13