API Reference¶
state_space_analysis.mimoTool.cli¶
Command line interface for the state-space MIMO analysis tool.
state_space_analysis.mimoTool.apis¶
Public APIs and dataclasses that are CLI- and test-friendly.
- class state_space_analysis.mimoTool.apis.DescribeRequest(plant: 'PlantName')[source]¶
Bases:
object- Parameters:
plant (Literal['two_tank', 'two_zone_thermal'])
- plant: Literal['two_tank', 'two_zone_thermal']¶
- class state_space_analysis.mimoTool.apis.SigmaRequest(plant: 'PlantName', w_min: 'float' = 0.001, w_max: 'float' = 31.622776601683793, n_pts: 'int' = 400, save: 'bool' = False, out_name: 'Optional[str]' = None)[source]¶
Bases:
object- Parameters:
plant (Literal['two_tank', 'two_zone_thermal'])
w_min (float)
w_max (float)
n_pts (int)
save (bool)
out_name (str | None)
- n_pts: int = 400¶
- out_name: str | None = None¶
- plant: Literal['two_tank', 'two_zone_thermal']¶
- save: bool = False¶
- w_max: float = 31.622776601683793¶
- w_min: float = 0.001¶
- class state_space_analysis.mimoTool.apis.StepRequest(plant: 'PlantName', tfinal: 'float' = 100.0, dt: 'float' = 0.1, save: 'bool' = False, out_prefix: 'Optional[str]' = None)[source]¶
Bases:
object- Parameters:
plant (Literal['two_tank', 'two_zone_thermal'])
tfinal (float)
dt (float)
save (bool)
out_prefix (str | None)
- dt: float = 0.1¶
- out_prefix: str | None = None¶
- plant: Literal['two_tank', 'two_zone_thermal']¶
- save: bool = False¶
- tfinal: float = 100.0¶
- state_space_analysis.mimoTool.apis.describe(req)[source]¶
- Parameters:
req (DescribeRequest)
- Return type:
dict
- state_space_analysis.mimoTool.apis.get_plant(plant)[source]¶
- Parameters:
plant (Literal['two_tank', 'two_zone_thermal'])
- Return type:
- state_space_analysis.mimoTool.apis.sigma(req)[source]¶
- Parameters:
req (SigmaRequest)
- Return type:
str | None
- state_space_analysis.mimoTool.apis.steps(req)[source]¶
- Parameters:
req (StepRequest)
- Return type:
List[str]
state_space_analysis.mimoTool.app¶
App orchestrator for typical workflows.
state_space_analysis.mimoTool.core¶
Core OOP classes for MIMO analysis.
- class state_space_analysis.mimoTool.core.MIMOSystem(sys)[source]¶
Bases:
objectA thin OOP wrapper around a python-control StateSpace system. Provides convenience methods that are easy to unit test.
- Parameters:
sys (StateSpace)
- property A¶
- property B¶
- property C¶
- property D¶
- property ninputs: int¶
- property noutputs: int¶
- sigma_over_frequency(w)[source]¶
Compute singular values of G(jw). Returns (r, len(w)).
- Parameters:
w (ndarray)
- Return type:
ndarray
- step_response_per_input(tfinal=100.0, dt=0.1, input_index=None)[source]¶
Compute step response either for a specific input or for the default (let python-control choose). Returns (T, Y) with Y shaped (m, N).
- Parameters:
tfinal (float)
dt (float)
input_index (int | None)
- Return type:
Tuple[ndarray, ndarray]
- sys: StateSpace¶
state_space_analysis.mimoTool.design¶
Plant builders and pre-configured examples.
state_space_analysis.mimoTool.io¶
Simple I/O helpers for saving figures and ensuring directories.
- state_space_analysis.mimoTool.io.in_dir(path=None)[source]¶
- Parameters:
path (str | None)
- Return type:
str
state_space_analysis.mimoTool.utils¶
Utility helpers for version-agnostic python-control usage, shape coercions, decorators, and logging.
- state_space_analysis.mimoTool.utils.coerce_outputs_m_by_N(Y, N_time)[source]¶
- Make output array shape (m, N_time) robust across python-control versions:
(N,) -> (1,N) (m,N) ok (N,m) -> (m,N) (m,1,N) or (1,m,N) -> (m,N)
- Parameters:
N_time (int)
- state_space_analysis.mimoTool.utils.ensure_dir(path)[source]¶
- Parameters:
path (str)
- Return type:
str
- state_space_analysis.mimoTool.utils.get_logger(name='mimoTool', level=None)[source]¶
- Parameters:
name (str)
level (str | None)
- Return type:
Logger