Authoring a Digital Thread in System Composer
This tutorial provides a complete system architecture example using System Composer, building on the following resources:
- https://github.com/icub-tech-iit/training-matlab-pendulum
- https://github.com/icub-tech-iit/training-simscape-pendulum
In detail, the project consists of a system controlling a pendulum, showing how to deal with:
- Requirements
- Architectures
- Variant subsystems
- Test harnesses
- Test cases
- Digital threads
Open the project and browse it to discover how the requirements are linked to the architecture,
how the architecture is linked to the test harnesses, and how the test harnesses are linked to the test cases.
This is the so-called digital thread.
Run the test suite to verify that the system is working as expected.
playback_mech_explorer.mp4
- Create a further requirement to verify the safety properties of the system when the pendulum gets
in contact with an external obstacle while being driven by the controller at a constant velocity:
"The contact shall be detected and the interaction force shall be reduced under <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="015a17a96b93537c70887e0238f599dd">$1$</math-renderer> <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="015a17a96b93537c70887e0238f599dd">$\text{N}$</math-renderer> within <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="015a17a96b93537c70887e0238f599dd">$1$</math-renderer> <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="015a17a96b93537c70887e0238f599dd">$\text{s}$</math-renderer>".
"Once the contact is detected, the system stops receiving further set-points". - Enable the
Test Safety
in the test suite and associate the new requirement to the test case. - Modify the controller to take the safety requirement into account.
- Run the test suite to validate your approach.
To complete the assignment do:
- Generate a copy of this repository into your account. Tick in the option "include all branches" ✔
-
Create the branch
solution
off of the branchmaster
. -
Commit into the branch
solution
your development. - Push/sync the changes up to GitHub.
-
Create a pull request (PR) with
master
as base branch andsolution
as compare branch. - Request to review your PR 👋 to turn in the assignment.
- MATLAB
- Simulink
- System Composer
- Requirements Toolbox
- Motor Control Blockset
- Simscape
- Simscape Electrical
- Simscape Multibody
- Simulink Test
Citation pour cette source
Ugo Pattacini (2024). Authoring a Digital Thread in System Composer (https://github.com/icub-tech-iit/training-systemcomposer-pendulum/releases/tag/v1.3.2), GitHub. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.