How icub-tech-iit/training-systemcomposer-pendulum works
Project Type and Purpose
• This is a model-based control system example built in MATLAB/Simulink using System Composer.
• Its purpose is to demonstrate a “digital thread” linking requirements → architecture → test harnesses for a pendulum control system (drive, sensors, physical plant, and obstacle handling).
File Structure
• Top‐level “architectures/arch_logical.slx” is your System Composer logical architecture.
• “models/” contains Simulink component models: Actuation, Driver, Controller, Environment, Obstacle, Pendulum, Sensors.
• “dictionaries/” holds Simulink data dictionaries (data_interface.sldd) and enumerations (PendulumTypes.m, ObstacleMode.m).
• “requirements/req_functional.slreqx” is the Requirements Toolbox project.
• “tests/” has test harnesses and test cases.
• “scripts/” contains helper MATLAB scripts (e.g., run_mech_explorer.m).
Pull Extra Insights from the README
• The README shows a high-level architecture image (assets/architecture.png).
• It stresses the digital thread: requirements linked to architecture, which links to test harnesses, which link to test cases.
Main Components & Interactions
• Controller (control algorithm)
• Driver (interface translating control commands to actuation signals)
• Actuation (power electronics / motor blockset)
• Pendulum (physical plant, Simscape Multibody)
• Sensors (feedback of angle, velocity)
• Environment (gravity, optional obstacle)
• Obstacle (variant subsystem modeling contact)
• Requirements repository (linked artifact)
• Test Harnesses (one per use case: normal operation, safety test)
– Controller → Driver: “torque_setpoint”
– Driver → Actuation: “electrical_signal”
– Actuation → Pendulum: “torque”
– Pendulum → Sensors: “angle, velocity”
– Sensors → Controller: “feedback”
– Environment + Obstacle feed into Pendulum (physical interaction)
– Requirements (Req Toolbox) → Architecture ports (requirement links)
– Architecture → Test Harnesses (import architecture into each harness)
– Test Harness → Test Cases (data-driven link)
c. Architectural Patterns & Principles
– Functional decomposition: each function in its own model
– Variant subsystem for obstacle handling (ObstacleMode enum)
– Digital‐thread linking: bidirectional requirement traceability
– Separation of concerns: control logic vs. plant vs. I/O
d. Key Technologies & Libraries
– System Composer (architectures/*.slx)
– Simulink and Simscape blocksets (models/*.slx)
– Requirements Toolbox (requirements/*.slreqx)
– Simulink Test (tests/*.slx, .mldatx)
– Data dictionary for shared interfaces (dictionaries/*.sldd)