sysml

SysML: Mixing SW with analog HW


Using SysML.

Hypothetical scenario - hasn’t happened yet, but quite likely soon will. This question must have been asked a 1000 times …

I am given a system sketch with mixed SW and analog HW components and asked to model it using SysML.

Simple example: A Gardening SW application runs on a PC computer and connects to (controls) a garden sprinkler device. The sprinkler device is not digital.

I am assuming that SysML (MBSE?) forbids mixing HW and SW in the same diagram.

What do I do?

Suggestion – at HW level and at SW level:

(Assuming the BDD diagram is properly set up.)

HW IBD Diagram: No problem - I can model the system as two HW devices:

• PC Computer HW, which runs the Gardening SW app

• Sprinkler device – not digital (non-intelligent)

SW IBD Diagram: Problem …

If they want a highest-level diagram to show the SW app just as a block-box bubble and connected to the sprinkler – again, the sprinkler is not intelligent – just analog. So the SW app has nobody to talk to from a SW point of view.

The only thing I can think of is to define something like this - a diagram with the following features:

Your opinions?

In practice, do some engineers simply model (draw...) a SW block connecting to an analog HW device?

Thanks


Solution

  • You can show both hardware and software blocks in the same diagram. The question of course is, how they are connected.

    A software block can only be connected directly to the hardware block it is deployed on. Together the software and hardware block make up a new subsystem that is connected to other subsystems.

    These other subsystems may or may not have software blocks. If they do have software blocks, there might be an abstraction layer, where two software blocks can be viewed as being connected. How to connect the different abstraction layers is not defined in SysML. For this I can recomment the paper on the Layered Interface Modeling Pattern.

    Now the software block probably will contain some knowledge about the subsystem it will be controling. This knowledge, however, should not be confused with the real hardware block. The knowledge could be incomplete or even plain wrong. Therefore, I model this as «domain block».

    If you really want to model the software, you would need to describe how it interacts with the hardware. That could involve interrupts and registers or some abstraction layer in form of firmware and operating system. So the "hardware" often already is a combination of soft- and hardware.

    As an example, I modeled your gardening automation system: gardening automation system

    As a controler I use an Arduino and the software uses the Arduino-Programming-Port. There are two different kinds of Sprinkler. The physical sprinkler and the domain knowledge about it, represented in the software.

    Whether this level of detail is necessary is debatable. Maybe, I only want to model that I use an Arduino and together with a certain software block it forms a subsystem. Then I don't specify the internal ports and connectors. The Software will then have no connection to the physical subsystems. It is only a part of something that does have connections. I would consider the more detailed model as implied by this configuration. enter image description here