Variable window length applied to a modified Hanning filter for optimal amplitude estimation of power systems signals