r/ControlTheory

Higher order control barrier functions - applications/ resources

Hey all,

At ECC earlier this year I had few good chats around CBFs. I get the theory, but I've not really used them before for any application and I need that to wrap my head around them a bit better.

A) Does anyone have some good resources (preferably with code / simulink block diagrams) of CBF applications?

B) what have you used CBFs for? As in, what applications?

reddit.com
u/Barnowl93 — 15 hours ago

What type of controller is used in refrigerators?

Nowadays you have one compressor and many compartments, so I imagine it can’t be a simple thermostat anymore.

reddit.com
u/pythomerist — 15 hours ago
▲ 38 r/ControlTheory+1 crossposts

Planning transition from PhD to industry (robotics/control/ML)

I'm currently finishing my 2nd year of a PhD in Automation & Control Systems. Where I am, PhD programs are three years long, so I have roughly 18 months left before graduating and starting to seriously look for industry positions.

My research sits at the intersection of robotics, control system theory, and optimization, with a focus on topics such as MPC, nonlinear safe control, system identification, Gaussian processes, and distributed optimization.

I have a solid research background and regularly use Python, ROS2, Docker, Git, Gazebo/MuJoCo, etc., but I feel that I need to broaden my engineering skills before entering industry.

Over the next 18 months, I'd like to prepare for roles in areas such as:

- Robotics / autonomous systems

- Advanced control and optimization

- Robotics software / ROS2

- ML engineering applied to robotics

In particular, I would like to improve my C++, software engineering, ML engineering/MLOps, ROS2, system design, and technical interview skills, while continuing to leverage my control/optimization background.

I have around 8–12 hours/week available outside my PhD.

For people who have made a similar transition, how would you structure those 18 months? What skills would you prioritize, and what would you avoid spending too much time on?

I'm especially interested in advice on:

- What skills are actually valuable in robotics/controls industry

- Good resources or learning paths

- Projects that would make a strong portfolio

- How much time to dedicate to LeetCode/DSA vs actual engineering projects

- Whether C++/ROS2/ML engineering should be the main focus

- Any mistakes you made when preparing for the transition from academia to industry

I'd really appreciate advice from people working in robotics, autonomous systems, controls, or ML engineering.

reddit.com
u/SteppiWall — 1 day ago
▲ 1 r/ControlTheory+1 crossposts

Pipelining and working with registers, data types and resource allocation in control systems

Hi everyone,
I am working on a control system implemented on FPGA and trying to find resources regarding the topics in title.

Especially, I face some problems with defining data types and sizes. As an example, after discretizing a first order filter, I am confused which length of data types I have to use after a multiplication and summation inside the filter, as those are not necessarily physical variables that can be measured or interpreted. They are values between two stages of arithmetic operation inside the filter.

So I would like to learn more about basics on this. Also in general I want to learn more about registers, pipelining and resource allocation in control systems. So if you have learned and worked with such a system and know some resources (books, papers, youtube videos etc.) please let me know.
Thanks!

Note: Because of confidentiality I cannot tell more about the system to be controlled. You can imagine it as a spring damper with active damping implemented on fpga.

reddit.com
u/airconditioner26 — 3 days ago

Question about GNC Coursework

TL:DR: Wondering if I need to focus on guidance, navigation, or control in my graduate coursework, or taking an even mix of all of them is fine.

Hi all!

Currently doing my masters in aerospace engineering, majoring in autonomy/control with a goal of entering the GNC space.

