フィルターのクリア

How can I specify less oschillatory behaviour for PID

4 ビュー (過去 30 日間)
JAMES KEEN
JAMES KEEN 2021 年 3 月 2 日
コメント済み: JAMES KEEN 2021 年 3 月 8 日
How can I speicfy that I do not want a heavily underdamped response as seen in the image attached? The addition of the derivative term makes it difficult to implement in simulink enviroment.
--------------------------------------------------------------First script------------------------------------------------------------
clear all, close all, clc
dt = 0.000005; % this is 10^-6 0.000001
PopSize = 40;
MaxGenerations = 25;
s = tf('s');
G =(1.44e09)/((s*s)+5333*s+9.6e07)
options = optimoptions(@ga,'PopulationSize',PopSize,'MaxGenerations',MaxGenerations,'OutputFcn',@myfun);
[x,fval] = ga(@(K)pidtest(G,dt,K),2,-eye(2),zeros(2,1),[],[],[],[],[],options);
--------------------------------------------------------------Second script--------------------------------------------------------
function J = pidtest(G,dt,parms)
s = tf('s');
K = parms(1)+ parms(2)/s
Loop = series(K,G);
ClosedLoop = feedback(Loop,1);
t = 0:dt:0.005; % this indicates length of time to show
e = 1 - step(ClosedLoop,t);
J = sum(t'.*abs(e)*dt);
step(1*ClosedLoop,t)
h = findobj(gcf,'type','line');
set(h,'linewidth',1);
drawnow
---------------------------------------------------------------end of script------------------------------------------------------
  13 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 3 月 8 日
OK - did you get similar values ?
I believe I saw also some submissions of PID tuning using GA in the FEX section - did you check that ?
JAMES KEEN
JAMES KEEN 2021 年 3 月 8 日
Hi I get the following PID values when using my LQR cost function.
P= 7.23803323894401
I= 0.617502138949610
D= 0.000315064097110046
filter coefficent = 1e06
I have not checked that submission as I have not seen it

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

回答 (1 件)

Tesfaye Girma
Tesfaye Girma 2021 年 3 月 5 日
figure(3),plot(yt)
title('PID control result. V-Tiger is better than Ziegler-Nichols rule')
xlabel('sample number k (0.01k [sec])')
ylabel('step response')
gv
gi

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by