EOM 6DOF Custom Variable Mass Euler Angles — Robotics/Equations Of Motion
Robotics/Equations_Of_Motion/EOM_6DOF_Custom_Variable_Mass_Euler_Angles · 5 input / 6 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text
Description#
The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.
EOM 6DOF Custom Variable Mass Euler Angles
Robotics / Equations Of Motion
The six-degree-of-freedom equations of motion of a rigid body whose mass, inertia tensor and its rate are supplied on wires, carried in body axes with the attitude as Euler angles (the 3-2-1 sequence). Every quantity of the fixed-mass EOM 6DOF Euler Angles block, with the mass and inertia read each sample:
- Vb' = F/m − ω × Vb
- ω' = I−1(M − ω × (Iω) − dI/dt·ω)
- the Euler-angle kinematics of EOM 6DOF Euler Angles, singular at θ = ±90°
- Xe' = DCMbeT Vb
Ports
- F – the applied force in body axes, [3,1].
- M – the applied moment about the centre of gravity in body axes, [3,1].
- m – the mass, a nonzero scalar [1,1].
- I_dot – the rate of change of the inertia tensor, [3,3].
- I – the inertia tensor, an invertible [3,3].
- Ve – the velocity in the flat-earth frame, DCMbeT Vb, [3,1].
- Xe – the position in the flat-earth frame, [3,1].
- Euler – the Euler angles [φ; θ; ψ] in radians, [3,1].
- DCMbe – the direction cosine matrix from the flat-earth frame to body axes, [3,3].
- Vb – the velocity in body axes [u; v; w], [3,1].
- wb – the body rates [p; q; r] in rad/s, [3,1].
Parameters
- Units – Metric (MKS) (the default) or English (velocity in ft/s). The two are the same arithmetic, so the choice only says which units the numbers are in.
- Initial Position [Xe Ye Ze] – three values. Defaults to [0 0 0].
- Initial Velocity [U V W] – the initial body velocity, three values. Defaults to [0 0 0].
- Initial Euler Angles [phi theta psi] – in radians, three values, with |θ| below 90°. Defaults to [0 0 0].
- Initial Body Rates [p q r] – in rad/s, three values. Defaults to [0 0 0].
- Integration Substeps – M, how many fourth-order Runge-Kutta steps a sample is integrated with on the discrete solver and in exported code, a whole number of 1 or more. Defaults to 100. No Simulink counterpart.
- Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.
Code export
All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. A core holds the 12 states, publishes the outputs from them, and integrates one sample with the inputs held and M Runge-Kutta substeps – with M = 100, the same computation as Simulink's fixed-step ode4 at one hundredth of the sample time. The inertia is inverted in closed form at every derivative evaluation.
The three HDL targets are simulation-only real arithmetic, quantized at the port: a sine of a state has no Q16.16 form. The cores simulate correctly and are not offered as synthesizable.
Simulink bridge
Import and export, mapped to Aerospace Blockset's aerolib6dof2/Custom Variable Mass 6DOF (Euler Angles): Units → units (the two offered values 1:1), Initial Position [Xe Ye Ze] → xme_0, Initial Velocity [U V W] → Vm_0, Initial Euler Angles [phi theta psi] → eul_0, Initial Body Rates [p q r] → pm_0. Always emitted with mtype = Custom Variable and vre_flag and mass_flag off: each of those moves that block's port list, and this block has one. The knots unit system is not offered – it converts velocities inside the integration – and an imported one is reported. The dialog's mass_0, inertia and empty/full values are not read at this mass type and are not offered. "Sampling Time (s)" does not cross: the Simulink block is continuous and defines no SampleTime.
Notes
- Stateful, continuous and nonlinear: 12 continuous states. The outputs are states or functions of them, so the block has no direct feedthrough and a loop through it is not an algebraic loop.
- The mass and the inertia divide, so the m wire must not carry zero and the I wire must stay invertible; the block does not check that I and I_dot agree.
- θ = ±90° is the Euler kinematics' singularity, as in the fixed-mass block.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Equations_Of_Motion/EOM_6DOF_Custom_Variable_Mass_Euler_Angles |
| family | Robotics/Equations_Of_Motion |
| solver environment class | ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Custom_Variable_Mass_Euler_Angles |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/EOM_6DOF_Custom_Variable_Mass_Euler_Angles/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Custom_Variable_Mass_Euler_Angles.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/EOM_6DOF_Custom_Variable_Mass_Euler_Angles/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_EOM_6DOF_Custom_Variable_Mass_Euler_Angles.h |
| default size on canvas | 160 × 150 px |
| ports at insert | 5 in, 6 out |
| code generators implemented | Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text |
Ports#
| # | Direction | Signal type | Description label |
|---|---|---|---|
| 1 | in | ICoreDouble | F |
| 2 | in | ICoreDouble | M |
| 3 | in | ICoreDouble | m |
| 4 | in | ICoreDouble | I_dot |
| 5 | in | ICoreDouble | I |
| 6 | out | ICoreDouble | Ve |
| 7 | out | ICoreDouble | Xe |
| 8 | out | ICoreDouble | Euler |
| 9 | out | ICoreDouble | DCMbe |
| 10 | out | ICoreDouble | Vb |
| 11 | out | ICoreDouble | wb |
Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.
Configuration variables#
| Config variable | Default | Simulink parameter |
|---|---|---|
Units | Metric (MKS)%~%English (velocity in ft/s)~~Metric (MKS) | units |
Initial Position [Xe Ye Ze] | [0 0 0] | xme_0 |
Initial Velocity [U V W] | [0 0 0] | Vm_0 |
Initial Euler Angles [phi theta psi] | [0 0 0] | eul_0 |
Initial Body Rates [p q r] | [0 0 0] | pm_0 |
Integration Substeps | 100 | not crossed |
Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.
Simulink bridge#
| support | Support::Both |
| Simulink path | aerolib6dof2/Custom Variable Mass 6DOF (Euler Angles) |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
| deliberately not crossed | Integration Substeps |
| always set | mtype = Custom Variable, vre_flag = off, mass_flag = off |
| ICore config | Simulink parameter | Value translation |
|---|---|---|
Units | units | Metric (MKS) → Metric (MKS), English (velocity in ft/s) → English (velocity in ft/s) |
Initial Position [Xe Ye Ze] | xme_0 | passes through |
Initial Velocity [U V W] | Vm_0 | passes through |
Initial Euler Angles [phi theta psi] | eul_0 | passes through |
Initial Body Rates [p q r] | pm_0 | passes through |
Caveat (shown to the user): aerolib6dof2/Custom Variable Mass 6DOF (Euler Angles) is continuous and has NO SampleTime parameter (verified against the R2026a block dialog). mtype, vre_flag and mass_flag are pinned because each moves that block's port list; the kts unit system is not offered because it converts velocities inside the integration; mass_0, inertia and the empty/full values are not read at this mass type; "Integration Substeps" is how this block integrates a sample and has no counterpart
Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h
Description vs code#
The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:
B0every stimulus in the sample errored — cross-checks skipped
The verdict above is
tools/docs/check_block_descriptions.py(P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.
File banner (developer view)#
The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).
Custom Variable Mass 6DOF (Euler Angles) -- rigid-body equations of motion, custom variable mass The fixed-mass 6DOF (Euler Angles) block's state and outputs, with the mass and inertia on wires.
Vb' = F/m - omega x Vb omega' = I^-1 (M - omega x (I omega) - Idot omega) with m, Idot and I read off the inputs every sample (F, M, m, dI/dt, I -- measured order).
⚠ MEASURED AGAINST R2026a (a compiled EOM6DOFBodyEuler block at mtype = Custom Variable): ode4 at 1e-4 for 0.5 s from a state with every component nonzero, under constant, distinct inputs and an asymmetric inertia with a nonzero rate, the equations above reproduce Vb and omega to every printed digit -- and the same run WITHOUT the Idot omega term, or with its sign flipped, is out in the second decimal. There is no dm/dt input and no mass-flow term while vre_flag is off.
I^-1 is the ADJUGATE over the determinant, formed at every derivative evaluation from the wire's entries, where the Simulink block solves; the two agree to rounding. Units, the pins and the ode4 equivalence are the fixed-mass 6DOF (Euler Angles) block's.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at EOM 6DOF Custom Variable Mass Euler Angles block: ICore Blocks/Home/EOM 6DOF Custom Variable Mass Euler Angles. That is a fact about the single-block rig, not a verdict on the block: an offline batch fit, a block whose output only appears at onSolverFinish, or one that needs a driven environment cannot be exercised alone.
Category unsampled · sample time 0.1 · 60 steps · commit 07cc682bf · produced by docsSample --out <folder> --blocks EOM_6DOF_Custom_Variable_Mass_Euler_Angles EOM_6DOF_Custom_Variable_Mass_Quaternion EOM_6DOF_Simple_Variable_Mass_Euler_Angles EOM_6DOF_Simple_Variable_Mass_Quaternion --steps 60
Sample data: docs/generated/samples/Robotics__Equations_Of_Motion__EOM_6DOF_Custom_Variable_Mass_Euler_Angles.json