A velocity scaling method with least-squares correction of several constraints