AI PI/PID Gain Scheduling for STM32 FOC | Auto-Tuning

What we do

We design and deploy AI-based gain scheduling for PI/PID controllers in Field-Oriented Control (FOC) on STM32. Our approach builds adaptive maps/models that keep your current and speed loops stable and responsive across speed, torque, temperature, and bus-voltage variation—without hand-retuning.

Outcomes we target

  • Consistent bandwidth & phase margin across the operating envelope

  • Faster transient response with minimal overshoot and anti-windup

  • Reduced torque ripple and improved efficiency under variable load

  • Robust low-speed / start-up behavior (sensorless or sensored)

  • Safe scheduling with constraints for current, voltage, and thermal limits


Services

  • Data Strategy & Instrumentation – define operating grids, log signals (iq/id refs, currents, speed, voltage, temp), and KPIs.

  • Plant Identification – estimate Rs, Ld/Lq, Ke/Kt, friction/inertia; frequency/step tests for loop shaping.

  • Baseline PI/PID Tuning – dq current and speed loops (IMC/loop-shaping), saturation and anti-windup design.

  • AI Model Design – lightweight regressors or lookup-tables (LUTs) for gain scheduling vs. speed/torque/Vbus/temp.

  • On-Target Inference – C-fixed-point or FPU implementations; O(1) LUT reads or compact models with guard rails.

  • Scheduler Logic & Safety – hysteresis, rate-limits, interpolation bounds, fallback to safe base gains.

  • Validation & Stress Testing – envelope sweeps, corner cases, brown-out, thermal drift; report with acceptance metrics.

  • Knowledge Transfer – handover docs, parameter files, and engineer training.


Deliverables you receive

  • Scheduling Map/Model: LUTs (CSV/headers) or compact model coefficients with versioning and ranges.

  • Integration Patch: scheduler module for CubeIDE/MCSDK (HAL/LL) including bounds, hysteresis, and diagnostics.

  • Tuning Report: identification plots, Bode/step results, stability margins, KPI improvements vs. baseline.

  • Test Scripts & Logs: automated sweep scripts and post-processing notebooks (Python/MATLAB) + acceptance checklist.

  • Handover Session: 60–90 minutes walkthrough and Q&A with your team.


Technical stack

  • MCUs: STM32F3/F4/F7, G4, H7, U5

  • FOC Tooling: X-CUBE-MCSDK, STM32CubeIDE, CubeMX, HAL/LL, FreeRTOS

  • Scheduling Options: multi-dimensional LUTs with bilinear/trilinear interpolation, piecewise-affine maps, light regressors

  • Observers: SMO, MRAS, PLL; sensored (encoder/Hall) and sensorless

  • Runtime Profile: ISR-safe code, deterministic cycles, low RAM/flash footprint


How an engagement works

  1. Discovery (30 min) – targets, constraints, hardware overview.

  2. Data & Access – firmware snapshot, schematics, motor/inverter data, KPIs.

  3. Baseline & ID – establish reference gains and identify plant behavior.

  4. Model & Integrate – create scheduling map/model, integrate and guard with safety.

  5. Validate & Handover – envelope tests, finalize parameters, documentation, training.


What we need from you

  • Motor/inverter specs (poles, Rs, Ld/Lq if known, Ke/Kt, shunt/OpAmp gains)

  • Operating envelope: speed/torque ranges, duty cycles, Vbus range, ambient/thermal

  • Sensoring (encoder/Hall/sensorless) and PWM/ADC timing details

  • KPIs (e.g., overshoot <5%, settling <50 ms, ripple ≤ X %, efficiency ≥ Y %)


Packages (example framing—set your own prices)

  • Foundation  – instrumentation, identification, baseline tuning, data plan.

  • Scheduler Build  – AI/LUT design, integration, and initial validation.

  • Production Readiness – robustness at corners, documentation, training, and support window.
    (Messaging tip: position as “transparent, cost-effective pricing” or offer a clear price-match policy rather than “cheapest”.)


Example use cases

  • E-mobility – consistent feel across battery SOC and temperature swings

  • Robotics/AGV – precise low-speed control with fast load transients

  • Pumps/Compressors – efficiency across wide duty cycles and Vbus sag

  • Fans/HVAC – acoustic comfort via ripple-aware scheduling


FAQ

Why AI instead of manual scheduling?
It scales to multi-variable envelopes (speed/torque/Vbus/temp) and keeps stability margins consistent without endless hand-tuning.

Will it fit on my MCU?
Yes—our default is LUT-based scheduling (constant-time, tiny footprint). We only use learned regressors if they meet your timing budget.

Sensorless compatible?
Absolutely—scheduler coexists with SMO/MRAS/PLL observers and improves low-speed robustness.

Do you require MCSDK?
No—we integrate with pure HAL/LL or MCSDK, whichever your stack uses.

Kontaktformular