Workflow Automation for Cyber Physical System Development Processes

Charles Hartsell, Nagabhushan Mahadevan, Harmon Nine, Ted Bapty, Abhishek Dubey, Gabor KarsaiarXiv 2020

Introduction

Developing modern Cyber-Physical Systems (CPS), such as autonomous underwater vehicles or smart grids, is a complex multidisciplinary challenge. Engineers must navigate various domains, including mechanical engineering, control theory, software development, and machine learning (ML). While specialized tools like TensorFlow or high-fidelity physics simulators exist for individual domains, the integration layer—the "glue"—between these tools is often missing.

Currently, developers are frequently burdened with manual data transformation, toolchain configuration, and the monitoring of long-running processes. This manual intervention is not only slow and error-prone but also hinders the reproducibility of results. This paper introduces a formal, automated workflow system designed to replace these ad-hoc manual processes within the Assurance-based Learning-enabled CPS (ALC) Toolchain.

Methods: Workflow DSML and Execution Engine

The authors propose a solution consisting of a Workflow Domain-Specific Modeling Language (DSML) and a corresponding Workflow Executor.

The Workflow DSML

The DSML provides a graphical framework to model the development process itself as a first-class model. It utilizes several primary objects to define the logic and data movement of a workflow.

Components of the Workflow DSML including Job Blocks, Data Flows, and Process Flows.

Key components include:

  • Job Blocks: Represent individual steps or tasks in the process.
  • Data Flows: Indicated by black lines, these show how artifacts, such as trained models, are passed between jobs.
  • Process Flows: These define execution logic using blue "check" edges for verification and red "repeat" edges for iterative tasks.
  • Iteration Blocks: Represented by grey diamonds, these blocks contain Python scripts to manage complex looping logic, such as repeating a training cycle until a specific accuracy threshold is met.

The Workflow Executor

The execution engine is built upon Gradle, a robust build automation tool. The executor translates the graphical DSML model into a Directed Acyclic Graph (DAG) of tasks. By leveraging a Python API, the system allows for dynamic updates to model parameters during execution, facilitating sophisticated operations like automated hyperparameter grid searches.

Evaluation: Unmanned Underwater Vehicle Task

The system was evaluated using a simulated Unmanned Underwater Vehicle (UUV) mission. The workflow encompassed several phases:

  1. Data Generation: A simulator generated labeled sonar images of a seafloor pipeline, incorporating randomized obstacles and start locations.
  2. Model Training: The generated data was used to train a "Perception LEC" (Learning-Enabled Component) using the SegNet architecture and a "Control LEC" via reinforcement learning.
  3. Automation Benchmarking: The utility of the system was demonstrated by automating a 3x4 grid search for hyperparameter optimization, totaling 12 iterations.

Key Results and Insights

The implementation of the automated workflow system yielded significant improvements in development efficiency and process management.

Results of the 3x4 hyperparameter grid search for the Learning Optimizer and Number of Epochs.
  • Efficiency and Automation: Complex workflows, such as the hyperparameter optimization grid shown above, could be configured in less than an hour. The system autonomously managed long-running jobs, ensuring that hardware resources did not remain idle between training sessions.
  • Workflows as Models: Treating the development process as a model brings the benefits of Model-Based Design—such as version control and formal semantics—to the meta-level of system engineering.
  • Handling Iteration: While standard build tools often struggle with loops, this system successfully manages iterative ML cycles by separating looping logic from the acyclic execution of individual tasks.

Limitations and Future Work

Despite its successes, the current system has several limitations that the authors intend to address:

  • Branching and Hierarchy: The language currently lacks general "if-then-else" branching and does not support hierarchical "sub-workflows," which limits the modularity of large-scale projects.
  • Parallel Execution: Iterations within a loop currently run sequentially. Future updates will focus on parallelizing these tasks to leverage high-performance computing clusters.
  • Autonomous Error Recovery: While the system provides real-time status tracking, it cannot yet autonomously recover from tool failures without manual intervention.

Summary updated

BibTeX
@misc{hartsell2020workflow,
  author = {Charles Hartsell and Nagabhushan Mahadevan and Harmon Nine and Ted Bapty and Abhishek Dubey and Gabor Karsai},
  title = {{Workflow Automation for Cyber Physical System Development Processes}},
  year = {2020},
  eprint = {2004.05654},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.05654},
}
Figure