[SciPy-user] signal.lti __mul__ and feedback

Zdeněk Hurák hurak at control.felk.cvut.cz
Sun Oct 22 11:23:53 CDT 2006


Ryan Krauss wrote:

> As I continue to try to make scipy.signal a replacment for the Matlab
> controls toolbox, 

Honestly, I feel that the word "replacement" is too strong...

> I need to be able to multiply signal.lti instances 
> by other instances ...
[...]
> The only problem 
> with that is what to do when there should be a cancelation (i.e.
> (s+1)/(s+2)*(s+3)/(s+1)= [(s+3)*(s+1)]/[(s+2)*(s+1)]).  

Well, the problem of cancelling commong factors when manipulating transfer
functions is one of fundamental ones in control computation. In Matlab,
factors are not cancelled automatically except for a special case when both
the pole and the zero are at EXACT 0. In all other instances, you have to
tell Matlab explicitly that you want a "minimal realization" by calling
minreal function.

[...]
> I had started a seperate controls module before I knew about the
> signal.lti stuff.  It is attached.  It would have to be seperated from
> some of my other modules to make it more portable, but most of what I
> am talking about could be done by making my TransferFunction class
> derive from signal.lti (or incorporate all of its methods into
> signal.lti).  Any thoughts on this?

By the way, does your module support MIMO (multi-input-multi-output)
systems? Without this, I am afraid, it will be useless. But starting a SISO
(single-input-single-output) version without having a good plan about how
to extend it later to MIMO case will surely bring you to dead ends. And the
fact is, that computing with matrices of transfer functions is numerically
badly inferior to state space method. The only alternative capable of
competing is the so-called polynomial matrix fraction approach, when the
natural extension of a rational function to MIMO systems is a fraction of
two polynomial matrices. You might perhaps take some inspiration from a
commercial Polynomial Toolbox for Matlab http://www.polyx.com (the manual
is available) or free Polmat package for Mupad at http://polmat.wz.cz.

Should you stick with state-space methods, be sure not to develop your own
solvers for Riccati and Ljapunov equations and alike but to use somehow the
SLICOT Fortran library http://www.slicot.de. 

Best,
Zdenek


> 
> Thanks,
> 
> Ryan




More information about the SciPy-user mailing list