[SciPy-User] bug in signal.lsim2

Warren Weckesser warren.weckesser@enthought....
Sun Feb 21 15:03:08 CST 2010

josef.pktd@gmail.com wrote:
> On Sun, Feb 14, 2010 at 8:02 PM, Warren Weckesser
> <warren.weckesser@enthought.com> wrote:
>> I added a patch to ticket #1112.  In addition to adding the suggested
>> change to pass keyword args to odeint, I also added a new funciton,
>> impulse2(), that computes the impulse response by using odeint.  See
>> this thread for details:
>>    http://mail.scipy.org/pipermail/scipy-user/2009-November/023416.html
> Thanks, the test examples look nice and serve also as some
> documentation for ltisys. The lsim2 test05 is interesting, I was
> convinced last year (and there were some previous threads) that ltisys
> cannot handle multi-input systems. I always got shape errors when I
> tried and without documentation it's difficult to figure out what is
> supposed to work and what not. (I will look at it more closely when I
> have more time.)

I'd like to look into this, too.  I don't think it was originally 
designed for MIMO systems.

> I think the changes are reasonable including turning u and t into
> keywords instead of required arguments. Maybe Ryan or someone who is
> using this functions can comment on this.
> Just one improvement to the tests, assert_almost_equal takes a decimal
> argument. If you know the precision of your tests, then it would be
> useful to increase it from the default decimal=7.

I suspect the default precision is fine.  To actually know the expected 
precision, one has to be able to convert the absolute and relative 
tolerances used by the ODE solver, which are *local* error control 
parameters, into a global tolerance (i.e. what is the error at 
t=f_final).  This is a nontrivial problem.


More information about the SciPy-User mailing list