rms of noise signal

18 Ansichten (letzte 30 Tage)
ANAS HAMZAH
ANAS HAMZAH am 14 Nov. 2024
Kommentiert: Mathieu NOE am 19 Nov. 2024
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.

Antworten (1)

Mathieu NOE
Mathieu NOE am 14 Nov. 2024
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 Kommentare
Mathieu NOE
Mathieu NOE am 19 Nov. 2024
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 am 19 Nov. 2024
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

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by