There is one part of PID code I don't understand

5 ビュー (過去 30 日間)
kung li lin
kung li lin 2020 年 12 月 26 日
コメント済み: kung li lin 2020 年 12 月 27 日
The part is here
%% You can replace the follwoing five lines with your system/hardware/model
STATE1(i+1) = sum(PID); % sum PID term to calculate the first integration
state2(i+1) = (STATE1(i+1) + STATE1(i))*dt/2; % output after the first integrator
STATE2(i+1) = sum(state2); % sum output of first integrator to calculate the second integration
Output(i+1) = (STATE2(i+1) + STATE2(i))*dt/2; % output of the system after the second integrator
FeedBack(i+1) = state2(i+1)*feed1 + Output(i+1)*feed2;
I just don't understand what it means
why i have to integrate twitce to get the output and feedback?
I watch the block diagram but just simple pid controller and output input

採用された回答

Luigi Emanuel di Grazia
Luigi Emanuel di Grazia 2020 年 12 月 27 日
As can I see from the link you attached, the cose uses as plant a double integrator.
This is the plant to be controller, not the PID itself
  1 件のコメント
kung li lin
kung li lin 2020 年 12 月 27 日
Thank you very much !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePID Controller Tuning についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by