Added DC offset to RMS calculation