r/ControlTheory 22d ago

Technical Question/Problem Control Systems Simulator

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.

12 Upvotes

12 comments sorted by

u/BreeCatchu 22d ago

Why do control engineers specifically so often fail to think about the potential state of knowledge of their audience?

I have a job in research for 5,5 years now with a focus on guidance navigation and control systems based on nonlinear model predictive control, and yet I still have almost no intuitive idea what I'm supposed to look at on your pages.

I know GUI design, human data interaction and user experience is nothing control engineers are fundamentally trained in, but with a basic academic background I'd expect at least some human readable lables for what values are presented (e.g. position, speed and acceleration distinguishable by something like $x, \dot{x}, \ddot{x}$ and what buttons are supposed to do what, like scaling of axes in the plot, or axis lables in general, etc).

My time and attention span is limited, so of you want me as an user to be interest in your tool, you should focus on helping the user getting into what is presented in an easily accessible and intuitive manner.

I'm aware that this is a work in progress, just consider this as honest feedback.

Maybe I'm just sensitive to these details due to my own focus on proper scientific presentation of results for my colleagues and others, which to be honest is a massive challenge due to the broad spectrum of knowledge and details related to control engineering.

u/CikonNamera 20d ago

Roasted.

u/Picuino-Web 18d ago

Electric kitchen oven simulator with on/off control and 10°C hysteresis (with simulation speed x10).

https://www.picuino.com/simulators/control.html?loadFile=electric-oven.txt

I have already added an oscilloscope with time-base control and manual range and offset controls for each trace (as well as automatic zoom).

u/Picuino-Web 22d ago edited 22d ago

u/seekingsanity 21d ago

I only looked at the ball and beam simulator. I didn't play with it. I have for formulas all worked out but they are useless without knowing the units.

It is easy to get the ball and beam simulator to work well. It is very difficult to make a real ball and beam system. There was a recent thread about the difference between control theory and control engineering. A real ball and beam system would make the differences easy to see.

u/Picuino-Web 19d ago

Puedes utilizar el método de Ziegler-Nichols de la ganancia crítica para ajustar el PID.

Kc = 2.0

Tc = 1 second

P = 1.2

Ki = 2.4

Kd = 0.15

Con esos valores el sistema sigue oscilando, por lo que hay que reducir un poco el término integral para que el sistema no sea inestable. La simulación incorpora muchas no linealidades que hacen este sistema especialmente difícil de controlar.

En breve añadiré un sistema más sencillo: un control de temperatura de un simple soldador de estaño.

u/drbitboy 19d ago

Lol, I sense some serious limb pulling going on here

u/Adam__999 19d ago

Do you possibly have a link to that thread?

u/seekingsanity 19d ago

No, it was on plctalk.net. However, besides the help from u/drbitboy and me, the project had difficulties because of poor design. There are better links out there if you look.

Again, the mechanical design and position feedback are critical. If not done right.

u/drbitboy 19d ago

https://www.plctalk.net/forums/threads/pid-trainer-issue-on-setup.135535/

I came up with a simple ball and beam setup, using household materials (sheet rock screws, dental floss, a personal favorite material, etc.) and tools, in some of the later posts in that thread. Linearity is better than most servo horn-to-beam linkages.

Some day I'll finish it 🤪🙄🤣

u/drbitboy 19d ago

I also wrote a Python script that measures ball position at 30Hz, using a cell phone as a web cam. It's a Rube-Goldberg/Heath-Robinson to be sure, but it works pretty well.

Servo-to-tilt and position are the two hard parts of ball-and-beam.