Internally balanced minimal realization of discrete SISO systems

Given the transfer function or the state equations in phase canonical form of a discrete SISO system, a method is proposed to obtain an internally balanced state-space representation of it.