Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 288 additions & 0 deletions paper/architecture.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
digraph newtonian_rti {
subgraph cluster_engine {
fontname="Helvetica"
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#8F8F8F"
color="#8F8F8F"
fontcolor="#FFFFFF"
fontsize=12
penwidth=1.2
margin=16

graph [
rankdir=TB
fontname="Helvetica"
fontsize=20
bgcolor="transparent"
pad=0.5
nodesep=0.3
ranksep=0.25
label="Δ-Engine Architecture (GPLv3)"
labelloc=t
labeljust=c
splines=false
compound=true
]
node [
fontname="Helvetica"
shape=box
style="rounded,filled"
penwidth=0.8
width=5.5
margin="0.25,0.18"
]
edge [
fontname="Helvetica"
fontsize=10
arrowhead=vee
arrowsize=0.7
penwidth=0.8
color="#9C9A92"
]


// ── Newtonian RII — Amber ─────────────────────────────────────────────
subgraph cluster_rti {
label="[0] Atomic Newtonian RTI — Physics Spaces\nTop-level simulation environment and scene API"
fontname="Helvetica"
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#633806"
color="#EF9F27"
fontcolor="#FFFFFF"
fontsize=12
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#733806"
color="#733806"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

_molecular [ label="Molecular Component" ]
_inertia [ label="Inertial Ref. Frames Component" ]
_forceacc [ label="Accelerating Component" ]
_interaction [ label="Interaction Component" ]

{ rank=same _molecular _inertia _forceacc _interaction }

// invisible edges to enforce left-to-right ordering
_molecular -> _inertia -> _forceacc -> _interaction [ style=invis ]
}

// ── Physics Mechanics cluster ─────────────────────────────────────────
subgraph cluster_physics {
label="[1] Physics Mechanics Modules"
fontname="Helvetica"
fontsize=12
fontcolor="#FFFFFF"
style="rounded,filled"
fillcolor="#3C3489"
color="#AFA9EC"
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#26215C"
color="#26215C"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

PM_mech [ label="Mechanics" ]
PM_fluid [ label="Fluid Dynamics" ]
PM_therm [ label="Thermodynamics" ]
PM_em [ label="Electromagnetism" ]

{ rank=same PM_mech PM_fluid PM_therm PM_em }

// invisible edges to enforce left-to-right ordering
PM_mech -> PM_fluid -> PM_therm -> PM_em [ style=invis ]
}

subgraph cluster_sdk {
label="The Electrostatic-Sandbox SDK (GPLv3)"
fontname="Helvetica"
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#000000"
color="#000000"
fontcolor="#FFFFFF"
fontsize=12
penwidth=1.2
margin=16
// ── Mathematical Libraries — Blue ─────────────────────────────────────
subgraph cluster_mathlibs {
label="[2] Mathematical Libraries"
fontname="Helvetica"
fontsize=12
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#0C447C"
color="#85B7EB"
fontcolor="#FFFFFF"
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#26215C"
color="#26215C"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

_vectors [ label="Vector Math" ]
_calculus [ label="Calculus" ]
_matrix [ label="Matrix Algebra" ]

{ rank=same _vectors _calculus _matrix }

// invisible edges to enforce left-to-right ordering
_vectors -> _calculus -> _matrix [ style=invis ]
}

// ── IO VM — Teal ──────────────────────────────────────────────────────

subgraph cluster_vmio {
label="[3] IO VM (VMIO)\nVirtualised IO interface — platform-agnostic dispatch"
fontname="Helvetica"
fontsize=12
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#085041"
color="#5DCAA5"
fontcolor="#FFFFFF"
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#115022"
color="#115022"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

_analog [ label="Analog Driver" ]
_digital [ label="Digital Driver" ]
_comm [ label="Comm Driver" ]
_memory [ label="Memory Driver" ]

{ rank=same _analog _digital _comm _memory }

// invisible edges to enforce left-to-right ordering
_analog -> _digital -> _comm -> _memory [ style=invis ]
}

// ── IO Infrastructure — Coral ─────────────────────────────────────────

subgraph cluster_io {
label="[4] IO Infrastructure"
fontname="Helvetica"
fontsize=12
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#712B13"
color="#F0997B"
fontcolor="#FFFFFF"
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#912B13"
color="#912B13"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

_gpio [ label="GPIO" ]
_spi [ label="SPI" ]
_i2c [ label="I2C" ]
_pwm [ label="PWM" ]
_adc [ label="ADC" ]
_eeprom [ label="EEPROM" ]

{ rank=same _gpio _spi _i2c _pwm _adc _eeprom }

// invisible edges to enforce left-to-right ordering
_gpio -> _spi -> _i2c -> _pwm -> _adc -> _eeprom [ style=invis ]
}
}

// ── Platform targets — Gray ───────────────────────────────────────────
subgraph cluster_toolchain {
label="[5] Platform-dependent Toolchain"
fontname="Helvetica"
fontsize=12
fontcolor="#CECBF6"
style="rounded,filled"
fillcolor="#444441"
color="#B4B2A9"
fontcolor="#FFFFFF"
penwidth=1.2
margin=16

node [
fontname="Helvetica"
fontsize=11
shape=box
style="rounded,filled"
fillcolor="#545451"
color="#B4B2A9"
fontcolor="#FFFFFF"
penwidth=0.8
width=1.0
margin="0.18,0.14"
]

_avr [ label="AVR" ]
_arm [ label="ARM" ]
_x86 [ label="x86" ]
_android [ label="Android" ]

{ rank=same _avr _arm _x86 _android }

// invisible edges to enforce left-to-right ordering
_avr -> _arm -> _x86 -> _android [ style=invis ]
}

// ── Spine edges ───────────────────────────────────────────────────────
_interaction -> PM_em [style=invis] [ lhead=cluster_physics ]
PM_em -> _matrix [style=invis] [ ltail=cluster_physics ]
_matrix -> _memory [style=invis]
_memory -> _eeprom [style=invis]
_eeprom -> _android [style=invis]
}
}
93 changes: 93 additions & 0 deletions paper/paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Delta-Engine

