← Latest papers
⚡ electrical engineering

L4acados: Learning-based models for acados, applied to Gaussian process-based predictive control

This paper introduces L4acados, a framework that integrates Python-based learning models, such as Gaussian processes and neural networks, into the real-time optimal control software acados via external sensitivities, enabling efficient and scalable model predictive control demonstrated on autonomous vehicle hardware.

Original authors: Amon Lahr, Joshua Näf, Kim P. Wabersich, Jonathan Frey, Pascal Siehl, Andrea Carron, Moritz Diehl, Melanie N. Zeilinger

Published 2026-03-19
📖 5 min read🧠 Deep dive

Original authors: Amon Lahr, Joshua Näf, Kim P. Wabersich, Jonathan Frey, Pascal Siehl, Andrea Carron, Moritz Diehl, Melanie N. Zeilinger

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a self-driving car how to race. You have two ways to teach it:

  1. The Textbook Method: You give the car a perfect physics textbook. It knows exactly how a car should move based on math and laws of physics.
  2. The "Street Smart" Method: You let the car learn from experience. It realizes, "Hey, the textbook says I should turn left here, but on this specific track, the tires are slippery, so I actually need to turn a bit earlier."

The problem is that the "Textbook" software (called acados) is incredibly fast and efficient, but it's rigid. It only understands the textbook math. The "Street Smart" learning (using AI like Neural Networks or Gaussian Processes) is flexible and smart, but it's usually too slow or incompatible to run inside the fast "Textbook" software in real-time.

This paper introduces "L4acados," a universal translator that lets the fast software talk to the smart AI.

Here is a breakdown of how it works, using simple analogies:

1. The Problem: The Language Barrier

Think of acados as a high-speed race car engine. It's built for speed. To steer the car, the engine needs to know exactly how the car reacts to the steering wheel (this is called "sensitivity").

  • Usually, the engine calculates this reaction using its own internal math.
  • But if you want to use a "Street Smart" AI (like a Neural Network trained on real-world data), the engine doesn't speak its language.
  • The old way: You had to rewrite the AI in the engine's native language. This was like translating a complex novel word-for-word by hand. It was slow, prone to errors, and you couldn't use the latest, most advanced AI tools.

2. The Solution: L4acados (The Universal Translator)

The authors built L4acados. Instead of forcing the AI to speak the engine's language, L4acados acts as a real-time interpreter.

  • How it works: The AI (written in Python, the language of modern AI) stays in its own comfortable environment. When the race car engine needs to know, "If I turn the wheel 5 degrees, where will I be in 0.1 seconds?", it asks L4acados.
  • L4acados quickly asks the AI, gets the answer (and the math behind why that answer is true), and feeds it back to the engine.
  • The Magic Trick: They figured out a way to ask the AI for many answers at once (like asking "What happens if I turn left, right, hard left, and hard right?" all in one go). This is called parallelization. It's like asking a team of 100 people to solve a puzzle simultaneously instead of asking one person to do it 100 times. This makes the process incredibly fast.

3. The "Gaussian Process" (The Uncertainty Detective)

The paper also uses a specific type of AI called a Gaussian Process (GP).

  • Analogy: Imagine a weather forecaster. A standard AI might say, "It will rain." A Gaussian Process says, "It will rain, and I'm 95% sure. But if the wind shifts, there's a chance it won't."
  • Why it matters for racing: If the car is 95% sure the track is slippery, it drives cautiously. If it's 99% sure the track is dry, it drives fast.
  • The Challenge: Calculating this "confidence level" is mathematically heavy and usually too slow for a race car.
  • The Fix: Using L4acados, they created a "Zero-Order" method. Think of this as a smart shortcut. Instead of calculating every single tiny detail of the uncertainty (which takes forever), the car makes a "good enough" guess based on its last move, then quickly corrects it. It's like driving by looking at the road ahead rather than calculating the friction of every single pebble.

4. The Real-World Test: From Miniature Cars to Real Cars

The authors didn't just talk about this; they tested it.

  • Test 1: The Miniature Race Car (1:24 scale)
    They put this system on a tiny remote-controlled car.

    • Without the AI: The car drove cautiously, staying in the middle of the track because it was afraid of slipping.
    • With L4acados + AI: The car learned the track. It realized, "Ah, this corner is actually grippy!" It started driving faster, taking sharper turns, and lapping the track significantly quicker without crashing. It learned to balance speed and safety perfectly.
  • Test 2: The Full-Scale Car
    They tried it on a real, full-sized autonomous vehicle doing a "lane change" maneuver (swerving to avoid an obstacle).

    • Without the AI: The car was jerky and uncomfortable. It didn't trust its own sensors enough to make smooth moves.
    • With L4acados + AI: The car moved smoothly and confidently. It knew exactly how much to steer to stay safe, even though the road conditions were tricky. The whole calculation happened in the blink of an eye (about 3 to 8 milliseconds), well within the time limit needed to keep the car safe.

The Bottom Line

L4acados is a bridge. It allows engineers to use the most powerful, modern AI tools (written in Python) inside the fastest, most reliable control software (acados) without slowing anything down.

It's like giving a Formula 1 driver a supercomputer that can predict the future of the track, while still letting them drive at 200 mph. The result is machines that are not only faster but also smarter and safer.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →