Deterministic Sub-Microsecond Safety Layer for Edge AI on Cortex-M (1.18 µs Latency)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deterministic Sub-Microsecond Safety Layer for Edge AI on Cortex-M (1.18 µs Latency)

347 Views
kretski
Junior Contributor I

Hi everyone,

I wanted to share a project designed for mission-critical Edge AI on resource-constrained MCUs like the STM32, LPC, and i.MX series.

MicroSafe-RL is a deterministic C++ safety interceptor that sits between an AI agent and the hardware actuators. It prevents unsafe commands from damaging hardware during Reinforcement Learning exploration or due to sensor drift.

Technical Highlights:

Latency: 1.18 microseconds (WCET) on Cortex-M3 at 72MHz.

Memory: Exactly 20 bytes of RAM, zero dynamic allocation (malloc-free).

Logic: O(1) deterministic execution.

Safety: Uses EMA and MAD statistical profiling to detect hardware drift in real-time.

The project methodology is currently under review at IEEE Transactions on Aerospace and Electronic Systems (Manuscript ID: TAES-2026-1001).

I am looking for feedback from the community on further MISRA-C compliance and hardware-specific optimizations.

GitHub: https://github.com/Kretski/MicroSafe-RL
Zenodo DOI: 10.5281/zenodo.19019599

0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2345170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDeterministic%20Sub-Microsecond%20Safety%20Layer%20for%20Edge%20AI%20on%20Cortex-M%20(1.18%20%C2%B5s%20Latency)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2345170%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3EI%20wanted%20to%20share%20a%20project%20designed%20for%20mission-critical%20Edge%20AI%20on%20resource-constrained%20MCUs%20like%20the%20STM32%2C%20LPC%2C%20and%20i.MX%20series.%3C%2FP%3E%3CP%3EMicroSafe-RL%20is%20a%20deterministic%20C%2B%2B%20safety%20interceptor%20that%20sits%20between%20an%20AI%20agent%20and%20the%20hardware%20actuators.%20It%20prevents%20unsafe%20commands%20from%20damaging%20hardware%20during%20Reinforcement%20Learning%20exploration%20or%20due%20to%20sensor%20drift.%3C%2FP%3E%3CP%3ETechnical%20Highlights%3A%3C%2FP%3E%3CP%3ELatency%3A%201.18%20microseconds%20(WCET)%20on%20Cortex-M3%20at%2072MHz.%3C%2FP%3E%3CP%3EMemory%3A%20Exactly%2020%20bytes%20of%20RAM%2C%20zero%20dynamic%20allocation%20(malloc-free).%3C%2FP%3E%3CP%3ELogic%3A%20O(1)%20deterministic%20execution.%3C%2FP%3E%3CP%3ESafety%3A%20Uses%20EMA%20and%20MAD%20statistical%20profiling%20to%20detect%20hardware%20drift%20in%20real-time.%3C%2FP%3E%3CP%3EThe%20project%20methodology%20is%20currently%20under%20review%20at%20IEEE%20Transactions%20on%20Aerospace%20and%20Electronic%20Systems%20(Manuscript%20ID%3A%20TAES-2026-1001).%3C%2FP%3E%3CP%3EI%20am%20looking%20for%20feedback%20from%20the%20community%20on%20further%20MISRA-C%20compliance%20and%20hardware-specific%20optimizations.%3C%2FP%3E%3CP%3EGitHub%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FKretski%2FMicroSafe-RL%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FKretski%2FMicroSafe-RL%3C%2FA%3E%3CBR%20%2F%3EZenodo%20DOI%3A%2010.5281%2Fzenodo.19019599%3C%2FP%3E%3C%2FLINGO-BODY%3E