About this project

A lightweight embedded numerical library stack, for control and robotics.

Robotat Linalg provides the essential numerical routines of linear algebra and numerical optimization for control and robotics applications targeting single-precision embedded devices. Application examples include PID, Kalman Filter, MPC and pose computation.

Features

layer

No External Libraries (100% C, using the Standard C Library)

ram

Static memory allocation (no malloc)

decimal

Single-Precision Arithmetic (float32)

microcontroller laptop

Multiple platforms (PC, Arduino, ESP32, STM32, etc.)

Algorithms

matrix

Linear Algebra

Basic matrix operations, inverse, pseudoinverse, matrix factorizations: LU, QR, Cholesky, Singular Value Decomposition (SVD).

convex-function

Convex Optimization

Linear solver: Forward/Backward Substitution, LU, QR, Cholesky, SVD. Quadratic solver: active-set, KKT direct methods.

gears

Control

PID controller, LTI state-space representation, non linear system simulation, Kalman filter, LTI shooting-based MPC.

robotic-arm

Robotics

Homogeneous transformations, rotation matrices, and quaternions for basic robot pose computation.

Performance

Representative control algorithm test cases, compared against MATLAB.

Maximum observed execution time (in seconds) for representative control test cases.

Platform PID Kalman filter MPC
MATLAB 1.35E-03 2.71E-03 5.76E-02
Linux-amd64 1.80E-05 3.40E-05 5.90E-03
ESP32-WROOM-32 7.40E-05 2.02E-04 4.50E-02
STM32 NUCLEO F446RE 1.30E-05 3.30E-05 6.37E-02
Arduino Mega 2560 3.52E-04 9.68E-04 -

MPC not executed in the Arduino Mega due to RAM limitations.

PID's controlled output and LTI system's state using PID.

PID controlled output
LTI system's state with Kalman Filter
LTI system's states with MPC