Design, configure, and analyze variants with
Control and system engineers use MATLAB® and Simulink® to develop models that can be configured to a variety of tasks and requirements. Engineers adapt their models to specific design requirements by activating a predefined set of variabilities, which are integral parts of a model design. Simulink variant capabilities allow you to create flexible models with inbuilt variabilities to more efficiently manage, configure, and reuse your designs.
With Simulink, you can:
- Design a single model for multiple systems
- Configure a model to match different sets of requirements by activating inbuilt variabilities
- Control variant activation in model simulation and code generation
- Visualize and analyze variant configurations
- Utilize variants in all phases of Model-Based Design, including simulation, testing, and code generation
- Design AUTOSAR-compliant software components with variant implementations
“It would be horrendously complex to build a scale model of our full system for all the different variants we considered in the design phase. With Simulink we built virtual prototypes that enable us to predict system performance under various sea conditions, simulate failure cases, and analyze loads so we can select the best design and accurately specify component requirements to our suppliers.”Jonathan Fiévez, Carnegie Wave Energy
Using Simulink for Variant System Design
Create Models with Variations
Introduce variability to any aspect of your model. Implement variabilities in all domains, including controls logic, state machines, flow charts, and physical plants. Design variants in hierarchical or inline topologies to either encapsulate variations in a separate hierarchy or to view all variations at the same level.
For designs that require variable I/O interfaces between components, use variants to create subsystems that have flexible interfaces but still maintain the common system architecture.
To realize context-dependent system behaviors, combine variants with conditionally executed or event-driven functions, such as initialization, reset, and termination functions or triggered subsystems.
Define Regions of Variability
Expand variability control to any region of your model by automatically propagating variant conditions from variant blocks to other blocks upstream and downstream. Variant conditions can propagate through signal lines, busses, and function calls to reach blocks in a model affected by variant selection. Control which blocks in your model will be subject to variation by confining condition propagation to predefined regions of your model.
Configure Model Variations
Define, control, and visualize variant configurations with Variant Manager. Configure variants to be controlled with either name-based expressions or conditional logic. Create predefined variant configurations that can be easily activated and switched between control multiple variabilities simultaneously. Define constraints for configurations to prevent invalid variant combinations. Once variant configurations are defined, store, distribute, and reuse them with variant configuration data objects.
Visualize and Analyze Variant Configurations
Visually trace variant conditions directly in the Simulink canvas and compare and contrast multiple variant configurations in a tabular form. Easily validate variant configurations during edit time to identify issues without having to simulate or update your model. Analyze variant configurations to identify variants that will always or never be active, in order to locate and diagnose potential faults or inconsistencies in your configurations.
Control Variant Activation Time
Design variants that can be activated before simulation or at code compile time. During code generation, choose which variabilities will be included in the generated code and activate them at precompile time based on the requirements and the target platform. Before deploying a model, check for incompatibilities, such as datatype and dimension mismatches, by analyzing all variant choices prior to simulation or code generation.
Deploy Variant Models
Automatically generate a reduced model from a set of variant configurations or based on specified variant control values. To distribute and share models, use model reduction to protect intellectual property by removing unused variants. Analyze the reduced model in a detailed report to check for broken model dependencies and to validate model structure.
Integrate Variant Design with Complete Development Lifecycle
Easily manage variations in your models throughout development lifecycles, from requirements to deployment. Use variants to switch a model between design, test, and implementation contexts by activating different variants. For example, adapt a model to read data from a file during simulation or to receive signals from a sensor when deploying the model to hardware. Include variabilities in generated code to reuse and configure generated code for different stages of development, such as testing different implementations or providing multifunctional code to third parties.
Model and Implement AUTOSAR Variants
Use Simulink to design AUTOSAR software components that can be distributed across ECUs, and integrated with software modules from different sources and OEM suppliers. Leverage Simulink variant capabilities to implement scalable AUTOSAR architectures used in software for multiple vehicle lines.
Model AUTOSAR software components with variation points to enable AUTOSAR interfaces or implementations based on predefined control conditions. Import and export ARXML files with AUTOSAR variants to integrate Simulink into the full AUTOSAR workflow. After modeling and testing AUTOSAR designs in Simulink, generate efficient code from your model with preprocessor conditionals implementing variation points.