API Reference¶
state_space_analysis.stateRepTool.cli¶
state_space_analysis.stateRepTool.apis¶
- class state_space_analysis.stateRepTool.apis.StateRepAPIRequest(tf: 'str | None' = None, num: 'str | None' = None, den: 'str | None' = None, example: 'str | None' = None, which: 'str' = 'all', numeric: 'bool' = False, digits: 'int' = 6, pretty: 'bool' = False, verify: 'bool' = True)[source]¶
Bases:
object- Parameters:
tf (str | None)
num (str | None)
den (str | None)
example (str | None)
which (str)
numeric (bool)
digits (int)
pretty (bool)
verify (bool)
- den: str | None = None¶
- digits: int = 6¶
- example: str | None = None¶
- num: str | None = None¶
- numeric: bool = False¶
- pretty: bool = False¶
- tf: str | None = None¶
- verify: bool = True¶
- which: str = 'all'¶
- class state_space_analysis.stateRepTool.apis.StateRepAPIResponse(results: 'Dict[str, dict]')[source]¶
Bases:
object- Parameters:
results (Dict[str, dict])
- results: Dict[str, dict]¶
- class state_space_analysis.stateRepTool.apis.StateRepService[source]¶
Bases:
object- static run(req)[source]¶
- Parameters:
req (StateRepAPIRequest)
- Return type:
state_space_analysis.stateRepTool.app¶
- class state_space_analysis.stateRepTool.app.StateRepApp(out_dir: 'Path' = PosixPath('/home/runner/work/control-systems/control-systems/state_space_analysis/stateRepTool/out'))[source]¶
Bases:
object- Parameters:
out_dir (Path)
- out_dir: Path = PosixPath('/home/runner/work/control-systems/control-systems/state_space_analysis/stateRepTool/out')¶
- run(req, export_json=None)[source]¶
- Parameters:
req (StateRepAPIRequest)
export_json (str | None)
- Return type:
Dict
state_space_analysis.stateRepTool.core¶
- class state_space_analysis.stateRepTool.core.CanonicalFormCalculator(tf: 'TransferFunctionSpec', numeric: 'bool' = False, digits: 'int' = 6, pretty: 'bool' = False, verify: 'bool' = True)[source]¶
Bases:
object- Parameters:
tf (TransferFunctionSpec)
numeric (bool)
digits (int)
pretty (bool)
verify (bool)
- Dfeed: Expr¶
- compute(which='all')[source]¶
- Parameters:
which (str)
- Return type:
Dict[str, Realization]
- den_desc: List[Expr]¶
- digits: int = 6¶
- num_desc: List[Expr]¶
- num_proper_desc: List[Expr]¶
- numeric: bool = False¶
- pretty: bool = False¶
- static tf_from_ss(A, B, C, D)[source]¶
- Parameters:
A (MutableDenseMatrix)
B (MutableDenseMatrix)
C (MutableDenseMatrix)
D (Expr)
- Return type:
Expr
- verify: bool = True¶
- class state_space_analysis.stateRepTool.core.Realization(A: 'sp.Matrix', B: 'sp.Matrix', C: 'sp.Matrix', D: 'sp.Expr', P: 'Optional[sp.Matrix]' = None)[source]¶
Bases:
object- Parameters:
A (MutableDenseMatrix)
B (MutableDenseMatrix)
C (MutableDenseMatrix)
D (Expr)
P (MutableDenseMatrix | None)
- A: MutableDenseMatrix¶
- B: MutableDenseMatrix¶
- C: MutableDenseMatrix¶
- D: Expr¶
- P: MutableDenseMatrix | None = None¶
- class state_space_analysis.stateRepTool.core.TransferFunctionSpec(num_desc: 'List[sp.Expr]', den_desc: 'List[sp.Expr]')[source]¶
Bases:
object- Parameters:
num_desc (List[Expr])
den_desc (List[Expr])
- den_desc: List[Expr]¶
- num_desc: List[Expr]¶
state_space_analysis.stateRepTool.design¶
Place future design-oriented helpers here (e.g., real-modal 2x2 blocks, CSV/Markdown exporters).
state_space_analysis.stateRepTool.io¶
state_space_analysis.stateRepTool.utils¶
- state_space_analysis.stateRepTool.utils.coeffs_asc(desc, n)[source]¶
- Parameters:
desc (List[Expr])
n (int)
- Return type:
List[Expr]
- state_space_analysis.stateRepTool.utils.ensure_proper(num_desc, den_desc)[source]¶
- Return type:
Tuple[List[Expr], List[Expr], Expr, List[Expr]]
- state_space_analysis.stateRepTool.utils.normalize_monic(num_desc, den_desc)[source]¶
- Parameters:
num_desc (List[Expr])
den_desc (List[Expr])
- Return type:
Tuple[List[Expr], List[Expr]]
- state_space_analysis.stateRepTool.utils.parse_poly(arg)[source]¶
Parse CSV or polynomial string to descending-power coefficients (SymPy exact).
- Parameters:
arg (str | List[float])
- Return type:
List[Expr]
- state_space_analysis.stateRepTool.utils.parse_tf_string(tf_str)[source]¶
- Parameters:
tf_str (str)
- Return type:
Tuple[List[Expr], List[Expr]]
- state_space_analysis.stateRepTool.utils.square_free(poly)[source]¶
- Parameters:
poly (Poly)
- Return type:
bool