Skip to content

Commit

Permalink
working commit
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadtalasila committed Sep 29, 2023
1 parent 3d82e89 commit 5d5980d
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 72 deletions.
9 changes: 6 additions & 3 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Frequently Asked Questions

## Abreviations

Expand Down Expand Up @@ -40,7 +41,8 @@
DTaaS is not a model creation tool. You can put model creation tool
inside DTaaS and create new models.

The DTaaS itself does not create digital twin models. But you can run
The DTaaS itself does not create digital twin models but it can help
users create digital twin models. You can run
Linux desktop / terminal tools inside the DTaaS. So you can create
models inside DTaaS and run them using tools that can run in Linux.
The Windows only tools can not run in DTaaS.
Expand Down Expand Up @@ -74,8 +76,9 @@
to provide one.

??? Question "Does it support XML-based representation and ontology representation?"
Currently No. **We are looking for users needing this capability. If you have concrete requirements and an example, we can discuss a way of realizing it in DTaaS**.

Currently No. **We are looking for users needing this capability.**
**If you have concrete requirements and an example, we can discuss a way**
**of realizing it in DTaaS**.

## Communication Between Physical Twin and Digital Twin

Expand Down
108 changes: 82 additions & 26 deletions docs/user/digital-twins/create.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@

# Create a Digital Twin

The first step in digital twin creation is to use the available assets in your workspace. If you have assets / files in your computer that need to be available in the DTaaS workspace, then please follow the instructions provided in [library assets](../servers/lib/assets.md).
The first step in digital twin creation is to use the available assets
in your workspace. If you have assets / files in your computer that need
to be available in the DTaaS workspace, then please follow the instructions
provided in [library assets](../servers/lib/assets.md).

There are dependencies among the library assets. These dependencies are shown below.
There are dependencies among the library assets. These dependencies
are shown below.

![Relation between reusable assets](asset-relationship.png)

A digital twin can only be created by linking the assets in a meaningful way. This relationship can be expressed using a mathematical equation:
A digital twin can only be created by linking the assets in
a meaningful way. This relationship can be expressed using
a mathematical equation:

$$
D_t: \{ D{^*},M^{*},(FT)^{+} \}C_{dt}
$$

where D denotes data, M denotes models, F denotes functions, T denotes tools, $C_{dt}$ denotes DT configuration and $D_t$ is a symbolic notation for a digital twin itself. The $\{ D{^*},M^{*},(FT)^{+} \}C_{dt}$ expression denotes composition of DT from D,M,T and F assets. The $*$ indicates zero or one more instances of an asset and $+$ indicates one or more instances of an asset.
where D denotes data, M denotes models, F denotes functions, T denotes tools,
$C_{dt}$ denotes DT configuration and $D_t$ is a symbolic notation for
a digital twin itself. The $\{ D{^*},M^{*},(FT)^{+} \}C_{dt}$ expression
denotes composition of DT from D,M,T and F assets. The $*$ indicates zero
or one more instances of an asset and $+$ indicates one or more instances
of an asset.

The DT configuration specifies the relevant assets to use, the potential parameters to be set for these assets. If a DT needs to use RabbitMQ, InfluxDB like services supported by the platform, the DT configuration needs to have access credentials for these services.
The DT configuration specifies the relevant assets to use, the potential
parameters to be set for these assets. If a DT needs to use RabbitMQ, InfluxDB
like services supported by the platform, the DT configuration needs to
have access credentials for these services.

This kind of generic DT definition is based on the DT examples seen in the wild. You are at liberty to deviate from this definition of DT. The only requirement is the ability to run the DT from either commandline or desktop.
This kind of generic DT definition is based on the DT examples seen in
the wild. You are at liberty to deviate from this definition of DT.
The only requirement is the ability to run the DT from either commandline
or desktop.

!!! tip

If you are stepping into the world of Digital Twins, you might not have distinct digital twin assets. You are likely to have one directory of everything in which you run your digital twin. In such a case we recommend that you upload this monolithic digital twin into **digital twin/your_digital_twin_name** directory.
If you are stepping into the world of Digital Twins, you might not
have distinct digital twin assets. You are likely to have one directory
of everything in which you run your digital twin. In such a case we
recommend that you upload this monolithic digital twin into
**digital twin/your_digital_twin_name** directory.

## Example

