Discrete Wind Gust Model — Robotics/Wind
Robotics/Wind/Discrete_Wind_Gust_Model · 1 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.
Discrete Wind Gust Model
Robotics / Wind
The MIL-F-8785C “1 − cosine” discrete gust, on up to three body axes. From the gust start time t0 on, each enabled axis integrates the airspeed V into a distance x travelled into the gust, held in [0, d], and blows
- w = (vm/2)·(1 − cos(π·x/d)) – rising from 0 to the amplitude vm over the gust length d, and staying at vm once the gust has been flown through.
“Discrete” is the name of the gust's shape, a single event rather than turbulence.
Ports
- Input – V, the airspeed, a scalar [1,1], in m/s, ft/s or knots per Units.
- Output – the gust velocity [ug; vg; wg] along the body axes, [3,1], in the unit the amplitude is given in. A disabled axis is 0.
Parameters
- Units – the unit system:
- Metric (MKS) – airspeed and amplitude in m/s, lengths in m (the default).
- English (Velocity in ft/s) – airspeed and amplitude in ft/s, lengths in ft.
- English (Velocity in kts) – airspeed and amplitude in knots, lengths in ft; the airspeed is converted to ft/s (×1852/3600/0.3048) before it is integrated.
- Gust In u-axis, Gust In v-axis, Gust In w-axis – on (the default for all three) or off, per body axis.
- Gust Start Time (s) – t0, a scalar. Defaults to 5.
- Gust Length [dx dy dz] – d per axis, three values > 0. Defaults to [120 120 80].
- Gust Amplitude [ug vg wg] – vm per axis, three values, either sign. Defaults to [3.5 3.5 3.0].
- 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. Each core counts its own samples for the time, keeps the three distances as state, publishes the gust from them and then advances them by V·τ, τ being the part of the sample after t0. The lengths, amplitudes, start time and sample time are folded to constants at export time.
The three HDL targets are simulation-only real
arithmetic, quantized at the port: a cosine 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
aerolibwind2/Discrete Wind Gust Model: Units →
units (1:1, lossless), Gust In u-axis → Gx,
Gust In v-axis → Gy, Gust In w-axis →
Gz, Gust Start Time (s) → t_0, Gust Length
[dx dy dz] → d_m and Gust Amplitude [ug vg wg] →
v_m – the block's whole dialog. "Sampling Time (s)" does not
cross: the Simulink block defines no SampleTime parameter,
measured on R2026a.
Notes
- Discrete-only and stateful: the three distances into the gust and a sample counter. The Simulink block integrates the airspeed continuously; this one integrates it exactly for an airspeed held across each sample, which is the same thing whenever the airspeed is sampled at the block's rate.
- The output does not depend on this sample's airspeed, only on the distance flown so far, so a feedback loop through the block is not an algebraic loop.
- A negative airspeed winds the distance back towards 0, where it is held.
Code facts#
| Fact | Value |
|---|---|
| registered type | Robotics/Wind/Discrete_Wind_Gust_Model |
| family | Robotics/Wind |
| solver environment class | ICoreBlock_0_Robotics_1_Wind_2_Discrete_Wind_Gust_Model |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Wind/Discrete_Wind_Gust_Model/ICoreBlock_0_Robotics_1_Wind_2_Discrete_Wind_Gust_Model.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Robotics/Wind/Discrete_Wind_Gust_Model/ICoreBlock_0_Robotics_1_Wind_2_Discrete_Wind_Gust_Model.h |
| default size on canvas | 120 × 80 px |
| ports at insert | 1 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 | — |
| 2 | out | ICoreDouble | — |
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)%~%English (Velo… | units |
Gust In u-axis | on%~%off~~on | Gx |
Gust In v-axis | on%~%off~~on | Gy |
Gust In w-axis | on%~%off~~on | Gz |
Gust Start Time (s) | 5 | t_0 |
Gust Length [dx dy dz] | [120 120 80] | d_m |
Gust Amplitude [ug vg wg] | [3.5 3.5 3.0] | v_m |
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 | aerolibwind2/Discrete Wind Gust Model |
| port-count rule | PortsParam::None |
SampleTime parameter | no — the counterpart defines none; the rate stays on the ICore side |
| ICore config | Simulink parameter | Value translation |
|---|---|---|
Units | units | Metric (MKS) → Metric (MKS), English (Velocity in ft/s) → English (Velocity in ft/s), English (Velocity in kts) → English (Velocity in kts) |
Gust In u-axis | Gx | on → on, off → off |
Gust In v-axis | Gy | on → on, off → off |
Gust In w-axis | Gz | on → on, off → off |
Gust Start Time (s) | t_0 | passes through |
Gust Length [dx dy dz] | d_m | passes through |
Gust Amplitude [ug vg wg] | v_m | passes through |
Caveat (shown to the user): aerolibwind2/Discrete Wind Gust Model has NO SampleTime parameter (verified against the R2026a block dialog), so "Sampling Time (s)" does not cross
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).
Discrete Wind Gust Model — the MIL-F-8785C 1 - cosine gust on up to three body axes Per sample k, at t_k = start + k*Ts:
w_a = (vm_a / 2) * (1 - cos((pi / d_a) * x_a)) published first tau = min(max((t_k + Ts) - max(t_k, t0), 0), Ts) the part after the start x_a := min(max(x_a + (kV * V) * tau, 0), d_a) enabled axes only
⚠ MEASURED AGAINST R2026a BEFORE ANY OF IT WAS WRITTEN. The masked subsystem is three Enabled Subsystems, each one limited Integrator [0, d] with IC 0 and "held" outputs, enabled by Clock >= t_0 AND the axis flag, then Gain pi./d_m, cos, 1.0 - that, Gain v_m/2.0. The chain above reproduces the block, run at a fixed step of Ts/100 with the airspeed held per sample, to 6.8e-14 in Metric (start time on and off the sample grid) and 4.5e-14 in knots.
DISCRETE-ONLY, and it owns a sample counter rather than reading the solver's clock: the exported cores count samples the same way, so the moment the gust starts is decided by one expression everywhere instead of by two clocks that can disagree in the last bit.
Sample results#
The same rig also ran:
| Stimulus | What it is | Output range |
|---|---|---|
impulse | Impulse: one sample of 1 at k = 5, 0 elsewhere (Repeating Sequence Stair) | 0 … 0 |
ramp | Ramp: slope 1 from t = 0 | 0 … 0.01415 |
sine | Sine Wave: amplitude 1, 2 rad/s, no phase, no bias | 0 … 0 |
table | Repeating Sequence Stair: [-2 -1 -0.5 0 0.5 1 2 3], one entry per sample | 0 … 2.534e-4 |
Plotted: step — Step: 0 -> 1 at t = 1 s
Category dynamic · sample time 0.1 · 60 steps · commit fc85ac64df179e0aadfcbe797a2731524d14cbb9 · produced by docsSample --out <folder> --blocks Linear_Second_Order_Actuator Nonlinear_Second_Order_Actuator Wind_Shear_Model Discrete_Wind_Gust_Model Julian_Date_Conversion --steps 60 · data docs/generated/samples/Robotics__Wind__Discrete_Wind_Gust_Model.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).