## Abstract
Scientific abstractions are one of the very useful techniques to implement software to control embedded microcontrollers for heavy machinery operations. In this paper, we introduce a physics engine that provides a new software paradigm for IO control for embedded systems and robotics based on a mathematical-physical abstraction.

## Keywords
Embedded Systems - Embedded IO - C Programming Framework - Calculus-based Physics - Multivariate Calculus - Software programming paradigms - System Entity Structure/Model Base (SES/MB) - Hardware Abstraction Layer (HAL) - Entity Component System (ECS) - Automata Theory

## Knowledge Gaps (Statement of Need)
There are a couple of theoretical and practical knowledge gaps that this software is going to address including, but not limited to:
- [ ] Precisional IO Embedded Control of heavy machines and robotics using Scientific Abstractions (e.g., Mathematical/Physical and Chemical Abstractions).
- [ ] Seamless hardware implementation of several physics simulation systems.
- [ ] Single abstraction for software and hardware systems.

## Introduction
Delta-Engine is a physics engine that provides a new software architectural paradigm for precisional IO switch and control over embedded systems and robotics without much knowledge in embedded systems, managing states and software engineering paradigms or if they fail to design the system (e.g., Object-oriented programming). It introduces the field of computational physics to the embedded world through providing a virtual machine and a runtime infrastructure based on the Newtonian physics spaces and supporting infrastructure IO libraries for several supported platforms.

## Methodologies
- The Abstract architectural design methodologies involve using the **Hardware-Abstraction Layer (HAL)** to model the structure of the engine in a hierarchial form and the **System-Entity-Structure/Model-Base (SES/MB) Framework** to model the structure of the engine in a more detailed form and model the relation among the subsystems and the components of the engine.
- The Detailed-design methodologies involve using **Entity-Component-System (ECS)** to implement the structure of the physics engine together with the **Automata Theory**; such that, each component of the physics architecture could be represented by a system of component objects, and the system part of the ECS encapsulates state-machines; either deterministic or non-deterministic; with cyclic or non-cyclic runtime.
- Virtualization of physics objects and IO emulation using mathematical and physical abstractions.
- Newtonian physics spaces as Runtime Infrastructure (RTI).
- Implementation of several physics spaces modules (e.g., Kinematics Module - Fluid Mechanics Module).

## High-level Architecture
<img width="773" height="904" alt="architecture" src="https://github.com/user-attachments/assets/d5700f97-d21c-42fb-9279-818225b125d4" />

<img width="1662" height="1301" alt="ses-mb" src="https://github.com/user-attachments/assets/51447f44-0fc4-4b15-9e33-3a40257c5764" />

Two architectural models are being proposed here; a **hierarchial model** representing a hardware abstraction layer using a mathematical/physical abstraction, and a **System-Entity-Structure/Model-Base (SES/MB) model** to model the same system components into several subsytems; those subsystems display some components that may be formally linked with components from other subsystems (e.g., the formal linkage among Math Libraries, Mechanics Libraries, and the VMIO Libraries that enable a chained dispatch from Physics to IO).

