From: Ryan K. <rk...@si...> - 2013-04-09 14:25:26
|
I have run into this same problem with pulse inputs. The issue is that the underlying Fortran numeric integration algorithm tries to determine the largest possible step-size that can be used and still get accurate results. If the input starts and ends at zero but is non-zero in the middle, it is possible for the adaptive step-size algorithm to essentially step over the input. There is no way for the algorithm to correctly choose the correct step-size in that situation without exhaustively trying every possible point on the input vector. So, setting hmax is a perfectly valid solution in this case. If you input also starts at zero, you could try truncating the input vector to start at the first non-zero element. -- Ryan Krauss, Ph.D. Associate Professor Mechanical Engineering Southern Illinois University Edwardsville On Tue, Mar 26, 2013 at 10:55 AM, Sawyer Fuller <mi...@se...>wrote: > Is anybody experiencing terrible performance of the integrator, used in > functions like "step_response"? I see glitches and other random behavior > when running my own code, and even for example the pvtol-nested.py example > code. The integrator it uses, scipy.integrate.odeint, is derived from some > fortran code somewhere and appears to be doing optimization that is giving > unwanted behavior. > > One can force a short simulation interval dt for a fixed-step integration > by passing "hmax=dt" to "step-respose" and get a response that looks like > Matlab's, but I'd rather just have a working integrator that optimizes > correctly. > > Anybody know a good workaround, eg settings for the integrator that make > it behave normally? Or why it is giving odd behavior? > > S > > > ------------------------ > Sawyer B. Fuller, Ph.D. > Harvard School of Engineering and Applied Science > Wyss Institute for Biologically Inspired Engineering > http://people.seas.harvard.edu/~minster/ > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > _______________________________________________ > python-control-discuss mailing list > pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-control-discuss > > |