Band model
Requirements.Examples.Elementary.Margin.Band
ยท source
A sine against a band: During's margin is min(u - lo, hi - u)/scale in closed form, the worst 0.5 at t = 7.5 s
Extends Modelica.Icons.Example
A temperature 293.15 + 7 sin(2π t / 10 s) K against within 12 degC and 30 degC (285.15 .. 303.15 K)
with a tolerance of 2 K: During(check = lo ≤ u ≤ hi, rho = min(u − lo, hi − u), scale = 2).
The margin is min(8 + 7 sin, 10 − 7 sin)/2 in closed form; the requirement is satisfied
throughout and the closest call is at t = 7.5 s (the minimum of the sine, 1 K above the lower bound): margin 0.5,
half a tolerance -- what a report shows amber.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Components and variables
| Name | Type | Description |
|---|---|---|
T | Modelica.Blocks.Sources.Sine | a temperature in K |
always | Requirements.Sources.BooleanConstant | Condition, always true |
during1 | Requirements.ChecksInFixedWindow.During | the temperature shall remain within 12 degC and 30 degC, tolerance 2 K |