You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any chance you could just, by correctly assigning names that match between systems as I have done here, interconnect automatically without needing the "connections" argument? Here, that doesnt seem to work (systems don't match anymore), but for some reason I had in my mind that it was possible. Am I just missing something? Thanks!
This is not something that currently works (as you saw), but would be easy to implement via a keyword (connect-by-name=True?). Basically we could go through and anytime the name of a signal in one system matches the name of a signal in another, we can connect things together. If an output signal name appears multiple times, then you implicitly sum all outputs and attach to the inputs using that signal name.
One small issue is how to know the "sign" of the connection.
MATLAB has a capability like this. I'll need to look up how they handle the sign.
That must be it, I must have been thinking of Matlab.
Suggested kwarg makes sense!
Not sure how they do negations but maybe one option is to include that in
signal name ‘-y’. Alternatively, just negate the system when defining it.
Conceptually I like the idea of using -y, but not sure how that work work since sometimes you want the output (or input) to have a negative sign but sometimes you don't. But there is only 1 signal name. So, for example, if you had the system
Makes sense & i agree that method would have a problem in a situation like you describe. the sign mioght have to be a property of the connection rather than the signal. one fallback is to just rely on negative unity feedthroigh systems when necessary, but not as appealing because it would require more names.
Activity
murrayrm commentedon Jan 22, 2021
This is not something that currently works (as you saw), but would be easy to implement via a keyword (
connect-by-name=True?). Basically we could go through and anytime the name of a signal in one system matches the name of a signal in another, we can connect things together. If an output signal name appears multiple times, then you implicitly sum all outputs and attach to the inputs using that signal name.One small issue is how to know the "sign" of the connection.
MATLAB has a capability like this. I'll need to look up how they handle the sign.
sawyerbfuller commentedon Jan 23, 2021
murrayrm commentedon Jan 23, 2021
Conceptually I like the idea of using -y, but not sure how that work work since sometimes you want the output (or input) to have a negative sign but sometimes you don't. But there is only 1 signal name. So, for example, if you had the system
then the output from P needs to be positive at the output of the close loop system but negative at the input to C.
sawyerbfuller commentedon Jan 23, 2021
Makes sense & i agree that method would have a problem in a situation like you describe. the sign mioght have to be a property of the connection rather than the signal. one fallback is to just rely on negative unity feedthroigh systems when necessary, but not as appealing because it would require more names.
murrayrm commentedon Jan 23, 2021
Another solution I just thought of is to use something like
sumblkfrom issue #493. If this was there, then you could domurrayrm commentedon Jan 23, 2021
Code above works in PR #517