滑模变结构控制MATLAB仿真.rar

  • ningqingxue
    了解作者
  • matlab
    开发工具
  • 846KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 4
    下载次数
  • 2020-03-19 06:42
    上传日期
滑模变结构控制MATLAB仿真(第3版):基本理论与设计方法 仿真程序(本资料包含了该书的一些matlab仿真,供大家参考学习)
滑模变结构控制MATLAB仿真.rar
  • 滑模变结构控制MATLAB仿真(第3版):基本理论与设计方法 仿真程序
  • 第6章仿真程序
  • chap6_6plant.m
    691B
  • chap6_6ctrl.m
    1KB
  • chap6_2plot.m
    426B
  • chap6_3ctrl.m
    1.1KB
  • chap6_1ctrl.m
    833B
  • chap6_4low_filter.m
    706B
  • chap6_2sim.mdl
    24.1KB
  • chap6_4ctrl.m
    746B
  • chap6_1sim.mdl
    24.9KB
  • chap6_2Q.m
    104B
  • chap6_4int.m
    420B
  • chap6_5plot.m
    619B
  • chap6_1plot.m
    428B
  • chap6_5x2bar.m
    658B
  • chap6_6sim.mdl
    26.5KB
  • chap6_5ctrl.m
    865B
  • chap6_2plant.m
    761B
  • chap6_4x2_bar.m
    658B
  • chap6_4plant.m
    736B
  • chap6_5low_filter.m
    706B
  • chap6_6plot.m
    265B
  • chap6_4sim.mdl.r2011a
    25.7KB
  • chap6_4sim.mdl
    29.1KB
  • chap6_3sim.mdl
    25.9KB
  • chap6_3plant.m
    761B
  • chap6_5plant.m
    759B
  • chap6_5int.m
    420B
  • chap6_3plot.m
    564B
  • chap6_5sim.mdl
    29.1KB
  • chap6_6sim.mdl.r2011a
    23.1KB
  • chap6_1plant.m
    1KB
  • chap6_2ctrl.m
    868B
  • chap6_4plot.m
    619B
  • 第11章仿真程序
  • chap11_3input.m
    667B
  • chap11_6input.m
    667B
  • chap11_10sim.mdl
    24.9KB
  • chap11_10dylmi.m
    384B
  • chap11_6plant.m
    949B
  • chap11_9input.m
    588B
  • Pfile.mat
    405B
  • chap11_9plot.m
    111B
  • chap11_5sim.mdl
    22.6KB
  • chap11_9plant.m
    804B
  • chap11_3ctrl.m
    981B
  • chap11_8plant.m
    175B
  • chap11_7lmi.m
    472B
  • chap11_10ctrl.m
    1.4KB
  • chap11_5plot.m
    536B
  • chap11_1.m
    268B
  • chap11_7ctrl.m
    1.4KB
  • chap11_3plot.m
    590B
  • chap11_4plant.m
    889B
  • chap11_7sim.mdl
    23.5KB
  • chap11_4LMI.m
    405B
  • chap11_2LMI.m
    380B
  • chap11_3sim.mdl
    23.8KB
  • chap11_4input.m
    667B
  • chap11_7plot.m
    608B
  • chap11_10plant.m
    804B
  • chap11_4plot.m
    590B
  • chap11_5ctrl.m
    795B
  • chap11_10lmi.m
    341B
  • chap11_8.m
    1.4KB
  • chap11_6LMI.m
    408B
  • chap11_9sim.mdl
    22.5KB
  • chap11_6plot.m
    590B
  • chap11_10input.m
    588B
  • chap11_6sim.mdl
    24.1KB
  • chap11_2plant.m
    850B
  • chap11_2input.m
    0B
  • chap11_7plant.m
    1KB
  • chap11_5plant.m
    908B
  • chap11_2sim.mdl
    22.6KB
  • chap11_6ctrl.m
    1.4KB
  • chap11_4sim.mdl
    24.1KB
  • chap11_2ctrl.m
    726B
  • chap11_4ctrl.m
    1.3KB
  • chap11_5LMI.m
    408B
  • chap11_2plot.m
    536B
  • chap11_10plot.m
    565B
  • 第1章仿真程序
  • chap1_1sim.mdl
    26.5KB
  • chap1_1ctrl.m
    755B
  • chap1_1plant.m
    732B
  • chap1_1sim.mdl.r2007b
    19.5KB
  • chap1_1plot.m
    211B
  • chap1_1input.m
    621B
  • 第4章仿真程序
  • chap4_2ctrl.m
    1.2KB
  • chap4_1sim.mdl
    24.5KB
  • chap4_2adapt.m
    1014B
  • chap4_2plot.m
    800B
  • chap4_3sim.mdl
    25.6KB
  • chap4_1plot.m
    548B
  • chap4_1adapt.m
    1KB
  • chap4_3plant.m
    1.1KB
  • chap4_3ctrl.m
    1.2KB
