Ported EnergyEnvelope-"Feature" from MATLAB-Impl. Not tested for correctness!