Курсовая работа: Колонна для перегона коньячного спирта
subplot(2,2,1);plot(y(:,1));grid;ylabel('u1,МПа');title('Razgon u1,1%');
subplot(2,2,3);plot(y(:,2));grid;ylabel('u2,');
%u2
y=dstep(Ad,Bd,C,D,2,G);
subplot(2,2,2);plot(y(:,1));grid;ylabel('y1,М3/с');title('Razgon u2,1%');
subplot(2,2,4);plot(y(:,2));grid;ylabel('y2,кг/с');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A1=[Ad zeros(14,2);C eye(2)];
B1=[Bd; zeros(2)];
C1=[zeros(2,14) eye(2)];
Q2=1e6*[1 0;0 1];
V=C'*Q2*C;
Q=[V zeros(14,2);zeros(2,14) eye(2)];
R=eye(2);
Q1=eye(16);
R1=eye(2);
K=dlqr(A1,B1,Q,R);
L=dlqr(A1',C1',Q1,R1)';
K1=K(:,1:14);
K2=K(:,15:16);
L1=L(1:14,:);
L2=L(15:16,:);
Ar=[Ad-Bd*K1 -Bd*K2-L1 L1; C eye(2)-L2 L2; zeros(2,14) zeros(2) eye(2)];
Br=[zeros(14,2); zeros(2); eye(2)];
Cr=[-K zeros(2)];
Az=[Ad Bd*Cr; Br*C Ar];
Bf=[Bd; zeros(18,2)];
Bz=[zeros(14,2); Br];
Cz=[C zeros(2,18)];