[SysML] #17. Understanding Port and Association Block

In this blog post, we will take a closer look at Port and Association Block, These are the important elements of SysML (Block Definition Diagram). This component plays a key role in understanding the structural modeling of complex systems in systems engineering.

As we learned in the last post, SysML basically allows you to model system interfaces using component blocks and connectors. However, SysML introduces the concept of ports to define a more powerful and flexible interface.

Port: System communication port

A port is located on the border of a block and acts as an access point between the block and an external component or reference. This allows for a variety of interactions, including provision of services and exchange of materials, energy, and data.

Black box approach: combination of ports and blocks

By adding ports to a block, the block is modeled as a ‘black box’. This approach hides the structure’s internal implementation, and the client only sees the structure’s interface. This means that we only know the types of services and materials, energy, and data that the structure provides and requires.

Flexibility in encapsulation and modeling through ports

Encapsulating blocks through ports gives you the flexibility to redesign their internal implementation without affecting the design of other parts of the system. This helps save time and money on system modifications.

Port diversity and offerings in SysML

  • Full Ports: Considered as part of the parent block boundary and typed as a block. A full port represents a physical part and is considered part of the system parts tree.
  • Proxy Ports: Provide external access without forming part of the parent block. It is typed as an interface block and cannot have any internal behavior or parts.

Considerations when using ports

Choosing whether to use a port and what type of port it is depends on how the block will be used. Proxy ports are primarily used to designate a system as a black box, while full ports are used to specify interfaces in terms of physical parts of the system.

Full ports play an important role in SysML modeling to effectively represent the physical interfaces of a system. This allows modelers to clearly define and visualize the interactions between the various parts of the system. The use of full ports provides a clearer understanding of the structural aspects of the system.

  1. Similarity to Part : The full port is included in the part tree of its owning block, which has similar properties to the part. However, full ports differ from parts in that they are displayed graphically on the border of their parent block.
  2. Encapsulation : The full port can be connected to an external connector even if the parent block that owns the port is encapsulated. However, parts of the encapsulated block cannot be connected to external connectors.
  3. Graphical representation : The full port is represented by a rectangle that intersects the border of the parent symbol, and the port’s name, type, and multiplicity are displayed inside or near the port symbol. Additionally, if the port type has a flow attribute, an arrow inside the port symbol is used to provide information about direction. Arrows appear differently depending on the direction of the flow property.

In SysML modeling, a proxy port is an important modeling element that does not represent a unique part of the system, but exposes the owning block or some functionality of that block to the outside world. Proxy ports are used to define the interfaces of a system and are especially useful when modeling functional aspects of complex systems. The use of proxy ports is also particularly useful when modeling a system as a black box or providing external access to a selected set of features.

  1. Contains no internal structures or behavior : A proxy port is typed as a special type of block that contains no internal structures or behavior, namely an interface block.
  2. Similarity to reference properties : If a full port is similar to a partial property, then a proxy port is similar to a reference property that provides access to the selected feature set of the owning block or its part.
  3. Graphical representation : Proxy ports are shown as rectangles that intersect the border of the parent symbol, and the port’s name, type, and multiplicity are shown as strings floating near the port.
  4. Use of interface blocks : An interface block can only contain proxy ports, not full ports, and all ports have the keyword «proxy».
  5. Use as a behavioral port : This port clearly represents the behavioral interaction of the system by providing access to the functionality of the block itself, rather than the functionality of the block’s internal components.
    • Event and signal processing : Block actions can include accepting events or sending signals through ports. This allows for more detailed modeling of the system’s behavior.
    • Sending and receiving information : In the process of sending and receiving information through an operating port, the path to the port can be explicitly specified. This allows you to effectively model complex interactions.

In SysML, ports in blocks play an important role in modeling the structural and functional connectivity of a system. Port connections clearly define the interaction between a block and its external environment, and visualize the flow of information between various parts of a complex system.

Basic principles of port connection

  • Multiple connection possibilities : A port can be connected to multiple other ports or components, each connection requiring a separate connector.
  • Internal vs. External Connection : A port can be connected to a component within the same block using an internal connector, or to a component or port in another block using an external connector.
  • Functional compatibility : There is no difference in functional compatibility between full ports and proxy ports from an external perspective, but characteristics may differ in internal connections.
  • Operation port : The proxy port used as the operation port cannot be connected internally because it represents its own block.
  • Display within diagram frame : Ports displayed in the diagram frame of an internal block diagram represent ports of the enclosing block specified by that diagram frame.

