Residual function design for linear multivariable systems