Experimental Onboard Neural Net – Work in Progress

Hi,

I’m experimenting with an embedded onboard neural net and is planned to be as simple as possible to start.

It is aimed at something like onboard intelligence for turbulence detection (for example) not GNC.

It is a very simple feed forward neural net, adapted to an embedded ArduPilot system, from Dave Miller’s general (PC based) neural net in C++: https://millermattson.com/dave/?p=54

So making modifications to dynamic memory, timing, training, loading weights, etc…embedded systems type constraints as best as possible.

This is part of a longer-term goal to develop an embedded-safe neural net architecture that can run efficiently within ArduPilot’s constraints - eventually.

Note:

I am just working a few hours a week on and off when I have time. Feel free to use it or take it in a completely different direction based on where the commits are at over time.

I am sure there are all sorts of companies with very advanced onboard ML but thought I would share this if anyone was interested and on the same page.

Link to code in progress:

There is an initial scaffold for the unit test.

The plan is to - expand the unit test for training the net on a dev machine with simulated data and then eventually past flight telemetry. The idea is that users (developers for now) can tailor the net to their application and/or need (maybe something like an addition to precision landing vs turbulence detection). After training, the the neural weights can be burned to flash and loaded on initialization onboard for the next flight, based on what it learned:

11/11/25 Dev Notes:

  1. VectorN-based architecture, HAL random init, unit test scaffold.
  2. IDE CLion
  3. Unit test harness for training
2 Likes

Link to branch: