-
Notifications
You must be signed in to change notification settings - Fork 438
add/cleanup documentation on simulation functions #905
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
Conversation
Any reason why As for the |
It should be possible to make all of the systems work for a NonlinearIOSystem. For the impulse response, we could take the linearization of the system at the initial condition and then use that to reset the initial condition, though I'd want to think that through make sure that is the right thing to do mathematically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to add nonlinear system compatibility to time simulation functions to a future PR. LGTM
@sawyerbfuller, |
hi @frohro - These four simulation functions derive their names from the matlab equivalents, At the very least, there should probably be a warning in As for nonlinear simulation, it seems like it would be useful to have functionality available in the library to do the same for nonlinear systems, even if superposition doesn't hold for them. An example that comes to mind is simulating a nonlinear pendulum system from an arbitrary initial state. Granted, complexities may arise in the extensions of such functions to nonlinear systems because in many cases we will not be able to auto-compute a reasonable time window, but I will assume they can be handled somehow. |
Hi @sawyerbfuller,
I understand that changing function names and parameters are painful, but Python is famous for changing those things, and it can probably be done in a less painful way if careful thought is put into it. Hopefully, it is more clear what bothers me about these things. Thanks for thinking about this. Rob |
Dealing with matlab legacy almost daily on scipy, I think lsim is the worst possible name that they can choose when they were dealing with 8.3 fortran name silliness. forced response is exactly what is happening. Zero state response has nothing to do with it since initial condition is an impulse response super imposed to the input function. So I don't quite get the argument there. Initial condition is a forcing if you let a mass spring damper system from a nonzero condition. It only hides the fact that somebody/something pumped energy to the system prior to t=0. So in that sense I disagree that initial conditions are independent from the forcing signal that is u. I think this should have been the case for matlab but they did poor naming themselves decades ago. linear or not input output response tells you that there is this input and and there will be an output. I am not a big fan but any other complexity will make things more magical than what it seems. Again, I don't quite get the distinction between linear and nonlinear it's an operator and if you disagree with that signal processing view than you should have bigger problems that control theory treats systems not this naming. I believe, somewhat strongly that all this is coming from terrible matlab naming schemes and it's not the fault of python-control. Folks should stop treating matlab as the canon instead and move on. |
@ilayn, |
Yes I agree linear systems is the key and they play important role but your argument is basically your last sentence, and if I am understanding correctly, just keep things the same don't change them which I cannot participate in sharing your enthusiasm about it. What is it that goes against the grain here? The initial conditions or matlab incompatibility. Intial conditions are also forcing conditions. So I don't quite understand the argument here. The matlab syntax is/was clearly wrong for many decades why should we continue that tradition? |
@ilayn, I guess I don't understand why MATLAB was wrong and the present control package is right. Can you help me? Maybe it would help to answer my three points, with proofs or citations why they and MATLAB or wrong? Sorry I'm so dense. :-) |
Just to weigh in a bit:
Having said all of that, as we move into 0.10 (see #904), I think we can do the following:
|
I did not imply anything personal with my remarks, and I don't want the discussion to derail to such direction.
If you bother to check matlab's documentation on lsim it accepts both linear and nonlinear models, LPV and identified models of every kind. Thus if we were to be hygenic about linear nonlinear distinction, matlab itself is contradicting its rule. That is what I mean by wrong naming/syntax. What you probably have in mind for "forced response" is the differential equation solutions; homogeneous solution when you set input term to zero (complementary equation) and non-homogeneous solutions and so on. That is not the right terminology to use if you call nonhomogeneous a forced response. Because like I mentioned, initial conditions are also forcing terms or say inputs happened before t<0. "Forced response" term for zero RHS is a sloppy usage in that respect. The common terminology for such things are, that I am sure you know vrey well, typically zero-input response (ZIR) (which is called This in fact opens up for nonlinear systems since we have concepts like zero dynamics and so on. |
This PR updates the user guide and docstrings to provide more information on simulation functions, addressing issues #890 and #893.
I also added the missing
OptimalEstimationProblem
andOptimalEstimationResult
classes to the documentation.