[Scipy-tickets] [SciPy] #1096: tf2ss and "Improper transfer function."

SciPy Trac scipy-tickets@scipy....
Mon Aug 9 22:47:09 CDT 2010


#1096: tf2ss and "Improper transfer function."
----------------------------------------------+-----------------------------
 Reporter:  jary                              |       Owner:  somebody    
     Type:  defect                            |      Status:  needs_review
 Priority:  normal                            |   Milestone:  0.7.2       
Component:  scipy.signal                      |     Version:  0.7.0       
 Keywords:  tf2ss transfer function impulse.  |  
----------------------------------------------+-----------------------------

Comment(by Fabricio):

 I agree with Josef. The patch seems wrong to me:

 {{{
     num, den = normalize(num, den)   # Strips zeros, checks arrays
     nn = len(num.shape)
     if nn == 1:
         num = asarray([num], num.dtype)
     M = num.shape[1]
     K = len(den)
 }}}

 In fact tf2ss deal with SIMO objects (single input, multiple outputs). num
 is then a 2d array with shape
 (nn=number of outputs, M=order of numerators).

 In the SISO case (single output), the condition on nn==1 takes care to
 raise num as a 2darray. The calculation of M is then correct, the solution
 proposed in the patch would work only in the SISO case and without the
 previously mentionned condition on nn.

 Can you provide a test that shows wrong behaviour?

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1096#comment:4>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list