@@ -121,7 +121,7 @@ class for a set of subclasses that are used to implement specific
121
121
122
122
_idCounter = 0
123
123
124
- def name_or_default (self , name = None ):
124
+ def _name_or_default (self , name = None ):
125
125
if name is None :
126
126
name = "sys[{}]" .format (InputOutputSystem ._idCounter )
127
127
InputOutputSystem ._idCounter += 1
@@ -138,39 +138,6 @@ def __init__(self, inputs=None, outputs=None, states=None, params={},
138
138
:class:`~control.LinearIOSystem`, :class:`~control.NonlinearIOSystem`,
139
139
:class:`~control.InterconnectedSystem`.
140
140
141
- Parameters
142
- ----------
143
- inputs : int, list of str, or None
144
- Description of the system inputs. This can be given as an integer
145
- count or as a list of strings that name the individual signals.
146
- If an integer count is specified, the names of the signal will be
147
- of the form `s[i]` (where `s` is one of `u`, `y`, or `x`). If
148
- this parameter is not given or given as `None`, the relevant
149
- quantity will be determined when possible based on other
150
- information provided to functions using the system.
151
- outputs : int, list of str, or None
152
- Description of the system outputs. Same format as `inputs`.
153
- states : int, list of str, or None
154
- Description of the system states. Same format as `inputs`.
155
- dt : None, True or float, optional
156
- System timebase. 0 (default) indicates continuous
157
- time, True indicates discrete time with unspecified sampling
158
- time, positive number is discrete time with specified
159
- sampling time, None indicates unspecified timebase (either
160
- continuous or discrete time).
161
- params : dict, optional
162
- Parameter values for the systems. Passed to the evaluation
163
- functions for the system as default values, overriding internal
164
- defaults.
165
- name : string, optional
166
- System name (used for specifying signals). If unspecified, a
167
- generic name <sys[id]> is generated with a unique integer id.
168
-
169
- Returns
170
- -------
171
- InputOutputSystem
172
- Input/output system object
173
-
174
141
"""
175
142
# Store the input arguments
176
143
@@ -179,7 +146,7 @@ def __init__(self, inputs=None, outputs=None, states=None, params={},
179
146
# timebase
180
147
self .dt = kwargs .get ('dt' , config .defaults ['control.default_dt' ])
181
148
# system name
182
- self .name = self .name_or_default (name )
149
+ self .name = self ._name_or_default (name )
183
150
184
151
# Parse and store the number of inputs, outputs, and states
185
152
self .set_inputs (inputs )
@@ -686,7 +653,7 @@ def copy(self, newname=None):
686
653
dup_prefix = config .defaults ['iosys.duplicate_system_name_prefix' ]
687
654
dup_suffix = config .defaults ['iosys.duplicate_system_name_suffix' ]
688
655
newsys = copy .copy (self )
689
- newsys .name = self .name_or_default (
656
+ newsys .name = self ._name_or_default (
690
657
dup_prefix + self .name + dup_suffix if not newname else newname )
691
658
return newsys
692
659
@@ -697,49 +664,55 @@ class LinearIOSystem(InputOutputSystem, StateSpace):
697
664
This class is used to implementat a system that is a linear state
698
665
space system (defined by the StateSpace system object).
699
666
667
+ Parameters
668
+ ----------
669
+ linsys : StateSpace
670
+ LTI StateSpace system to be converted
671
+ inputs : int, list of str or None, optional
672
+ Description of the system inputs. This can be given as an integer
673
+ count or as a list of strings that name the individual signals. If an
674
+ integer count is specified, the names of the signal will be of the
675
+ form `s[i]` (where `s` is one of `u`, `y`, or `x`). If this parameter
676
+ is not given or given as `None`, the relevant quantity will be
677
+ determined when possible based on other information provided to
678
+ functions using the system.
679
+ outputs : int, list of str or None, optional
680
+ Description of the system outputs. Same format as `inputs`.
681
+ states : int, list of str, or None, optional
682
+ Description of the system states. Same format as `inputs`.
683
+ dt : None, True or float, optional
684
+ System timebase. 0 (default) indicates continuous time, True indicates
685
+ discrete time with unspecified sampling time, positive number is
686
+ discrete time with specified sampling time, None indicates unspecified
687
+ timebase (either continuous or discrete time).
688
+ params : dict, optional
689
+ Parameter values for the systems. Passed to the evaluation functions
690
+ for the system as default values, overriding internal defaults.
691
+ name : string, optional
692
+ System name (used for specifying signals). If unspecified, a
693
+ generic name <sys[id]> is generated with a unique integer id.
694
+
695
+ Attributes
696
+ ----------
697
+ ninputs, noutputs, nstates, dt, etc
698
+ See :class:`InputOutputSystem` for inherited attributes.
699
+
700
+ A, B, C, D
701
+ See :class:`~control.StateSpace` for inherited attributes.
702
+
703
+ Returns
704
+ -------
705
+ iosys : LinearIOSystem
706
+ Linear system represented as an input/output system
707
+
700
708
"""
701
709
def __init__ (self , linsys , inputs = None , outputs = None , states = None ,
702
710
name = None , ** kwargs ):
703
711
"""Create an I/O system from a state space linear system.
704
712
705
713
Converts a :class:`~control.StateSpace` system into an
706
714
:class:`~control.InputOutputSystem` with the same inputs, outputs, and
707
- states. The new system can be a continuous or discrete time system
708
-
709
- Parameters
710
- ----------
711
- linsys : StateSpace
712
- LTI StateSpace system to be converted
713
- inputs : int, list of str or None, optional
714
- Description of the system inputs. This can be given as an integer
715
- count or as a list of strings that name the individual signals.
716
- If an integer count is specified, the names of the signal will be
717
- of the form `s[i]` (where `s` is one of `u`, `y`, or `x`). If
718
- this parameter is not given or given as `None`, the relevant
719
- quantity will be determined when possible based on other
720
- information provided to functions using the system.
721
- outputs : int, list of str or None, optional
722
- Description of the system outputs. Same format as `inputs`.
723
- states : int, list of str, or None, optional
724
- Description of the system states. Same format as `inputs`.
725
- dt : None, True or float, optional
726
- System timebase. 0 (default) indicates continuous
727
- time, True indicates discrete time with unspecified sampling
728
- time, positive number is discrete time with specified
729
- sampling time, None indicates unspecified timebase (either
730
- continuous or discrete time).
731
- params : dict, optional
732
- Parameter values for the systems. Passed to the evaluation
733
- functions for the system as default values, overriding internal
734
- defaults.
735
- name : string, optional
736
- System name (used for specifying signals). If unspecified, a
737
- generic name <sys[id]> is generated with a unique integer id.
738
-
739
- Returns
740
- -------
741
- iosys : LinearIOSystem
742
- Linear system represented as an input/output system
715
+ states. The new system can be a continuous or discrete time system.
743
716
744
717
"""
745
718
if not isinstance (linsys , StateSpace ):
0 commit comments