马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
本帖最后由 ChaChing 于 2010-9-4 22:39 编辑
请问,
这个程序运行为什么错无
这个是五层框架结构用基于LMI的多目标控制法进行 振动控制(两个作动器)
fclose all; clc; clear; clf; load elcentro
force = e(2:2,1:1600);
% ------ 3-storey building with generalized predictive control----------------
M = diag([30 30 30 30 30])*6; K = zeros(5);
k = 2.0e3/0.4^3; k = k*4; k = [k k k k k 0];
for i=1:5, K(i,i) = k(i)+k(i+1); end
K(1,2) = -k(2); K(2,1) = -k(2); K(2,3) = -k(3); K(3,2) = -k(3);
K(3,4)=-k(4); K(4,3)=-k(4); K(4,5)=-k(5); K(5,4)=-k(5);
% ******* measuring frequencies(Hz): 5.3846 20.0697 34.2654 **********
[V1,D1]=eig(K,M); eigen=sqrt(D1)/(2*pi);
% **** damping ratio is 0.02 ,, determining damping matrix
C1 = sqrt(D1)*2*0.02; C = M*V1*C1*inv(V1);
% ******* state equations **************************************
AA = zeros(10);
AA(1:5,6:10) = eye(5); AA(6:10,1:5) = -inv(M)*K; AA(6:10,6:10) = -inv(M)*C;
BB1 = [1 0; 0 1; 0 0;0 0;0 0]; % control force
BB = zeros(10,2); BB(6:10,:) = inv(M)*BB1;
E = [0;0;0;0;0;-1;-1;-1;-1;-1]; % earthquake action
H = zeros(1,10);H(1,6)=1% output matrix
Cz=H*AA;Dz=H*BB;Ez=H*E;
Cs=zeros(2,10);Ds=eye(2);Es=zeros(2,1);
r1=4000; epsil=2e5; epsi2=8e4; beta2=23.3814;
% decentralized control force
setlmis([])
[r,n,sx1]=lmivar(1,[1,1]);
[Q,n,sx1]=lmivar(1,[1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0]);
[Y1,n,sy1]=lmivar(2,[1 2]);
[Y2,n,sy2]=lmivar(2,[1 3]);
[Y,n,sx2]=lmivar(3,[sy1,zeros(1,8);sy2,zeros(1,7)]);
%present the inequality
BR11=newlmi;
lmiterm([1 1 1 Q],AA,1,'s');
lmiterm([1 1 1 Y],BB,1,'s');
lmiterm([1 1 2 0],E);
lmiterm([1 2 2 0],-1);
%*****b1
BR12=newlmi;
lmiterm([-1 1 1 Q],1,1);
lmiterm([-1 1 2 Q],1,Cz(1:1,:)');
lmiterm([-1 1 2 -Y],1,Dz(1:1,:)');
lmiterm([-1 2 2 r],1/(beta2)^2,1);
%******c1
BR13=newlmi;
lmiterm([-1 1 1 Q],1,1);
lmiterm([-1 1 2 Q],1,Cs(1:1,:)');
lmiterm([-1 1 2 -Y],1,Ds(1:1,:)');
lmiterm([-1 2 2 0],(r1*epsil/beta2)^2);
%******c2
BR14=newlmi;
lmiterm([-1 1 1 Q],1,1);
lmiterm([-1 1 2 Q],1,Cs(2:2,:)');
lmiterm([-1 1 2 -Y],1,Ds(2:2,:)');
lmiterm([-1 2 2 0],(r1*epsi2/beta2)^2);
limsys1=getlmis;
lminbr(limsys1);
matnbr(limsys1);
c=zeros(16,1);
c(1,1)=1;
[copt,xpot]=mincx(limsys1,c)
xf1=dec2mat(limsys1,xpot,r) |