内容介绍
function [sys,x0,str,ts] = spacemodel(t,x,u,flag) switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes; case 1, sys=mdlDerivatives(t,x,u); case 3, sys=mdlOutputs(t,x,u); case {2,4,9} sys=[]; otherwise error(['Unhandled flag = ',num2str(flag)]); end function [sys,x0,str,ts]=mdlInitializeSizes sizes = simsizes; sizes.NumContStates = 53; sizes.NumDiscStates = 0; sizes.NumOutputs = 3; sizes.NumInputs = 5; sizes.DirFeedthrough = 1; sizes.NumSampleTimes = 0; sys = simsizes(sizes); x0 = [0.1*ones(53,1)]; str = []; ts = []; function sys=mdlDerivatives(t,x,u) r1=50;r2=1;r3=10; xd=0.1*sin(t); dxd=0.1*cos(t); ddxd=-0.1*sin(t); x1=u(2); x2=u(3); e=x1-xd; de=x2-dxd; k1=3; s=k1*e+de; for i=1:1:25 thtaf(i,1)=x(i); end for i=1:1:25 thtag(i,1)=x(i+25); end for i=1:1:3 thtah(i,1)=x(i+50); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fsd1=0; fsd2=0; for l1=1:1:5 gs1=-[(x1+pi/6-(l1-1)*pi/12)/(pi/24)]^2; u1(l1)=exp(gs1); end for l2=1:1:5 gs2=-[(x2+pi/6-(l2-1)*pi/12)/(pi/24)]^2; u2(l2)=exp(gs2); end for l1=1:1:5 for l2=1:1:5 fsu1(5*(l1-1)+l2)=u1(l1)*u2(l2); fsd1=fsd1+u1(l1)*u2(l2); end end fs1=fsu1/(fsd1+0.001); fx1=thtaf'*fs1'; gx1=thtag'*fs1'+0.001; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% gs3=5*(s+3); u3(1)=1/(1+exp(gs3)); u3(2)=exp(-s^2); gs3=5*(s-3); u3(3)=1/(1+exp(gs3)); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fsu2=u3; for i=1:1:3 fsd2=fsd2+u3(i); end fs2=fsu2/(fsd2+0.001); h1=thtah'*fs2'; ut=1/gx1*(-fx1-k1*de+ddxd-h1); S1=r1*s*fs1; S2=r2*s*fs1*ut; S3=r3*s*fs2; for i=1:1:25 sys(i)=S1(i); end for j=26:1:50 sys(j)=S2(j-25); end for j=51:1:53 sys(j)=S3(j-50); end function sys=mdlOutputs(t,x,u) xd=0.1*sin(t); dxd=0.1*cos(t); ddxd=-0.1*sin(t); x1=u(2); x2=u(3); e=x1-xd; de=x2-dxd; k1=3; s=k1*e+de; for i=1:1:25 thtaf(i,1)=x(i); end for i=1:1:25 thtag(i,1)=x(i+25); end for i=1:1:3 thtah(i,1)=x(i+50); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fsd1=0; fsd2=0; for l1=1:1:5 gs1=-[(x1+pi/6-(l1-1)*pi/12)/(pi/24)]^2; u1(l1)=exp(gs1); end for l2=1:1:5 gs2=-[(x2+pi/6-(l2-1)*pi/12)/(pi/24)]^2; u2(l2)=exp(gs2); end for l1=1:1:5 for l2=1:1:5 fsu1(5*(l1-1)+l2)=u1(l1)*u2(l2); fsd1=fsd1+u1(l1)*u2(l2); end end fs1=fsu1/(fsd1+0.001); fx1=thtaf'*fs1'; gx1=thtag'*fs1'+0.001; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% gs3=5*(s+3); u3(1)=1/(1+exp(gs3)); u3(2)=exp(-s^2); gs3=5*(s-3); u3(3)=1/(1+exp(gs3)); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fsu2=u3; for i=1:1:3 fsd2=fsd2+u3(i); end fs2=fsu2/(fsd2+0.001); h1=thtah'*fs2'; ut=1/gx1*(-fx1-k1*de+ddxd-h1); sys(1)=ut; sys(2)=fx1; sys(3)=gx1;
评论
    相关推荐