Simulink Verification and Validation

Component Testing

Simulink Verification and Validation provides an API for the analysis and simulation of one or more referenced models, subsystems, or atomic subcharts in a model. All component testing functions can be used from the command line or incorporated into MATLAB® scripts.

Harness Model Generation

The harness model generation function lets you isolate an atomic subsystem or a model referenced by a larger control system model and extract it into a harness model for additional testing and analysis. You can use the harness model for exhaustive testing of components that are being developed, or when the rest of the system model may not be available for simulation.

The harness model generation function automates interface configuration for the root-level inputs and outputs including complex deeply nested buses. Subsystem dependencies, such as external data stores, are integrated in the harness and associated with the new model inputs. All required signal labeling and connections are automated to match the attributes of the component under test.

Create a Test Harness and Import Test Cases 1:52
Create a test harness to verify model behavior. Import existing functional tests and set up harness for analysis using Simulink Verification and Validation™.

Data Logging, Importing, and Authoring

With the data logging function you can capture input signals during closed-loop simulation and reuse the logged test vectors for simulation of the harness model. Because the underlying data format is compatible with Simulink Design Verifier, you can use the test-generation capability provided in Simulink Design Verifier to generate additional test cases.

When generating the harness model, the model harness generation function can include the logged data and import it in the Signal Builder block for editing.

Harness models that include a Signal Builder block can be used for debugging and detailed analysis. The Simulink Signal Builder block lets you graphically edit test vectors and import existing test data from document spreadsheets.

Workflow in Simulink Verification and Validation utilizing component testing functions to augment tests done on the control system model and to verify the model and code in the simulation.
Component testing workflow with Simulink Verification and Validation. The workflow utilizes the component testing functions in the product to augment tests done on the control system model and to verify the model and code in the simulation.

Executing Tests

With the test execution function you can automate execution of test cases against models and generated code in simulation, SIL, and PIL modes. The SIL and PIL modes require Embedded Coder.

Component test results can be imported into the Data Inspector for further analysis. The test execution function integrates with model coverage and code coverage tools to collect additional information about test completeness.

Simulate Test Cases and Measure Model Coverage 1:16
Execute functional test cases to test your design components using Simulink Verification and Validation™.

Linking Tests with Requirements

You can link the test cases in Signal Builder to external documents, such as functional requirements and test plans, via the Requirements pane in the Signal Builder window. In addition, you can assign assertions to individual test cases to automatically analyze pass/fail results.

Using the Simulink Signal Builder block to link test cases with verification blocks and requirements.
Using the Simulink Signal Builder block to link test cases with verification blocks and requirements. The Verification block settings pane and the Requirements pane are displayed.
Next: Analyzing Model Coverage

Try Simulink Verification and Validation

Get trial software

Mejores Prácticas para la Verificación y Validación de modelos Simulink y Código C

View webinar