Main Content

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.

An architecture model overview showing a model with components, ports, and connectors labeled

TermDefinitionApplicationMore Information
architectureA 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:

  • Functional architecture describes the flow of data in a system.

  • Logical architecture describes the intended operation of a system.

  • Physical architecture describes the platform or hardware in a system.

Compose Architecture Visually
modelA System Composer model is the file that contains architectural information, including components, ports, connectors, interfaces, and behaviors.

Perform operations on a model:

  • Extract the root-level architecture contained in the model.

  • Apply profiles.

  • Link interface data dictionaries.

  • Generate instances from model architecture.

System Composer models are stored as SLX files.

Create an Architecture Model with Interfaces and Requirement Links
componentA 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
portA 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:

  • Component ports are interaction points on the component to other components.

  • Architecture ports are ports on the boundary of the system, whether the boundary is within a component or the overall architecture model.

Ports
connectorConnectors 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

Manage Variants

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.

Two variants and an active choice inside a variant component.

TermDefinitionApplicationMore Information
variantA 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 controlA variant control is a string that controls the active variant choice.Set the variant control to programmatically control which variant is active.Set Condition

Manage Interfaces

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.

An architecture model with the Interface Editor open. The interface data dictionary archDictionary.sldd, data interface Charger, data element Voltage, and value type VoltageType are labeled.

Manage interfaces local to a port using the Interface Editor in Port Interface View.

An architecture model with the Interface Editor open. The Power Source port and owned element elem0 are labeled.

TermDefinitionApplicationMore Information
interface data dictionaryAn 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 interfaceA 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 elementA 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:

  • Pins or wires in a connector or harness.

  • Messages transmitted across a bus.

  • Data structures shared between components.

value typeA 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 interfaceAn 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
adapterAn 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:

  • Create and edit mappings between input and output interfaces.

  • Apply an interface conversion UnitDelay to break an algebraic loop.

  • Apply an interface conversion RateTransition to reconcile different sample time rates for reference models.

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.

The Power component displays the physical interface WirelessPower, physical element ElectricalConn, and domain foundation.electrical.electrical.

For more information, see Author Model Behavior.

TermDefinitionApplicationMore Information
physical subsystemA 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 portA 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
physical connector

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
physical interface

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 Simulink.ConnectionBus object that specifies at least one Simulink.ConnectionElement object.

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
physical element

A physical element describes the decomposition of a physical interface. A physical element is equivalent to a Simulink.ConnectionElement object.

Define the Type of a physical element as a physical domain to enable use of that domain in a physical model.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.

The Profile Editor and Property Inspector are open.

TermDefinitionApplicationMore Information
stereotypeA 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
propertyA 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.
profileA 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.

The Transport Load requirement link on the robot variant component is shown.

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.

Test harness example in the Small UAV architecture model.

TermDefinitionApplicationMore Information
requirementsRequirements 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 setA 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 .slreqx files. You can create a new requirement set and author requirements using Simulink Requirements, or import requirements from supported third-party tools.Manage Requirements
requirement linkA 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 .slmx files.
test harnessA 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.

A generated view from filter where the selected components have a stereotype.

TermDefinitionApplicationMore Information
viewA 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:

  • Operational views demonstrate how a system will be used and should be integrated with requirements analysis.

  • Functional views focus on what the system must do to operate.

  • Physical views show how the system is constructed and configured.

A viewpoint represents a stakeholder perspective that specifies the contents of the view.

Modeling System Architecture of Keyless Entry System
element groupAn element group is a grouping of components in a view.Use element groups to programmatically populate a view.
queryA 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 diagramA 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 diagramYou 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:

  • Component hierarchy diagrams display components in tree form with parents above children. In a component hierarchy view, each referenced model is represented as many times as it is used.

  • Architecture hierarchy diagrams display unique component architecture types and their relationships using composition connections. In an architecture hierarchy view, each referenced model is represented only once.

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.

The allocation set browser displays an allocation set with one allocation scenario between two models and their allocations.

TermDefinitionApplicationMore Information
allocationAn 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 scenarioAn 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 Scenario 1.Create and Manage Allocations
allocation setAn 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.

The robot model Instance Properties are open, displaying total power consumption.

TermDefinitionApplicationMore Information
analysisAnalysis 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 functionAn 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 modelAn 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 .MAT file, of a System Composer architecture model for analysis.Run Analysis Function
instanceAn 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.

A reference architecture, a subsystem component, and a state chart behavior in the robot design model.

Create a sequence diagram in the Architecture Views Gallery to describe system interactions.

Different parts of a sequence diagram for the robot design model.

TermDefinitionApplicationMore Information
reference componentA 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.
subsystem component

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 chartA 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 diagramA 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.

A software architecture with a software component linked to an Export-Function model.

View the software architecture diagram in a class diagram in the Architecture Views Gallery.

A class diagram view.

TermDefinitionApplicationMore Information
software architecture

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 componentA 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 compositionA 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 diagramA 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

Related Topics

External Websites