// readme

e-foc

An embedded motor control application implementing Field-Oriented Control (FOC) for BLDC and PMSM motors with strict real-time and memory constraints. Built for deterministic execution on resource-constrained microcontrollers.

Overview

This project provides a production-ready motor control implementation designed for embedded systems with no heap allocation, deterministic execution, and minimal memory footprint. It demonstrates FOC algorithms with complete hardware integration for ST and TI microcontrollers.

Features

Core Capabilities

  • Field-Oriented Control (FOC): Complete implementation for BLDC and PMSM motors
  • Space Vector Modulation (SVM): Efficient PWM generation
  • PID Control: Anti-windup implementations for current and velocity loops
  • Sensored Control: Quadrature encoder feedback
  • Auto-Tuning: Resistance and Inductance estimation
  • Real-Time Performance: Deterministic execution with no heap allocation

Embedded Constraints

  • Zero Heap Allocation: All memory statically allocated at compile-time
  • Fixed Memory Footprint: Uses infra::BoundedVector, infra::BoundedString instead of standard containers -โ€ฆ