b_asic.state_space¶
B-ASIC State Space Module.
Contains a class for the state-space representation of a linear system.
- class b_asic.state_space.StateSpace(A: ndarray[tuple[Any, ...], dtype[_ScalarT]] | list[list[complex]], B: ndarray[tuple[Any, ...], dtype[_ScalarT]] | list[list[complex]], C: ndarray[tuple[Any, ...], dtype[_ScalarT]] | list[list[complex]], D: ndarray[tuple[Any, ...], dtype[_ScalarT]] | list[list[complex]])¶
Bases:
objectState-space representation of a linear system.
- Parameters:
- Anumpy array or list of lists
State matrix.
- Bnumpy array or list of lists
Input matrix.
- Cnumpy array or list of lists
Output matrix.
- Dnumpy array or list of lists
Feedthrough matrix.
- A¶
- B¶
- C¶
- D¶
- property equations: tuple¶
Get the state-space equations in symbolic form using SymPy.
- Returns:
- A tuple containing (state_equation, output_equation):
Notes
Requires SymPy to be installed.
- classmethod from_sfg(sfg: SFG) StateSpace¶
Create a StateSpace representation from an SFG.
- Parameters:
- sfgSFG
Signal flow graph of a linear system.
- Returns:
- The State-space representation of the SFG.
- to_tf()¶
Convert the state-space representation to a transfer function.
- Returns:
TransferFunctionThe transfer function representation.