I realized so far my past coursework (both for my masters and the graduate electives I took during undergrad) have been a mix of guidance, navigation, and control, instead of a focus in one of them (I've covered: pontryagin optimal control, convex optimization; probability, estimation, kalman filtering; classical, linear, nonlinear control).

TBH I haven't really nailed down if I want to focus on guidance, navigation, or control. But I feel like I should since I am halfway through my masters. I am also not doing a thesis which is partly why I haven't really found a focus yet lol.

I had an internship technically in the controls branch of a company (guidance and nav were another branch), but basically doing modeling/simulation. This experience also sort of made me realize that as a GNC engineer I will probably be focusing on either G,N, or C and not all of them.

So I guess my main question is, would it be a bad idea to have a mix of coursework when I am looking for a full time GNC position? Would companies prefer to see you really focused on G,N, or C? Maybe I should choose based on which classes I got the best grades in lol.

reddit.com
u/Ok_Cry_7149 — 3 days ago

Is MPC the final chapter of control engineering/theory?

It feels that in a standard curriculum on control engineering/theory, the final topic is inevitably MPC.

Everything else that gradually builds towards MPC feels like “discardable” after you learn about MPC. All that wild eigenvalue analysis and drawing those Nyquist contour? Phew, MPC doesn’t involve with any of that!

Plus, MPC is already in discrete time, so it is implementable without any further weirdness that comes from sampling and discretization of other types of controllers.

I think a parallel analogy is the development of the transformer model in machine learning, which I am more familiar with. Now everything in ML is transformer-based and the next big breakthrough seem to be very far away. Is MPC like the transformer of control theory?

Are there situations where other methods might outperform MPC?

Or does MPC require some unrealistic assumption/requirement?

Is there any other possible algorithm that goes beyond the MPC or is this the final story?

reddit.com
u/NeighborhoodFatCat — 5 days ago

Control Fundamentals Questions for Interview

Couple of weeks ago, I had asked for advice for an Apple controls engineering role. It was an interview with the hiring manager, and now I am preparing for the panel interview. According to the recruiter, it is going to be mostly all control fundamentals questions. Currently working through my old controls book problem set, but what are your favorite questions to ask/that you have been asked in an interview? Any question that stumped you? A question that made you think? Also, are there any Leetcode style question bank for controls?

reddit.com
u/SlowAFRunner94 — 4 days ago

Have most applications that could benefit disproportionately from control engineering already found controls?

A couple of weeks ago there were discussions on this sub about AI researchers reinventing what is essentially control techniques.

MPC was originally invented for chemical processing, but later unlocked reusable space launch vehicles. I don’t think anyone back in the 70s saw landing rockets vertically as a potential application. Yet in hindsight it’s almost obvious.

How much of an adoption gap do you think is out there? How many more equivalents of “reusable rocket” are out there unaware of controls?

reddit.com
u/Proof-Bed-6928 — 4 days ago

Non-linear unstable system

Hi all, I have an exam tomorrow and have no clue how to distinguish between an unstable non-linear system and a linear marginally stable system. Here is an example of what I am talking about.

I have been told to design a PID controller for a pendulum attached to a DC motor. Then I need to compare the stability between open loop linear and closed loop linear system. For the open loop non-linear, the step input of 0 to 10V and 0 to 15V have constant oscillations and increase (see below). Am I correct to say that between 0 to 15V the system is unstable?

https://preview.redd.it/afx2mrn1frjh1.png?width=1600&format=png&auto=webp&s=90bfc734868939c110245d7149a9bbd5427f3c36

Secondly, from the same system I need to test if the system works without the gravitational term. This means the sin term is taken out, so can I say the system is linear and therefore marginally stable as the output response is a ramp? See below.

https://preview.redd.it/0654jyedfrjh1.png?width=1600&format=png&auto=webp&s=2a14464d6a89037c1aef04f5d2908cf7d497fb94

I am genuinely confused. How does the stability criteria vary between linear and non-linear systems? How do I identify the stability?

Thank you so much for your help.

reddit.com
u/Ambitionless_Sad_Gir — 4 days ago

What’s the weirdest thing you’ve tried to control?

I’m gathering a list of all known applications of advanced control techniques in industry to see if there’s a pattern. Then I’m gonna try to use the pattern to infer new potential applications to work on.

reddit.com
u/Proof-Bed-6928 — 5 days ago
▲ 38 r/ControlTheory+1 crossposts

Ball and Beam Inventor and Origin Story thoughts

As a mechanical engineering professor for over 25-years, I lean "old school". So, my students suggested I reach out to the Reddit community. Here's my first post.

I first heard of the ball-and-beam (BNB) platform in my controls courses 40-years ago. However, I never heard of its origin and/or who invented it. My former controls professors and robotics colleagues don't know either. I also pinged the founder/owner of Quanser (a professional colleague). He didn't know either.

Literature review seem to point to Prof. Karl Astrom who's now over 90-years old. I pinged his department chair at the Lund Institute a few years ago. He didn't know either and said (understandably) that Prof. Astrom doesn't respond to email.

Without references, I use the following "origin" story to help motivate my students - the Apollo Moon Landing. The 1950s demanded control engineers. Without friction, the lander's dynamics is a double integrator - which is what the classic BNB is. So, the BNB served as a table-top trainer; designs like lead compensation and tools root locus and/or Bode plots, are needed to ensure minimum overshoot (not crash into the Moon) and settling time (not run out of fuel). As control theory grew, designs like pole placement, LQR, etc provided alternatives.

Any thoughts and references to the BNB for this first time Reddit poster?

reddit.com
u/profpauloh — 6 days ago

MPC for output tracking of time-varying references

Hi,

I'm a master degree graduate in Mechanical Engineering with a strong passion for Control System Theory and a will to become a Control Engineer.

I've studied at uni a formulation of a MPC controller that promises zero offset from piece-wise costant references signals in the presence of disturbances, either external or internal. This formulation, conveniently called Offset-Free MPC by its inventor Prof. Gabriele Pannocchia at University of Pisa, somewhat works even with time-varying references, but there's a severe lag between the reference signal and the output of the system.

As originally this formulation is meant for setpoint tracking, I'd like to ask if you happen to know some formulation more appropriate for time-varying references.

Thank you for your time

reddit.com
u/ObMadness — 6 days ago

Is advanced control adoption in industry primarily held back by not enough people knowing things other than PID?

So we know 95% of controllers are just PID, and fancy things like MPC, non-linear, bang bang, learning based control etc live mostly in academia.

Is this because there’s diminishing performance or cost benefits when you use advanced control techniques over PID, or is it simply because not a lot of people know how to tune anything other than PID?

reddit.com
u/Proof-Bed-6928 — 8 days ago
▲ 396 r/ControlTheory+3 crossposts

Implementing On-Edge Dynamic Flight Stabilization in E-Foils: Using Closed-Loop Reinforcement Learning for Adaptive Wing Control

1. The Core Engineering Challenge

Electric hydrofoils operate at the highly volatile boundary layer between ocean water and air. Legacy e-foils rely on static, fixed-wing geometries, forcing the rider to constantly absorb pitch instability, rough chop, and throttle-induced pitching manually.

To automate pitch, roll, and yaw stability at speeds exceeding 25–30+ mph, hardcoded static PID loops fail because fluid dynamics in turbulent ocean conditions are non-linear.

2. The Solution: XFOIL Adaptive Dynamic Wings (AWS) & Active Thrust Stabilization

Across the XFOIL Apex (100L all-arounder with dual Surface/Fly modes) and Escape (80L agile composite platform)—validated and backed through our Kickstarter and Indiegogo communities—we replaced passive wings with our Adaptive Active Dynamic Wing System (AWS) and Active Thrust Driven Stabilization.

Instead of static control loops, the XFOIL platform uses a continuous closed-loop control system trained via Reinforcement Learning (RL):

  • High-Frequency Sensor Fusion: An array of 6-DOF IMUs, hall-effect magnetic throttle sensors from the 191g Nano Remote, and pressure transducers feed telemetry into the onboard processor at 200Hz+.
  • Real-Time Subsurface Adjustments: The controller makes intelligent, predictive adjustments beneath the waterline to continuously neutralize pitch variations caused by rapid acceleration/deceleration, wave crest passage, and ocean chop.
  • Rider-Adaptive Optimization (E-Foil For Everyone): The algorithm differentiates human rider movements (center-of-mass shifts, banking into turns) from environmental turbulence. It dynamically adjusts the wing's angle-of-attack (AoA), delivering up to a 25% increase in hydrodynamic efficiency—yielding up to 30 minutes longer session times and over 7 miles of additional range on our 1,894Wh long-range battery.

3. Edge Hardware & Thermal Architecture Constraints

Executing low-latency control loops in a marine-sealed environment introduced strict hardware constraints:

  • Miniaturized Underwater ESC: We miniaturized the motor controller by 75% and integrated the 75V, 100A continuous (150A peak) ESC directly inside the underwater motor housing. This creates a direct water-immersed solid-state cooling system—eliminating internal cooling hoses, heat sinks, and water pumps entirely.
  • Low-Latency Inference (<15ms): Actuation latency is capped under 15ms to prevent phase lag and high-speed porpoising.
  • 16S / 67.2V Voltage Headroom: Operating on a 67.2V peak architecture (14% higher than industry standard) keeps system current low, drastically reducing thermal throttling during heavy dynamic wing actuations.

4. Results & Field Validation

During Hawaii field trials with early production units shipped to our Kickstarter and Indiegogo backers, field testing demonstrated:

  • Complete neutralization of throttle-induced pitching during sudden speed changes.
  • Significant reduction in the learning curve for beginner riders on the Apex platform.
  • Extended flight times and lower total energy draw from the direct-drive brushless motor due to dynamic AoA drag reduction.

Discussion Points for the AI / Robotics Community:

  1. Model Drift vs. Hydrodynamic Noise: How do you best handle real-time edge adaptation when localized cavitation or air-venting introduces unpredictable sensor noise during high-speed carving?
  2. Deterministic Safety Boundaries: In safety-critical embedded systems, what hybrid architectures (e.g., neural networks wrapped inside deterministic safety boundaries like board-angle auto shutdown or instant kill-switches) do you favor to prevent control flap lockups?
u/PrestigiousTomato8 — 9 days ago

Help Modeling a System

I have tried modeling this a few times with my limited knowledge of hydraulics and kept getting very weird and ugly state space equations. I am not sure what I am doing wrong so I figured I would post it here (I sincerely apologize if I am breaking the sub rules by posting this).

I have been tasked with controlling the following system with the goal of minimizing the 'ripple' on Q_jet. In other words, ideally Q_jet would look like some constant non-zero value despite changes in the system and environment.

Context of my assumptions for this system:

-Ideal Check Valves

-Qacc ~ (V_o/nP_o)*dP_acc/dt (V_o, P_o initial gass pressure and volume of accumulator, n as poly-tropic index)

-All pressures are absolute

-Incompressible Fluid

-Local restriction equation is: Qjet = C_d*A_n*sqrt(2(P_acc - Patm)/rho) (C_d: discharge coefficient, A_n: restriction area, rho: liquid density)

-A_n is our control input

-Q_pump ~ Asin(2pi*f*t):

4.25e-5 m^3/s < A < 4.25e-3 m^3/s

0.1 Hz < f < 0.6 Hz

System:

https://preview.redd.it/iimigg7c32jh1.png?width=2419&format=png&auto=webp&s=00cc974e80a780f4d7fdbe0421ce6ef659aeace7

Q_jet_Reference from Simulation:

https://preview.redd.it/ig37daqjn2jh1.png?width=1962&format=png&auto=webp&s=d2932549737775df75a489d121442dd50bd6360e

reddit.com
u/Known_Fan5765 — 7 days ago

Looking for RIGOROUS and Proof-based course on Control theory.

Hi everyone,

I followed multiple course on control theory : i know how to analyse a linear system, to derive PID controllers / RST controllers and H-infinty based controller. I understand how it works in practice and i have a good intuition for it.

However, i lack the underlying mathematical framework (and also Lyapunov theory) supporting the whole field. What function space are we working in ? In under which condition the stability of the linearised system at some point guarantees the stability of the whole systems etc...

I have seen the proof of the Kalman theorem but where i saw it, it was cutting corner and relies on the construction on an explicit control and base decomposition in a finite hilbert space (What about control in infinite dimensional spaces ??? Is there a K-theorem equivalent)
And honestly, i only found text books either practice-oriented (ewww) or more mathematical textbook but with AWFUL NOTATIONS.

Do you know about a well-written, proof-based course on control (w/o "handwaving" and reference to this or that) and with decent notations ?

Sorry for ranting but i think control theory is beautiful but i only get accross the same copy-pasted shit engineer oriented control textbooks.

Thank you for reading and have a good day !

reddit.com
u/Sea_Addendum4529 — 9 days ago

summary of Lyapunov Stability

Hey everyone!

Lyapunov stability always felt super abstract when looking purely at differential equations, so I drew out a simple 1-page visual summary on my whiteboard to bridge the physical intuition with the math.

Quick Recap of the 3-Step Idea:

  1. Define Energy V(x): Must be zero at rest V(0)=0 and positive everywhere else V(x) > 0.

  2. Check Energy Rate V_dot(x): Compute the rate of change using your system dynamics.

  3. Evaluate Stability:

    • V_dot(x) ≤ 0 ➔ Stable (Lyapunov)

    • V_dot(x) < 0 ➔ Asymptotically Stable

    • V_dot(x) > 0 ➔ Unstable

Hope this helps anyone currently taking Control Theory or System Dynamics! Let me know if you spot any mistakes or if you have a different favorite way to visualize this.

Also, what are your favorite go-to resources (textbooks, software tools, or YouTube channels) for learning advanced nonlinear control? Would love to hear what helped you master it!

u/Admirable-Emu-1563 — 10 days ago

BLDC modelling

Hello there!

Usually when we model DC-motors we use a second order system, however, BLDC motors used for drones are usually stepper motors (as far as I know), so my question is simply, how do we model these? The specific motor I want to model is for a project of my own, and I am curious as to how to model it. Motor: https://www.aliexpress.com/item/1005007273770590.html#nav-specification

My intuition is to also just model it as a second order system, however, am not sure if this is the correct approach. Specifically I want to model it has motor command [0,1] to rad/s (rotations).

Thank you in advance for the help

reddit.com
u/Kenno03 — 8 days ago
▲ 7 r/ControlTheory+1 crossposts

AcadosCpp: a unified C++/Python interface for generated acados OCP solvers

Hi everyone,

I've been developing AcadosCpp, an open-source wrapper that helps you integrate acados-generated OCP solvers into both C++ and Python applications.

https://github.com/amaldevh/AcadosCpp

The main goal is to make integration easier. acados creates highly optimized C code for each model and OCP, but using its API directly can tie your application to specific symbols, dimensions, lifecycle calls, and data updates.

AcadosCpp provides a stable, stage-aware interface for the generated solver. Here’s how you typically use it:

  1. Define or modify the model and OCP in Python.
  2. Regenerate the acados solver and wrapper.
  3. Recompile and relink the application.

The control-loop structure in your application stays the same. If you change the model or problem, you usually don’t need to rewrite the integration layer, as long as your data matches the new dimensions and cost setup.

The wrapper includes:

  • Stage-0 initial-state constraints
  • Stage-varying and terminal references
  • Generic raw yref support
  • Per-stage and global parameters
  • Full state/control initial guesses
  • Shifted trajectory warm starts
  • Complete predicted trajectories and solver diagnostics
  • SQP-RTI preparation and feedback phases
  • C++ and pybind11 interfaces

For a standard

y=[x,u], y_e=x

tracking problem, the control loop is:

const auto&amp; u = ocp.solve(measured_x, xrefs, urefs);

This process shifts the previous solution, updates the stage-0 measurement and the full reference horizon, solves the OCP, and returns the first input.

The repository has matching Python and C++ quadrotor NMPC examples. I’d love to hear your feedback on the API, especially if you use acados with time-varying references, parameters, SQP-RTI, or custom cost outputs.

u/Amaldevhari — 7 days ago