A least squares approach to reduce stable discrete linear systems preserving their stability