[SciPy-User] lsoda vs. Coulomb friction
Wed Feb 3 10:28:49 CST 2010
I am trying to use odeint (i.e. lsoda) on a mechanical system that
involves a mass and friction modeled as a viscous term plus Coulomb
friction. The discontinuity near 0 velocity makes lsoda mad. It
complains that it has to do excess work (lazy algorithm :). In spite
of its complaining, the result leads to fairly good agreement between
model and experiment. But is there a better way to handle this?
This is the func I am passing to odeint (see attached example script
for the details):
def ydot_ol(x, t, u, C):
m = C
b1 = C
b2 = C
y1 = x
y2 = x
ydot = zeros(2,)
ydot = y2
ydot = (u - b1*y2 - b2*sign(y2))/m
u is an external input.
lsoda doesn't complain until the system is essentially stopping.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 853 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20100203/fe4123b0/attachment.py
More information about the SciPy-User