-
Notifications
You must be signed in to change notification settings - Fork 438
I/O system class restructuring #916
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
I/O system class restructuring #916
Conversation
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.
A big drop - this looks great.
My only real concern is in regards to the tf2io
and ss2io
functions - are they implemented somehwere with a deprecation warning?
@sawyerbfuller I put back ss2io and tf2io. If you have a chance, try running this against some of your existing code to just confirm it works as expected (and to see what else you end up needing to change, if anything). |
24d7309
to
fc19cd6
Compare
Ok just checked through and pretty much everything I have works with this new code, bravo! (and bravo unit tests!). The two exceptions I found were:
sys = ct.interconnect([ct.ss(ct.drss(3,1, 1, dt=0.2), inputs='e', outputs='u'),
ct.ss(ct.drss(3,1, 1, dt=0.2), inputs='u', outputs='y')],
inputs='e', outputs='y')
sys.frequency_response(22) raises
|
The "bug" in the
(note that you can also just call Fix for #1 is on its way. |
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.
Looks good to me
This PR restructures the input/output systems classes as described in issue #904 and summarized in the following diagram:
In addition, a number of deprecated functions were removed and various other changes related to I/O systems were made.
Summary of major changes:
NamedIOSystem
class has been renamedInputOutputSystem
and serves as the parent class for all input/output system classes.LinearIOSystems
class has been merged into theStateSpace
class.NonlinearIOSystem
can now be created using thenlsys()
factory function (instead of using the class name, so more likess
andtf
).series
,parallel
,feedback
,append
,neg
) now work on all I/O system classes, including nonlinear systems.initial_response
,step_response
,forced_response
) will now work for nonlinear functions (via an internal call toinput_output_response
).impulse_response
function only works forLTI
systems.impulse_response
function no longer accepts theX0
keyword.initial_response
function no longer accepts theinput
keyword.step_response
function still accepts theX0
keyword (to allow for non-zero equilibrium points for nonlinear systems).__str__()
method for I/O system classes now includes the name of the system and signals (viaInputOutputSystem.__str__()
).ss2io
,tf2io
.pole
,zero
,LTI.{inputs,outputs, pole, zero}
,timebaseEqual
. (Thepole()
andzero()
functions are still available in the MATLAB compatibility module,control.matlab
.)connect
function generates aDeprecationWarning
(useinterconnect
instead).namedio
module are now in theiosys
module.What you will need to change to run version 0.10.0 (this should go in the release notes):
LinearIOSystem
class with theStateSpace
class.pole()
andzero()
withpoles()
andzeros()
.Additional recommended changes:
ss2io
ortf2io
with calls toss
ortf
, including moving signal and system naming parameters into thess
ortf
call.StateSpace
,TransferFunction
, andNonlinearIOSystem
with calls to the equivalent factory functions:ss()
,tf()
,nlsys()
.