-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulator does not allow non-zero D matrix #397
Comments
I do not have any memory left of this unfortunately, but if you do not get said stack-overflow error I'm all for removing the restriction :) |
Okay, will put together a PR for that then. Also wondering about Was thinking that either it seems it could be dropped and |
There were once several different |
The objective of |
I believe we could make good use of this |
I think that we should either make a small change in #398, like adding a |
A few things stalled out with that package because I wanted to include a better interface for discrete/continuous hybrid systems, but I never landed on anything I particularly liked. I’ll be taking some time off work soon, though, so hopefully I’ll finally be able to get around to putting everything together. If, when I do, anything looks like it would be a good fit to live inside ControlSystems.jl instead of a separate package, let me know and I’ll submit a PR. |
@albheim this can be closed now? |
The initial question is resolved. Then there are the questions that came up in the discussion about what to do about the Simulator type, but that is maybe better to continue in its own thread. |
I noticed that when I create a continuous system with equal number of poles and zeros I can't use
step
since it is complaining that a non-zero D-matrix is not supported.The error comes from simulator.jl here
ControlSystems.jl/src/simulators.jl
Lines 39 to 46 in e9837ee
Though it seems that in
lsim
, which is the function callingSimulator
, it only expects the states to be calculated and calculates the output given the D-matrix by itself. Seems like these two are not entirely synced in how they work,Simulator
exposes they
function which is not used andlsim
seems like it does not have a problem with the D-matrix butSimulator
has (which I still don't really see the reason why it is a problem).ControlSystems.jl/src/timeresp.jl
Lines 183 to 192 in e9837ee
The assertion that D should be zero comes from a #118 in a commit named "Fix stack overflow error" by @baggepinnen, though when testing to remove that assertion it seems that running
works fine and gives the values I expect when plotting. Running all tests also seems to work without the assertion. So I guess I'm wondering if @baggepinnen has any memory of why it was once needed and if it is still needed for some case that is not tested? Or could we just remove it?
The text was updated successfully, but these errors were encountered: