r/ControlTheory • • Nov 02 '22

Welcome to r/ControlTheory

91 Upvotes

This subreddit is for discussion of systems and control theory, control engineering, and their applications. Questions about mathematics related to control are also welcome. All posts should be related to those topics including topics related to the practice, profession and community related to control.

PLEASE READ THIS BEFORE POSTING

​

Asking precise questions

​

  • A lot of information, including books, lecture notes, courses, PhD and masters programs, DIY projects, how to apply to programs, list of companies, how to publish papers, lists of useful software, etc., is already available on the the Subreddit wiki https://www.reddit.com/r/ControlTheory/wiki/index/. Some shortcuts are available in the menus below the banner of the sub. Please check those before asking questions.
  • When asking a technical question, please provide all the technical details necessary to fully understand your problem. While you may understand (or not) what you want to do, people reading needs all the details to clearly understand you.
    • If you are considering a system, please mention exactly what system it is (i.e. linear, time-invariant, etc.)
    • If you have a control problem, please mention the different constraints the controlled system should satisfy (e.g. settling-time, robustness guarantees, etc.).
    • Provide some context. The same question usually may have several possible answers depending on the context.
    • Provide some personal background, such as current level in the fields relevant to the question such as control, math, optimization, engineering, etc. This will help people to answer your questions in terms that you will understand.
  • When mentioning a reference (book, article, lecture notes, slides, etc.) , please provide a link so that readers can have a look at it.

Discord Server

Feel free to join the Discord server at https://discord.gg/CEF3n5g for more interactive discussions. It is often easier to get clear answers there than on Reddit.

​

Resources

If you would like to see a book or an online resource added, just contact us by direct message.

​

Master Programs

If you are looking for Master programs in Systems and Control, check the wiki page https://www.reddit.com/r/ControlTheory/wiki/master_programs/

​

Research Groups in Systems and Control

If you are looking for a research group for your master's thesis or for doing a PhD, check the wiki page https://www.reddit.com/r/ControlTheory/wiki/research_departments/

​

Companies involved in Systems and Control

If you are looking for a position in Systems and Control, check the list of companies there https://www.reddit.com/r/ControlTheory/wiki/companies/

If you are involved in a company that is not listed, you can contact us via a direct message on this matter. The only requirement is that the company is involved in systems and control, and its applications.

​

You cannot find what you are looking for?

Then, please ask and provide all the details such as background, country or origin and destination, etc. Rules vastly differ from one country to another.

The wiki will be continuously updated based on the coming requests and needs of the community.


r/ControlTheory • • Nov 10 '22

Help and suggestions to complete the wiki

36 Upvotes

Dear all,