Full port connections

Connections across ports define the flow of information and energy between physical components within a system, allowing the interactions of complex systems to be modeled in greater detail.

  • Similarity to partial connection: Connecting an full port has the same meaning and constraints as connecting parts within the system. This means that the full port represents physical components and is used to model the interactions between them.
  • Compatibility Rules: Compatibility of operation characteristics and flow characteristics between all connected ports is the same as the component connection rules. These rules ensure that the information and energy flow within the system reflects actual operating conditions.

Proxy Port Connection

Proxy port connections are an important element in SysML modeling to precisely define the functional interactions of a system. This allows system designers to clearly define and visualize the detailed functional connections between the various parts within the system and effectively analyze the system’s performance and behavior. Proxy port connectivity serves as an essential tool, especially for precisely mapping and modeling the internal functionality of a system.

Internal connectors with proxy ports focus on identifying specific features of the part, which vary depending on the proxy port type.

  • Feature Compatibility : Internal connectors between proxy ports and full ports behave differently in terms of feature compatibility. Internal connectors with proxy ports focus on identifying specific features of the part, which vary depending on the proxy port type.
  • Same Directionality : The proxy port functionality must match the functionality of the internal component to which it is connected. In other words, for compatibility, the direction must be the same, not opposite.

When modeling interactions between systems in SysML, when interacting blocks exchange similar items that may have opposite directions, SysML provides a powerful mechanism to model this efficiently: Conjugate Ports.

A Conjugate Port is a port where one port is set as the conjugate of another port, indicating that the direction of the interface block is reversed. This mechanism allows you to reuse interface blocks to model the interaction between two ports. Reversing the direction of oriented features is key, which also affects the orientation notation in the port symbol.

  • Applies to nested ports : The Conjugate Port mechanism also applies to nested ports, allowing the direction of internally oriented features to be reversed.
  • Relationship with directional functions : Like parts, full ports cannot be conjugated, which corresponds to blocks containing actions that depend on directional functions (e.g. flow properties and actions).
  • Notation : Combined ports are indicated by placing a tilde ‘~’ before the port type. For example, ‘~interface block name’.

  • Nested Ports : Nested ports can be connected individually, which is made possible by external and internal connectors. These connectors can be connected directly to nested ports, or you can use Association Blocks to specify more details.
  • Connectors and Association Block : The internal structure of a connector is defined using an Association Block, which can contain a set of connectors. This set defines between nested ports at the end of a connection, and is typed by an Association Block. The actual interaction is handled by the internal structure of the Association Block.
  • Multiple connection possibilities : A port can be connected to several other ports, this applies to both internal and external connectors. This connectivity enables complex interactions between the various parts within the system.
  • Multiple links in a connector : A connector can represent multiple connections between block instances, meaning that the connector can have multiplicity. This means that one connector can connect to multiple ports.
  • Routability : Items and requests going out or incoming on a port can be routed to different ports depending on compatible features. This significantly increases the flexibility of the system.
  • Item flow representation : Entry flow can be displayed on port-to-port connectors, which is an important modeling tool that represents how data or signals move within a system.
  • Compatibility Rules : General compatibility rules apply to partial and full ports, but there are special connection rules for internal connectors associated with proxy ports. If the internal connector associated with the proxy port has a unidirectional flow attribute (that is, not inout), the direction of item flow must match the direction of the source and destination flow attributes.

Full Port

In order to practice SysML’s Port with EA, let’s model the battery power input part that is almost always included in electrical equipment.

First, I created a new project and created a bdd with the same name as “Battery_Input” Package under Model. Then, we create the highest level Battery Input Context block and the Battery, ECU, and SMPS blocks that will appear in this modeling. A Battery Input Context block was added to create an ibd that indicates the interaction between the battery and ECU. Unlike Battery and ECU, Battery Input Context is an abstract concept, but it is often useful to create a Context block when modeling.

And since Battery Input Context includes ECU and ECU includes SMPS, Battery, ECU → Battery Input Context are connected through Part Association. And since SMPS is also included in the ECU, a Part Association is connected between SMPS and ECU.

image 165

