User`s guide
RMS
5-379
5RMS
Purpose Compute the root-mean-square (RMS) value of an input or sequence of inputs.
Library Statistics
Description The RMS block computes the RMS value of each column in the input, or tracks
the RMS value of a sequence of inputs over a period of time. The
Running RMS
parameter selects between basic operation and running operation.
Basic Operation
When the Running RMS check box is not selected, the block computes the
RMS value of each column in M-by-N input matrix
u independently at each
sample time.
y = sqrt(sum(u.^2)/size(u,1)) % Equivalent MATLAB code
For convenience, length-M 1-D vector inputs and sample-based length-M row
vector inputs are both treated as M-by-1 column vectors.
The output at each sample time,
y, is a 1-by-N vector containing the RMS value
for each column in
u. The RMS value of the jth column is
The frame status of the output is the same as that of the input.
Running Operation
When the Running RMS check box is selected, the block tracks the RMS value
of each channel in a time-sequence of M-by-N inputs. For sample-based inputs,
the output is a sample-based M-by-N matrix with each element y
ij
containing
the RMS value of element u
ij
over all inputs since the last reset. For
frame-based inputs, the output is a frame-based M-by-N matrix with each
element y
ij
containing the RMS value of the jth column over all inputs since the
last reset, up to and including element u
ij
of the current input.
If the
Reset port parameter is set to Non-zero sample, the optional Rst port
is enabled and the block resets the running RMS when the scalar input at the
Rst port is nonzero. (The Rst port can be disabled by setting the Reset port
y
j
u
ij
2
i 1=
M
∑
M
------------------=