Skip to content

Introduction

Modern systems engineering demands precise specification and clear communication of component interactions, behaviors, and requirements. There are many tools available for requirement management, where SysML is the most well-known. SysML is a diagram-based language that visualizes interactions and behaviors of a system. However, ensuring correctness of the model based on the requirements is a demanding and time consuming task. The Elephant Specification Language (ESL) offers a complementary approach to this challenge, through structured textual definitions and correct-by-construction system visualization.

This guide demonstrates how both languages can be used together to enhance system clarity and consistency. Even though ESL is lightly explained in this guide, a basic understanding of ESL is recommended. A more in-depth explanation can be found in the tutorials.

ESL and SysML

The Elephant Specification Language (ESL) is a textual language that allows for the specification of components and their interactions in a system. ESL is based on the concept of components, which are defined using a hierarchy. These components can be decomposed into subcomponents. The interactions between different components can be defined by variables, parameters, and requirements. ESL supports the definition of various types of requirements, such as: goal-, need-, transformation-, design-, and behavioral requirements. ESL provides a specific syntax for defining requirements, enabling automatic linking to components and resulting in a clear and traceable model of the system.

SysML, in constrast, is a diagram-based language used to specify blocks and their interactions within a system. Blocks in SysML correspond to ESL components, where parts, properties, ports and flows capture the internal composition and external interactions of the blocks. The core aspects of SysML are: Behavior diagrams, Structure diagrams, and Requirement diagrams:

  • The structure of the system is defined in a Block Definition Diagram (BDD), which contains blocks that represent the system components. These blocks can be decomposed into subcomponents (also referred to as “parts”) using Internal Block Diagrams (IBD).
  • The behavior of the system is represented using Activity Diagrams. The behavior can be linked to blocks using the allocation relationship.
  • The requirements are specified in Requirement Diagrams and can be linked to other model elements (e.g., blocks, activities, state machines) using the relationships: satisfy, verify, and derive.

sysml_structure

The figure shows the SysML diagram taxonomy. The main pillars of SysML are the behavior, structure, and requirement diagrams.

In the following sections, we will demonstrate the mapping using an example of a pump and drive-mechanism:

world.esl
# Specification of a drive-mechanism driving a pump.
define type
  mechanical-energy-flow is a real with unit Nm
  electrical-energy-flow is a real with unit W
  liquid-material-flow is a real with unit L/s
  energy-potential is a real with unit Wh
  control-signal is a boolean
  distance is a real with unit m
  spatial-measure is a distance of at least 0.0 [m]
  efficiency is a real  of at least 0.0 and at most 1.0


define verb
  provide to
  convert into
  send to


define relation
  battery-efficiency-model
    relating parameters
    * potential is an energy-potential
    * output is an electrical-energy-flow


world
  variables
    torque is a mechanical-energy-flow #< Comments on variable torque.
    water-flow is a liquid-material-flow
    drive-length is a spatial-measure
    pump-length is a spatial-measure



  components
    pump is a CentrifugalPump with arguments
      * torque
      * water-flow
      * pump-length

    drive-mechanism is an ElectricalDriveMechanism with arguments
      * torque
      * drive-length



  comments
    pump #< Can be sourced by manufacturer XYZ.
         #< Part number CFG.PMP.0.1


  goal-requirements
    provide-torque: drive-mechanism must provide torque to pump



  design-requirements
    min-water-flow: water-flow must be at least 1.0 [L/s]



  design-constraints
    dc-drive-length: drive-length must be equal to pump-length

  need
    IP68: drive-mechanism must be IP68 compliant


define component CentrifugalPump
  parameters
    torque is a mechanical-energy-flow
    water-flow is a liquid-material-flow
    length is a spatial-measure property

  transformation-requirements
    convert-torque: must convert torque into water-flow


define component ElectricalDriveMechanism
  parameters
    torque is a mechanical-energy-flow
    length is a spatial-measure property

  variables
    power-potential is an energy-potential
    power is an electrical-energy-flow
    motor-control-signal is a control-signal

  transformation-requirements
    convert-power-potential: must convert power-potential into torque


  components
    power-source is a Battery with arguments
      * power-potential
      * power

    motor is a BrushlessMotor with arguments
      * power
      * torque

    power-Switch is a Switch with arguments
      * motor-control-signal


  goal-requirements
    provide-power: power-source must provide power to motor
    send-control-signal: power-Switch must send motor-control-signal to power-source


  behavior-requirements
    toggle-power:
      case on:
        when
          * c1: motor-control-signal is equal to True [-]
        then
          * r1: power must be at least 300 [W]
      case off:
        when no other case applies
        then
          * r2: power must be equal to 0 [W]


define component BrushlessMotor
  parameters
    power is an electrical-energy-flow
    torque is a mechanical-energy-flow

  variables
    conversion is an efficiency

  transformation-requirements
    convert-power: must convert power into torque with subclauses
      * s1: conversion must be at least 0.8


define component Battery
  parameters
    power-potential is an energy-potential
    power is an electrical-energy-flow

  transformation-constraints
    convert-potential: does convert power-potential into power


  relations
    efficiency-model: battery-efficiency-model
      relating arguments
      * power-potential
      * power


define component Switch
  parameters
    motor-control-signal is a control-signal

Next!

Press next (or N on your keyboard) to head over to the next page! P is for Previous.