Skip to content

Modest proposal for discussion: eliminate LinearICSystem class #786

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

Closed
sawyerbfuller opened this issue Nov 7, 2022 · 1 comment
Closed

Comments

@sawyerbfuller
Copy link
Contributor

It is not clear to me what purpose there is for a LinearICSystem. One possibility is as a biquad cascade*, but this can already be implemented by forcing the interconnected systems to be NonlinearIOSystems, and is not currently supported by LinearICSystems anyway because the constituent systems are combined into a single system with A, B, C, D matrices and signal names.

Is there any other use case for a LinearICSystem? I can't figure out what benefit there is to preserving other characteristics of an InterconnectedSystem, if such a system is always used in an equivalent way to a LinearIOSystem.

*There are cases when you don't want a combined interconnected series of systems to be tunred into a single state-space or transfer function system. For example, if you want to numerically interconnect a series of linear systems to create a biquad cascade to avoid numerical issues that crop up when combining large and small coefficients. This comes up for example when implementing a high-order pade approximation (see e.g. https://www.embeddedrelated.com/showarticle/927.php)

@murrayrm
Copy link
Member

The current system class hierarchy has been stable for a few years now and so I think this issue can be closed.

For posterity: the LinearICSystem class is used when you create a linear system via interconnect and it maintains both the interconnected system structure (subsystems, interconnection matrix, etc) as well as the state space structure (A, B, C, D matrices). If you simulate a LinearICSystem using forced_response (or the other linear response functions) then it will use the linear system structure. If you simulate it using input_output_response, it will use the subsystem structure (computing the right hand side from all of the individual subsystems and interconnections). The latter is probably a bit slower.

One justification for keeping the LinearICSystem object is that if we implement functionality that utilizes the subsystem structure (eg, being able to extract signals via a hierarchical signal name like 'subsys.signal') then this would allow that to be done for linear interconnected systems.

Note also that using series, parallel, and feedback (or their equivalent operators) will not generate a LinearICSystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants