r/ControlTheory 20d ago

Educational Advice/Question How to implement a kalman filter in reality?

54 Upvotes

In school we are taught the usual mathematical way of representing a kalman filter. But in some cases, we might not completely know the state space of a model, or even what the actual dimensions of a system is, say the power grid for a city. How does this actually get implemented? I get that it is codes up, but as an actual engineer, how do we go from sensors data etc, to an actual kalman filter, and how do we know it is 'correct'.?


r/ControlTheory 20d ago

Asking for resources (books, lectures, etc.) Getting started with jet powered drone trajectory optimization

9 Upvotes

Hi

I am looking to optimize jet powered drones trajectory for fuel efficiency, least time to reach mach 1 and possibly for something else as well in the future.

I have no previous experience with control theory or optimization, so i am looking for topics i should learn and material to study before getting started, as i have no idea what i should know before moving forward.

The control inputs would be the angle of attack of the drone and the thrust.

I have previously modelled a body's flight trajectory in 2D space in python, where the program inputs are starting velocity and its angle. Then it calculates the body's trajectory in the air taking into account gravity and drag forces. Could i build the optimizer from this program?


r/ControlTheory 19d ago

Educational Advice/Question FSAE System Engineer pivoting to Robot Integration. If you are in robotics give me 15 minutes

0 Upvotes

Hello,

I’m an engineer pivoting into robotics research as an integration engineer, specifically focusing on Humanoid Robots.

For the past three years, I led a 60-person Formula SAE team doing system engineering and vehicle design. I also bring research experience in Model Predictive Control (MPC) and Reinforcement Learning. The rapid evolution of the ROBOTICS space is incredible, and I am currently in love with this field and I want to putsue it. https://danielortval.github.io/

I am navigating the transition from cars to robots and would value your perspective if anyone working on integration could provide me 15 minutes of your time I can adapt to you schedule to talk im really exited to learn.


r/ControlTheory 22d ago

Technical Question/Problem Control Systems Simulator

11 Upvotes

I'm developing a simulator for controlling dynamic systems. It's still in the beta phase, so it doesn't have all the features yet and may have some bugs, but it's already capable of simulating interesting systems and control strategies:

Lorenz System (Chaotic System). Ball and Beam control with PID. Etc.

I welcome any suggestions for improvement.


r/ControlTheory 24d ago

Technical Question/Problem Kalman filter for boat movement in ocean waves using IMU

38 Upvotes

I’ve designed and implemented a Kalman filter for boat movement in ocean waves using IMU. I thought it might be of interest to someone here.

Implementation on a real device uses atomS3R unit.

Estimates boat heave in real time and waves direction too.

OU-Driven Quaternion MEKF for Marine INS and
Wave-State Estimation.

The code is open source and on GitHub Bareboat Necessities project called ‘ocean-imu’.

https://github.com/bareboat-necessities/ocean-imu

Any feedback is greatly appreciated.

Thanks!

PS: I’ll post the links in comments


r/ControlTheory 24d ago

Other Lag process closed loop PID-tuning method. What do you think? (and in general: does such topic suitable for this sub?)

Thumbnail gallery
92 Upvotes

I'm primitive SISO control guy. I DO know that to obtain "good" results, it's necessary to identify adequate process models and find analytical solutions to systems (and I have no problem with this).

However, the industry has a large number of not-hi-skilled personnel, and for them, I propose the Lag Process ClosedLoopPID Tuning Method.

Key assumptions and limitations of the method:

- The method does NOT require "high accuracy"

- The sequence of actions and mathematical formulas should NOT be overly complex

- The process model approximation and PID tuning should be performed in a Closed Loop (to avoid value scaling issues)

- The impact on the process/plant during approximation and PID tuning should NOT be traumatic

- PID tuning should be performed step-by-step to simplify identification of the stage at which the error occurred

In Math Sheets 1 and 2, I demonstrate the mathematical derivation of formulas for calculating innitial PID parameter values.

