harold.State¶
-
class
harold.
State
(a, b=None, c=None, d=None, dt=None)¶ A class for creating State space models.
-
__init__
(a, b=None, c=None, d=None, dt=None)¶ A State object can be instantiated in a straightforward manner by entering arraylikes.:
>>> G = State([[0, 1], [-4, -5]], [[0], [1]], [1, 0], 1)
For zero feedthrough (strictly proper) models, “d” matrix can be skipped and will be replaced with the zeros array whose shape is inferred from the rows/columns of “c”/”b” arrays.
Setting
SamplingPeriod
property to'None'
will make the system continuous time again and relevant properties are reset to continuous-time properties. However the numerical data will still be the same.
Methods
__init__
(a[, b, c, d, dt])A State object can be instantiated in a straightforward manner by entering arraylikes.. pole_properties
([output_data])The resulting array holds the poles in the first column, natural frequencies in the second and damping ratios in the third. to_array
()If a State representation is a static gain, this method returns a regular 2D-ndarray. validate_arguments
(a, b, c, d[, verbose])An internal command to validate whether given arguments to a State() instance are valid and compatible. Attributes
DiscretizationMatrix
This matrix denoted with \(Q\) is internally used to represent the upper linear fractional transformation of the operation \(\frac{1}{s} I = \frac{1}{z} I \star Q\). DiscretizedWith
This property is used internally to keep track of (if applicable) the original method used for discretization. NumberOfInputs
A read only property that holds the number of inputs. NumberOfOutputs
A read only property that holds the number of outputs. NumberOfStates
A read only property that holds the number of states. PrewarpFrequency
If the discretization method is tustin
then a frequency warping correction might be required the match of the discrete time system response at the frequency band of interest.SamplingPeriod
If this property is called G.SamplingPeriod
then returns the sampling period data.SamplingSet
If this property is called G.SamplingSet
then returns the setZ
orR
for discrete and continuous models respectively.a
If this property is called G.a
then returns the matrix data.b
If this property is called G.b
then returns the matrix data.c
If this property is called G.c
then returns the matrix data.d
If this property is called G.a
then returns the matrix data.matrices
A read only property that returns the model matrices. shape
A read only property that holds the shape of the system as a tuple such that the result is (# of inputs , # of outputs)
.-