Discrete spring-mass system

Submodule SpringMass.jl provides the basic features to simulate the flexible appendages of the spacecraft with the discrete spring mass representation, dynamics calculation, and time evolution.

Libraries

FlexibleSpacecraft.StructuresBase.SpringMass.ModalSystemType
ModalSystem

Representation of dynamics part of the structural system in mass-normalized modal coordinate.

Fields

  • dim::Integer: dimension of the structural system
  • PHI::Matrix: modal transformation matrix
  • OMEGA::Matrix: modal angular velocity matrix
  • XI::Matrix: modal damping matrix

Mathematical representation

This data containter corresponds to the left hand side of the equation of motion as follows:

\[\ddot{\mathbf{\eta}} + 2 \boldsymbol{\Xi \Omega} \dot{\mathbf{\eta}} + \boldsymbol{\Omega}^2 \mathbf{\eta} = \ldots\]

The modal transformation is given as:

\[\mathbf{x} = \boldsymbol{\Phi} \boldsymbol{\eta}\]

  • $\boldsymbol{\Phi}$ : transformation matrix from modal coordinate to physical coordinate
  • $\boldsymbol{\Omega}$ : modal angular velocity matrix
  • $\boldsymbol{\Xi}$ : modal damping ratio matrix

Constructor

ModalSystem(PHI::Matrix, OMEGA::Matrix, XI::Matrix)

Example

# You can convert the `physicalsystem::PhysicalSystem` into `::ModalSystem`
physicalsystem = PhysicalSystem(M, C, K)
# Convert representation of the system in modal coordinate
modalsystem = physical2modal(physicalsystem)
source
FlexibleSpacecraft.StructuresBase.SpringMass.PhysicalSystemType
PhysicalSystem

Representation of dynamics part of the structural system in physical coordinate.

Fields

  • dim::Integer: dimension of the structural system
  • mass_matrix::Matrix: mass matrix in physical coordinate
  • damping_matrix::Matrix: damping matrix in physical coordinate
  • stiffness_matrix::Matrix: stiffness matrix in physical coordinate

Mathematical representation

This data containter corresponds to the left hand side of the equation of motion as follows:

\[\mathbf{M} \ddot{\mathbf{x}} + \mathbf{D} \dot{\mathbf{x}} + \mathbf{K} \mathbf{x} = \ldots\]

  • $\mathbf{M}$ : mass matrix
  • $\mathbf{D}$ : damping matrix
  • $\mathbf{K}$ : stiffness matrix

Constructor

PhysicalSystem(mass_matrix::Matrix, damping_matrix::Matrix, stiffness_matrix::Matrix)

Example

# Suppose M, D, K are given

# Create representation of the system in physical coordinate
physicalsystem = PhysicalSystem(M, D, K)
source
FlexibleSpacecraft.StructuresBase.SpringMass.SpringMassModelType
SpringMassModel

Spring mass representation of the entire system modeling

Mathematical representation

\[\ddot{\mathbf{\eta}} + 2 \boldsymbol{\Xi \Omega} \dot{\mathbf{\eta}} + \boldsymbol{\Omega}^2 \mathbf{\eta} = \boldsymbol{\Phi}^{\mathrm{T}} \mathbf{D} \boldsymbol{\omega} + \boldsymbol{\Phi}^{\mathrm{T}} \mathbf{F}_{\mathrm{ctrl}} \mathbf{f_\mathrm{ctrl}} + \boldsymbol{\Phi}^{\mathrm{T}} \mathbf{F}_{\mathrm{dist}} \mathbf{f_\mathrm{dist}}\]

Fields

  • DOF::Integer: dimension of the displacement vector of the system
  • dimcontrolinput::Integer: dimension of the control input vector
  • dimdistinput::Integer: dimension of the disturbance input vector
  • system::ModalSystem: mass-normalized modal representation of the system
  • D::AbstractMatrix: coupling matrix wiht the attitude motion (time derivative of the angular velocity vector)
  • Fctrl::AbstractVecOrMat: coefficient matrix or vector of the control input vector
  • Fdist::AbstractVecOrMat: coefficient matrix or vector of the disturbance input vector
source
FlexibleSpacecraft.StructuresBase.SpringMass.SpringMassParamsType
SpringMassParams

