• 大小: 4KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-18
  • 语言: Matlab
  • 标签: tag  

资源简介

系统的切换控制稳定性仿真,最新研究成果,网上极少具有很好的参考价值

资源截图

代码片段和文件信息

clc
clear all
A1=[-0.5 0.3;
    0.1 1];
A2=[0.2 -0.1;
    1 0.3];
A3=[1 -0.2;
    2 0.05];
B1=[0.1;
    0.2];
B2=[0.1;
    0.2];
B3=[0.1;
    0.2];
D1=[0.1;
    0.2];
D2=[0.1;
    0.2];
D3=[0.1;
    0.2];
C11=[0.1 2];
C12=[0.1 2];
C13=[0.1 2];

C21=[0.1 2];
C22=[0.1 2];
C23=[0.1 2];

T=[1 0;
    -0.05 0.5];


Abar11=[-0.515 0.1;
        0  1];
Abar12=[0.205 0.1;
        0  1];
Abar13=[1.01 0.1;
        0  1];
Abar21=[0.0485 0.41];
Abar22=[1.9905 0.41];
Abar23=[4.096 0.41];
Dbar11=[0.41 0];
Dbar12=[0.41 0];
Dbar13=[0.41 0];
Dbar21=[0.1 0;
        0  1];
Dbar22=[0.1 0;
        0  1];
Dbar23=[0.1 0;
        0  1];
    
Gbar1=[0.2439;
       3.7367];
Gbar2=[0.2439;
       3.7366];
Gbar3=[0.2439;
       3.7365];
   
Ak1=[0.226 0.1265;
      0.1322 0.1337];
Ak2=[-0.0345 -0.0059;
     -0.1637 0.0085];
Ak3=[-0.3 -0.129;
     -0.4638 -0.1132];
Bk1=[-0.0535;
     -0.2393];
Bk2=[0.0338;
     -0.0878];
Bk3=[0.0459;
     -0.0403];
Ck1=[5.6344 11.2687];
Ck2=[8 16];
Ck3=[7.3786 14.7573];


A111=-0.515;
A121=0.15;
A211=0.0485;
A221=1.015;

A112=0.205;
A122=-0.05;
A212=1.9905;
A222=0.295;

A113=1.01;
A123=-0.1;
A213=4.096;
A223=0.04;

B11=0.1;
B21=0.41;
B12=0.1;
B22=0.41;
B13=0.1;
B23=0.41;


D11=0.1;
D12=0.1;
D13=0.1;
D21=0.41;
D22=0.41;
D23=0.41;


G1=0.2439;
G2=0.2439;
G3=0.2439;

F1=3.7367;
F2=3.7366;
F3=3.7365;



alph1=0.35;
alph2=0.25;
alph3=0.4;




x0=[1;2];
x(:1)=x0;
xhat(:1)=x0;
fhat(:1)=0;
z1(:1)=0;
zhat1(:1)=0;

dt=0.01;
t=10;

for k=1:t/dt
    
    
    if k<1/dt
        f(:k)=0;
    else
        f(:k)=2*sin(0.5*k*dt)+3;
    end
    
    
    %w(:k)=0;
   %w(:k)=-0.1*sin(k*dt);
   w(:k)=1/(1+(k*dt)*(k*dt));
    
    u(:k)=alph1*Ck1*xhat(:k)+alph2*Ck2*xhat(:k)+alph3*Ck3*xhat(:k)-fhat(:k);
    
    x(:k+1)=alph1*(A1*x(:k)+B1*(u(:k)+f(:k))+D1*w(:k))+alph2*(A2*x(:k)+B2*(u(:k)+f(:k))+D2*w(:k))+alph3*(A3*x(:k)+B3*(u(:k)+f(:k))+D3*w(:k));
    y(:k)=alph1*C11*x(:k)+alph2*C12*x(:k)+alph3*C13*x(:k);
    zw(:k)=alph1*C21*x(:k)+alph2*C22*x(:k)+alph3*C23*x(:k);
    
    
    
    xhat(:k+1)=alph1*Ak1*xhat(:k)+alph2*Ak2*xhat(:k)+alph3*Ak3*xhat(:k)+alph1*Bk1*y(:k)+alph2*Bk2*y(:k)+alph3*Bk3*y(:k);
    
    
    eta(:k)=(alph1*A121+alph2*A122+alph3*A123)*y(:k)+(alph1*B11+alph2*B12+alph3*B13)*u(:k);
    
    z1(:k+1)=(alph1*A111+alph2*A112+alph3*A113)*z1(:k)+eta(:k)+(alph1*B11+alph2*B12+alph3*B13)*f(:k)+(alph1*D11+alph2*D12+alph3*D13)*w(:k);
    
    
    
    
    rou(:k)=(alph1*A211+alph2*A212+alph3*A213)*z1(:k)+(alph1*B21+alph2*B22+alph3*B23)*f(:k)+(alph1*D21+alph2*D22+alph3*D23)*w(:k);
    
    rouhat(:k)=(alph1*A211+alph2*A212+alph3*A213)*zhat1(:k)+(alph1*B21+alph2*B22+alph3*B23)*fhat(:k);
    zhat1(:k+1)=(alph1*A111+alph2*A112+alph3*A113)*zhat1(:k)+eta(:k)+(alph1*B11+alph2*B12+alph3*B13)*fhat(:k)-(alph1*G1+alph2*G2+alph3*G3)*(rouhat(:

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        3456  2018-05-15 15:33  saexample1.m
     文件        3301  2018-05-14 11:14  saexample1_unfault.m
     文件        3527  2018-05-14 11:14  saexample2.m

评论

共有 条评论