python-control / python-control

The Python Control Systems Library is a Python module that implements basic operations for analysis and design of feedback control systems.
http://python-control.org
BSD 3-Clause "New" or "Revised" License
1.7k stars 427 forks source link

Make zero() work for non-square MIMO systems #229

Open calcmogul opened 6 years ago

calcmogul commented 6 years ago

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.

calcmogul commented 5 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.