4
$\begingroup$

I have a signal in MATLAB

s = randn(1,1e6);

that is normalized in the following way:

s = s/sqrt(sum(abs(s .^2)) / 1e6);

I would be thankful if anyone could explain me why is the signal normalized in this way!

$\endgroup$

1 Answer 1

5
$\begingroup$

Assuming that $N$ is the length of your signal $s$, the normalized signal $s_n$ is given by:

$$s_n = \dfrac{s}{\sqrt{\dfrac{\sum_{i=1}^{N}\left|s_i^2\right|}{N}}} $$

The denominator is nothing else than Root Mean Square value of your signal. Thus the code is doing a simple RMS normalization.

You can think of it as a method of normalizing the average of your signal and still allowing for some peaks to clip it (instead of being set to 1). In other words the standard division by the maximum absolute value of your signal will always guarantee that the sample values will be within the range of $[-1;1]$, whereas RMS normalization doesn't.

This method is widely used for audio processing and speech processing.

$\endgroup$
3
  • $\begingroup$ Okay, but if I have a signal, say a= randn(1,1e4) + irandn(1,1e4); I normalize it to power 1 by simply multiplying it by sqrt(0.5),i.e a= sqrt(0.5)*(randn(1,1e4) + irandn(1,1e4)); But now I want to normalize it to say power 3.9811e-06. Do you have any suggestions on how to do this? $\endgroup$
    – rmb
    Commented Oct 13, 2015 at 15:10
  • $\begingroup$ Is it OK to normalize by subtracting by the average of the signal? $\endgroup$
    – zygimantus
    Commented Jan 16, 2016 at 15:55
  • 1
    $\begingroup$ It is a completely different thing. You are talking about mean normalization (removal ). $\endgroup$
    – jojeck
    Commented Jan 16, 2016 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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