Skip to content

Repository files navigation

RADMA: Resource Aware Dynamic Deployment of ML Architectures in Space for an Edge TPU

RADMA is a framework for dynamically selecting which ML model a satellite runs onboard, given constraints that change throughout an orbit: battery state of charge, solar generation through eclipse cycles, and per-frame time/energy budgets driven by orbital geometry (ground sample distance, dwell time, etc.). Instead of committing to one fixed model, RADMA picks the best model for the current frame budget so the satellite maximizes correct inferences without exceeding its energy budget.

This repository contains:

  • C/C++ FreeRTOS applications for the Coral Pico (a custom PCB hosting a Google Coral Edge TPU in a Picosatellite form factor), including the RADMA scheduler itself (src/libs).
  • Tooling to perform offline hardware-in-the-loop (HIL) characterization (power, latency, accuracy) of candidate models on a Coral Pico or Google Coral Micro Dev Board (src/scripts/hardware_characterization).
  • Simulation and case-study tooling that replays real orbit telemetry (from STK) through the RADMA scheduler to evaluate energy/throughput tradeoffs for different orbits (src/scripts/dynamic_selection_sims).

Directory

  • data: characterization HIL testing data (candidate models, STK orbit exports, accuracy results) and the resulting model performance map consumed by both the RADMA simulator and firmware.

  • results: outputs of hardware characterization runs and simulation case studies (captures, plots, per-orbit reports).

  • src: Coral firmware, the RADMA scheduler library, and the Python scripts used for characterization and simulation.

  • tests: C++ unit tests (GoogleTest) for the RADMA scheduler.

  • setup.sh: bash script to install submodules, create a venv, and build dependencies.

  • flashtool.sh: bash script to build the firmware and flash it onto a connected Coral board.

Setup

setup.sh installs the coralmicro submodule (recursively), creates a Python virtual environment in this repository named coraldev, installs requirements.txt into it, builds coralmicro, and drops you into a shell with coraldev activated. Re-activate it later with source coraldev/bin/activate.

Native support follows the coralmicro submodule: x86 Linux and macOS. Windows isn't supported natively — use WSL2 (see below).

Linux

From the repository root:

bash setup.sh

macOS (untested, sorry!)

Install Homebrew or MacPorts first — coralmicro's own setup step uses one of them to install cmake/libusb. Then from the repository root:

bash setup.sh

flashtool.sh's build step needs GNU nproc/sysctl-based core counting, which is already handled for macOS. If you hit missing-tool errors during the coralmicro build, install GNU coreutils (brew install coreutils) and retry.

Windows (via WSL2)

coralmicro (and therefore this repo's build) is not supported on native Windows. Use WSL2 with an Ubuntu distribution, then follow the Linux instructions above from inside your WSL shell.

Flashing a connected Coral board requires USB access from within WSL2, which isn't passed through by default. Attach the board's USB device to your WSL2 distro with usbipd-win before running flashtool.sh.

Building and flashing firmware

Once setup has completed, build and flash a connected Coral board with:

./flashtool.sh

Run ./flashtool.sh --help for flags to skip the build (-nb), skip flashing (-nf), or skip re-flashing the model/data filesystem (-nd).

Running the simulation and characterization scripts

See src/scripts/scripts.md for a full reference of each Python script, its inputs, and its outputs.

License

Apache License 2.0 — see LICENSE.

About

Resource-Aware, Dynamic Deployment of ML Architectures on an Edge TPU in Space

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages