Browse Source

Create PSO-PID.m

master
TianZhendong 6 years ago
committed by GitHub
parent
commit
7d8eb559ed
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      PSO-PID.m

6
PSO-PID.m

@ -0,0 +1,6 @@
function z=PSO_PID(x)
assignin('base','Kp',x(1));
assignin('base','Ki',x(2));
assignin('base','Kd',x(3));
[~,~,y_out]=sim('thetapid',[0,50]);
z=y_out(end,1); %%表示 取这个 矩阵的第一列最后一行的数据。
Loading…
Cancel
Save