r/ControlTheory • u/NeighborhoodFatCat • 29d ago
Technical Question/Problem What is the catch of modelling dynamical systems using neural networks?
Consider the class of nonlinear systems of the form :
x' = f(x, u), y = h(x,u)
It can be re-written as
x = int f(x,u) dt, y = h(x, u)
This results in a very complicated expression due to the integral and various properties of function f. This said, we can potentially identify the system using a neural network NN:
x = NN(u)
The idea is to grab input-state pairs (u(t), x(t)) of a real system and fit a neural network.
After all x' = f(x,u) is just an approximation of the real system, and x = NN(u) is also an approximation. If the network has enough capacity, NN could potentially contain the entirety of x = int f(x,u) in some part of the network.
Of course, x' = f(x,u) has greater amount of interpretability for small systems, but potentially difficult to justify for very complicated systems. x = NN(u) could be used instead. But is this idea doomed because (u(t), x(t)) are difficult to get (and using a simulator means we need to solve x' = f(x,u) anyways)?
Seem there is a precedent is in machine learning, where the RNN model h_t+1 = Ah_t + Bu_t was replaced with the transformer model x = NN(u). Can control engineering ever be re-imagined so that its foundation are input-output systems x = NN(u) as opposed to dynamical systems x_{t+1} = f(x_t, u_t)?
•
u/ElectronSculptor 29d ago
I think the answer here is “yes” you can do that. But what you are essentially doing is a numerical approximation and for some systems there are classical methods like Runge-Katta that may be better suited.
I’ve done work in control systems (electrical engineer) and most “real” systems use some sort of numerical approximation instead of closed form solutions simply because we can’t fit functions to our data.
On the other hand, there are some very complex systems that DO use AI based systems. One example that comes to mind is one of the fusion reactor research companies uses AI in the control loop for the plasma containment. The neural network they used was able to better capture the nonlinear response than the numerical methods I mentioned.
•
u/maiosi2 29d ago
If the Neural Network is just a feed forward them no, you can't, because those have no memory so you can learn a static function not a dynamical system.
If the NN has state then yes, but then you will lose all the useful information that a mathematical model would have, and also you may need a very big NN for a very simple nonlinear model
•
u/Poman22 29d ago
One drawback is physically systems wear down or change over time. Your model may fit now, but retraining on new data is expensive and you don't have a way to do it automatically
•
u/Mu5_ 29d ago
Isn't at the end of the day an NN "just" a linear system with extra steps? So you would basically build a linearized model of the system, not exactly linear since the NN layers compound, but still.
I would say, it depends on what you need: if you need to know the full profile of y(t) then you cannot really use the NN. If what you need is only the the y(t_f) then NN is one of the many options available
•
u/LikeSmith 29d ago
Theoretically, yes, the NN can approximate a dynamics function (if it is time invarient as discussed by another commenter). However the issue is in the word "approximate," the result is never going to be exact, and since we integrate the results, these errors accumulate, usually rapidly. How well it will work will ultimately depend on how chaotic the underlying plant is. Fundamentally, an asymptotically stable (or.stronger condition) will probably be fine since it will tend to the origin either way, while unstable systems will likely be very difficult to model effectively.
•
u/r_transpose_p 28d ago
So I've never studied the intersection between ML and controls, but I've studied each separately and i think i can come up with educated guesses for answers to your questions.
Hope you found this useful and interesting.
•
u/ColonelStoic 29d ago
A slight correction is that, depending on how the neural network is used, it cannot use the control input as an input, only the state. The high level reason is due to circularity from a stability standpoint.
To answer your question, NNs cannot approximate explicit functions of time since time does not lie on a compact set. That is a drawback. You can model something like xdot = f(x) + u(t) + d(t), and the NN can model f and you can use something like a disturbance observer for d(t), but due to structural identifiability, in practice the NN will be dominated by the disturbance observer and not be very useful.
•
u/LewsTherinKinslayer3 29d ago
Yeah, look up Neural ODEs, or Universal DEs. The Julia SciML ecosystem has a lot of tools for working with these kinds of things.
•
u/Barnowl93 29d ago
This is just black-box sysid with a sequence model, no?
Also, x = NN(u) as a static map has no memory: x(t) depends on the whole input history and on x(0), so you need NN(u(0:t), x0).
The principled versions already exist: neural ODEs learn f rather than int(f), and neural operators (DeepONet, FNO) learn the input-to-trajectory map. Neither removes the real problems, which are extrapolation, noise, and stability and safety guarantees.
Where these approaches work, the guarantees come from control theory around the network.
•
u/whats_a_quasar 29d ago edited 29d ago
I don't understand this goal. Why would we want a system model that does not depend on state? Most dynamics evolve based on state. The current form is a representation of the underlying physics. It's possible to write the system in the form of "dead reckoning" from an initial state, but what does that accomplish?
What is the advantage? All you say is writing a dynamical system as x_{t+1} = f(x_t, u_t) is "potentially difficult to justify for very complicated systems." You're free to investigate what you like, and there are some neural network applications in controls, but you have to beat existing methods on computational intensity, accuracy, or robustness to be interesting.
Even if you use a neural network to learn the system though, it would perform better with the state available.