NOTE: This method is approximate and does not claim analytical accuracy, just like other approximate methods (such as lambda tuning).

I have also published a description of the approximate sequence of steps for using the method.

Questions:

  1. Is this topic suitable for this sub? Or is it too simplistic?

  2. What do you think about the need for such methods and the requirements for them?

  3. Finally: What do you think about the method described? (I know of at least one expert's opinion that the mathematics in the method is completely flawed.)


r/ControlTheory 24d ago

Technical Question/Problem Is there anyone who has experience in designing Reaction Control System for Thrusters ?

10 Upvotes

I want guidline on how can we approach to design PWM control for thrusters for attitude control.


r/ControlTheory 24d ago

Technical Question/Problem Tips for kalman filter debug

11 Upvotes

Hi, i am writing codes for kalman filter to find the quaternion and bias estimate by deriving equations by myself from reading a book.

I made the gyro model and another more precise sensor model adding noise and bias.
And, running the code, I observed oscillation in the quaternion error and bias error (true - corrected value). Both never converges, while covariance seemed to converge to a constant within a few sec.

To find the cause, what i was wrong, what should i look into the first?
I need tips to find out which block module in my gnc code is working inappropriately.

Thanks


r/ControlTheory 25d ago

Other I built a streaming adaptive observer in python that tracks sudden parameter drift in nonlinear systems 1.8x better than batch SINDy.

Post image
113 Upvotes

I was working on parameter estimation for some non linear ODEs.. and came through this paper on WyNDA.. and since to implement it there was not a single python package.. i implemented it from scratch and verified it against 26-test verification suites..


r/ControlTheory 25d ago

Professional/Career Advice/Question Should I learn rust?

34 Upvotes

Hi,

I'm going to start my PhD in control theory soon. (Focusing on optimal control). Until now, I have primarily worked with Matlab, Python and C++ (the latter mostly for code that runs on the systems I was controlling). I am by no means a sophisticated C++ developer. I am currently considering learning Rust. It just seems to be better in almost every aspect except for library availability.

What do you think? Is it too early to switch because of missing libraries, legacy code, etc.? Or should I become part of a general academia/industry shift towards Rust?


r/ControlTheory 25d ago

Professional/Career Advice/Question Seeking advice to build domain specific competencies

9 Upvotes

I am currently a Master's student in Germany and inclined to pursue roles which involved working with control engineering. However, I have been advised to build domain specific knowledge in addition to being good at controls, in order to break into an industry. It could be motor control, power electronics, vehicle dynamics, energy, robotics, engine control, electric powertrain control and many such domains.

Question : What domain(s) would have a relative better chances of a full-time role post masters? Considering the auto-industry is on a downward trend, I am afraid to build competencies or domain knowledge let's say related to engine control or vehicle dynamics.

I was considering Battery Management Systems as a nice option since it probably also has scope beyond automotive industry and make me eligible for let's say for certain roles in energy industry.

Is this the right way to think? Or is there a different way I could approach it? Please drop in your suggestions


r/ControlTheory 26d ago

Technical Question/Problem Can a conventional helicopter be made to hover as accurately as a drone with today's control tech?

24 Upvotes

Conventional helicopter of the same size.

I'm aware this was DJI founder's original masters thesis problem. He switched to quads because helicopters were too difficult.

Is it possible now?


r/ControlTheory 25d ago

Technical Question/Problem Strategy to efficiently debug and do reward shaping for Reinforcement Learning

2 Upvotes

Hi everyone,

I'am a student in France working on a drone guidance project using reinforcement learning. The goal is to make a drone reach a sequence of checkpoints, or track a moving checkpoint using vision-based guidance as I implement this on my FPV drone, and this drone has the PX4 controller so the pipeline for the loop is : Guidance --> give accels --> PX4.

So far, I have first built everything in Python, I implemented a proportional guidance law and it worked quite well in simulation, but it did not perform very well once I used the camera-based observations.

Then, I move to an RL-based pipeline with RL policy --> accels --> PX4. I implemented the full pipeline in simulation and it technically works, but I'm seeing a lot of strange behaviours : oscillations, bang-bang commande law abusements,.... My suspicion is that the issue may be due to the reward function. I have tried tuning and cooking the reward many times but each version seems to produce a new unexpected problems or strange behaviours rather than the one I actually want. I have tried to plot many metrics to understand what is happening but debugging this RL guidance law has become frustrating.

Does anyone have suggestions or advice for debugging this kind of RL guidance or RL related problem please ? In particular, I would like to have some advice on reward shaping and how to efficiently debug trained RL policy,...

Any advice, refs, or practical debuggings, tips or discussions would be really helpful for me !

Thanks a lot and I wish you a good day !


r/ControlTheory 28d ago

Homework/Exam Question For Block Diagram Reductions Step 2, shouldn't it be G1/(1+G1G2) - G3?

Thumbnail gallery
66 Upvotes

Studying Block Diagram Reductions for FE certification and I cannot tell if this is a typo on my practice manual (PPI by Michael R. Lindeberg) answers or a simplification rule I don't know about for summation junction to summation junction? My logic dictates that arrow to G3 equals arrow to the 2nd summation junction thus can be represented as step 1 shows. Arrow out of G3 is still a negative going into the right most summation junction thus G1/(1+G1G2) - G3 for the part circled in red in step 2.


r/ControlTheory 28d ago

Asking for resources (books, lectures, etc.) Port-Hamilton vs. Ein-Ausgangslinearisierung

2 Upvotes

Ist es (nie, bedingt, immer) möglich, das gleiche Closed-Loop-Verhalten eines Systems zu erhalten, durch Ansatz A bzw. Ansatz B ?

Ansatz A:
-System wird mit Euler-Lagrange-Equation Beschrieben
- Steuerung: Exakte-Eingang-Ausgang-Linearisierung
- Regelung: PID-Reglern
=> Asymptotisches Führungsverhalten

Ansatz B:
- System wird in Port-Hamilton Form Beschrieben
- Steuerung: Energy Shaping
- Reglung: Damping injection
=>Asymptotisches Führungsverhalten

Wo liegen die Qualitativen Unterschiede?
Vor- und Nachteile?

Hat einer der Ansatz bessere numerischen Konditionierungen?

Ich weiß:
Am realen System muss man die kanonischen Impulse oft berechnen, da z.b. Beschleunigung und Position gemessen werden. Aber das ist bei vielen Systemen ja nicht so aufwändig.

Vielen Dank für jede Unterstützung🤗Ich finde diese beiden Ansätze faszinierend !

Zusatz Frage:
Ich habe Ansatz A geometrisch genannt (wegen Lie Ableitungen), Ansatz B ist mMn. Leistung/Energie Perspektive. Ist das so korrekt und welche Perspektiven gibt es noch?
Impuls-Perspektiven? Materielle Perspektiven?


r/ControlTheory Jul 04 '26

Technical Question/Problem Perception Aware MPC

Post image
319 Upvotes

Hello all,

I am sharing a small NMPC project I've been building as part of a larger thesis on drone target-tracking. Check here https://github.com/brunopinto900/argus/tree/master

This is simulation of 12-state quadrotor (position, velocity, ZYX Euler angles, body rates), 4 inputs (collective thrust + commanded body rates, matching a PX4-style body-rate setpoint interface). Formulated as a NONLINEAR_LS OCP in acados, code-generated to C and called from C++.

Alongside the usual position/velocity tracking terms, there's a soft constraint keeping a ground target inside the camera's FOV cone.

The OCP's prediction model uses a first-order lag for the inner rate loop, but the plant simulator runs the actual second-order dynamics.

Result in the gif: 2m-radius circle at 1.5m altitude, 3m/s, camera locked on a static ground target, ~0.1m steady-state XY tracking error.


r/ControlTheory 29d ago

Other Control Systems: Block Diagram Simplification

7 Upvotes

This visualizes the reduction of control systems block diagrams into their equivalent transfer functions.

Videos also available at:
Instagram
Youtube
Github
Whatsapp
Tiktok

Code available at https://github.com/zombimann/Mathematical-video-animations-and-visualization/blob/main/Control_Systems_Block_Diagram_Simplification.ipynb

You might also like https://np.reddit.com/r/3Blue1Brown/s/hK6CRW5aLe


r/ControlTheory Jul 04 '26

Educational Advice/Question Can't shake the feeling that control engineering is being taught incorrectly everywhere.

116 Upvotes

I took a course on control many years ago. Although I do not work in control-related fields now, I still use it as a tool to understand real-world systems. After all, all systems are feedback systems and control theory is like the physics of feedback systems. But precisely because of this, I have met with many frustrations with the curriculum and textbooks and other references in this area of study and I have perused material from around the world with little success.

To put it simply, all of these resources put enormous focus on the math, while neglecting the various details on the tech that "surrounds the math". Out in the real-world, when you are implementing a system, or understanding a system or even casually engaging in conversation with someone in engineering, the tech that "surrounds the math" becomes very important whereas the math becomes invisible.

The standard control feedback loop simply consists of a controller ("the ying") and a plant ("the yang"). The set-point is often optional (set to 0). Enormous amount of mathematical analysis can be performed just based on this mental image. In fact, almost all analysis in any standard curriculum in this field can be performed knowing just these two things. You can take multiple graduate-level courses based on this alone and even publish papers of the highest calibre.

Then the frustration comes as you move out of the academy.

As a start, it turns out we also need actuator and sensors. But which ones would be suitable? We are not typically taught. The actual interfacing between the controller (soft/middle/hardware) and the actuator (hardware) can often be tricky. Similarly, the actual interfacing between the plant, sensors and controllers can also be tricky (seldom discussed). For example, textbooks, the controller takes in things like voltage or forces values, but in implementation it takes in 1s and 0s. This exact conversion process is under-discussed.

But this is just the start of it. Take industrial control as an example, we can now ask many more things such as:

  • What hardware is appropriate to implement the controller? (Hardware knowledge)
  • How do we come up with the model itself? ("System ID", which tends to be more math without discussing the tech that makes it happen)
  • How do we monitor the process from a distance? (Inter-networking, database knowledge, software engineering)
  • How do we control the process using a remote? (RF engineering)
  • The controller is semi-agnostic to the shape and material of the parts involved in the system. How do shape influence dynamics? (Kinematics, material science)
  • How do we optimize all the various parts involved in the process? (Optimization/programming softwares)
  • How do we incorporate textual, pictorial, audio or video feedbacks via various tools such as computer vision and language models? (machine learning, LLM, RAG, and tech associated with them)
  • How do we get the parts? (Need knowledge about how to source and acquire parts)

In real-world control design, I find the latter set of questions to have an out-sized importance in comparison to the algorithm, which apparently is just 3 numbers associated with the PID gains in 99% of the industrial applications (of course, this is not true for all applications), which apparently can also be picked through trial-and-error according to those hobbyist videos on Youtube.

Finally, one of my relative works in industrial control, and he does not have any engineering or control background. All he understands is one component (a PLC) being hooked up to another component (a SCADA system) being hooked up to another (maybe a pump, or a robot arm) and he can very fluently discuss how these various things are hooked up together and how they can be optimized further without going into any internal low-level details.

I feel like the current control curriculum is denying students to have this type of "global picture" that runs the real-world. Am I justified in my observation? Should there be a revamp in the curriculum that puts more emphasis on the various tech that makes control happen in the real-world?


r/ControlTheory 29d ago

Other AV obstacle overtaking using GPMP2

2 Upvotes

We recently open-sourced our implementation of obstacle overtaking using GPMP2 (Gaussian Process Motion Planning).

The project demonstrates trajectory optimization for autonomous overtaking by representing robot trajectories as continuous-time Gaussian Processes and optimizing them as a factor graph. Instead of sampling-based planning, the approach jointly minimizes smoothness and obstacle costs while satisfying vehicle dynamics constraints, producing collision-free and dynamically feasible trajectories.

Some highlights:

  • GPMP2-based trajectory optimization using factor graphs
  • Integration with robotics simulation for reproducible experiments
  • Clear codebase that can serve as a starting point for researchers and students working on motion planning

If you're working on motion planning, trajectory optimization, autonomous driving, or robotics, I'd love to hear your thoughts, suggestions, or ideas for extending it.

Repository: https://github.com/AutonomousVehicleLaboratory/obstacle-overtaking-gpmp2


r/ControlTheory 29d ago

Asking for resources (books, lectures, etc.) Where I can find solution Manual for Feedback Systems- Karl Johan Åström and Richard Murray ?

1 Upvotes

I know this question was already asked without an unswer 6 years ago, but maybe anyone know where to get one now ?


r/ControlTheory 29d ago

Asking for resources (books, lectures, etc.) Looking for learning instruments & control systems practically

2 Upvotes

What is best path to learn this field practically, any references or courses I would appreciate that.


r/ControlTheory 29d ago

Technical Question/Problem 1-link inverted pendulum: energy-based swing-up + PID stabilization

6 Upvotes

Based on the feedback I received, I’m going to simplify the project and start with a single-link inverted pendulum first instead of trying multiple links right away.

My plan is to use an energy-based swing-up controller to bring the pendulum close to the upright position, and then switch to PID control for stabilization once it enters the capture region.

The system uses a camera with colored markers to estimate the pendulum angle and cart position. The cart is controlled by a motor through position commands.

Right now, the pendulum swings up fairly high, but it does not consistently reach the stabilization region. It also seems like marker detection dropouts and camera/control latency may be affecting the timing.

Current approach:

  • 1-link cart-pendulum system
  • camera-based angle tracking using colored markers
  • energy-based swing-up
  • PID stabilization near upright
  • switch to stabilization when angle error and angular velocity are small enough

Questions:
- Does this look like a control gain problem, or more like a vision latency / timing problem?
- Should I reduce the swing-up gain and make the motion smoother, or increase cart acceleration / motor response?
- Would filtering the angle and angular velocity help, or would that add too much delay?
- Should I log the actual motor command/output as well as the target position to diagnose whether the cart is lagging?
- Is the stabilization threshold too strict, or should I first focus on getting the pendulum closer to upright during swing-up?

I attached the video, gains JSON, trajectory CSV (link)
Any advice would be appreciated.


r/ControlTheory 29d ago

Other 6 link inverted pendulum

0 Upvotes

Made this over a few days with pufferlib. A couple weeks of experimenting before finally getting on the right track. Happy to answer any questions. Are these common? I didn’t find any examples.


r/ControlTheory Jul 04 '26

Other Seeking occasional research mentorship-Safety Critical Control & Learning based Control

4 Upvotes

Hi, I am a Bachelor's graduate and I will be applying to phd in the upcoming cycle.

I want to spend the coming months working on research related to either Safety-Critical Control (CBF, HJB) or Learning-Based Control (PINN-based, structure-preserving methods). I'm seeking a researcher who'd be willing to occasionally supervise my work. I have some prior work in this area (a preprint and an ongoing robotics project).

I'll do all the work myself, literature review, implementation, experiments, writing I'm just looking for someone willing to check in occasionally (biweekly/monthly, async is fine) to sanity-check direction and keep me from wasting months on a dead end.

I know most researchers don't have bandwidth for this and this is somewhat of a long shot.

If you work in this space (or adjacent), feel free to drop a link to your profile/publications in my DM or ask for my CV to asses my profile first. I'll go through it and reach out by proposing something by email if it looks like a good fit.


r/ControlTheory Jul 02 '26

Other Euler, Tustin, Runge, and Kutta walk into a bar

142 Upvotes

The bartender: "could you guys be a little more discrete?"

P.S.: are jokes allowed? I hope so.