RMS of non sinusoidal wave

15 views (last 30 days)
carlo mars
carlo mars on 2 Apr 2016
Commented: Star Strider on 2 Apr 2016
I have a signal sampled at 5000 samples per second . and I have 5 second .please tell me how yo get the RMS of non sinusoidal wave by matlab
I knew that for sinusoidal wave we do this
ac_signal = YourSignal - mean(YourSignal(:));
rms = sqrt( mean(ac_signal.^2) );

Accepted Answer

Star Strider
Star Strider on 2 Apr 2016
You get it just the way you calculated it in your ‘rms’ assignment. It’s the square root of the mean of the squared magnitude of the signal.
  2 Comments
carlo mars
carlo mars on 2 Apr 2016
but my signal is not sinusoidal?
Star Strider
Star Strider on 2 Apr 2016
That doesn’t make any difference.
Remember that all signals can, in Fourier space, be decomposed into a (usually finite but potentially infinite) concurrent series of sinusoids with possibly different amplitudes and possibly different phases. Put it into that context, and it doesn’t matter if your actual waveform appears to be sinusoidal. It’s simply a series of concurrent, additive sinusoids.
You would also consider the d-c offset as part of the RMS voltage of a sinusoidal waveform, for example, so it is not absolutely necessary to remove the mean from the waveform first. It depends on your application.

Sign in to comment.

More Answers (1)

Muhammad Usman Saleem
Muhammad Usman Saleem on 2 Apr 2016
Edited: Muhammad Usman Saleem on 2 Apr 2016
in order to calculate some RMS error for your signal, you require two points
(1) YourOrginalSignal
(2) ExtimatedSignal
Then you can calculate RMS error as
RMS=sqrt(sum(YourOrginalSignal (:)-ExtimatedSignal (:))/N)
where N may be total no of samples in YourOrginalSignal

Community Treasure Hunt

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

Start Hunting!