You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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); %%表示 取这个矩阵的第一列最后一行的数据。
|