Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Moving Root Mean Square

The `dsp.MovingRMS`

System
object™ computes
the moving Root Mean Square (RMS) of the input signal along each channel,
independently over time. The object uses either the sliding window
method or the exponential weighting method to compute the moving RMS.
In the sliding window method, a window of specified length is moved
over the data, sample by sample, and the RMS is computed over the
data in the window. In the exponential weighting method, the object
squares the data samples, multiplies them with a set of weighting
factors, and sums the weighed data. The object then computes the RMS
by taking the square root of the sum. For more details on these methods,
see Algorithms.

The object accepts multichannel inputs, that is, *m*-by-*n* size
inputs, where *m* ≥ 1, and *n* >
1. The object also accepts variable-size inputs. Once the object is
locked, you can change the size of each input channel. However, the
number of channels cannot change. This object supports C and C++ code
generation.

To compute the moving RMS of the input:

Create a

`dsp.MovingRMS`

object and set the properties of the object.Call

`step`

to compute the moving RMS.

Alternatively, instead of using the `step`

method
to perform the operation defined by the System
object, you can
call the object with arguments, as if it were a function. For example, ```
y
= step(obj,x)
```

and `y = obj(x)`

perform
equivalent operations.

`movRMS = dsp.MovingRMS`

returns a moving
RMS object, `movRMS`

, using the default properties.

`movRMS = dsp.MovingRMS(Len)`

sets the `WindowLength`

property
to `Len`

.

`movRMS = dsp.MovingRMS(Name,Value)`

specifies
additional properties using `Name,Value`

pairs. Unspecified
properties have default values.

**Example**:

movRMS = dsp.MovingRMS('Method','Exponential weighting','ForgettingFactor',0.9);

reset | Reset internal states of System object |

step | Moving RMS of input signal |

Common to All System Objects | |
---|---|

`clone` | Create System object with same property values |

`getNumInputs` | Expected number of inputs to a System object |

`getNumOutputs` | Expected number of outputs of a System object |

`isLocked` | Check locked states of a System object (logical) |

`release` | Allow System object property value changes |

[1] Bodenham, Dean. “Adaptive Filtering and Change Detection for Streaming Data.” PH.D. Thesis. Imperial College, London, 2012.

`dsp.MedianFilter`

|`dsp.MovingAverage`

|`dsp.MovingMaximum`

|`dsp.MovingMinimum`

|`dsp.MovingStandardDeviation`

|`dsp.MovingVariance`

|`dsp.RMS`

Was this topic helpful?