Skip to content

Commit a711f55

Browse files
Propagate labels and names when converting between mimo/siso/simo
1 parent e6ab9fe commit a711f55

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

control/statesp.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,9 @@ def _mimo2siso(sys, input, output, warn_conversion=False):
17771777
new_B = sys.B[:, input]
17781778
new_C = sys.C[output, :]
17791779
new_D = sys.D[output, input]
1780-
sys = StateSpace(sys.A, new_B, new_C, new_D, sys.dt)
1780+
sys = StateSpace(sys.A, new_B, new_C, new_D, sys.dt,
1781+
name=sys.name,
1782+
inputs=[sys.input_labels[input]], outputs=[sys.output_labels[output]])
17811783

17821784
return sys
17831785

@@ -1826,7 +1828,9 @@ def _mimo2simo(sys, input, warn_conversion=False):
18261828
# Y = C*X + D*U
18271829
new_B = sys.B[:, input:input+1]
18281830
new_D = sys.D[:, input:input+1]
1829-
sys = StateSpace(sys.A, new_B, sys.C, new_D, sys.dt)
1831+
sys = StateSpace(sys.A, new_B, sys.C, new_D, sys.dt,
1832+
name=sys.name,
1833+
inputs=[sys.input_labels[input]], outputs=sys.output_labels)
18301834

18311835
return sys
18321836

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy