Open calcmogul opened 6 years ago
I found a paper mentioned by the above pdf that addresses implicit state-space models (the simpler problem python control deals with): https://perso.uclouvain.be/paul.vandooren/publications/EmamiNaeiniV82.pdf. I converted the fortran code provided at the end to python a few months ago, but it produced incorrect results for the unit tests. I later determined that the original fortran produces the same incorrect results compared to slicot. Translating the slicot version to python is probably the clearest path forward.
Currently, the QZ algorithm is used to find transmission zeroes for state-space models without slycot. This only works when the compound system matrix is square (the number of inputs must equal the number of outputs, or for a closed-loop system, the number of states must equal the number of outputs). Many systems don't satisfy this requirement.
This paper describes the algorithm SLICOT uses to reduce the system to a square matrix: https://perso.uclouvain.be/paul.vandooren/publications/MisraVV94.pdf. Implementations of the SVD, the QR decomposition, and the RQ decomposition are needed for it (scipy seems to have them). The rest of the algorithm is just extracting and repacking submatrices recursively.