mto419 发表于 2010-8-13 17:27

请教matlab在控制中的问题

本帖最后由 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()*6; K = zeros(5);
k = 2.0e3/0.4^3;k = k*4; k = ;
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 **********
=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 = ; % control force
BB = zeros(10,2); BB(6:10,:) = inv(M)*BB1;
E = ;% 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([])
=lmivar(1,);
=lmivar(1,);
=lmivar(2,);
=lmivar(2,);
=lmivar(3,);
%present the inequality
BR11=newlmi;
lmiterm(,AA,1,'s');
lmiterm(,BB,1,'s');
lmiterm(,E);
lmiterm(,-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;
=mincx(limsys1,c)
xf1=dec2mat(limsys1,xpot,r)

mto419 发表于 2010-8-18 00:57

回复 楼主 mto419 的帖子

怎么没人理啊
please   any help

curb 发表于 2010-8-20 11:09

没提供数据,没法看

mto419 发表于 2010-9-3 18:48

回复 curb 的帖子
数据不都有了啊


   

ChaChing 发表于 2010-9-4 00:43

回复
数据不都有了啊
mto419 发表于 2010-9-3 18:48 static/image/common/back.gif
load elcentro ???

ChaChing 发表于 2010-9-5 00:21

刚详看一下LZ的程序, 才明白load elcentro;force = e(2:2,1:1600);好像没用到!? 楼主没说清楚呀

而且出错提示为
>> xf1=dec2mat(limsys1,xpot,r)
??? Error using ==> dec2mat at 31
DECVARS must be a vector of length 16

这些函数没用过, 懒得看help, 就帮LZ说清楚些, 待高人路过
页: [1]
查看完整版本: 请教matlab在控制中的问题