MainPowerSupplyRequirements model
Requirements.Examples.BackupPowerSupply.MainPowerSupplyRequirements
ยท source
Evaluating the requirement definitions for the Main Power Supply system
Extends Modelica.Icons.Example
Using the given input signals MPSVoltage, On, and
Available results in
![]() |
| Simulation results for requirements R1 and R2: R1: MPS CAN be declared Off when the voltage gets below 170 V R2: MPS MUST be declared Off when the voltage gets below 160 V |
![]() |
| Simulation results for requirements R3 and R4: R3: MPS CAN be declared On again when the voltage gets above 200 V R4: MPS MUST be declared On again when the voltage gets above 210 V |
At the end of the simulation (70 s), the following verdicts are printed to the output window (simulated with OpenModelica 1.27.1 on 2026-12-03; requirement texts abbreviated):
Requirements violated (6 of 8):
(MPS.R5 first violation at 14 s, 1 attempts): MPS CAN be declared Unavailable when it has been Off ...
(MPS.R6 first violation at 25 s, 3 attempts): MPS MUST be declared Unavailable when it has been Off ...
(MPS.R7 first violation at 0 s, 1 attempts): MPS CAN be declared Available again when On for more than 8 consecutive seconds
(MPS.R4 first violation at 10 s, 2 attempts): MPS MUST be declared On again when the voltage gets above 210 V
(MPS.R3 first violation at 53.3333 s, 1 attempts): MPS CAN be declared On again when the voltage gets above 200 V
(MPS.R2 first violation at 25 s, 1 attempts): MPS MUST be declared Off when the voltage gets below 160 V
Requirements untested (1 of 8):
(MPS.R8, 0 attempts): MPS MUST be declared Available again when On for more than 10 consecutive seconds
Requirements satisfied (1 of 8):
(MPS.R1, 1 attempts): MPS CAN be declared Off when the voltage gets below 170 V
These verdicts follow from the test signals: the voltage falls below 170 V at 19.1 s, when MPS is already Off (R1 satisfied); it is below 160 V on (23.3 s, 36.7 s) while MPS is On on [25 s, 30 s) (R2); it rises above 200 V at 53.3 s while MPS is Off on [50 s, 60 s) (R3); it is above 210 V at 10 s when MPS is declared Off (R4); MPS has been Off for 4 s at 14 s while still Available (R5); it is Available again at 25 s while it has been Off for more than 6 s of the last 10 s (R6); MPS is declared Available at 0 s without having been On for 8 s (R7); and MPS is never On for more than 10 consecutive seconds, so R8 is never applicable (untested).
Revisions
| Date | Description |
|---|---|
| Dec. 3, 2026 | Documentation: the printed verdicts are replaced by those of a simulation with OpenModelica 1.27.1 (R1 satisfied, R3 violated at 53.3 s, R5 and R6 violated, which the old list did not show) and explained from the test signals; input name MPSVoltage corrected (H. Tummescheit, Model Based Innovation LLC) |
Components and variables
| Name | Type | Description |
|---|---|---|
printViolations inner | Verify.PrintViolations | Prints the requirement verdicts and writes the log files at the end of the simulation |
MPSVoltageTable | Modelica.Blocks.Sources.CombiTimeTable | Test trajectory of the MPS voltage in V |
onTable | Modelica.Blocks.Sources.BooleanTable | Test signal: MPS declared On (toggles at the table instants, starting false) |
availableTable | Modelica.Blocks.Sources.BooleanTable | Test signal: MPS declared Available (toggles at the table instants, starting false) |
MPS | Components.MPS | Requirements R1 to R8 of the Main Power Supply |

