MATLAB |
%ymcpb_ana
%-----
clear all, close all
dataset=[...
"ABC_No1_20220128",...
"ABC_No2_20220131",...
"ABC_No3_20220128",...
"ABC_No4_20220131",...
"ABC_No5_20220131"];
no=1
load(dataset(no))
ID=[8,9,10,11,12,13,14,...
36,37,38,39,40,41,42,43,...
66,67,68,69,70,71,72,73,...
97,98,99,100,101,102,103,...
126,127,128,129,130,131,132,133];
id=1:length(ID);
%-----
figure(1)
subplot(321),plot(run_eq_Series,"o-"), hold on
subplot(321),plot(ID,run_eq_Series(ID),"or"),title("No"+num2str(no)+": "+"run")
subplot(323),plot(No_eq_Series,"o-"), hold on
subplot(323),plot(ID,No_eq_Series(ID),"or"),title("No"+num2str(no)+": "+"no")
subplot(325),plot(dx_eq_Series*3.6,"o-"), hold on
subplot(325),plot(ID,dx_eq_Series(ID)*3.6,"or"),title("No"+num2str(no)+": "+"dxs")
subplot(322),plot(z_eq_Series*100,"o-"), hold on
subplot(322),plot(ID,z_eq_Series(ID)*100,"or"),title("No"+num2str(no)+": "+"zs")
subplot(324),plot(th_eq_Series/pi*180,"o-"), hold on
subplot(324),plot(ID,th_eq_Series(ID)/pi*180,"or"),title("No"+num2str(no)+": "+"ths")
subplot(326),plot(the_eq_Series/pi*180,"o-"), hold on
subplot(326),plot(ID,the_eq_Series(ID)/pi*180,"or"),title("No"+num2str(no)+": "+"thes")
%-----
figure(2)
for i=id, a41(i)=A0(4,1,ID(i)); end
subplot(331),plot(id,a41,"o-",33,a41(33),"*r"),title("No"+num2str(no)+": "+"a41")
for i=id, a42(i)=A0(4,2,ID(i)); end
subplot(332),plot(id,a42,"o-",33,a42(33),"*r"),title("No"+num2str(no)+": "+"a42")
for i=id, a43(i)=A0(4,3,ID(i)); end
subplot(333),plot(id,a43,"o-",33,a43(33),"*r"),title("No"+num2str(no)+": "+"a43")
for i=id, a51(i)=A0(5,1,ID(i)); end
subplot(334),plot(id,a51,"o-",33,a51(33),"*r"),title("No"+num2str(no)+": "+"a51")
for i=id, a52(i)=A0(5,2,ID(i)); end
subplot(335),plot(id,a52,"o-",33,a52(33),"*r"),title("No"+num2str(no)+": "+"a52")
for i=id, a53(i)=A0(5,3,ID(i)); end
subplot(336),plot(id,a53,"o-",33,a53(33),"*r"),title("No"+num2str(no)+": "+"a53")
for i=id, a61(i)=A0(6,1,ID(i)); end
subplot(337),plot(id,a61,"o-",33,a61(33),"*r"),title("No"+num2str(no)+": "+"a61")
for i=id, a62(i)=A0(6,2,ID(i)); end
subplot(338),plot(id,a62,"o-",33,a62(33),"*r"),title("No"+num2str(no)+": "+"a62")
for i=id, a63(i)=A0(6,3,ID(i)); end
subplot(339),plot(id,a63,"o-",33,a63(33),"*r"),title("No"+num2str(no)+": "+"a63")
%-----
figure(3)
for i=id, a44(i)=A0(4,4,ID(i)); end
subplot(331),plot(id,a44,"o-",33,a44(33),"*r"),title("No"+num2str(no)+": "+"a44")
for i=id, a45(i)=A0(4,5,ID(i)); end
subplot(332),plot(id,a45,"o-",33,a45(33),"*r"),title("No"+num2str(no)+": "+"a45")
for i=id, a46(i)=A0(4,6,ID(i)); end
subplot(333),plot(id,a46,"o-",33,a46(33),"*r"),title("No"+num2str(no)+": "+"a46")
for i=id, a54(i)=A0(5,4,ID(i)); end
subplot(334),plot(id,a54,"o-",33,a54(33),"*r"),title("No"+num2str(no)+": "+"a54")
for i=id, a55(i)=A0(5,5,ID(i)); end
subplot(335),plot(id,a55,"o-",33,a55(33),"*r"),title("No"+num2str(no)+": "+"a55")
for i=id, a56(i)=A0(5,6,ID(i)); end, axis([0 40 -1 1])
subplot(336),plot(id,a56,"o-",33,a56(33),"*r"),title("No"+num2str(no)+": "+"a56")
for i=id, a64(i)=A0(6,4,ID(i)); end, axis([0 40 -1 1])
subplot(337),plot(id,a64,"o-",33,a64(33),"*r"),title("No"+num2str(no)+": "+"a64")
for i=id, a65(i)=A0(6,5,ID(i)); end, axis([0 40 -1 1])
subplot(338),plot(id,a65,"o-",33,a65(33),"*r"),title("No"+num2str(no)+": "+"a65")
for i=id, a66(i)=A0(6,6,ID(i)); end
subplot(339),plot(id,a66,"o-",33,a66(33),"*r"),title("No"+num2str(no)+": "+"a66")
%-----
figure(4)
for i=id, b41(i)=B0(4,1,ID(i)); end
subplot(321),plot(id,b41,"o-",33,b41(33),"*r"),title("No"+num2str(no)+": "+"b41")
for i=id, b42(i)=B0(4,2,ID(i)); end
subplot(322),plot(id,b42,"o-",33,b42(33),"*r"),title("No"+num2str(no)+": "+"b42")
for i=id, b51(i)=B0(5,1,ID(i)); end
subplot(323),plot(id,b51,"o-",33,b51(33),"*r"),title("No"+num2str(no)+": "+"b51")
for i=id, b52(i)=B0(5,2,ID(i)); end
subplot(324),plot(id,b52,"o-",33,b52(33),"*r"),title("No"+num2str(no)+": "+"b52")
for i=id, b61(i)=B0(6,1,ID(i)); end
subplot(325),plot(id,b61,"o-",33,b61(33),"*r"),title("No"+num2str(no)+": "+"b61")
for i=id, b62(i)=B0(6,2,ID(i)); end
subplot(326),plot(id,b62,"o-",33,b62(33),"*r"),title("No"+num2str(no)+": "+"b62")
%-----6次元モデル
%(1)x,(2)z,(3)th,(4)dx-V*,(5)dz,(6)dth
sys=ss(A0(:,:,ID),B0(:,:,ID),eye(6,6),[]);
figure(5),pzmap(sys),axis([-10,10,-10,10])
title("No"+num2str(no)+": "+"k=ID"),hold on
figure(5),pzmap(sys(:,:,33),"*r")
%-----5次元モデル
%(1)z,(2)th,(3)dz,(4)dth,(5)the
k=[2,3,5,6]; i=[2,4,5]; j=[2];
for id=ID
A(:,:,id)=[A0(k,k,id) B0(k,j,id);zeros(1,5)];
end
B=[zeros(4,1);0.0380*3];
C=eye(5,5);
C=C(i,:);
sys5=ss(A(:,:,ID),B,C,[]);
figure(6),pzmap(sys5),axis([-10,10,-10,10])
title("No"+num2str(no)+": "+"k=ID"),hold on
figure(6),pzmap(sys5(:,:,33),"*r")
%-----3次元モデル
%(1)th,(2)dth,(3)the
k=[3,6]; j=[2];
for id=ID
AA(:,:,id)=[A0(k,k,id) B0(k,j,id);zeros(1,3)];
end
B=[zeros(2,1);0.0380*3];
C=eye(3,3);
sys3=ss(AA(:,:,ID),B,C,[]);
figure(7),pzmap(sys3),axis([-10,10,-10,10])
title("No"+num2str(no)+": "+"k=ID"),hold on
figure(7),pzmap(sys3(:,:,33),"*r")
%-----設計ポイント id=128,ID=33
[Asys,Bsys]=ssdata(sys(:,:,33))
[Asys5,Bsys5,Csys5]=ssdata(sys5(:,:,33))
[Asys3,Bsys3,Csys3]=ssdata(sys3(:,:,33))
pl=pole(sys(:,:,33))
pl5=pole(sys5(:,:,33))
pl3=pole(sys3(:,:,33))
%-----可制御性
w=zeros(5,1);
for i=1:5
S=[Bsys5 Asys5-pl5(i)*eye(5,5)];
w(i)=min(svd(S));
end
C0=[pl5 w]
%-----可観測性
w=zeros(5,1);
for i=1:5
S=[Csys5; Asys5-pl5(i)*eye(5,5)];
w(i)=min(svd(S));
end
OB=[pl5 w]
%-----伝達特性
%(1)x,(2)z,(3)th,(4)dx-V*,(5)dz,(6)dth
figure(11),hold on
sigma(sys(:,2,33),logspace(0,2))
title("No"+num2str(no)+": "+"sys(:,2,33)")
%-----
%(2)z,(5)dz
figure(12),hold on
sigma(sys([2,5],2,33),logspace(0,2))
title("No"+num2str(no)+": "+"sys([2,5],2,33)")
%-----
%(3)th,(6)dth
figure(13),hold on
sigma(sys([3,6],2,33),logspace(0,2))
title("No"+num2str(no)+": "+"sys([3,6],2,33)")
%-----
%eof
|