%plot ua K1 K2条件下都一样 figure (1) plot(ua_K1(:,1),ua_K1(:,2),'--r','linewidth',2.5) hold on plot(ua_K1(:,1),ua_K1(:,3),'-g','linewidth',2.5) hold on plot(ua_K1(:,1),ua_K1(:,4),':b','linewidth',2.5) hold on plot(ua_K1(:,1),ua_K1(:,5),'--g','linewidth',2.5) hold on plot(ua_K1(:,1),ua_K1(:,6),'-.b','linewidth',2.5) hold on plot(ua_K1(:,1),ua_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$u_{a1}(t)$$','$$u_{a2}(t)$$','$$u_{a3}(t)$$','$$u_{a4}(t)$$','$$u_{a5}(t)$$','$$u_{a6}(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('$u_a(t)$','fontsize',16,'Interpreter','latex') axis([0 10 0 2]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 %ax=gca; %ax.YAxis.Exponent=-2; saveas(gcf,'ua_signal','eps') % [mu,beta,alpha,p,q,r] under v=K1xi without compensation mechanism figure (2) plot(x_without_vc_K1(:,1),x_without_vc_K1(:,2),'--r','linewidth',2.5) hold on plot(x_without_vc_K1(:,1),x_without_vc_K1(:,3),'-.g','linewidth',2.5) hold on plot(x_without_vc_K1(:,1),x_without_vc_K1(:,4),':b','linewidth',2.5) hold on plot(x_without_vc_K1(:,1),x_without_vc_K1(:,5),'--g','linewidth',2.5) hold on plot(x_without_vc_K1(:,1),x_without_vc_K1(:,6),'-.b','linewidth',2.5) hold on plot(x_without_vc_K1(:,1),x_without_vc_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$\mu(t)$$','$$\beta(t)$$','$$\alpha(t)$$','$$p(t)$$','$$q(t)$$','$$r(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('States (deg)','fontsize',16,'Interpreter','latex') axis([0 10 -10 6]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 saveas(gcf,'states_without_vc_K1','eps') grid on % [mu,beta,alpha,p,q,r] under v=K1xi with compensation mechanism figure (4) plot(x_K1(:,1),x_K1(:,2),'--r','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,3),'-.g','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,4),':b','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,5),'--g','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,6),'-.b','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$\mu(t)$$','$$\beta(t)$$','$$\alpha(t)$$','$$p(t)$$','$$q(t)$$','$$r(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('States (deg)','fontsize',16,'Interpreter','latex') axis([0 10 -10 6]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 saveas(gcf,'states_K1','eps') grid on % tilde[mu,beta,alpha,p,q,r] under v=K1xi figure (40) plot(x_n_K1(:,1),x_K1(:,2)-x_n_K1(:,2),'--r','linewidth',2.5) hold on plot(x_n_K1(:,1),x_K1(:,3)-x_n_K1(:,3),'-.g','linewidth',2.5) hold on plot(x_n_K1(:,1),x_K1(:,4)-x_n_K1(:,4),':b','linewidth',2.5) hold on plot(x_n_K1(:,1),x_K1(:,5)-x_n_K1(:,5),'--g','linewidth',2.5) hold on plot(x_n_K1(:,1),x_K1(:,6)-x_n_K1(:,6),'-.b','linewidth',2.5) hold on plot(x_n_K1(:,1),x_K1(:,7)-x_n_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$\tilde{\mu}(t)$$','$$\tilde{\beta}(t)$$','$$\tilde{\alpha}(t)$$','$$\tilde{p}(t)$$','$$\tilde{q}(t)$$','$$\tilde{r}(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('State deviation (deg)','fontsize',16,'Interpreter','latex') axis([0 10 -2e-4 2e-4]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 saveas(gcf,'state_deviation_K1','eps') grid on % uc under v=K1xi with compensation mechanism figure (60) plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,2),'--r','linewidth',2.5) hold on plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,3),'-.g','linewidth',2.5) hold on plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,4),':b','linewidth',2.5) hold on plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,5),'--g','linewidth',2.5) hold on plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,6),'-.b','linewidth',2.5) hold on plot(uc_with_vc_K1(:,1),uc_with_vc_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$u_{c1}(t)$$','$$u_{c2}(t)$$','$$u_{c3}(t)$$','$$u_{c4}(t)$$','$$u_{c5}(t)$$','$$u_{c6}(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('$u_c$','fontsize',16,'Interpreter','latex') axis([0 10 -3 1]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 saveas(gcf,'uc_with_vc_K1','eps') grid on % %%%暂时不用 % %%% % %%% % % [mu,beta,alpha,p,q,r] under v=K2xi without compensation mechanism % figure (3) % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,2),'--r','linewidth',2.5) % hold on % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,3),'-.g','linewidth',2.5) % hold on % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,4),':b','linewidth',2.5) % hold on % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,5),'--g','linewidth',2.5) % hold on % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,6),'-.b','linewidth',2.5) % hold on % plot(x_without_vc_K2(:,1),x_without_vc_K2(:,7),':r','linewidth',2.5) % hold off % h=legend('$$\mu(t)$$','$$\beta(t)$$','$$\alpha(t)$$','$$p(t)$$','$$q(t)$$','$$r(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('States (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -10 15]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'states_without_vc_K2','eps') % grid on % % % [mu,beta,alpha,p,q,r] under v=K2xi with compensation mechanism % figure (5) % plot(x_K2(:,1),x_K2(:,2),'--r','linewidth',2.5) % hold on % plot(x_K2(:,1),x_K2(:,3),'-.g','linewidth',2.5) % hold on % plot(x_K2(:,1),x_K2(:,4),':b','linewidth',2.5) % hold on % plot(x_K2(:,1),x_K2(:,5),'--g','linewidth',2.5) % hold on % plot(x_K2(:,1),x_K2(:,6),'-.b','linewidth',2.5) % hold on % plot(x_K2(:,1),x_K2(:,7),':r','linewidth',2.5) % hold off % h=legend('$$\mu(t)$$','$$\beta(t)$$','$$\alpha(t)$$','$$p(t)$$','$$q(t)$$','$$r(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('States (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -10 15]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'states_K2','eps') % grid on % % % uc under v=K1xi without compensation mechanism % figure (6) % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,2),'--r','linewidth',2.5) % hold on % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,3),'-.g','linewidth',2.5) % hold on % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,4),':b','linewidth',2.5) % hold on % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,5),'--g','linewidth',2.5) % hold on % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,6),'-.b','linewidth',2.5) % hold on % plot(uc_without_vc_K1(:,1),uc_without_vc_K1(:,7),':r','linewidth',2.5) % hold off % h=legend('$$u_{c1}(t)$$','$$u_{c2}(t)$$','$$u_{c3}(t)$$','$$u_{c4}(t)$$','$$u_{c5}(t)$$','$$u_{c6}(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('$u_c$ (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -10 15]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'uc_without_vc_K1','eps') % grid on % % % uc under v=K2xi without compensation mechanism % figure (7) % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,2),'--r','linewidth',2.5) % hold on % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,3),'-.g','linewidth',2.5) % hold on % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,4),':b','linewidth',2.5) % hold on % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,5),'--g','linewidth',2.5) % hold on % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,6),'-.b','linewidth',2.5) % hold on % plot(uc_without_vc_K2(:,1),uc_without_vc_K2(:,7),':r','linewidth',2.5) % hold off % h=legend('$$u_{c1}(t)$$','$$u_{c2}(t)$$','$$u_{c3}(t)$$','$$u_{c4}(t)$$','$$u_{c5}(t)$$','$$u_{c6}(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('$u_c$ (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -10 15]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'uc_without_vc_K2','eps') % grid on % % % un under v=K1xi without compensation mechanism % figure (8) % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,2),'--r','linewidth',2.5) % hold on % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,3),'-.g','linewidth',2.5) % hold on % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,4),':b','linewidth',2.5) % hold on % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,5),'--g','linewidth',2.5) % hold on % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,6),'-.b','linewidth',2.5) % hold on % plot(un_without_vc_K1(:,1),un_without_vc_K1(:,7),':r','linewidth',2.5) % hold off % h=legend('$$u_{n1}(t)$$','$$u_{n2}(t)$$','$$u_{n3}(t)$$','$$u_{n4}(t)$$','$$u_{n5}(t)$$','$$u_{n6}(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('$u_n$ (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -60 70]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'un_without_vc_K1','eps') % grid on % % % un under v=K2xi without compensation mechanism % figure (9) % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,2),'--r','linewidth',2.5) % hold on % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,3),'-.g','linewidth',2.5) % hold on % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,4),':b','linewidth',2.5) % hold on % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,5),'--g','linewidth',2.5) % hold on % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,6),'-.b','linewidth',2.5) % hold on % plot(un_without_vc_K2(:,1),un_without_vc_K2(:,7),':r','linewidth',2.5) % hold off % h=legend('$$u_{n1}(t)$$','$$u_{n2}(t)$$','$$u_{n3}(t)$$','$$u_{n4}(t)$$','$$u_{n5}(t)$$','$$u_{n6}(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('$u_n$ (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -50 50]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'un_without_vc_K2','eps') % grid on % % un under v=K1xi with compensation mechanism %比较期望输入 subplot(1,2,1) plot(u_n_K1(:,1),u_n_K1(:,2),'--r','linewidth',2.5) hold on plot(u_n_K1(:,1),u_n_K1(:,3),'-.g','linewidth',2.5) hold on plot(u_n_K1(:,1),u_n_K1(:,4),':b','linewidth',2.5) hold on plot(u_n_K1(:,1),u_n_K1(:,5),'--g','linewidth',2.5) hold on plot(u_n_K1(:,1),u_n_K1(:,6),'-.b','linewidth',2.5) hold on plot(u_n_K1(:,1),u_n_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$u_{dn1}(t)$$','$$u_{dn2}(t)$$','$$u_{dn3}(t)$$','$$u_{dn4}(t)$$','$$u_{dn5}(t)$$','$$u_{dn6}(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('$u_{dn}$','fontsize',16,'Interpreter','latex') axis([0 10 -60 70]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 grid on subplot(1,2,2) plot(un_with_vc_K1(:,1),un_with_vc_K1(:,2),'--r','linewidth',2.5) hold on plot(un_with_vc_K1(:,1),un_with_vc_K1(:,3),'-.g','linewidth',2.5) hold on plot(un_with_vc_K1(:,1),un_with_vc_K1(:,4),':b','linewidth',2.5) hold on plot(un_with_vc_K1(:,1),un_with_vc_K1(:,5),'--g','linewidth',2.5) hold on plot(un_with_vc_K1(:,1),un_with_vc_K1(:,6),'-.b','linewidth',2.5) hold on plot(un_with_vc_K1(:,1),un_with_vc_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$u_{d1}(t)$$','$$u_{d2}(t)$$','$$u_{d3}(t)$$','$$u_{d4}(t)$$','$$u_{d5}(t)$$','$$u_{d6}(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('$u_d$','fontsize',16,'Interpreter','latex') axis([0 10 -60 70]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 grid on saveas(gcf,'udn_ud_K1','eps') %比较输出 subplot(1,2,1) plot(x_n_K1(:,1),x_n_K1(:,2),'--r','linewidth',2.5) hold on plot(x_n_K1(:,1),x_n_K1(:,3),'-.g','linewidth',2.5) hold on plot(x_n_K1(:,1),x_n_K1(:,4),':b','linewidth',2.5) hold on plot(x_n_K1(:,1),x_n_K1(:,5),'--g','linewidth',2.5) hold on plot(x_n_K1(:,1),x_n_K1(:,6),'-.b','linewidth',2.5) hold on plot(x_n_K1(:,1),x_n_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$\mu_n(t)$$','$$\beta_n(t)$$','$$\alpha_n(t)$$','$$p_n(t)$$','$$q_n(t)$$','$$r_n(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('States in the nominal system (deg)','fontsize',16,'Interpreter','latex') axis([0 10 -10 6]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 grid on subplot(1,2,2) plot(x_K1(:,1),x_K1(:,2),'--r','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,3),'-.g','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,4),':b','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,5),'--g','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,6),'-.b','linewidth',2.5) hold on plot(x_K1(:,1),x_K1(:,7),':r','linewidth',2.5) hold off h=legend('$$\mu(t)$$','$$\beta(t)$$','$$\alpha(t)$$','$$p(t)$$','$$q(t)$$','$$r(t)$$'); set(h,'fontsize',16,'Interpreter','latex') xlabel('$t/s$','fontsize',16,'Interpreter','latex') ylabel('States in the actual system (deg)','fontsize',16,'Interpreter','latex') axis([0 10 -10 6]) set(gca,'FontSize',12) %是设置刻度字体大小 set(gca,'LineWidth',2) %是设置刻度字体大小 grid on saveas(gcf,'xdn_xd_K1','eps') % % % un under v=K2xi with compensation mechanism % figure (11) % plot(u_n_K2(:,1),u_n_K2(:,2),'--r','linewidth',2.5) % hold on % plot(u_n_K2(:,1),u_n_K2(:,3),'-.g','linewidth',2.5) % hold on % plot(u_n_K2(:,1),u_n_K2(:,4),':b','linewidth',2.5) % hold on % plot(u_n_K2(:,1),u_n_K2(:,5),'--g','linewidth',2.5) % hold on % plot(u_n_K2(:,1),u_n_K2(:,6),'-.b','linewidth',2.5) % hold on % plot(u_n_K2(:,1),u_n_K2(:,7),':r','linewidth',2.5) % hold off % h=legend('$$u_{n1}(t)$$','$$u_{n2}(t)$$','$$u_{n3}(t)$$','$$u_{n4}(t)$$','$$u_{n5}(t)$$','$$u_{n6}(t)$$'); % set(h,'fontsize',16,'Interpreter','latex') % xlabel('$t/s$','fontsize',16,'Interpreter','latex') % ylabel('$u_n$ (deg)','fontsize',16,'Interpreter','latex') % axis([0 15 -20 30]) % set(gca,'FontSize',12) %是设置刻度字体大小 % set(gca,'LineWidth',2) %是设置刻度字体大小 % saveas(gcf,'u_n_K2','eps') % grid on