Main Content

Requirements

For any software, the original equipment manufacturer (OEM) generally provides software requirements in Microsoft® Excel® or Word format. You can convert these requirements to a structured format by using the tools described in Requirements Editor (Requirements Toolbox) before your team begins development. Having requirements in a structured format enables traceability between artifacts, such as requirements, the model, code, and tests.

Follow these steps to author and import requirements:

Write Requirements

  • Author requirements in Microsoft Excel using the BMSSwRequirements.xlsx template.

  • On the Data tab of the spreadsheet, click Outline to hierarchically segregate the requirements based on the title.

    Highlighting the Data and Outline options in Excel

Import Requirements

  • Open the Requirements Editor app in MATLAB®. On the MATLAB Toolstrip, on the Apps tab, click Requirements Editor.

    Requirements editor tab on the MATLAB toolstrip

  • To import requirements, on the Requirements tab, in the File section, click Import.

  • In the Importing Requirements dialog box, for Document type, select Microsoft Excel Spreadsheet.

    Dropdown in importing requirements dialog box

  • Specify the source location where the document is saved.

  • To make the images of the BMS inputs and outputs in the Excel spreadsheet available for import, under Content, select Include graphics and layout.

  • To configure the columns, click Configure, in the Use As row, set the ID column value to Custom ID, the Summary column value to Summary, and the Description column value to Description. Click OK.

  • Under Destination(s), in Requirement Set, specify where to store the .slreqx file. By default, the .slreqx file uses the Excel file name.

  • To import the requirements in .slreqx format with the correct hierarchy, under Callbacks, add the post-callback script named excelHierarchyImport.m and click Import.

    Import requirements

  • Run this command from the command window to open the requirements file.

    open("BMSSwRequirements.slreqx");
  • Under Properties, set the requirement type by selecting an option for Type. Map user information to Informational. By default, every requirement is set as Functional, so mapping the requirement type ensures you get the imported result correctly.

    Map titles to Container. Map testable requirements to Functional.

    Informational

    Container

    Functional

  • Test the functional requirements. For more information, see System Integration and Test.

Using Projects for Collaborative Model-Based Design

Best Practices for Collaboration and Sharing Projects

MATLAB and Simulink® projects offer many advantages for teams of developers doing large-scale modeling using Model-Based Design. Projects help you to:

  • Streamline file-sharing and file management.

  • Handle dependencies across and within developer teams.

  • Integrate easily with source control and configuration management tools.

  • Enable componentization, reuse, and modular work.

  • Increase efficiency and enable organizational knowledge-transfer.

For more information on projects, see What Are MATLAB Projects in Simulink?

Managing Work with Projects

Once requirements are ready, follow these steps to manage work using projects in MATLAB and Simulink.

Creating and Structuring a Project

  • Define a folder structure that addresses the needs and use cases of various project collaborators. For example, create folders for Requirements, Design, Architecture, and Scripts.

  • To create a project, on the Home tab, navigate to New > Project.

    How to create projects from folder

  • Select the folder that contains the available requirements file.

Expanding and Organizing Projects

  • Collaborators can expand the project by adding files to it.

  • Label files for easy access and identification. You can create custom labels such as Code, Requirements, Integration etc, and so forth.

  • To add files and folders to project path, in the Project panel, right-click the file or folder and select Add to Project Path.

  • To create shortcuts to access files quickly, in the Project toolstrip, expand the Shortcuts gallery.

    Project shortcuts gallery

    Then, click New Shortcut and browse to select a file.

    MBD BMS project shortcuts

Finalizing and Maintaining Projects

  • Once all project files and folders are ready, perform an integrity check on the project. In the Project toolstrip, in the Environment section, click Project Issues.

    Check project.

    In the Checks Issues tab of the Project Issues panel, click Run Checks. Make sure that all checks pass.

    Integrity check on project.

  • Version control the project.

This activity diagram depicts the workflow for collaborative design using projects.

Flowchart detailing the steps of collaborative design using MATLAB or Simulink projects.

See Also

Topics