Expand description
This module is used to build the state space model of the telescope structure
A state space model is represented by the structure DiscreteModalSolver that is created using the builder DiscreteStateSpace.
The transformation of the FEM continuous 2nd order differential equation
into a discrete state space model is performed by the [Exponential] structure
(for the details of the transformation see the exponential module ).
§Example
The following example loads a FEM model and converts it into a state space model setting the sampling rate and the damping coefficients and truncating the eigen frequencies. A single input and a single output are selected.
use gmt_fem::FEM;
use gmt_dos_clients_fem::{DiscreteStateSpace, DiscreteModalSolver,
fem_io::{actors_inputs::OSSM1Lcl6F, actors_outputs::OSSM1Lcl}};
#[cfg(not(feature = "cuda"))]
use gmt_dos_clients_fem::solvers::Exponential;
#[cfg(feature = "cuda")]
use gmt_dos_clients_fem::solvers::{CuStateSpace, Exponential};
let sampling_rate = 1e3; // Hz
let fem = FEM::from_env()?;
#[cfg(not(feature = "cuda"))]
let mut fem_ss: DiscreteModalSolver<Exponential> = DiscreteStateSpace::from(fem)
.sampling(sampling_rate)
.proportional_damping(2. / 100.)
.ins::<OSSM1Lcl6F>()
.outs::<OSSM1Lcl>()
.build()?;
#[cfg(feature = "cuda")]
let mut fem_ss: DiscreteModalSolver<CuStateSpace> = DiscreteStateSpace::<Exponential>::from(fem)
.sampling(sampling_rate)
.proportional_damping(2. / 100.)
.ins::<OSSM1Lcl6F>()
.outs::<OSSM1Lcl>()
.build()?;Modules§
- actors_
interface - GMT Finite Element Model client
- fem_io
- FEM inputs/outputs definitions
- solvers
Structs§
- Discrete
Modal Solver - This structure represents the actual state space model of the telescope
- Discrete
State Space - This structure is the state space model builder based on a builder pattern design
Enums§
- State
Space Error - Switch
- Select/deselect FEM inputs/outputs