Tune PI Controller Using Reinforcement Learning

조회 수: 8 (최근 30일)
嘻嘻
嘻嘻 2023년 10월 18일
How is the initial value of the weight of this neural network determined? If I want to change my PI controller to a PID controller, do I just add another weight to this row that is initialGain = single([1e-3 2])?
This code is from the demo "Tune PI Controller Using Reinforcement Learning."
initialGain = single([1e-3 2]);
actorNet = [
featureInputLayer(numObs)
fullyConnectedPILayer(initialGain,'ActOutLyr')
];
actorNet = dlnetwork(actorNet);
actor = rlContinuousDeterministicActor(actorNet,obsInfo,actInfo);
Can my network be changed to look like the following:
actorNet= [
featureInputLayer(numObs)
fullyConnectedPILayer(randi([-60,60],1,3), 'Action')]
  댓글 수: 3
嘻嘻
嘻嘻 2023년 10월 18일
I want the weights of the network to represent the controller parameters, the input of the network to represent the error and the error integral and its first derivative, and the final output of the network to be the control instructions
嘻嘻
嘻嘻 2023년 10월 18일
I'm not really sure. What do you think of this scheme?

댓글을 달려면 로그인하십시오.

채택된 답변

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 10월 23일
I also replied to the other thread. The fullyConnectedPILayer is a custom layer provided in the example - you can open it and see how it's implemented. So you can certainly add a third weight for the D term, but you will most likely run into other issues (e.g. how to approximate the error derivative)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Approximation and Clustering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by