Example

% dissipative controller design for 2D truss, % 2 inputs and 2 outputs clear %

% mass and stiffness matrices of the 2D truss (see Appendix C):

% inputs: bo=zeros(16,l); bo(16,l)=l; bo(5,2) = l; bo=inv(m)*bo;

dampo=inv(m)*damp;

% state-space representation: a=[zeros(nd,nd) eye(nd); -ko -dampo];

% state-space modal representation: [va2,ad,bd, cd]=balmod2 (a,b,c) ; gaml=lyap(ad,bd(:, l)*bd(:, 1)'); gam2=lyap(ad,bd (:, 2)*bd(:, 2)');

gaml=diag(gaml) ; gam2=diag(gam2); G-2*[garni gam2];

% set values d_beta: db=zeros(2*nd,l); db(ii(l,l), 1)=59; db(ii(2,l), 1)=59; db(ii(l,2), 1)=59; db(ii(2,2), 1)=59;

% solve equation (10. 23): k=pinv(G)*db; % gains: k=diag(k);

% closed-loop system:

% open-loop poles:

% natural frequencies: omo=abs(imag(l));

% plot relative shift: subplot (211) bar(omo,beta);

xlabel('natural frequency, rad/s') ylabel('\beta')

yo=impulse (ad,bd,cd,zeros(2,2),l,t); yc=impulse (ac,bc,cc,zeros(2,2),l,t); subplot (212)

axis([0 .5 -20 20]) xlabel('time, s') ylabel('impulse response')

0 0

Post a comment