-
Notifications
You must be signed in to change notification settings - Fork 411
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
Signal names do not propagate through algebraic scalar/matrix operations #902
Comments
I encountered this issue last quarter (multiplying by a scalar loses signal names) and initially thought it was a bug before I realized that multiplying by a scalar is technically creating a new system. It also would be very convenient to be able do this in python when you are constructing a transfer function in which you want to scale all coefficients in the numerator by a constant. Maybe operations with a constant/matrix should be a special case that preserves signal names? Relatedly, I am not sure if the operations * and + preserve input and output signal names if both are systems. |
I started to work on an implementation, but I'm not actually sure what I think the right behavior should be:
If we sort out rules for these cases, we can propagate those to The |
That seems reasonable and straightforward for series and negation connections. As far as adding two systems with incompatible names, i think signal names should be seen as a convenience feature that can get overridden if the connection is directly specified by e.g. + or * or There should probably be a similar warning for series connections if the signal names do not match, but the systems should still get combined. As for feedback, I think the input should always get a new default name. Should |
When a system with named signals is combined with a constant system represented by a scalar or matrix, the signal names are lost. For example
would be expected (by me) to have input 'e' and output 'u'. But what you get instead is
This is happening because scaling by a factor of 2 is internally handled by converting the number `2' into an input/output system then creating a new system that is the series composition of the two systems. But in doing that, you lose the signal names.
There is a similar problem using the
series
function, which also loses signal names (I would expect the input and output signal names to be preserved).The text was updated successfully, but these errors were encountered: