visualdynamics.io.rattlesnake_state_space¶
rattlesnake_state_space
¶
Write a modal state-space model as Rattlesnake's state-space hardware file.
The controller's state-space virtual hardware loads a NumPy .npz (or
MATLAB .mat) holding A, B, C and D, integrates the model at its
sample rate, and returns C x + D u as each channel's value. It checks
that C and D have a row per channel of its channel table and that B
and D have a column per channel with a feedback device, the drives, so
the model is written for one table and matches that table row for row
(core.state_space).
The file also holds channel_dof, input_dof, channel_unit and
mode_frequency, which the controller ignores. They say what the rows,
the columns and the states are, since the file has no other place for
units.
Functions:
| Name | Description |
|---|---|
save |
Write |
Classes¶
Functions:¶
save
¶
save(model: StateSpaceModel, path: str | PathLike) -> None
Write model to path as an uncompressed .npz.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
StateSpaceModel
|
The model to write. |
required |
path
|
str or PathLike
|
Where to write it. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|