Main Content

Best Practices for Profile Design

You should design your profiles in System Composer™ as your system grows. You can optimize your stereotype definitions by placing a shared set of properties in a base stereotype and maintain consistent definitions between specialized groups of model elements.

In this topic, you will learn how to:

  • Clarify the role of profiles in systems engineering design.

  • Structure your stereotypes so common properties can be shared through an inherited mechanism. For example, a UserInterface stereotype can be an extension of a SoftwareComponent stereotype, and you can add a property called ScreenResolution.

  • Decide how to use multiple profiles based on what each profile represents.

For more information about profiles terminology, see Extend System Composer Language Elements Using Profiles.

Role of Profiles in System Design

Profiles in System Composer are used to define a framework for stereotypes. In a profile, stereotypes, which can apply to a certain element type, include property definitions. Stereotypes extend model elements after you apply a stereotype to the elements and define property values for each element type. You can apply stereotypes to these model elements:

In this example, the profile MyCustomProfile contains multiple stereotypes. The PhysicalComponent stereotype applies to Component elements and includes the DeviceID property. The BluetoothLink stereotype applies to Connector elements. You can further specialize the PhysicalComponent stereotype by using the SensorComponent stereotype, which inherits the DeviceID property and includes the additional property FailureProb.

Overview of the structure of a profile.

Extend Stereotypes

You can extend a stereotype by creating a new stereotype based on the existing one, allowing you to control properties in a structural manner. For example, all components in a project may have a part number, but only electrical components have a power rating, and only electronic components — a subset of electrical components — have manufacturer information. You can use an abstract stereotype to serve solely as a base for other stereotypes and not as a stereotype for any architecture model elements.

For example, in the Profile Editor, create a new stereotype called ElectronicComponent. For Base stereotype, select ProjectProfile.ElectricalComponent. Define properties you want to add to those of the base stereotype. Select Show inherited properties (read-only) at the bottom of the property list to show the properties of the base stereotype. You can edit only the properties of the selected stereotype, not the base stereotype.

Adding a base stereotype in the Profile Editor to make the stereotype inherit properties from it.

When you apply the new stereotype, it carries its defined properties in addition to those of its base stereotype.

The stereotype for the component named 'Sensor' called 'Electronic Component' inherits properties from its base stereotype displayed below on the Property Inspector.

When you use a base stereotype and shared property definitions across your profile, you optimize your stereotype definitions as your model grows.

Using Multiple Profiles

Profiles provide a way to extend a modeling language. In System Composer, profiles allow you to clarify which domain-specific language to use to specialize your system. Domain-specific languages include definitions for safety, logic, or company information.

Suppose your system has a physical domain and a safety domain with separate definitions. You can create the PhysicalProfile and SafetyProfile profiles in the Profile Editor.

Profile Editor tool with two different profiles.

On the model canvas, after importing both profiles into the model, you can apply both the PhysicalComponent and SafetyComponent stereotypes from the two different profiles to the PressureSensorLeft component, then populate the respective property values for the component.

An architecture model called 'system Model' with two components 'Pressure Sensor Left' and 'Pressure Sensor Right' and the Property Inspector open for the left sensor with two stereotypes and property values defined.

When you work with multiple profiles, use Simulink® projects with source control to organize your files and folders and collaborate with other contributors. For more information, see Organize System Composer Files in Projects.

Multiple profiles help to maintain consistent definitions between specialized groups of model elements in separate domains.

See Also

Tools

Blocks

Objects

Functions

Related Topics