System Composer Concepts
The terms in this topic provide a consistent and common language for using System Composer™.
Author Architecture Models
An architecture model in System Composer consists of the common Simulink® constructions: components, ports, and connectors. An architecture represents the system of components.
|architecture||A System Composer architecture represents a system of components and how they interface with each other structurally and behaviorally. You can represent specific architectures using alternate views.|
Different types of architectures describe different aspects of systems:
|Compose Architecture Visually|
|model||A System Composer model is the file that contains architectural information, including components, ports, connectors, interfaces, and behaviors.|
Perform operations on a model:
System Composer models are stored as SLX files.
|Create an Architecture Model with Interfaces and Requirement Links|
|component||A component is a nontrivial, nearly independent, and replaceable part of a system that fulfills a clear function in the context of an architecture. A component defines an architecture element, such as a function, a system, hardware, software, or other conceptual entity. A component can also be a subsystem or subfunction.||Represented as a block, a component is a part of an architecture model that can be separated into reusable artifacts.||Components|
|port||A port is a node on a component or architecture that represents a point of interaction with its environment. A port permits the flow of information to and from other components or systems.|
There are different types of ports:
|connector||Connectors are lines that provide connections between ports. Connectors describe how information flows between components or architectures.||A connector allows two components to interact without defining the nature of the interaction. Set an interface on a port to define how the components interact.||Connections|
Create variant components and implement multiple design alternatives or variants, chosen based on programmatic rules. Add variant choices to any component to make a variant component. The active choice represents the original component.
|variant||A variant is one of many structural or behavioral choices in a variant component.||Use variants to quickly swap different architectural designs for a component while performing analysis.||Create Variants|
|variant control||A variant control is a string that controls the active variant choice.||Set the variant control to programmatically control which variant is active.||Set Condition|
Assign interfaces to ports using the Interface Editor in Dictionary View. Use an Adapter block to reconcile differences between interfaces on a connector between ports.
Manage interfaces local to a port using the Interface Editor in Port Interface View.
|interface data dictionary||An interface data dictionary is a consolidated list of all the interfaces and value types in an architecture and where they are used.|
Local interfaces on a System Composer model can be saved in an interface data dictionary using the Interface Editor.
Interface dictionaries can be reused between models that need to use a given set of interfaces, elements, and value types. Data dictionaries are stored in separate SLDD files.
|data interface||A data interface defines the kind of information that flows through a port. The same interface can be assigned to multiple ports. A data interface can be composite, meaning that it can include data elements that describe the properties of an interface signal.||Data interfaces represent the information that is shared through a connector and enters or exits a component through a port. Use the Interface Editor to create and manage data interfaces and data elements and store them in an interface data dictionary for reuse between models.||Create an Architecture Model with Interfaces and Requirement Links|
|data element||A data element describes a portion of an interface, such as a communication message, a calculated or measured parameter, or other decomposition of that interface.|
Data interfaces are decomposed into data elements:
|value type||A value type can be used as a port interface to define the atomic piece of data that flows through that port and has a top-level type, dimension, unit, complexity, minimum, maximum, and description.||You can also assign the type of data elements in data interfaces to value types. Add value types to data dictionaries using the Interface Editor so that you can reuse the value types as interfaces or data elements.||Create Value Types as Interfaces|
|owned interface||An owned interface is a locally defined interface that is local to a specific port and not shared in a data dictionary or the model dictionary.||Create an owned interface to represent a value type or data interface that is local to a port.||Define Owned Interfaces Local to Ports|
|adapter||An adapter helps connect two components with incompatible port interfaces by mapping between the two interfaces. An adapter can also act as a unit delay or rate transition. Use the Adapter block to implement an adapter.|
With an adapter, you can perform functions on the Interface Adapter dialog:
Author Physical Models
Author physical models in System Composer using subsystem components. A subsystem component is a Simulink subsystem that is part of the parent System Composer architecture model. You can add Simscape™ behavior to a subsystem component using physical ports, connectors, and interfaces.
For more information, see Author Model Behavior.
|physical subsystem||A physical subsystem is a Simulink subsystem with Simscape connections.||A physical subsystem with Simscape connections uses a physical network approach suited for simulating systems with real physical components and represents a mathematical model.||Describe Component Behavior Using Simscape|
|physical port||A physical port represents a Simscape physical modeling connector port called a Connection Port (Simscape).||Use physical ports to connect components in an architecture model or to enable physical systems in a Simulink subsystem.||Define Physical Ports on a Component|
A physical connector can represent a nondirectional conserving connection of a specific physical domain. Connectors can also represent physical signals.
|Use physical connectors to connect physical components that represent features of a system to simulate mathematically.||Architecture Model with Simscape Behavior for a DC Motor|
A physical interface defines the kind of information that flows through a physical
port. The same interface can be assigned to multiple ports. A physical
interface is a composite interface equivalent to a
|Use a physical interface to bundle physical elements to describe a physical model using at least one physical domain.||Specify Physical Interfaces on the Ports|
A physical element describes the decomposition of a physical interface. A physical
element is equivalent to a
|Define the ||Describe Component Behavior Using Simscape|
Extend Architectural Elements
Create a profile in the Profile Editor and add stereotypes to it with properties. Apply the stereotype to a component, and set the property value.
|stereotype||A stereotype is a custom extension of the modeling language. Stereotypes provide a mechanism to extend the architecture language elements by adding domain-specific metadata.||Apply stereotypes to elements: root-level architecture, component architecture, connectors, ports, data interfaces, and value types of a model. A model element can have multiple stereotypes. Stereotypes provide model elements with a common set of property fields, such as mass, cost, and power.||Extend Architectural Design Using Stereotypes|
|property||A property is a field in a stereotype. For each element the stereotype is applied to, specific property values are specified.||Use properties to store quantitative characteristics, such as weight or speed, that are associated with a model element. Properties can also be descriptive or represent a status. You can view and edit the properties of each element in the architecture model using the Property Inspector.|
|profile||A profile is a package of stereotypes to create a self-consistent domain of element types.||Author profiles and apply profiles to a model using the Profile Editor. You can store stereotypes for a project in one profile or in several. Profiles are stored in XML files when they are saved.|
Manage and Verify Requirements
In the Requirements perspective, you can create, manage, and allocate requirements. View the requirements on the architecture model. This functionality requires a Simulink Requirements™ license.
Use Simulink Test™ to create a test harness for a System Composer component to validate simulation results and verify design in the Test Manager. This functionality requires a Simulink Test license.
|requirements||Requirements are a collection of statements describing the desired behavior and characteristics of a system. Requirements ensure system design integrity and are achievable, verifiable, unambiguous, and consistent with each other. Each level of design should have appropriate requirements.||To enhance traceability of requirements, link system, functional, customer, performance, or design requirements to components and ports. Link requirements to each other to represent derived or allocated requirements. Manage requirements from the Requirements Manager on an architecture model or through custom views. Assign test cases to requirements using the Test Manager for verification and validation.||Link and Trace Requirements|
|requirement set||A requirement set is a collection of requirements. You can structure the requirements hierarchically and link them to components or ports.||Use the Requirements Editor to edit and
refine requirements in a requirement set.
Requirement sets are stored in
|requirement link||A link is an object that relates two model-based design elements. A requirement link is a link where the destination is a requirement. You can link requirements to components or ports.||View links using the Requirements
perspective in System Composer. Select a requirement in the
Requirements Browser to highlight the component or
the port to which the requirement is assigned.
Links are stored externally as
|test harness||A test harness is a model that isolates the component under test, with inputs, outputs, and verification blocks configured for testing scenarios. You can create a test harness for a model component or for a full model. A test harness gives you a separate testing environment for a model or a model component.||Create a test harness for a System Composer component to validate simulation results and verify design. The Interface Editor is accessible in System Composer test harness models to enable behavior testing and implementation-independent interface testing.|
Create Custom Views
Apply a view filter to generate an element group of components for the view in the Architecture Views Gallery.
|view||A view shows a customizable subset of elements in a model. Views can be filtered based on stereotypes or names of components, ports, and interfaces, along with the name, type, or units of an interface element. Create views by adding elements manually. Views create a simplified way to work with complex architectures by focusing on certain parts of the architecture design.|
You can use different types of views to represent the system:
A viewpoint represents a stakeholder perspective that specifies the contents of the view.
|Modeling System Architecture of Keyless Entry System|
|element group||An element group is a grouping of components in a view.||Use element groups to programmatically populate a view.|
|query||A query is a specification that describes certain constraints or criteria to be satisfied by model elements.||Use queries to search elements with constraint criteria and to filter views.||Find Elements in Model Using Queries|
|component diagram||A component diagram represents a view with components, ports, and connectors based on how the model is structured.||Component diagrams allow you to programmatically or manually add and remove components from the view.||Inspect Components in Custom Architecture Views|
|hierarchy diagram||You can visualize a hierarchy diagram as a view with components, ports, reference types, component stereotypes, and stereotype properties.|
There are two types of hierarchy diagrams:
|Display Component Hierarchy and Architecture Hierarchy Using Views|
Allocate Architecture Models
In the Allocation Editor, allocate components between two architecture models, based on a dependency or a directed relationship.
|allocation||An allocation is a directed relationship from an element in one model to an element in another model.||Resource-based allocation allows you to allocate functional architectural elements to logical architectural elements and logical architectural elements to physical architectural elements.||Allocate Architectures in Tire Pressure Monitoring System|
|allocation scenario||An allocation scenario contains a set of allocations between a source and target model.||Allocate between model elements within an allocation in an allocation scenario. The default
allocation scenario is called ||Create and Manage Allocations|
|allocation set||An allocation set consists of one more allocation scenarios which describe various allocations between a source and target model.||Create an allocation set with allocation scenarios.||Create and Manage Allocations|
Analyze Architecture Models
Create an analysis function to analyze power consumption in the
RobotDesign architecture model.
function robotDesign(instance,varargin) if instance.isComponent() if instance.hasValue('RobotProfile.ElectricalComponent.Power') sysComponent_power = instance.getValue('RobotProfile.ElectricalComponent.Power'); end for child = instance.Components comp_power = child.getValue('RobotProfile.ElectricalComponent.Power'); sysComponent_power = sysComponent_power + comp_power; end instance.setValue('RobotProfile.ElectricalComponent.Power',sysComponent_power); end
Analyze the robot design using the analysis function to determine total power usage.
|analysis||Analysis is a method for quantitatively evaluating an architecture for certain characteristics. Static analysis analyzes the structure of the system. Static analysis uses an analysis function and parametric values of properties captured in the system model.||Use analyses to calculate overall reliability, mass roll-up, performance, or thermal characteristics of a system, or to perform a SWaP analysis.|
|analysis function||An analysis function is a MATLAB® function that computes values necessary to evaluate the architecture using properties of each element in the model instance.||Use an analysis function to calculate the result of an analysis.||Write Analysis Function|
|instance model||An instance model is a collection of instances.||You can update an instance model with changes to a model, but the instance
model will not update with changes in active variants or model references. You
can use an instance model, saved in an ||Run Analysis Function|
|instance||An instance is an occurrence of an architecture model element at a given point in time.||An instance freezes the active variant or model reference of the component in the instance model.||Create a Model Instance for Analysis|
Author Model Behavior
Use a reference component to decompose and reuse architectural components and Simulink model behaviors. Use a subsystem component or state chart to implement Simulink and Stateflow® behaviors.
Create a sequence diagram in the Architecture Views Gallery to describe system interactions.
|reference component||A reference component is a component whose definition is a separate architecture model or Simulink behavior model.||A reference component represents a logical hierarchy of other compositions. You can reuse compositions in the model using reference components.|
A subsystem component is a Simulink subsystem that is part of the parent System Composer architecture model.
|Add Simulink subsystem behavior to a component to author a subsystem component in System Composer. You cannot synchronize and reuse subsystem components as Reference Component blocks because the component is part of the parent model.|
|state chart||A state chart diagram demonstrates the state-dependent behavior of a component throughout its state lifecycle and the events that can trigger a transition between states.||Add Stateflow chart behavior to describe a component using state machines. You cannot synchronize and reuse Stateflow chart behaviors as Reference Component blocks because the component is part of the parent model.|
|sequence diagram||A sequence diagram is a behavior diagram that represents the interaction between structural elements of an architecture as a sequence of message exchanges.||You can use sequence diagrams to describe how the parts of a static system interact.|
Design Software Architectures
Design a software architecture model, define the execution order of the functions from the components, simulate the design in the architecture level, and generate code.
View the software architecture diagram in a class diagram in the Architecture Views Gallery.
A software architecture is a specialization of an architecture for software-based systems, including the description of software compositions, component functions, and their scheduling
|Use software architectures in System Composer to author software architecture models composed of software components, ports, and interfaces. Design your software architecture model, define the execution order of your component functions, simulate your design in the architecture level, and generate code.|
|software component||A software component is a specialization of a component for software entities, including its functions (entry points) and interfaces.||Implement a Simulink export-function, rate-based, or JMAAB model as a software component, simulate the software architecture model, and generate code.|
|software composition||A software composition is a diagram of software components and connectors that represents a composite software entity, such as a module or application.||Encapsulate functionality by aggregating or nesting multiple software components or compositions.||Modeling the Software Architecture of a Throttle Position Control System|
|class diagram||A class diagram is a graphical representation of a static structural model that displays unique architecture types of the software components optionally with software methods and properties.||Class diagrams capture one instance of each referenced model and show relationships between them. Any component diagram view can be optionally represented as a class diagram for a software architecture model.||Class Diagram View of Software Architectures|
- Compose and Analyze a System Using an Architecture Model
- Organize System Composer Files in a Project
- Simulate Mobile Robot with System Composer Workflow
- Modeling System Architecture of Small UAV