Clear Filters
Clear Filters

How do we know that the PI controller can be modeled using a single neuron?

3 views (last 30 days)
In this tutorial (https://www.mathworks.com/help/reinforcement-learning/ug/tune-pi-controller-using-td3.html) one fully connected layer is used to model the PI controller. This translates to 2 inputs to and one output from a neuron. I am not sure what activation function is used.
How do we know that this problem doesn't need more neurons? If the answer is that the underlying model is linear then why have a non-linear activation function?

Answers (1)

Emmanouil Tzorakoleftherakis
The network used to model the PI controller is exactly this one
actorNet = [
featureInputLayer(numObs)
fullyConnectedPILayer(initialGain,'ActOutLyr')
];
The fullyConnectedPILayer layer is a custom layer created to imitate a PI controller. If you open it, you will see that it performs the operation of a fully connected layer with two weights. Those two weights represent Ki and Kp so you don't need any more neurons for this problem.
As you can see, there is no use of any activation layer here because we intend the actor network to behave exactly like a PI controller. If you work out the input output math, you will see that the output of the actor network is equal to u= [∫e dt e]∗[Ki Kp] where [∫e dt e] are the two observation inputs. This should be familiar as it's essentially a PI controller.
Hope this helps

Categories

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

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!