calculate hysteresis method 2 subtract midscale and zero