-
Notifications
You must be signed in to change notification settings - Fork 85
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
Broadcasting addition for mimo systems #416
Comments
Good that you opened a new issue. I don't quite remember all of the discussions around this. But here are some thoughts of today. I could envision that it occasionally would be useful to pre/post-multiply all the output/input channels of a MIMO system with the same SISO system. Not sure if there currently is an easy way of doing that? |
I mostly added C since that felt more in line with Julia syntax than A so if we should have either I'd vote for that. But I'd be as fine with just keeping B also since as you say it is not a lot of work to create that matrix. Pre/post multiplication with siso might be useful some times, I'm not aware of any really easy and clean way to do it. |
The following is a rant that I didn't have time to finish thinking through. I think there is something to consider here, but I have not been able to wrap my head fully around it yet. Posting the thought here anyway. I am a bit surprised that A. works, I don't think it should. I do however think that C should work (?). Same way for multiplication (?), however, it is not trivial to make it work for all cases in a type stable and understandable manner, even with a SISO/MIMO parameter in the type. For example the case With multiplication it gets confusing to me, maybe the only reasonable interpretation is to do it as the case for broadcast over the SISO systems in the TF matrices, but maybe there is another interpretation? |
Good, let's try to get rid of that. I started a new issue #417 on non-broadcasted addition, where we can discuss that and some related things. While it might seem natural to support broadcasted addition and multiplication in analogy with matrices, I don't see too many uses of either. By not introducing any of these, I think we will avoid a lot of confusion and headache while not really lose anything in terms of functionality. To me, the sensible interpretation of "element-wise"/channel-wise multiplication is that every input channel or output channel of the MIMO system is multiplied with the same SISO system. If there would be a reasonably convenient way to form such diagonal systems for pre/post multiplication I think we are better off without introducing
|
As mentioned by @olof3 in #166 we currently have that addition works between mimo system and scalars. Addition of scalar matrices also works, but broadcasting does not work.
This operation has to mean that one wants to add something to the D matrix (or equivalently to the matrix of transfer functions) which means we are doing matrix-scalar addition in the mimo case, and it just seems a bit off that we handle it differently then the rest of the julia ecosystem.
I see the problem that we represent a siso system as a 1x1 array of systems and then that would also fall into the same category of matrix-scalar addition, so I'm not sure what would be the nicest solution.
Works fine as it is now so I'm in no hurry to do anything about it, but thought I would document it since I closed the old issue.
The text was updated successfully, but these errors were encountered: