Generated reference › Angular Acceleration 3DOF — Robotics/Equations Of Motion
kind: generated#block#robotics-equations-of-motion

Angular Acceleration 3DOF — Robotics/Equations Of Motion

Robotics/Equations_Of_Motion/Angular_Acceleration_3DOF · 4 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.

3DOF Angular Acceleration

Robotics / Equations Of Motion

The longitudinal – pitch-only – rigid-body equation, with the pitch inertia allowed to change:

dq/dt = ( M − q·dIyy/dt ) / Iyy

The second term in the numerator is the angular momentum carried away by a changing inertia: a vehicle burning fuel or deploying a surface pitches even under no applied moment. With a constant inertia it is zero and the equation is the familiar M/I.

Ports

  • q – the pitch rate, a [1,1] scalar in rad/s. It is read only through the inertia-rate term, so with a zero rate it has no effect on the answer.
  • M – the applied pitching moment, a [1,1] scalar.
  • dIyy/dt – the rate of change of the pitch inertia dIyy/dt, a [1,1] scalar. Wire a constant zero here for a fixed-inertia vehicle.
  • Iyy – the pitch moment of inertia Iyy, a [1,1] scalar. It is last.
  • dq/dt – the pitch angular acceleration, a [1,1] scalar.

⚠ The port order is q, M, dIyy/dt, Iyy, which is the Simulink block's own and is not the order the formula reads. All four are scalars, so a wrong wiring passes every size check there is.

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 an inertia arriving on a port, and the Q16.16 base a block body is given has no division. They quantize at the port boundary and evaluate in real – correct in simulation, and not offered as hardware.

Simulink bridge

Import and export, mapped to Aerospace Blockset's aerolib3dof2/3DOF Angular Acceleration at its Custom Variable mass type, which is pinned as a fixed parameter and is the port shape above. 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, because nothing in this equation is a velocity. 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 and removes ports: measured in R2026a, Fixed is (q, Iyy, M) with three ports, and Simple Variable has five. An import carrying either is reported rather than silently wired.

Notes

  • Algebraic and stateless: the output depends on this sample alone.
  • A zero inertia answers zero rather than an infinity, on an exact zero test and not a tolerance band. A very small inertia gives a very large acceleration and is left alone.
  • The fixed-inertia case is this block with a zero on the rate port. That is deliberate: with the rate structurally absent the equation is M/I and the q port is never read, which is Control Systems / Base Blocks / Divide and already in this library. Reach for that one when the inertia is constant and this one when it is not.
  • Not linear – a division by an input and a product of two others – so the block carries no state space and model reduction correctly reports it as unmergeable.
  • The three-dimensional counterpart is 6DOF Angular Acceleration, which carries the full tensor and the gyroscopic term this scalar form has no room for.

Code facts#

FactValue
registered typeRobotics/Equations_Of_Motion/Angular_Acceleration_3DOF
familyRobotics/Equations_Of_Motion
solver environment classICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_3DOF
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Angular_Acceleration_3DOF/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_3DOF.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Equations_Of_Motion/Angular_Acceleration_3DOF/ICoreBlock_0_Robotics_1_Equations_Of_Motion_2_Angular_Acceleration_3DOF.h
default size on canvas132 × 96 px
ports at insert4 in, 1 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreDoubleq
2inICoreDoubleM
3inICoreDoubledIyy/dt
4inICoreDoubleIyy
5outICoreDoubledq/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.

supportSupport::Both
Simulink pathaerolib3dof2/3DOF Angular Acceleration
port-count rulePortsParam::None
SampleTime parameterno — the counterpart defines none; the rate stays on the ICore side
always setmtype = Custom Variable

