GithubHelp home page GithubHelp logo

lsim is slow about python-control HOT 5 CLOSED

python-control avatar python-control commented on August 18, 2024
lsim is slow

from python-control.

Comments (5)

murrayrm avatar murrayrm commented on August 18, 2024

Since I think we already depend on scipy.signal, can we just call through to that?

from python-control.

cwrowley avatar cwrowley commented on August 18, 2024

Unfortunately, no, because the LTI objects in scipy.signal are totally different from the TransferFunction and StateSpace objects in control.

This raises another issue, that ideally it would be nice if these objects were all compatible with one another, since a lot of stuff is already included in scipy.signal. However, those are pretty different, so that would require a lot of work.

from python-control.

blinkminster avatar blinkminster commented on August 18, 2024

Defaulting to the general-purpose solver was also motivated by how scipy's
lsim doesn't work for systems with a pole at the origin, which is
relatively common in control systems. So any function that tries to use
scipy.signal.lsim or whatever algorithm that uses should also fall back to
the general-purpose solver if there is a zero at the origin.

Sawyer


Sawyer B. Fuller, Ph.D.
Harvard School of Engineering and Applied Science
Wyss Institute for Biologically Inspired Engineering
http://people.seas.harvard.edu/~minster/

On Fri, Mar 20, 2015 at 9:18 PM, Richard Murray [email protected]
wrote:

Since I think we already depend on scipy.signal, can we just call through
to that?

Reply to this email directly or view it on GitHub
#48 (comment)
.

from python-control.

cwrowley avatar cwrowley commented on August 18, 2024

I was just planning to call scipy.linalg.expm(A * dt) where A is from the state-space representation of the system and dt is the (constant) timestep. I believe that should work fine even if there is a zero at the origin.

from python-control.

blinkminster avatar blinkminster commented on August 18, 2024

I've never looked into why scipy's lsim fails with a pole at the origin,
but if what you're talking about is faster than a standard ode solver, is
correct, and works for a zero pole, then that sounds great to me.

Sawyer


Sawyer B. Fuller, Ph.D.
Harvard School of Engineering and Applied Science
Wyss Institute for Biologically Inspired Engineering
http://people.seas.harvard.edu/~minster/

On Fri, Mar 20, 2015 at 10:31 PM, Clancy Rowley [email protected]
wrote:

I was just planning to call scipy.linalg.expm(A * dt) where A is from the
state-space representation of the system and dt is the (constant)
timestep. I believe that should work fine even if there is a zero at the
origin.

Reply to this email directly or view it on GitHub
#48 (comment)
.

from python-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.