rms of noise signal

50 visualizzazioni (ultimi 30 giorni)
ANAS HAMZAH
ANAS HAMZAH il 14 Nov 2024 alle 6:40
Commentato: Mathieu NOE il 19 Nov 2024 alle 8:06
what i want to generate two RMS of noise signal and caculate the total RMS of the noise in simulink.
I tried to use 2 random number block to generate noise signal with vrms value 5uvrms i set the value of the variance 2.5e-11 of each block to achieve rms =5uvrms of each block then i did summation for these two blocks but the result not what I expected the result was 10e-6 rather than 7.071e-6.
if I did any mestaik or I used wrong tepology or block then please help me and show me the right way.

Risposte (1)

Mathieu NOE
Mathieu NOE il 14 Nov 2024 alle 13:06
hello
to get the correct result, you need two uncorrelated random generators. here you are using the same seed , so the two ouputs are the same and you double the signal (hence factor 4 on the variance)
change the seed in one of the rand generator and check signals are different
  9 Commenti
Mathieu NOE
Mathieu NOE il 19 Nov 2024 alle 8:02
hello again
attached my simulink file
the moving rms block contains simply 3 functions :
  • square the signal
  • low pass filter (first order recursive filter : out(k) = (1-alpha)*out(k-1) + alpha*in(k) , I choose alpha = 0.01 for 1000 samples long simulation. This replace the mean operand in the m code
  • square root
Mathieu NOE
Mathieu NOE il 19 Nov 2024 alle 8:06
NB that my simulink file shows the end value of the simulation, so the accuracy of the result depends on the alpha value and the simulation duration. The shorter the simulation the higher the alpha must be (to ensure that the low pass filter transient has vanished before end of simulation) and the less accurate the result will be.
when you do the math in m code with mean operand , you should get more accurate results IMO

Accedi per commentare.

Prodotti


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by