Define Formal Requirements with a Duration
This example shows you how to use the Requirements Table block to create formal requirements with a duration. When modeling behaviors that cause brief noise during normal operation, engineers frequently define requirements that must be true for a specified duration. For example, in electrical circuits, closing a mechanical switch may cause the voltage to oscillate or spike before stabilizing, which is referred to as bounce. For sensitive control systems, bounce can cause measurements that lead to faulty behavior. When you mitigate bounce, which is known as debouncing, you specify controller behavior that executes only when the measurement is a certain value for a specified period of time.
This example shows how to model a requirement with a duration when the Requirement Table block has one or multiple input data. To define a requirement with a duration, use the Duration column, child requirements, semantic requirements, and default requirements. See Using the Duration Column and Establish Hierarchy in Requirements Table Blocks.
Define a Requirement with a Duration for a Single Input
If you want to create a requirement with a duration that uses a single input, specify the requirement along with a default requirement. Open the model
This model specifies a requirement for a sensor that detects a fault in a circuit. The model has one input data,
current. The Requirements Table block uses the value of
current to confirm the anticipated output of the sensor,
overCurrent. The table defines the following requirement:
If the measured current is greater than
10for more than
0.5seconds, then the sensor shall detect a fault in the circuit.
Otherwise, the sensor shall not detect a fault in the circuit.
Define a Requirement with a Duration for Multiple Inputs
If you have a requirement that relies on multiple inputs that each have a duration, and each of the inputs affects the anticipated output of your model, use a semantic requirement. You can use each child in the semantic requirement to represent the requirements for each input. Open the model
In this example, the Requirements Table block specifies a requirement for overspeed detection in a jet engine. A jet engine experiences overspeed when it spins beyond its physical limits. Prolonged overspeed can lead to catastrophic failure of the engine. To address this, jet engine control systems use multiple sensors and overspeed detection mechanisms. If at least one of the sensors detects overspeed, the engine control system shuts down the jet engine by cutting off fuel flow to the combustor. However, aircraft operators and designers also do not want the control system to shut down the engine due to a sensor, physical component, or software error caused by bounce. To reduce the chances of unintended engine shutdown, engineers often specify a short duration that each sensor must include before determining if overspeed occurs.
The table uses,
engineSpeed3 input data to define the requirement for the overspeed detection.
If at least one of the sensors measures the engine speed to be greater than
1000for more than
0.5seconds, then the engine control system shall detect engine overspeed.
Otherwise, the engine control system shall not detect engine overspeed.