training MLP by learning from PID controller

I have a PID controller, and I need to train MLP by learning from PID controller. The simulink structure is like the following, and the inputs are two sine waves.
The configuration of PID is like the following.
The architecture of MLP is like the following, and the normalization has been set in Sequence layer.
The training plot is good in reference to the following.
However, there is something wrong with comparision scope in simulink, where the mark red and mark green represents the outputs of PID controller, while the mark yellow an mark blue represents the outputs of Neural Network. Obviously, the performance of Neural Network is not so good, but I don't know the reason. If anyone knows about that, please help me, I will appreciate it.

Answers (1)

Hi,
Firstly, you may need to train a model that type includes state information, i.e.LSTM. I would recommend trying a LSTM network.
Another consideration, have you thought about using reinforcement learning? It is better suited to modeling control systems. This example shows how you can use it to tune a PI controller Tune PI Controller Using Reinforcement Learning

4 Comments

Hi, David,
thank you for your advice. I have tried the regular LSTM in the following structure.
However, the results are not so good, but it is better than MLP, so I want to know whether we can replace the PID controller only by simple deep neural network.
Have you taken a look Reinforcement Learning?
I haven't tried Reinforcement learning, because my current research is to replace PID by simple deep neural network. Reinforcement learning is a further step.
Hi Yang,
What is the goal to replace the PID with Deep Learning? What's your measures for success?
For the LSTM architecture, have you tried tuning any of the parameters?

Sign in to comment.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Products

Release

R2022a

Asked:

on 27 Oct 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!