PID control based on BP neural network

Source: Internet
Author: User

The parameters that need to be debugged in the classic incremental PID algorithm are KP,KI,KD. The three parameters are regulated by the BP neural Network, with X (i) as the input layer and the middle layer as the Simoid function:

f (x) = Tanh (x) = (exp (x)-exp (-X))/(exp (x) +exp (-X)). and modify the parameters by gradient descent method


Key code:%output Layer
For J=1:1:out
DK (j) =2/(exp (j) +exp (K (j))) ^2;
End
For L=1:1:out
DELTA3 (L) =error (k) *dyu (k) *epid (L) *DK (L);
End

For L=1:1:out
For I=1:1:h
D_WO=XITE*DELTA3 (L) *oh (i) +alfa* (wo_1-wo_2);
End
End
wo=wo_1+d_wo+alfa* (wo_1-wo_2);
%hidden Layer
For I=1:1:h
Do (i) =4/(exp (i (i)) +exp (-I (i))) ^2;
End
Segma=delta3*wo;
For I=1:1:h
Delta2 (i) =do (i) *segma (i);
End

D_wi=xite*delta2 ' *xi;
wi=wi_1+d_wi+alfa* (wi_1-wi_2);


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.