The battery has a physical interface that outputs power, and the ECU has a physical interface that receives power from the car battery. (We usually call this a vehicle-side connector, but in SysML, the lines connecting elements are called connectors, so it would be more correct to call it a physical interface or port in SysML modeling.)

This physical interface is modeled as Full-Port because it is not only included in the Bill of Materials of the ECU we are developing, but can actually receive voltage and current as input and provide noise filtering, overcurrent blocking, and various other functions.

After selecting Full Port in Toolbox, I added it to Battery and ECU and named Main Connector Male and Female, respectively. Then, if you select the full port and delete it with the Del key, it will be added to the full port section of the ECU Block.

image 166

And before actually modeling the full port internal design and the connection to SMPS inside the ECU, we will model the connection relationship between the Battery and ECU in Battery_Input_Context.

Power from the battery is output through the Main Connector Male Full Port and input into the ECU Main Connector Female Full Port.

And the items that actually flow between the Battery and ECU (here, current and voltage) can be expressed through a connector relationship, which is modeled through ibd.

Create an Internal Block Diagram of the Battery Input Context Block and display instances of the Battery and ECU as parts on the ibd through the Synchronize Structural Elements function. Then click Battery and activate Port in Features → Interaction Points. The ECU works the same way. Then connect the two ports with a connector.

Then, right-click the connector and select Advanced → Information Flows Realized to select the items flowing through the connector. Go back to bdd and add current and voltage value types and add them to Information Item. Then, you can model the items flowing between the battery and the full port of the ECU, as shown in ibd below.

image 170

Now, let’s model the internal structure and interaction of each Full Port in more detail. Go back to bdd and add blocks called Main Connector Male and Main Connector Female. And assign it to the type of full port of Battery and ECU, respectively. To assign a type, click on a port in the full ports section and specify the type in the Property tab of the Properties window. In this way, the internal structure of the full port can be modeled by designating a separate block as the type for the full port.

Let’s model the pin out of the Main Connector Male and Female. First, add blocks called Pin and Socket. Also, add two full ports, Power Out and GND Out, to the Main Connector Male Block and assign the Pin Block to the Type. For the Main Connector Female Block, add two full ports, Power In and GND In, and assign Socket Block as the Type.

image 171

Association Block

Then, select Association Block in the toolbox to connect between Main Connector Male and Female and name the created block as Main Connection. Association Block is a function that can model the internal structure of the association between two elements. Name the Association Main Connection and give it a Role name.

image 173

Now, if you create an ibd for the Main Connection Block and click Synchronize Structural Elements, the two blocks connected to the Main Connection Association will appear in the ibd as participantProperty. And activate all Full Ports in Features → Interaction Points of each participantProperty. And specify the Item Flow flowing through each port as shown in ibd below.

This image shows a internal block Diagram in order to Understanding port and association block

This is a Internal Block Diagram drawn with Enterprise Architect. If you want to get more information about port and association of block, this article may be helpful.

Now that we have completed modeling the interaction between the Main Connector Male and Female Full Port, go back to the Battery Input Context ibd and assign Main Connection as the Type to the connector connected between the Battery and the Full Port of the ECU.

Delete the previously connected Item Flow and Realized Connector and connect a new Connector. Then right-click on the connector → Advanced → Set Connector Type. Then we can allocate the Main Connection that we defined on bdd.

image 176

Go back to bdd and right-click Battery Input Context Block → New Child Diagram → Show Composite Diagram In Frame to increase visibility of the interaction between Battery and ECU as shown below.

image 177

Nested Port

Nested Port is a concept where there is another subport within a Port. This concept is already applied in our model.

Go back to Battery Input Context ibd, click Main Connector Female Full Port, and go to Features → Interaction Points to activate the two GND In and Power In Full Ports added to the Main Connector Female Block.

When enabled, two additional box icons will be created on the border of the Main Connector Female Port box icon. However, it is uncomfortable to see.

You can adjust the port size by right-clicking the Main Connector Female Full Port → Advanced → Port Size Customizable. Adjust it to look good. And by connecting each subport with a connector, it can be modeled as IBD as shown below.

image 178

Internal Connection

Now, if you create the ibd of the ECU Block and do Synchronize Structural Elements, the Main Connector Female Full Port and SMPS Part will be created on the ibd border. Connect the two elements as shown in ibd below.

image 179

