Numerically stable algorithm for pole assignment in linear multivariate systems using output feedback and its applications