Angular Acceleration 6DOF — Robotics/Equations Of Motion
Robotics/Equations_Of_Motion/Angular_Acceleration_6DOF · 3 input / 1 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.
6DOF Angular Acceleration
Robotics / Equations Of Motion
Euler's rigid-body equation solved for the angular acceleration of a body with a fixed inertia tensor:
dω/dt = I⁻¹ · ( M − ω × (I·ω) )
The second term is the gyroscopic one, and it is what makes this more than a division: a body spinning with unequal principal inertias accelerates about axes no moment was applied to. It vanishes only when I·ω is parallel to ω.
Ports
- omega – the body angular rates ω = [p q r]’, a [3,1] column in rad/s.
- I – the inertia tensor, a [3,3] signal in the same body axes. It is inverted every sample, so it may vary – but its RATE is not part of this block's equation (see Notes).
- M – the applied moment about the centre of gravity, a [3,1] column.
- dOmega/dt – the angular acceleration dω/dt, a [3,1] column. Its size does not follow any input: it is always three.
The port order is omega, I, M, which is the Simulink block's own and is not the order the formula reads. The two vector ports have the same shape, so a model wired M first passes every size check and answers a plausible, wrong acceleration.
Parameters
- Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.
There are no others: everything the equation needs arrives on a port.
Code export
All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text.
The three HDL targets are simulation-only real
arithmetic, not synthesizable fixed point. The answer divides by a determinant
that is itself a difference of six triple products, and a realistic inertia
tensor is four orders past the ±32767 a Q16.16 word holds before that
determinant is even formed. They quantize at the port boundary and evaluate in
real – correct in simulation, and not offered as hardware.
Invert 3x3 Matrix makes the same choice for the same reason.
Simulink bridge
Import and export, mapped to Aerospace Blockset's
aerolib6dof2/6DOF Angular Acceleration at its Fixed mass
type, which is pinned as a fixed parameter. Nothing else is mapped: the block's
other dialog parameter, units, was measured to be inert here
– all three of its values give byte-identical output on the same numbers,
because nothing in this equation is a velocity – so offering it as a config
that changed nothing would be a lie in the configuration panel. The Simulink
block defines no SampleTime, so the rate stays on the ICore
side and a block given an explicit positive period reports that it did not
cross.
⚠ The mass type reorders the ports rather than merely adding one: measured in R2026a, Fixed is (ω, I, M), Custom Variable is (ω, M, dI/dt, I) with the tensor LAST, and Simple Variable is five ports. An import carrying either of those is reported rather than silently wired.
Notes
- Algebraic and stateless: the output depends on this sample alone.
- A singular inertia tensor answers all zeros – determinant exactly zero – rather than infinities, on an exact test and not a tolerance band. A near-singular tensor has a real inverse with large entries and gets it. The hardware targets take the same branch, where the reason is sharper: fixed point has no infinity and no NaN to return.
- The inertia RATE is not in this equation. A body whose tensor changes – burning fuel, deploying a boom – carries a further −(dI/dt)·ω term, which the Simulink block adds only at its variable mass types. This block is the fixed-inertia one; feed it a varying I and it answers the fixed-inertia equation evaluated at the current tensor.
- The gyroscopic term is where a wrong implementation hides. With a diagonal tensor and rates about one axis it is identically zero, and a block that dropped it entirely would still look right. It is ω × (I·ω), not (I·ω) × ω, which differ by a sign.
- Not linear – a product of inputs, and an inverse – so the block carries no state space and model reduction correctly reports it as unmergeable.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Equations_Of_Motion/Angular_Acceleration_6DOF |
| family | Robotics/Equations_Of_Motion |
| solver environment class | ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_6DOF |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Angular_Acceleration_6DOF/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_6DOF.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Angular_Acceleration_6DOF/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_6DOF.h |
| default size on canvas | 140 × 92 px |
| ports at insert | 3 in, 1 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 | omega |
| 2 | in | ICoreDouble | I |
| 3 | in | ICoreDouble | M |
| 4 | out | ICoreDouble | dOmega/dt |
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#
No config variable beyond the Sampling Time (s) every block carries.
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/6DOF Angular Acceleration |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
| always set | mtype = Fixed |
Caveat (shown to the user): the mapping is the library path, the pinned mass type and the port order: omega, then I, then the moment -- which is NOT the order dw/dt = I^-1 (M - w x I w) reads. mtype is pinned to Fixed because the parameter REORDERS the ports rather than merely adding one (measured: Custom Variable is omega, Moment, dIdt, I, with the tensor last), so an import carrying another value is reported. The block's other parameter, units, is inert here -- all three values give byte-identical output -- and is therefore not offered as a config. No SampleTime parameter, so the rate stays on the ICore side
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).
6DOF Angular Acceleration -- dw/dt = I^-1 * ( M - w x (I w) ) Euler's rigid-body equation solved for the angular acceleration, with the inertia tensor and the applied moment both arriving on ports.
MEASURED AGAINST R2026a rather than asserted. aerolib6dof2/6DOF Angular Acceleration at its default mass type, fed w = [0.13 -0.27 0.41]', I = [1200 -30 40; -30 2500 -55; 40 -55 3100] and M = [210 -140 95]', answers
(0.22407953623858309, -0.01487238381555854, 0.041184624980839017)
and MATLAB's own I \ (M - cross(w, I*w)) agrees to the last two bits. Reading the mask confirms the shape: a Subtract with signs "+--" forming M - w x (I w) - (dI/dt) w, then one Product in matrix-divide mode. At the Fixed mass type the dI/dt arm is a Ground, so the term is structurally absent rather than merely zero.
⚠ THE PORT ORDER IS omega, I, Moment. It is the Simulink block's own inner Inport order and it is NOT the order the formula reads -- the moment is written first and wired third. The two vector ports are interchangeable by shape, so a model wired "Moment, I, omega" is accepted by every size check there is and answers a plausible, wrong angular acceleration.
⚠⚠ THE MASS TYPE REORDERS THE PORTS, WHICH IS WHY THIS BLOCK PINS IT. Measured on the same block: Fixed is (omega, I, Moment); Custom Variable is (omega, Moment, dIdt, I) -- four ports and I LAST; Simple Variable is (omega, I, dIdtConst, Moment, mdot), five. So the parameter does not merely add an input, it MOVES the ones already there. The bridge sets mtype = 'Fixed' as a fixed parameter, and an import carrying anything else is reported.
⚠
unitsIS INERT ON THIS BLOCK, MEASURED. All three values -- Metric (MKS), English (Velocity in ft/s), English (Velocity in kts) -- give byte-identical output on the same numbers, because nothing here is a velocity. It is therefore not mapped to a config: an ICore combo that changed nothing would be a lie in the configuration panel.THE THREE HDL TARGETS ARE SIMULATION-ONLY
real. The answer divides by a determinant that is itself a difference of six triple products, and a realistic inertia tensor is four orders above what a Q16.16 word holds before the determinant is even formed. They quantize at the port boundary and evaluate in real, which is correct in simulation and is not offered as hardware -- the same choice Invert 3x3 Matrix makes, for the same reason.A SINGULAR INERTIA TENSOR ANSWERS ALL ZEROS, on an EXACT zero determinant rather than a tolerance band -- the convention Invert 3x3 Matrix already set in this tree. A near-singular tensor has a real inverse with large entries and gets it.
Sample results#
No stimulus produced a sampled output in this rig — Invalid input size at 6DOF Angular Acceleration block: ICore Blocks/Home/Angular Acceleration 6DOF. 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 901c8f3d91c4f7251430ad097012afb44717ccc2 · produced by docsSample --out <folder> --blocks Equations_Of_Motion --steps 60
Sample data: docs/generated/samples/Robotics__Equations_Of_Motion__Angular_Acceleration_6DOF.json