### Subsystems:
* Atomic Newtonian RTI: a subsystem that groups the runtime infrastructure components; its instantiation reveals the base Newtonian physics of inertia, acceleration, and object interaction in space.
* Molecular Component.
* Inertial Ref. frame Component.
* Acceleration Component.
* Interaction Component.
* Physics Mechanics: a specialized subsystem of the Newtonian RTI; grouping the different types of objects in the universe that experience inertia, acceleration/deceleration, and interaction with other objects.
* Mechanics Module.
* Fluid Dynamics Module.
* Thermodynamics Module.
* Electromagnetism Module.
* Mathematical Libraries: a subsystem housing the base continous and discrete mathematical layer of the operations involved in the Physics Subsystems (both the Atomic/Newtonian RTI and the Physics Mechanics Subsystems).
* Calculus Module.
* VectorMath Module.
* Matrix Algebra Module.
* Virtualized IO (VMIO): a subsystem involving a platform-independent layer of driver modules to operate on the lower level platform-dependent IO infrastructure based on the output data from the Mathematical/Physical layers.
* Analog Driver Module.
* Digital Driver Module.
* Comm Driver Module.
* Memory Driver Module.
* IO Infrastructure: a subsystem involving a more platform specific dependent layer of the hardware IO; grouped together in a thin abstraction layer that encapsulates a procedural runtime for the hardware IO involved; links statically with **the Platform-dependent toolchain**.
* GPIO Module.
* PWM Module.
* UART Module.
* SPI Module.
* I2C Module.
* EEPROM Module.
* Platform-dependent toolchain: a subsystem involving a platform-dependent layer of the hardware IO and the operating system operations that are encapsulated directly by the IO Infrastructure subsystem and indirectly by the Platform-agnostic VMIO subsystem.
* Android Userspace Runtime.
* AVR Runtime.
* ARM Runtime.
* x86 Userspace Runtime.

### Detailed Design:
Detailed design could be carried out using the **Entity-Component System (ECS) Framework** to model the structure of the engine, and the **Automata Theory** to model the behavior of the engine. Both could be linked via the system part of the ECS; ECS systems can be state machines; either deterministic or non-deterministic; cyclic or non-cyclic in runtime behavior.

> [!NOTE]
> ## Example:
> A physics object; a ball; has the following:
> 1) A component that is attached to the **Inertial Ref. Frame System** through an entity `ID_BALL`.
> 2) A component that is attached to the **Acceleration/Deceleration System** through an entity `ID_BALL`.
> 3) A component that is attached to the **Molecular System** through an entity `ID_BALL`.
> 4) A component that is attached to the **Interaction System** through an entity `ID_BALL`.
> 5) A component that is attached to the **Mechanics System** through an entity `ID_BALL`.
>
> ## Remarks:
> * It's not ideal to add a component of the ball object to the **Fluid Dynamics System**; therefore, both the **Mechanics** and the **Fluid Dynamics** are specializations of the **Atomic/Newtonian RTI Subsystem**.
> * It would be ideal to attach a component of the ball object to the **Fluid Dynamics System**, only if the ball is highly deformable and could be expressed in terms of fluid or semi-fluid properties (e.g., the ball is a "thrombus" in biomedical simulation).
> * If that ball object is otherwise, a metallic object; it would be ideal to attach a component of it under the **Electromagnetism System**; as it could be electromagnetized under a magnetic field.
> * A ball object could have { **a standard mechanical component**, **a deformable component**, and **a magnetizable component** } at the same time to enable the different types of simulations accordingly under their respective systems { **Mechanics System**, **Fluid Dynamics System**, and **Electromagnetism System**}, respectively.
> * The collection of the previous systems represent the core of the Delta-Engine; the **Atomic/Newtonian RTI Subsystem** and its specialization **Physics Mechanics**.
> * Systems are operated using State-Machines; either deterministic or non-deterministic in nature; cyclic or non-cyclic.

## Implementation Phases and Milestones

## Integration Phases and Life Applications

## References
- [SES/MB Framework by Throsten Pawletta](https://dl.acm.org/doi/10.5555/3108244.3108245)
- [The Feynman Lectures Caltech University](https://www.feynmanlectures.caltech.edu/)
- [Fundamentals of Physics for Scientists and Engineers by Paul Tipler]()
- [Thomas' Calculus]()
Loading
Loading