Caveat (shown to the user): the mapping is the library path, the pinned mass type and the port order: q, then the moment, then dIyy/dt, then Iyy LAST -- which is NOT the order dq/dt = (M - q dIyy/dt)/Iyy reads. mtype is pinned to Custom Variable because that is the four-port shape this block carries; Fixed has three ports in a different order and Simple Variable five, so an import carrying either 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 lists agree. check_block_descriptions.py finds no disagreement between the description's Ports, Parameters, Code export and Simulink bridge lists and the code's.

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).

3DOF Angular Acceleration -- dq/dt = ( M - q * dIyy/dt ) / Iyy The longitudinal, pitch-only rigid-body equation, with the pitch inertia allowed to change: a vehicle burning fuel or deploying a surface has a moment of inertia that moves, and the q*dIyy/dt term is the angular momentum that goes with it.

MEASURED AGAINST R2026a at the Simulink block's CUSTOM VARIABLE mass type, which is the port shape this block carries. q = 0.21, M = 2500, dIyy/dt = 140, Iyy = -140 answers -17.647142857142857, and (2500 - 0.21*140)/(-140) is that number. Reading the mask confirms the shape: one Product forming q*dIdt, a Sum with signs "+-", and one Divide.

⚠⚠ WHY THIS BLOCK IS THE VARIABLE-INERTIA ONE, WHICH IS A DECISION AND NOT A DETAIL. At the Simulink block's FIXED mass type the same block is dq/dt = M / Iyy with three ports, and its FIRST input -- q -- is then never read at all. That is Base_Blocks/Divide with a dead port beside it, so shipping it under a new name would have added a second spelling of a block this library already has. Wiring a constant zero into dIyy/dt recovers the fixed-inertia case exactly, which is the whole of what the Fixed type does.

⚠ THE PORT ORDER IS q, M, dIyy/dt, Iyy AND THE INERTIA IS LAST. It is the Simulink block's own inner Inport order at that mass type -- measured, and NOT the order the formula reads. All four ports are scalars, so a wrong wiring passes every size check there is: the rig drives all four from independent gates for exactly that reason.

⚠ units IS 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 offered as a config.

THE THREE HDL TARGETS ARE SIMULATION-ONLY real: the answer divides by an inertia arriving on a PORT, and the Q16.16 base a block body is given has no division -- the same reason Invert 3x3 Matrix evaluates in real.

A ZERO INERTIA ANSWERS ZERO, on an EXACT zero rather than a tolerance band, which is the convention this tree already set for a division by a port value.

Sample results#

Angular Acceleration 3DOF — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sampleAngular Acceleration 3DOF — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample-202012345t (s)in ICoreDouble-Out-0in ICoreDouble-Out-0in ICoreDouble-Out-0out ICoreDouble-Out-0
tin ICoreDouble-Out-0in ICoreDouble-Out-0in ICoreDouble-Out-0out ICoreDouble-Out-0
0-2-2-23
0.40.50.50.50.5
0.8-2-2-23
1.20.50.50.50.5
1.6-2-2-23
20.50.50.50.5
2.4-2-2-23
2.80.50.50.50.5
3.2-2-2-23
3.60.50.50.50.5
4-2-2-23
4.40.50.50.50.5
4.8-2-2-23
5.20.50.50.50.5

Every 4th of 60 samples, from the table stimulus.

The same rig also ran:

StimulusWhat it isOutput range
impulseImpulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair)0 … 0
rampRamp: slope 1 from t = 0-4.8 … 0.9
sineSine Wave: amplitude 1, 2 rad/s, no phase, no bias0 … 2
stepStep: 0 -> 1 at t = 1 s0 … 0

Plotted: table — Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample

Category static · sample time 0.1 · 60 steps · commit 901c8f3d91c4f7251430ad097012afb44717ccc2 · produced by docsSample --out <folder> --blocks Equations_Of_Motion --steps 60 · data docs/generated/samples/Robotics__Equations_Of_Motion__Angular_Acceleration_3DOF.json · the SVG is generated from those numbers by tools/docs/plot_svg.py, so it is a run and not a drawing (R-D10).