struct for accomodating the parameters for the spring mass structural model

Fields

  • M::AbstractMatrix: mass matrix
  • D::AbstractMatrix: damping matrix
  • K::AbstractMatrix: stiffness matrix
  • Ecoupling::AbstractMatrix: coefficient matrix for the attitude coupling input
  • Econtrol::AbstractVecOrMat: coefficient matrix for the control input
  • Edisturbance::AbstractVecOrMat: coefficient matrix for the disturbance input
source
FlexibleSpacecraft.StructuresBase.SpringMass.StateSpaceType
StateSpace

State space representation of the structural system. This representation is mainly used for the time evolution of the structural system

Mathematical representation

State space equation of the structural system with the control input, coupling input (angular velocity of the attitude dynamics), and the disturbance input is given as:

\[\frac{d}{dt} \mathbf{z} = \mathbf{A} \mathbf{z} + \mathbf{B} \mathbf{u} + \mathbf{E}_{\mathrm{cplg}} \boldsymbol{\omega} + \mathbf{E}_{\mathrm{dist}} \mathbf{f}_{\mathrm{dist}}\]

Each matrix is defined as follows:

\[\mathbf{A} \equiv \begin{bmatrix} \mathbf{0} & \mathbf{I} \\ - \boldsymbol{\Omega}^2 & -2 \boldsymbol{\Xi \Omega} \end{bmatrix} \\ \mathbf{B} \equiv \begin{bmatrix} \mathbf{0} \\ \mathbf{F}_{\mathrm{ctrl}} \end{bmatrix} \\ \mathbf{E}_{\mathrm{cplg}} \equiv \begin{bmatrix} \mathbf{0} \\ \mathbf{D} \end{bmatrix} \\ \mathbf{E}_{\mathrm{dist}} \equiv \begin{bmatrix} \mathbf{0} \\ \mathbf{F}_{\mathrm{dist}} \end{bmatrix}\]

Fields

  • dimstate::Int: dimension of the state vector
  • dimctrlinput::Int: dimension of the control input vector
  • dimdistinput::Int: dimension of the disturbance input vector
  • sysA::SMatrix: system matrix
  • sysB::StaticArray: coefficient matrix or vector for control input
  • sysEcplg::SMatrix: input matrix for the coupling part (subscript represents coupling)
  • sysEdist::StaticArray: coefficient matrix or vector for the disturbance input (subscript represents disturbance)

Constructor

StateSpace(model::SpringMassModel)
source
FlexibleSpacecraft.StructuresBase.SpringMass.modalstate2physicalstateMethod
modalstate2physicalstate(model::StateSpace, modalstates::AbstractVector{<:AbstractVector})

convert the vector of the state vector in modal coordinate into physical coordiniate

Argument

  • model::StateSpace: state-space model for simulation
  • modalstates::AbstractVector{<:AbstractVector}: vector of state vector, which is a trajectory or time history of the state vector

Usage

physicalstates = modalstate2physicalstate(model, states)
source
FlexibleSpacecraft.StructuresBase.SpringMass.modalstate2physicalstateMethod
modalstate2physicalstate(model::StateSpace, state::AbstractVector{<:Real})

convert the state vector in modal coordinate into physical coordiniate

Argument

  • model::StateSpace: state-space model for simulation
  • state::AbstractVector{<:Real}: state vector

Usage

physicalstate = modalstate2physicalstate(model, state)
source
FlexibleSpacecraft.StructuresBase.SpringMass.physicalstate2modalstateMethod
physicalstate2modalstate(model::StateSpace, physicalstates::AbstractVector{<:AbstractVector})

convert the vector of state vector in physical coordinate into modal coordinate

Argument

  • model::StateSpace: state-space model for simulation
  • physicalstates::AbstractVector{<:AbstractVector}: vector of state vector
source
FlexibleSpacecraft.StructuresBase.SpringMass.updatestateMethod
updatestate(model::StateSpace, Tsampling::Real, currenttime::Real, currentstate::AbstractVector, angularvelocity::AbstractVector, controlinput::Union{AbstractVector, Real}, distinput::Union{AbstractVector, Real})::AbstractVector

Calculates time evolution of the structural system with Runge-Kutta method

source