Similarity transformation of matrices to one common canonical form and its applications to 2D linear systems