Compute discrete-time, cumulative root mean square (DRMS) of signal
Simulink Design Optimization

Attach the DRMS block to a signal to compute its discrete-time, cumulative root mean square value. Use in conjunction with the Signal Constraint block to optimize the signal energy.
The discrete-time, cumulative root mean square value of a signal u(ti) is defined as
The R.M.S value gives a measure of the average energy in the signal.