资源简介
刘金琨老师智能控制英文版教材的仿真程序,详细的MATLAB程序代码,安装程序代码可以复现书中的仿真图。
代码片段和文件信息
function [sysx0strts] = spacemodel(txuflag)
switch flag
case 0
[sysx0strts]=mdlInitializeSizes;
case 1
sys=mdlDerivatives(txu);
case 3
sys=mdlOutputs(txu);
case {249}
sys=[];
otherwise
error([‘Unhandled flag = ‘num2str(flag)]);
end
function [sysx0strts]=mdlInitializeSizes
global b c namna
sizes = simsizes;
sizes.NumContStates = 5;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 2;
sizes.NumInputs = 4;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
x0 = rands(15);
str = [];
ts = [0 0];
c=[-1 -0.5 0 0.5 1;
-1 -0.5 0 0.5 1];
b=1.2;
namna=10;
function sys=mdlDerivatives(txu)
global b c namna
xd=sin(t);
dxd=cos(t);
x1=u(2);
x2=u(3);
e=x1-xd;
de=x2-dxd;
s=namna*e+de;
W=[x(1) x(2) x(3) x(4) x(5)]‘;
xi=[x1;x2];
h=zeros(51);
for j=1:1:5
h(j)=exp(-norm(xi-c(:j))^2/(2*b^2));
end
gama=100;
for i=1:1:5
sys(i)=gama*s*h(i);
end
function sys=mdlOutputs(txu)
global b c namna
xd=sin(t);
dxd=cos(t);
ddxd=-sin(t);
x1=u(2);
x2=u(3);
e=x1-xd;
de=x2-dxd;
s=namna*e+de;
W=[x(1) x(2) x(3) x(4) x(5)];
xi=[x1;x2];
h=zeros(51);
for j=1:1:5
h(j)=exp(-norm(xi-c(:j))^2/(2*b^2));
end
fn=W*h;
xite=0.20;
%fn=10*x1+x2; %Precise f
ut=-namna*de+ddxd-fn-xite*sign(s);
sys(1)=ut;
sys(2)=fn;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1363 2016-12-05 10:30 Programs for Intelligent control design and Matlab simulation\chap10\chap10_1ctrl.m
文件 748 2012-01-04 15:55 Programs for Intelligent control design and Matlab simulation\chap10\chap10_1plant.m
文件 351 2012-01-04 16:24 Programs for Intelligent control design and Matlab simulation\chap10\chap10_1plot.m
文件 25370 2017-05-06 09:10 Programs for Intelligent control design and Matlab simulation\chap10\chap10_1sim.mdl
文件 1513 2017-05-06 09:26 Programs for Intelligent control design and Matlab simulation\chap10\chap10_2.m
文件 103 2016-12-04 16:18 Programs for Intelligent control design and Matlab simulation\chap10\chap10_2plant.m
文件 1234 2010-12-02 14:34 Programs for Intelligent control design and Matlab simulation\chap10\chap10_3.m
文件 2317 2011-06-03 15:47 Programs for Intelligent control design and Matlab simulation\chap11\chap11_1.m
文件 2452 2017-05-02 07:59 Programs for Intelligent control design and Matlab simulation\chap11\chap11_2.m
文件 55 2012-05-12 09:11 Programs for Intelligent control design and Matlab simulation\chap11\chap11_2func.m
文件 181 2017-05-02 07:59 Programs for Intelligent control design and Matlab simulation\chap11\chap11_2lbest.m
文件 1838 2017-05-02 07:58 Programs for Intelligent control design and Matlab simulation\chap11\chap11_3.m
文件 74 2017-05-07 09:30 Programs for Intelligent control design and Matlab simulation\chap11\chap11_3obj.m
文件 3148 2017-04-20 10:01 Programs for Intelligent control design and Matlab simulation\chap11\chap11_4.m
文件 73 2008-09-19 22:13 Programs for Intelligent control design and Matlab simulation\chap11\city8.txt
文件 401 2017-06-27 08:51 Programs for Intelligent control design and Matlab simulation\chap11\function_plot.m
文件 961 2008-07-31 19:35 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1ctrl.m
文件 651 2008-07-31 19:36 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1input.m
文件 1211 2017-05-06 08:23 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1main.m
文件 1354 2008-08-01 11:32 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1plant.m
文件 29316 2017-05-06 08:24 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1sim.mdl
文件 29069 2016-12-04 10:20 Programs for Intelligent control design and Matlab simulation\chap12\chap12_1sim.mdl.r2011a
文件 740 2008-07-31 20:01 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2ctrl.m
文件 651 2008-07-31 20:01 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2input.m
文件 1434 2017-05-06 08:39 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2main.m
文件 798 2008-07-31 20:01 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2plant.m
文件 36663 2017-05-06 08:40 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2sim.mdl
文件 36753 2016-12-04 10:22 Programs for Intelligent control design and Matlab simulation\chap12\chap12_2sim.mdl.r2011a
文件 838 2017-06-06 09:36 Programs for Intelligent control design and Matlab simulation\chap2\chap2_1.m
文件 2101 2017-06-06 09:26 Programs for Intelligent control design and Matlab simulation\chap2\chap2_2.m
............此处省略109个文件信息
评论
共有 条评论