 SignalProcessing - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Computing Statistics : SignalProcessing/RootMeanSquare

SignalProcessing

 RootMeanSquare
 calculate the root mean square of a signal

 Calling Sequence RootMeanSquare( data )

Parameters

 data - rtable of data

Description

 • The RootMeanSquare command takes a 1-D rtable of data and returns the root mean square. Specifically,

$\mathrm{RootMeanSquare}\left(A\right)=\sqrt{\frac{{\sum }_{i=1}^{n}{\left|{A}_{i}\right|}^{2}}{n}}$

 where $n=\mathrm{numelems}\left(A\right)$.
 • The input is converted to an Array of either float or complex datatype, and an error will be thrown if this is not possible. For this reason, it is most efficient for the input to already be an Array having the appropriate datatype.
 • As the underlying implementation of the SignalProcessing package is a module, it is also possible to use the form SignalProcessing:-RootMeanSquare to access the command from the package. For more information, see Module Members.

Examples

 > with( SignalProcessing ):

Simple Examples

 > X := Array( [ 1, 2*I, 3 ] );
 ${X}{≔}\left[\begin{array}{ccc}{1}& {2}{}{I}& {3}\end{array}\right]$ (1)
 > RootMeanSquare( X );
 ${2.16024689946929}$ (2)
 > Y := < 3 * sqrt(2), 4 * sqrt(2) >;
 ${Y}{≔}\left[\begin{array}{c}{3}{}\sqrt{{2}}\\ {4}{}\sqrt{{2}}\end{array}\right]$ (3)
 > RootMeanSquare( Y );
 ${5.}$ (4)

Parseval's Theorem

 • Parseval's Theorem shows that the root mean square of the Discrete Fourier Transform (DFT) of a signal is the same as that of the original signal. For example:
 > A := LinearAlgebra:-RandomVector( 5, datatype = complex );
 ${A}{≔}\left[\begin{array}{c}{-94.}{-}{58.}{}{I}\\ {12.}{-}{7.}{}{I}\\ {21.}{-}{53.}{}{I}\\ {40.}{-}{25.}{}{I}\\ {43.}{+}{97.}{}{I}\end{array}\right]$ (5)
 > B := Vector[column]( DFT( A ) );
 ${B}{≔}\left[\begin{array}{c}{9.83869910099907}{-}{20.5718253929981}{}{I}\\ {-108.101349850469}{+}{32.8995037690910}{}{I}\\ {-68.9361787597612}{-}{69.2123797669952}{}{I}\\ {-38.0783657332284}{-}{69.3476788839996}{}{I}\\ {-4.91319464252088}{-}{3.45956242008582}{}{I}\end{array}\right]$ (6)
 > rms__A := RootMeanSquare( A );
 $\mathrm{rms__A}{≔}{76.3229978446864}$ (7)
 > rms__B := RootMeanSquare( B );
 $\mathrm{rms__B}{≔}{76.3229978446864}$ (8)
 • We can also compare the original signal with the Inverse Discrete Fourier Transform (IDFT) of its DFT:
 > C := InverseDFT( B );
 ${C}{≔}\left[\begin{array}{ccccc}{-94.0000000000000}{-}{58.}{}{I}& {12.0000000000000}{-}{7.00000000000001}{}{I}& {21.0000000000000}{-}{53.0000000000000}{}{I}& {40.0000000000000}{-}{25.}{}{I}& {43.}{+}{97.}{}{I}\end{array}\right]$ (9)
 > RootMeanSquare( A - C );
 ${1.35981247304106}{}{{10}}^{{-14}}$ (10)

Compatibility

 • The SignalProcessing[RootMeanSquare] command was introduced in Maple 2020.