pathsim.blocks.lti module
- class pathsim.blocks.lti.StateSpace(A=-1.0, B=1.0, C=-1.0, D=1.0, initial_value=None)[source]
Bases:
BlockThis block integrates a LTI MIMO state space model with the structure
- d/dt x = A x + B u
y = C x + D u
where A, B, C and D are the state space matrices, x is the state, u the input and y the output vector.
- Parameters:
A (array) – state space matrices
B (array) – state space matrices
C (array) – state space matrices
D (array) – state space matrices
initial_value (array, None) – initial state / initial condition
- class pathsim.blocks.lti.TransferFunction(Poles=[], Residues=[], Const=0.0)[source]
Bases:
StateSpaceThis block integrates a LTI (MIMO for pole residue) transfer function.
The transfer function is defined in pole-residue form
H(s) = Const + sum( Residues / (s - Poles) )
where ‘Poles’ are the scalar poles of the transfer function and ‘Residues’ are the possibly matrix valued (in MIMO case) residues of the transfer function. ‘Const’ has same shape as ‘Residues’.
Upon initialization, the state space realization of the transfer function is computed using a minimal gilbert realization.
The resulting statespace model of the form
- d/dt x = A x + B u
y = C x + D u
is handled the same as the ‘StateSpace’ block, where A, B, C and D are the state space matrices, x is the internal state, u the input and y the output vector.
- Parameters:
Poles (array) – transfer function poles
Residues (array) – transfer function residues
Const (array, float) – constant term of transfer function