we are in the process of improving and completing the wiki (https://www.reddit.com/r/ControlTheory/wiki/index/) associated with this sub. The index is still messy but will be reorganized later. Roughly speaking we would like to list

- Online resources such as lecture notes, videos, etc.

- Books on systems and control, related math, and their applications.

- Bachelor and master programs related to control and its applications (i.e. robotics, aerospace, etc.)

- Research departments related to control and its applications.

- Journals of conferences, organizations.

- Seminal papers and resources on the history of control.

In this regard, it would be great to have suggestions that could help us complete the lists and fill out the gaps. Unfortunately, we do not have knowledge of all countries, so a collaborative effort seems to be the only solution to make those lists rather exhaustive in a reasonable amount of time. If some entries are not correct, feel free to also mention this to us.

So, we need some of you who could say some BSc/MSc they are aware of, or resources, or anything else they believe should be included in the wiki.

The names of the contributors will be listed in the acknowledgments section of the wiki.

Thanks a lot for your time.


r/ControlTheory • • 18h ago

Other rmpc: randomized MPC on the GPU

90 Upvotes

Open-sourcing Randomized MPC on the GPU šŸš€

What if MPC didnt need gradients at all?

RMPC samples thousands of feasible input sequences, rolls them all out in parallel on the GPU, and applies the best one. Models and costs dont need to be smooth or differentiable. Impacts, saturations, lookup tables and on/off penalties all just work.

https://github.com/marunmurali/randomized-mpc

⚔ 5,000 samples Ɨ 100-step horizon in ~0.8 ms on a laptop GPU
🧩 Header-only CUDA/C++, with the same model code running on GPU and CPU
šŸŽÆ Input bounds and rate limits respected by construction
šŸŽļø Four worked examples: S-curve path following with a Pacejka tire model, cart-pole swing-up, obstacle slalom, and paddle juggling with hybrid impacts

The method shared is from my PhD research at Nagoya University on real-time autonomous driving (IEEE T-IV 2022), this went on to autonomous racing (IEEE IV 2025), and has now moved from papers into a usable library.

If you work on control for robots, vehicles or anything with messy, non-smooth dynamics, try it out.

Issues and PRs are welcome.


r/ControlTheory • • 1d ago

Professional/Career Advice/Question What do you think about "digital twins"?

57 Upvotes

Seems like people are calling any software model of a real system a "digital twin" or sometimes applying this term broadly for any real-time supervisory monitoring system, like air traffic control, real-time road congestion control and other things of this kind.

At the same time, there seems to be a ton of opportunities in this area. Is digital twins a marketing term? Pure hype? Or is there some concrete engineering elements as well that distinguishes it from a traditional software model?


r/ControlTheory • • 15h ago

Other PID controller with two degrees of freedom

Thumbnail gallery
0 Upvotes

This implementation of a two-degree-of-freedom PID controller in Python demonstrates how this algorithm limits overshoot and eliminates the effects of the setpoint during a sudden jump in the setpoint.


r/ControlTheory • • 2d ago

Professional/Career Advice/Question Is control engineering research at risk of suffering the same problems as ML/AI?

53 Upvotes

I am a masters student in a course based program who is interested in both machine learning and control engineering/theory research. However, it appears that the research situation in machine learning is seriously troubling and I am having second thoughts about my future plans.

Just by browsing Reddit/Hackernews, I have found a list of problems that ML/AI is having:

  1. The conferences are clog jammed with publications. Close to over 100k submission at two of major conferences Neurips and ICML this year. Recently TMLR noted 1300% increase in solo publications. The journal noted that some people are submitting 6-8 research papers a week.
  2. Quality control is seriously lacking. People describe the acceptance/reject for these conferences as a lottery system. AI reviewers are reviewing AI generated papers. Every year there seems to be a new scandal involving some award winning paper that turned out to be wrong.
  3. Many unethical behavior in the research from salami slicing (e.g., propose one method and publish paper by running it on dozens of datasets) to collusion rings and hidden prompts in papers.
  4. Research papers rapidly expire in this area of research. By browsing Google Scholar I found that many researchers have proposed methods which are cited hundreds of times, but virtually nobody would use any of these methods just after a few months.
  5. There seems to be a bit of a misaligned incentive situation going on. Many people just want the publications to appear on their resumes so they can hop into an industry job. But in doing so they seem to be generating a lot of noise over signals.

This doesn't even cover half of the problems that ML/AI is having with at the moment, e.g., a paper from big tech is pretty much an automatic acceptance.

I wonder if control theory research is also having some of these issues. By talking to a professor at my school, they did note that there has been a sharp increase in the number of papers (especially from China) and many "minor tweaking" of models/algorithms that do not really provide any insight. Perhaps the mathematical rigor that is demanded in control engineering research would offset some of these problems? Can someone who is knowledgeable chime in on this matter?


r/ControlTheory • • 2d ago

Asking for resources (books, lectures, etc.) Best Books and Resources to Learn GNC from Scratch in One Month

11 Upvotes

​

Hi everyone!

I'm an aerospace engineering student, and I want to learn Guidance, Navigation, and Control (GNC) from scratch. I currently have no experience in this domain, either theoretically or practically, but I'm determined to build a strong foundation.

I have only one month to dedicate to learning GNC, so I'm looking for resources that will help me learn as efficiently as possible.

I'd really appreciate recommendations for:

- Books: Beginner-friendly books that explain GNC concepts from first principles.

- YouTube lectures and online courses: Structured lecture series that cover both theory and practical applications.

- MATLAB/Simulink tutorials: Resources to help me implement and simulate GNC algorithms.

- Hands-on projects: Beginner-level projects I can complete within a month to gain practical experience.

- Learning roadmaps: Any structured plans that take someone from zero knowledge to a reasonable beginner-level understanding.

I'm particularly interested in aerospace applications of GNC, including UAVs, missile guidance, flight dynamics, navigation, and control systems.

I understand that becoming proficient in GNC takes much longer than a month. My goal is to develop a solid theoretical foundation, understand the core algorithms, and implement a few basic simulations by the end of this period, and land an internship in this domain.

If you were starting from zero and had only 30 days, what books, courses, lectures, and projects would you prioritize?

Any advice, personal experiences, or resource recommendations would be greatly appreciated. Thank you!


r/ControlTheory • • 2d ago

Technical Question/Problem Mixed ODE/PDE Simulation Tools

4 Upvotes

I'm working on a unique class of controls problems that are fundamentally PDEs, but the control laws themselves will be conventional ODEs. The example I will give is controlling the trajectory of a particle moving through a fluid that may also be undergoing a phase change or have time varying viscoelastic behavior. Hence, the particle is subject to complex rheology in addition to your standard state-space controls formulation.

Most of my work has been in matlab/simulink, which works well for ODEs, but Ive never used it to capture a problem this complicated. Ideally I'd like to simultaneously simulate the flow field and the controller.

What are the tools used for these kind of problems? My lit search points to COMSOL but I have no experience with it.


r/ControlTheory • • 2d ago

Educational Advice/Question Control Systems Msc, or Ai and Engineering Systems MSc ( TU/e)

1 Upvotes

Hello! I am an ECE graduate from Greece with a strong passion for Control Systems and Reinforcement Learning (my thesis focuses on MARL for energy grid optimization).
I’m in a dilemma between these two MSc programs: Control Systems Tu/e and Ai and Es Tu/e. One puts me on a robotics and high-level control trajectory, while the other focuses heavily on mechatronics and hardware actuator design.
Could anyone share advice on which path aligns better with current European job market needs, and which one builds a stronger foundation for a controls engineer long-term?

and if its maybe better to pursue TU Delft GNC path?


r/ControlTheory • • 2d ago

Technical Question/Problem I have two process contributing to the output of a system, one is predictable, the other not. How can I estimate the unpredictable process?

0 Upvotes

Hi!

I am a complete newbie to control theory, but I hope I can make my question make sense.

I have a system that measures internal pressure which is controlled by a pump. The pressurised actuator is being placed on a person's body, imagine, for example, that it is a sitting cushion. Now, I know that there's a transfer function from the pump output to the next state of internal pressure in the cushion, say P = P_p + Pump + w where P_p is the previous pressure, Pump is the pump's output, and w is measurement noise (we assume that the pump contribution is linear to change in pressure). I can measure P and I control Pump. I can estimate the relation between P and Pump. I can also assume that in t0 User is 0.

But my actual system is more like P = P_p + User + Pump + w where User is the contribution from a person interacting with the system. How can I estimate User at every iteration?


r/ControlTheory • • 2d ago

Technical Question/Problem How do I show the Lyapunov stability of a LLM controller?

0 Upvotes

I am using claude opus 5.5 to control the HVAC system of a building, accounting for weather forecasts and building occupancy. How do I show the system is closed loop stable? Can I use alpha-beta-CROWN to produce a stability certificate?


r/ControlTheory • • 4d ago

Technical Question/Problem Heating control advice

8 Upvotes

What is the best way to design a temperature controller for heating an object with a much higher thermal inertia than the heating elements, without having the element overheat?

I am using a cascade where my PLC manages the temperature loop with a PID and outputs a power setpoint to a power controller. The control thermocouple is measuring the temperature of a medium that takes much longer to heat than the heating elements, so my fear is that when I give a temperature setpoint to the PLC, it will just keep demanding power from the controller and the elements might overheat. These resistances are very expensive and I can't risk burning them. I do have a thermocouple installed at the element.

Any advice?


r/ControlTheory • • 4d ago

Professional/Career Advice/Question How different are the roles of ā€œcontrol systems engineerā€ between companies?

19 Upvotes

I’m not talking about the PLC programming vs actual control theory jobs. I’m talking about specifically the control theory jobs in different companies where you tune things and make things stable.

Specifically, I wanna know that within the same ā€œjob titleā€ like ā€œsenior control systems engineerā€, how much does the competency requirements different between different companies with different products?

Can a ā€œsenior control systems engineerā€ from one company leave and join another company with a different type of product, and catch up within a couple of weeks of learning company specific processes, instead of having to start from scratch like a new grad?

If they can, it would follow that there’s a common set of competencies attached to the job title of ā€œsenior control systems engineerā€ no? Is there a place I can find this standard and benchmark myself against it so that I can gain and prove I have these abilities without having to use years of experience as a proxy of my abilities (which I think is a terrible metric) to market myself to companies?


r/ControlTheory • • 5d ago

Professional/Career Advice/Question How do you approximate fractional-order memory for embedded control with bounded computational cost?

7 Upvotes

I'm exploring practical implementations of fractional-order control for systems with limited onboard computing resources, particularly UAV flight controllers.

A conventional finite-history implementation can require increasing storage and computation as more samples accumulate. One alternative is to approximate the memory kernel using a fixed-length recursive filter, trading approximation error against computational cost.

I'm interested in the control-engineering perspective:

  • How do you choose an acceptable approximation error for a fractional-order controller?
  • What validation methods would you use before deploying the approximation on embedded hardware?
  • Are there particular stability or robustness issues you'd investigate when replacing the original fractional operator with a finite-dimensional approximation?

I'd appreciate insights from anyone who has implemented fractional-order controllers in practice.


r/ControlTheory • • 6d ago

Technical Question/Problem Quadrotor oscillations and zero-thrust commands near obstacles using NMPC + HOCBF

7 Upvotes

I'm working on autonomous quadrotor navigation using a 13-state NMPC (acados) with HOCBF-based obstacle avoidance.

I'm observing an issue where the drone approaches an obstacle, suddenly commands near-zero thrust, makes aggressive corrections, and starts oscillating back and forth near the obstacle boundary.

The logs show that HOCBF sometimes modifies the nominal NMPC commands, but near-zero thrust also occurs when both solvers report success. I've also observed actuator saturation, occasional solver failures, and differences between commanded and applied controls.

I'm trying to understand whether this behaviour originates from the NMPC optimization, HOCBF constraint activation, model mismatch, or interactions between the controllers.

Has anyone encountered similar behaviour with NMPC-CBF architectures? What would be a systematic mathematical approach to identifying the root cause rather than tuning parameters through trial and error?

I'd appreciate any insights or pointers to relevant literature.


r/ControlTheory • • 6d ago

Other Did control theory abstract itself to the edge of inapplicability?

120 Upvotes

Sorry for the provocative and somewhat pointed question. It is no secret that the general population's appreciation of the "hidden technology" is almost zilch. The employer/industry sectors are even worse outside of a few corporations (and half are in aerospace apparently). There are many many skills/knowledge nowadays that are favored way more than control knowledge. The gap between control theory and practical engineering seems to be ever present and increasing in many domains.

I have wondered whether this is because control theory abstracted itself way too much and became somewhat inapplicable to everybody out there.

I was reading an old control theorist's biography and the person said what attracted him to the field was that a car engine can be represented as a transfer function. And you can represent a chain of system as composition of transfer functions. Then you can throw the entire toolbox of linear algebra and complex analysis at it.

Yet, this way of doing things is not the dominant engineering paradigm. While there is a lot of simulation involved in the design of many engineering systems, and I have this feeling that treating everything as transfer function is probably not going to cut it in the real world.

Now I wonder how it became this way. Is it so that control theory becomes easier to teach and attract students? Or perhaps it is easier to treat mathematically, thus easier to write papers about?? What is your take?


r/ControlTheory • • 5d ago

Professional/Career Advice/Question Will AI have an impact on algorithmic development done by engineers?

0 Upvotes

Hey guys,

I think all of us agree that AI will/has an tremendous impact on software engineering.
But how about algorithmic development like we do as control engineers?

What are your thoughts and experiences for the future ?


r/ControlTheory • • 6d ago

Professional/Career Advice/Question Math BA and Looking for Program/Career Next Step

2 Upvotes

Hi everyone! I have a BA in Mathematics and participated in mathematical research (leaning pure but had applications in quantum computing and other fields) during my undergrad. I have always loved math and have enjoyed doing calculations, proofs, and the logical and critical thinking that comes along with it.

I found a mentor at my state university who does work in control theory, and the work seems heavy mathematical. The actual degree would be either an MS or PhD in Aerospace Engineering, depending on what I decide. I have concerns about pursuing solely a mathematics degree regarding job opportunities.

I am wondering if real world jobs actually do this type of mathematical work on the day-to-day where they are doing math by hand and working out/deriving equations or if it is primarily computer simulation and implementation. Is this only in GNC/flight dynamics/etc. positions? I have found conflicting answers from other posts and articles.

I don’t have any formal engineering training or much knowledge on the hardware or mechanics of things, and honestly I don’t really find passion in that. I have other research experience, but it has been in computational oncology, quantum computing, and other areas.

Thank you all for reading!!


r/ControlTheory • • 7d ago

Educational Advice/Question Reinforcement Learnin - How to learn

20 Upvotes

H! I'm currently trying to study and understand Reinforcement Learning using Sutton and Barto. My main objective would be to, in the end, be able to carry out a small project in simulation using a simple system like a robotic arm or a Turtlebot. Currently I'm studying the approximation methods for value function and Q-function, but they often mention neural networks as one possible tool to integrate with reinforcement learning and I was wondering how much is necessary for me, as a control engineer, to have a look to these type of topics in order to finally comprehend and apply reinforcement learning tecnhiques. What do you think about it?


r/ControlTheory • • 8d ago

Asking for resources (books, lectures, etc.) I built a chess-playing Franka Panda robot in simulation for my Mechatronics thesis!

26 Upvotes

Hey everyone!

I've been working on a chess-playing Franka Panda robot in simulation as part of my Mechatronics Engineering thesis.

The project combines ROS 2, MuJoCo, Octo VLA, MPC, WBC, and computer vision. I also developed the chess AI myself.

Interestingly, most of the improvement didn't come from major changes to the controllers. I discovered that my Octo model wasn't receiving the robot states correctly, and I also had issues with the cameras and ROS 2 communication.

After fixing those problems and making a few adjustments to MPC + WBC, the results are much better!

There's still plenty to improve. My next goal is to explore reinforcement learning to dynamically adjust the control parameters.

I've been developing this project independently, and it's been a challenging but rewarding learning experience.

One more thing I'd love to ask the community:

I'm considering pursuing a master's degree focused on control theory, robotics, and automated systems, especially research combining advanced control with reinforcement learning.

Do you have any recommendations for universities, research labs, or graduate programs working in these areas? I'm open to suggestions both in Brazil and internationally!

I'd really appreciate any feedback on the project and recommendations for my next academic steps!


r/ControlTheory • • 8d ago

Technical Question/Problem Ball-chasing robot: servos vs. DC motors with a PI speed loop (models, sims, and floor tests)

Thumbnail gallery
4 Upvotes

I built a small two-wheeled robot that uses a Pixy2 camera to find a table tennis ball and drive to it. I ended up making two prototypes, and for each one I did the modeling, ran simulations, and tested on the floor.

Both used the same guidance loop:

bearing error ε ā‰ˆ (x_ball āˆ’ x_center) / f_x Ī©_right = Ī©0 + Kε Ī©_left = Ī©0 āˆ’ Kε

Prototype 1: hobby servos, guidance output sent straight to the motors

The servos weren’t matched. The right one was about 12-15% stronger than the left, and the left had a bigger dead zone (picture 6). With pure P control the robot weaved noticeably and stopped 2-3 cm off the ball. Adding an integral term got rid of the offset (down to about 0.5-1 cm) but pushed the servos into saturation.

Prototype 2: DC motors with encoders and a 100 Hz PI speed loop on each wheel (picture 7)

I fit a first-order model to the measured step response and tuned the controller on that: Kp = 44, Ti = 0.17 s, which gave a 66° phase margin (Bode plot in picture 5). Then I simulated the whole system in Scilab Xcos before putting it on the floor. Final error was about 0.5-1 cm with no visible oscillation. Picture 4 compares the measured paths of both prototypes driving to the same ball.

At this point the actuators aren’t the limiting factor anymore. The camera is, mostly frame rate and lighting. (The plots come from my original report, so the labels are in French, sorry.)

Next I want it to intercept a ball that’s still rolling. Would you add a predictive term on the bearing, or estimate the ball’s velocity with a Kalman filter first?

Code, data, models and the motor identification CSV are here: https://github.com/promaaa/ball-collecting-robots


r/ControlTheory • • 9d ago

Technical Question/Problem Grey-box calibration of a greenhouse climate model against measured data: what we did, where it is weak, and a request for better methods

0 Upvotes

I build Phytotron, an open benchmark for greenhouse climate controllers (github.com/growmatics/phytotron, AGPL). It runs on GreenLight-Gym2, a 28-state ODE model of a tomato greenhouse. Every result it reports is simulated. I calibrated the model against a measured season and I am not satisfied with my own method. I would like to hear how you would do it.

The data: Autonomous Greenhouse Challenge 2019, Wageningen, CC0. Six glass compartments of 96 m2, cherry tomato, December 2019 to May 2020. Indoor climate and actuator states every 5 minutes. Heat only as daily totals. Each compartment was run in closed loop by a different controller, five by teams' algorithms, one by growers.

What I did first was open-loop replay: the logged actuators go into the model, nothing corrects it. The simulated climate is compared with the measured one. Eight multiplicative factors on ten parameters (cover convection, screen air exchange, floor conductivity and thickness, soil conductivity, leakage, vent discharge, pipe exchange), bounded least squares on 5-minute residuals of air temperature, RH and CO2, scaled by 2 C, 5 points and 150 ppm. Twelve windows of 11 days over three compartments, 3 days spin-up each. The fourth compartment held out for its whole season.

What came out. Held-out air temperature MAE 2.17 C before, 1.81 after. Night bias -2.33 to 0.04 C. RH got worse, 5.97 to 7.16 points. Four factors ended on their bounds.

What I checked afterwards, and what it showed.

- Naive floor: yesterday's value at the same time predicts the room to 0.66 C. The model in open loop does 1.81.

- Identifiability (finite-difference Jacobian, Brun's collinearity index): one factor, floor conductivity, has no measurable effect and is collinear with floor thickness. The set of eight sits at 9 to 11 on Brun's index.

- A fit of only the four identifiable factors does better on the hold-out than the ten-parameter fit. Fewer parameters won.

- Absolute humidity instead of RH in the residual moves the solution to a different point at the same cost. The surface is flat.

- Thresholds, which are what the benchmark actually scores: the measured room spent 809 hours above 90% RH, mostly in winter. The calibrated model gives 177 hours, mostly in May. The room was above 30 C for 33 hours; the model givesĀ 300. Lower MAE, worse at the thresholds.

Where I think it is weak.

  1. Closed-loop data. The controller hid the model's errors during the experiment. Inputs are correlated with the disturbances. I used simulation-error least squares with no noise model. Is there an identification method for a fixed nonlinear ODE structure on closed-loop records that you would trust more? Prediction-error with a noise model, multiple shooting, MCMC on the factors, something else?

  2. The fitness metric. MAE is not what a crop cares about. I ended up with hit rate and false-alarm rate on threshold crossings, and hours above threshold per month. Is there a standard statistic for "does the model reproduce exceedance hours"?

  3. Input uncertainty. Heat is a daily total spread by pipe temperatures. Fogging was not logged. How would you treat errors in the inputs rather than pushing them into the parameters?

  4. The selection rule. I chose the fit on the training windows and the hold-out only reports. Now the hold-out says a smaller model is better. A rotating hold-out across the four compartments is my next idea. What would you do?

  5. The water side. The vapour content error is 2.4 g/m3 under every variant, twice the naive floor. Night transpiration, condensation on the screen, unlogged fogging, or leakage?

Sugestions are more than welcome. And if you want to contribute. The benchmark is public and takes any controller through a small interface. The calibration scripts and records are on a branch under review and will follow. Issues and discussions are open on the repo. I would also take a pull request that replaces my fit with a better one, and I will publish the comparison either way.


r/ControlTheory • • 10d ago

Other Interactive Control System Simulator in Python - open-loop, bang-bang, PID, LQG, H-infinity, MPC and RL algorithms

170 Upvotes

Hello! About a year ago I posted here my control system simulator Python project. Since then I've grown the program to improve both the GUI, the control algorithms available and the plant (system) model is now customisable in state space form.

Available controllers include:

  • Manual - set the control input yourself, using your mouse
  • Open-loop - no feedback, just calculate the control input based on setpoint and plant gain.
  • Bang-bang - positive input if output is too low, negative input if output is too high
  • PID - the classic industry-standard, including option of a filtered derivative on measurement to help with practical stability.
  • H2 optimal control - aka linear quadratic regulator (LQR) with a Kalman filter or linear quadratic Gaussian (LQG). Minimises the energy gain from the noise disturbance input to the performance output (z = C1_x @ x + C1_u * u, where C1_x and C1_u are customisable gains).
  • H-infinity optimal control - minimises the worst-case gain between disturbance and performance output across all frequencies.
  • Model predictive control (MPC) with a Kalman filter - estimates the plant's internal state from the noisy measurements, then forecasts the future states for a given control input trajectory and solves a constrained quadratic least-squares problem to minimise the error and control effort. The relative weights and constraints are customisable. MPC is my favourite, it's insanely good... as long as you can specify the correct plant model of course!
  • Reinforcement learning (RL) control - an 'actor' (policy) learns to map observed measurements to continuous control inputs, and a 'critic' (value function) learns to evaluate their cost, based on a reward function that penalises large errors, large values of input and large changes input. Three such actor-critic RL algorithms are available: deep deterministic policy gradient (DDPG), twin-delayed DDPG (TD3) and soft actor-critic (SAC). Neural network architecture and algorithm parameters are customisable within. Despite their complexity, these controllers aren't much better than the others and are prone to misbehaving if you don't train/test them properly!

The integrator and controller algos were all written manually by me and checked rigorously against standard integrators and MATLAB, with the exception of the RL controllers where I relied on AI coding agents somewhat to get everything working. The GUI was coded almost entirely by AI (because nobody wants to write GUI code), using PyQt6 and PyQtGraph. I tried to keep as much as possible to 'first principles' to get the best learning experience out of building this up, so no use of existing control theory or reinforcement learning libraries.

Github repo with all code: here.

Some features not shown in the video:

  • You can change the model of the plant, including using any number of dimensions for the state variable x.
  • You can add measurement noise and process noise with specified covariances. The controllers only see the noisy measurement output, never the true plant state. These are the disturbances that the H2 and H-infinity controllers try to minimise in the output.
  • You can change the integrator from working in ODE (ordinary differential equation) or SDE (stochastic differential equation) form. In SDE form, process noise occurs as a sampled random process throughout integration steps, while in ODE form it is sampled once at each step.
  • You can train new RL agents (actor and critic neural networks and save/load them from disk) for use in RL control.

Future ideas

Some things I wish to add in the future soon are Bode/Nyquist/Nichols/root locus plots - I've already got the stability check working for PID, H2 and H-infinity. Then I'd like to add interactive pole-placement and loop-shaping controllers where you can design e.g. a lead-lag compensator with custom gain/phase margins. Perhaps even H-infinity loop shaping design but I'll need to hit the books again for that!

Currently the system is SISO (i.e. single input dimension, single output dimension). I thought about generalising to MIMO (multiple variables) control from the beginning, and it wouldn't be too hard to extend it as everything uses matrix algebra internally, but the emphasis was on education and understanding and I felt SISO is the easiest way to demonstrate controls interactively.

If you have any other ideas, please let me know! Thanks for reading :)


r/ControlTheory • • 11d ago

Professional/Career Advice/Question Control Engineering opportunities in Italy

21 Upvotes

I have a question for the Italian members of this subreddit: what companies should I look into in order to potentially get a role in Control System engineering? Where are, also geografically, the best opportunities for applying (and learning on the job) Control System theory?

I'm currently based in Tuscany and I've not found much, aside from giants like Baker Hughes or consulting companies like Capgemini.

I'm planning to start a phd soon in order to cement my knowledge and my claim as a control system engineer (I graduated in Mechanical Engineering but I've seen way more Control System Theory than my colleagues), but I'd like to know what future could await after.

Thank you very much


r/ControlTheory • • 11d ago

Educational Advice/Question [RESOURCE] Why does the Ensemble Kalman Filter work? A justification through non-linear filtering theory

1 Upvotes

Hi everyone,

I want to share some notes I wrote regarding to the Ensemble Kalman Filter, specifically on why does it work and about it's theoretical support based on the non-linear filtering theory. It's written as a pedagogical resource for any who is interested in.

Here's the link for the document: https://zenodo.org/records/23278598

I will be attentive to any comments and suggestions. Thank you, and I hope that it helps!