Proxy Port

As explained above, a proxy port is an interaction point that does not represent a unique part of the system, but exposes the owned block or some functions of the block to the outside. It is difficult to go into detail about this concept, so to explain it simply, there is no need to consider the internal structure like a full port, and it explicitly models an interaction point that represents a specific property of the block that owns the port (so that the property can be accessed). You can think of it as using it when you want to.

Keeping this concept in mind, the main connector on the battery side in our model above does not actually need to be a full port, and it would be more accurate to design it as a proxy port. This is because we are actually not interested in the structure of the battery’s connector part, and we only need to know that one port of the battery outputs power and the other port is GND.

Now, let’s modify the model. Select the Main Connector Male Full Port of the Battery Block, select Stereotype in the Properties window → Element tab, Uncheck FullPort, and select ProxyProt. And in the Property tab, change the Type back to None.

image 180

The type of ProxyPort is Interface Block. (Because ProxyPort cannot have an internal structure, Block cannot be assigned as Type) Select Interface Block from Toolbox, add it on bdd, name it Main Connector Male Proxy, and additionally add Power Out, GND Out 2 to the Interface Block. Add Proxy Ports. (In this way, Proxy Port can also be made into a Nested Port)

Association Block’s ibd can be modeled like a full port.

image 181

Now, assign Main Connector Male Proxy block to the type of proxy port of Battery. The ibd of Battery Input Context Block can also be modeled in the same way as Full Port.

image 182

There doesn’t seem to be much difference in how EA handles proxy ports and full ports. However, Proxy Port and Full Port have different intentions in modeling, so when actually modeling, you should select and model according to the situation according to the concept of SysML. For reference, when connecting a proxy port inside a block, one of the differences from a full port is that the directionality must be the same as that of the property that the proxy port references (i.e., the property of the block that owns the proxy port).

Displaying directions on ports

In the modeling above, direction marks are missing for each port. To display a direction on a port, the Type (block or interface block) assigned to each port must own the Flow Property. As an example, let’s add a Flow Property on the ibd of the Main Connector Male Proxy Interface Block and name it Power Out. And in the Properties window of the FlowProperty, set the Element tab → Direction to Out.

image 183

And if you go to Battery Input Context ibd again, you can see that an outgoing arrow is displayed on the Main Connector Male Proxy Port, as shown in ibd below.

image 184

When modeling a system’s interface, the concept of ‘Port’ plays a key role. Ports represent interfaces between system components and define how data and signals flow. Simply put, it is about designing a way for each part of the system to ‘shake hands’ with each other. Through these contact points, the components of the system exchange information and interact with each other.

This post does not completely cover SysML Ports, but was written to help provide a basic understanding of designing system interfaces using SysML. I hope this helped you understand the importance of interface design when modeling a system, and gave you some insight into how to approach it.

[SysML] #1. Understanding SysML Diagrams

[SysML] #2. Understanding SysML Package Diagram

[SysML] #3. Understanding Dependencies of Pkg Diagram

[SysML] #5. Understanding SysML Requirement Diagram

[SysML] #6. Understanding Relations In Req Diagram

[SysML] #7. How to draw a Req Diagram with EA

[SysML] #8. Understanding SysML UseCase Diagram

[SysML] #9. How to draw a UseCase Diagram with EA

[SysML] #10. Understanding SysML bdd Diagram

[SysML] #11. Understanding SysML ibd Diagram

[SysML] #12. Understanding Part Property of Block

[SysML] #13. Understanding Reference Property of Block

[SysML] #14. Understanding Value Type

[SysML] #15 Understanding Parametric Diagram

[SysML] #16. Understanding Flow Property

[SysML] #18. Understanding Behavior of Block

[SysML] #19. Understanding Generalizations

[SysML] #20. Understanding Dependencies, Allocate, Comment

[SysML] #21. Understanding Activity Diagram

[SysML] #22. How to draw a Activity Diagram with EA

[SysML] #23. Seq Diagram LifeLine and Message

[SysML] #24. Seq Diag Constraints Fragment Decompose

[SysML] #25. How to draw a Sequence Diagram with EA

[SysML] #26. Understanding Stm Diagram State and Transition

[SysML] #27. Understanding Stm Diagram Event Pseudostate Region

[SysML] #28. How to draw a State Machine Diagram with EA

Leave a Comment