The [Examples](https://github.com/INTO-CPS-Association/DTaaS-examples) repository contains a co-simulation setup for mass spring damper. The complete details on this example are available on [github](https://github.com/INTO-CPS-Association/example-mass_spring_damper).
The [Examples](https://github.com/INTO-CPS-Association/DTaaS-examples)
repository contains a co-simulation setup for mass spring damper.
The complete details on this example are available on
[github](https://github.com/INTO-CPS-Association/example-mass_spring_damper).

This example illustrates the potential of using co-simulation for digital twins.
This example illustrates the potential of using co-simulation
for digital twins.

The file system contents for this example are:

Expand Down Expand Up @@ -66,37 +91,68 @@ workspace/
maestro-2.3.0-jar-with-dependencies.jar
```

The `workspace/data/mass-spring-damper/` contains `input` and `output` data for the mass-spring-damper digital twin.
The `workspace/data/mass-spring-damper/` contains `input` and
`output` data for the mass-spring-damper digital twin.

The two FMU models needed for this digital twin are in `models/` directory.
The two FMU models needed for this digital twin are in
`models/` directory.

The co-simulation digital twin needs Maestro co-simulation orchestrator. Since this is a reusable asset for all the co-simulation based DTs, the tool has been placed in `common/tools/` directory.
The co-simulation digital twin needs Maestro co-simulation
orchestrator. Since this is a reusable asset for all
the co-simulation based DTs, the tool has been placed in
`common/tools/` directory.

The actual digital twin configuration is specified in `digital twins/mass-spring-damper` directory. The co-simulation configuration is specified in two json files, namely `cosim.json` and `time.json`. A small explanation of digital twin for its users can be placed in `digital twins/mass-spring-damper/README.md`.
The actual digital twin configuration is specified in
`digital twins/mass-spring-damper` directory. The co-simulation configuration
is specified in two json files, namely `cosim.json` and `time.json`.
A small explanation of digital twin for its users can be placed in
`digital twins/mass-spring-damper/README.md`.

The launch program for this digital twin is in `digital twins/mass-spring-damper/lifecycle/execute`. This launch program runs the co-simulation digital twin. The co-simulation runs till completion and then ends. The programs in `digital twins/mass-spring-damper/lifecycle` are responsible for lifecycle management of this digital twin. The [lifecycle page](lifecycle.md) provides more explanation on these programs.
The launch program for this digital twin is in
`digital twins/mass-spring-damper/lifecycle/execute`. This launch program runs
the co-simulation digital twin. The co-simulation runs till completion and
then ends. The programs in `digital twins/mass-spring-damper/lifecycle` are
responsible for lifecycle management of this digital twin.
The [lifecycle page](lifecycle.md) provides more explanation on these programs.

!!! Abstract "Execution of a Digital Twin"

A frequent question arises on the run time characteristics of a digital twin. The natural intuition is to say that a digital twin must operate as long as its physical twin is in operation.
**If a digital twin runs for a finite time and then ends, can it be called a digital twin?**
A frequent question arises on the run time characteristics of
a digital twin. The natural intuition is to say that a digital twin must
operate as long as its physical twin is in operation.

**The answer is a resounding YES**. The Industry 4.0 usecases seen among SMEs have digital twins that run for a finite time. These digital twins are often run at the discretion of the user.
**If a digital twin runs for a finite time and then ends, can it be
called a digital twin?**

**You can run this digital twin by **
**The answer is a resounding YES**. The Industry 4.0 usecases seen among
SMEs have digital twins that run for a finite time. These digital twins
are often run at the discretion of the user.

1. Go to Workbench tools page of the DTaaS website and open VNC Desktop. This opens a new tab in your browser
2. A page with VNC Desktop and a connect button comes up. Click on Connect. You are now connected to the Linux Desktop of your workspace.
3. Open a Terminal (black rectangular icon in the top left region of your tab) and type the following commands.
4. Download the [example files](https://github.com/INTO-CPS-Association/DTaaS-examples/archive/refs/heads/main.zip)
```
**You can run this digital twin by**,

1. Go to Workbench tools page of the DTaaS website and open VNC Desktop.
This opens a new tab in your browser
1. A page with VNC Desktop and a connect button comes up. Click on Connect.
You are now connected to the Linux Desktop of your workspace.
1. Open a Terminal (black rectangular icon in the top left region of your tab)
and type the following commands.
1. Download the
[example files](https://github.com/INTO-CPS-Association/DTaaS-examples/archive/refs/heads/main.zip)

```sh
$wget https://github.com/INTO-CPS-Association/DTaaS-examples/archive/refs/heads/main.zip
$unzip main.zip
```
5. Open a file browser and copy the files from this uncompressed folder into your workspace folder (`/workspace`). Make sure that the file placement matches the one given above.
6. Go to the digital twin directory and run

1. Open a file browser and copy the files from this uncompressed folder
into your workspace folder (`/workspace`). Make sure that the file placement
matches the one given above.
1. Go to the digital twin directory and run

```
$cd /workspace/digital twins/mass-spring-damper
$lifecycle/execute
```
The last command executes the mass-spring-damper digital twin and stores the co-simulation output in `data/mass-spring-damper/output`.
The last command executes the mass-spring-damper digital twin and stores
the co-simulation output in `data/mass-spring-damper/output`.
2 changes: 1 addition & 1 deletion docs/user/motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ this problem. Some of them are:
* Scale DT / execution of DT / ensemble of related DTs
* Support for PT product lifecycle

## What is Our Approach?
## Our Approach

* Support for transition from existing workflows to DT frameworks
* Create DTs from reusable assets
Expand Down
Loading

0 comments on commit 5d5980d

Please sign in to comment.