Main Content

Validate Requirements for Machine Cooling System Architecture

This example shows how to validate requirements for the system design of a machine cooling architecture model. In this example, you learn how to:

  1. Author a sequence diagram to plan for stakeholder needs and simulate it against state charts that represent functional workflows.

  2. Implement a requirements table to formally prove consistency and completeness of the requirements.

  3. Perform unit testing by creating a test harness around a component to verify system requirements.

  4. View a traceability diagram that tracks the digital thread from implementation back to stakeholder needs.

In this example, a machine cooling system is used to demonstrate the workflow. A machine cooling system cools a machine when a machine overheats. If cooling is unsuccessful, the machine cooling system shuts off the machine to prevent damage.

Open Machine Cooling Example Project

To get started, open the project for this example.

openProject("scMachineCoolingExample");

To use custom functionality in your project, load Simulink® customizations.

sl_refresh_customizations;

Define Requirements

You can define stakeholder requirements after understanding the needs of your stakeholders by using Requirements Toolbox™. Stakeholder requirements are high-level requirements that describe the needs of the actors who interact with the system, including environment, performance, safety, and repair concerns. In the Requirements Editor (Requirements Toolbox), use the Requirements view to author those requirements. In the project, in the Project Shortcuts tab, click the project shortcut 1. Stakeholder Requirements. The Requirements Editor displays the stakeholder requirements for this example project.

For example, the Noise Pollution stakeholder requirement indicates that the operating noise should not exceed 100 decibels. The following steps validate the Operating Temp requirement. These stakeholder requirements translate to system requirements, which you can use to verify that the system design represents stakeholder needs.

Requirements Editor stakeholder requirements for machine cooling. The noise pollution requirement is highlighted.

Represent System Scenarios Using Architecture Model

Use System Composer™ to author an architecture model for logical analysis. The model describes the operational environment of the machine, the logical behavior of the cooling system, and the actions the machine cooling system takes to mitigate high operating temperatures. In the project, in the Project Shortcuts tab, click the project shortcut 2. Cooling Scenarios. System Composer displays the machine cooling scenarios as inputs, behaviors, and actions.

Machine cooling scenarios as an architecture model in Inputs, Behaviors, and Actions.

In this architecture model, the environment and machine temperatures are input to the Sense_temperature component, which translates the temperature for input to the Determine_cooling_action component, which decides the next action. Action scenarios include:

  • Continue normal operation, represented by the Normal_operation component.

  • Cool the machine, represented by the Cooling_needed component.

  • Error out and turn off the machine, represented by the Cooling_not_effective component.

To view which requirements are linked to which system component, you can enter the Requirements Perspective. From the System Composer model, navigate to Apps > Requirements Manager.

Requirements Perspective with requirements linked to components in architecture model.

The Environment actor requirement links to the Environment component in the machine cooling architecture model. The Operations Engineer actor requirement links to the Machine Operation component. The Determine_cooling_action component links to the Operating Temp stakeholder requirement. The state chart behavior linked to the Determine_cooling_action component verifies the Operating Temp requirement by design.

Describe System Behaviors Using Sequence Diagram

A sequence diagram acts as a descriptive model. Descriptive models are graphical specifications of a system meant to communicate different operational scenarios to stakeholders. You can use a sequence diagram in System Composer to assess the interaction between the components in your architecture model. In the project, in the Project Shortcuts tab, click the project shortcut 3. Test Sequence Diagram. The sequence diagram TempControlUnit shows an operational scenario for the machine cooling system.

According to the sequence diagram, the temperature rises above 40 degrees, the cooling system turns on, and then as cooling is not effective, the machine turns off. For more information about creating sequence diagrams, see Describe System Behavior Using Sequence Diagrams.

Descriptive model as a sequence diagram visualizing different operational scenarios for the machine cooling system.

The sequence diagram uses a state chart to track this operational scenario using a Stateflow® component implementation.

State chart implementation of the operational scenario for the cooling system.

For more information about creating state charts in System Composer, see Implement Component Behavior Using Stateflow Charts.

Analyze Requirements Using Requirements Table

To maintain completeness and consistency of the requirements in your design, you can use the Requirements Table (Requirements Toolbox) block to analyze them. After you identify the issues, you can adjust the requirements. In the project, in the Project Shortcuts tab, click the project shortcut 4. Requirements Table. The model displays the Requirements Table block with machine cooling inputs.

Requirements Table block with inputs.

With Simulink Design Verifier™, you can view a formal description of requirements coverage in this requirements table. Open the Requirements Table (Requirements Toolbox) block. On the toolstrip, select Table > Analyze Table to determine whether your requirements table is consistent or view actions to restore consistency.

Requirements Table with information about requirements analysis.

The requirements for this example are consistent because they do not conflict with each other. The requirements are complete because they have no missing functionality. For more information, see Identify Inconsistent and Incomplete Formal Requirement Sets (Requirements Toolbox).

Validate Requirements Using Unit Testing

You can include requirements as part of unit tests to verify that your functional model meets requirements at different points in the design process by using Simulink Test™. In the project, in the Project Shortcuts tab, click the project shortcut 5. Validate Cooling. The Simulink Test Manager (Simulink Test) opens. The Test cooling behavior test suite includes two scenarios:

  1. Cooling not effective: The machine overheats and the cooling system is not successful in lowering the temperature, so the machine must turn off.

  2. Cooling effective: The machine overheats and the cooling system is effective and the machine can continue normal operation.

For each scenario, a test harness surrounds the system under test to isolate the system with a controlled set of inputs and outputs. To open test harnesses from the Simulink Test Manager, click the Open the specified test harness button.

Test harness with the system under test.

To define model parameters, the Simulink Test Manager loads the Inputs section of each scenario with workspace variables at the start of each test. Click Run to perform the tests. The Simulink Test Manager displays the results in the Results tab.

Test results from Simulink Test Manager showing all tests passed.

All the tests passed, indicated by a green check mark. For more information about test harnesses in System Composer, see Verify and Validate Requirements.

Create Digital Thread Using Traceability Diagrams

A digital thread helps you see how specific stakeholder requirements are validated by requirements analysis, verification, and system design. You can create a digital thread using traceability diagrams in Requirements Toolbox. To view stakeholder requirements, in the project, in the Project Shortcuts tab, click the project shortcut 1. Stakeholder Requirements. In the Requirements Editor, select the 2.1 Operating Temp requirement from the StakeholderRequirements requirements set. On the toolstrip, select Analysis > Traceability Diagram and then view the path around your selected requirement.

Traceability Diagram around Operating Temp requirement.

The Operations Engineer actor needs the Operating Temp requirement to be met. The Cooling not effective and Cooling effective test cases verify the Operating Temp requirement. The Determine_cooling_action state chart implements the Operating Temp requirement. The TempControlUnit sequence diagram describes the Operating Temp requirement.

As system design progresses, tracking the digital thread to show requirements verification increases confidence in valid system behavior. For more information about traceability diagrams, see Visualize Links with Traceability Diagrams (Requirements Toolbox).

See Also

Blocks

Tools

Functions

Related Topics