🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::BlockStateTransitionMatrix类 参考

#include <BlockStateTransitionMatrix.hpp>

+ 类 ast::BlockStateTransitionMatrix 继承关系图:

Public 成员函数

 BlockStateTransitionMatrix (const BlockStateTransitionMatrix &)=delete
 
BlockStateTransitionMatrixoperator= (const BlockStateTransitionMatrix &)=delete
 
errc_t run (const SimTime &simTime) override
 
- Public 成员函数 继承自 ast::BlockDerivative
 ~BlockDerivative () override=default
 
const std::vector< DataPort > & getDerivativePorts () const
 
std::vector< DataPort > & getDerivativePorts ()
 
- Public 成员函数 继承自 ast::FuncBlock
const std::vector< DataPort > & getInputPorts () const
 
std::vector< DataPort > & getInputPorts ()
 
const std::vector< DataPort > & getOutputPorts () const
 
std::vector< DataPort > & getOutputPorts ()
 
size_t getNumInputPorts () const
 
size_t getNumOutputPorts () const
 
DataPortgetInputPort (StringView portName)
 
DataPortgetOutputPort (StringView portName)
 
DataPortgetInputPort (size_t portIndex)
 
DataPortgetOutputPort (size_t portIndex)
 
DataPort::EValueType getInputPortDataType (size_t portIndex)
 
DataPort::EValueType getOutputPortDataType (size_t portIndex)
 
void * getInputPortSignal (size_t portIndex)
 
void * getOutputPortSignal (size_t portIndex)
 
double * getInputPortRealSignal (size_t portIndex)
 
double * getOutputPortRealSignal (size_t portIndex)
 
int getInputPortWidth (size_t portIndex)
 
int getOutputPortWidth (size_t portIndex)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 ast::FuncBlock
static errc_t connect (FuncBlock *src, StringView srcPortName, FuncBlock *dst, StringView dstPortName)
 
static errc_t connect (FuncBlock *src, size_t srcPortIndex, FuncBlock *dst, size_t dstPortIndex)
 
- Protected 属性 继承自 ast::BlockDerivative
std::vector< DataPortderivativePorts_ {}
 
- Protected 属性 继承自 ast::FuncBlock
std::vector< DataPortinputPorts_ {}
 
std::vector< DataPortoutputPorts_ {}
 

详细描述

状态转换矩阵(STM)函数块

计算状态转换矩阵 Φ(t) 的时间导数,用于线性化误差传播。

微分方程: dΦ/dt = A(t) · Φ(t), Φ(0) = I

其中: Φ = 状态转换矩阵(6×6),将初始状态偏差映射到当前时刻 A(t) = 动力学雅可比矩阵 ∂f/∂x(6×6)

A 矩阵结构(6维状态:位置3 + 速度3): ┌ ┐ │ 0 I │ 上左 3×3:零矩阵(位置导数不直接依赖位置) │ ∂a/∂r ∂a/∂v │ 上右 3×3:单位矩阵(位置对速度的导数 = 速度) └ ┘ 下左 3×3:加速度对位置的偏导数 下右 3×3:加速度对速度的偏导数

工作流程:

  1. 各力模型块(BlockTwoBody、BlockGravity、BlockDrag 等)计算各自的 加速度梯度(∂a_i/∂r, ∂a_i/∂v),累加到 A 矩阵中
  2. 本块读取组装好的 A 矩阵和当前状态转换矩阵 Φ
  3. 计算 dΦ/dt = A · Φ,输出到导数端口供积分器使用

输入端口:

  • "AMatrix":动力学雅可比矩阵 A(t)(36维,6×6 行优先存储)

输出端口:

  • "StateTransitionMatrix":状态转换矩阵 Φ(36维,6×6 行优先存储)
    注解
    该端口信号会被 BlockDynamicSystem 重定向到状态向量, 积分器负责更新 Φ 的值,本块仅读取 Φ 用于计算其导数
    导数端口:
  • "StateTransitionMatrix":Φ 的时间导数 dΦ/dt(36维,6×6 行优先存储)
注解
Φ(0) = I 的初始化由调用方在设置初始状态向量时完成
参见
BlockDynamicSystem, BlockAstro.hpp

成员函数说明

◆ run()

errc_t ast::BlockStateTransitionMatrix::run ( const SimTime & simTime)
overridevirtual

计算函数块

参数
simTime仿真时间
返回
错误码

实现了 ast::FuncBlock.


该类的文档由以下文件生成: